/* ==========================================================================
   The Classic Inn of Memphis — static site stylesheet
   Rebuilt from the WordPress (Astra + Elementor) design by ONNA Web Design.
   ========================================================================== */

/* ---------- Fonts (self-hosted variable woff2, latin subset) ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/noto-sans-latin.woff2') format('woff2');
}

/* ---------- Design tokens (from the original Astra global colors) ---------- */
:root {
  --indigo: #3d4288;        /* global color 0 — header, footer */
  --indigo-mid: #4d53a8;    /* global color 1 — buttons */
  --periwinkle: #5f66cd;    /* global color 2 — links, button hover */
  --butter: #e3e08f;        /* global color 3 — phone button */
  --text: #353437;          /* global color 4 */
  --heading: #2b2a33;       /* global color 5 */
  --white: #ffffff;
  --container: 1160px;      /* 1120px content + 2 × 20px gutters */
  --header-container: 1340px;
  --gutter: 20px;
  --font-body: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--periwinkle); text-underline-offset: 2px; }
a:hover, a:focus { color: var(--indigo); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 20px;
  line-height: 1.25;
}
h1, .size-h1 { font-size: 4rem; }        /* 64px */
h2, .size-h2 { font-size: 2.6rem; }      /* ~42px */
h3, .size-h3 { font-size: 2.1rem; }      /* ~34px */
h4, .size-h4 { font-size: 1.75rem; }     /* ~26px */

:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }
.site-header :focus-visible, .page-hero :focus-visible, .site-footer :focus-visible { outline-color: var(--butter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 10px; top: -60px; z-index: 1000;
  background: var(--white); color: var(--heading);
  padding: 10px 16px; font-weight: 700; text-decoration: none; border-radius: 3px;
}
.skip-link:focus { top: 10px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  color: var(--white);
  background: var(--indigo-mid);
  border: 0;
  padding: 12px 24px;
  transition: background-color .2s;
}
.btn:hover, .btn:focus { color: var(--white); background: var(--periwinkle); }

/* ==========================================================================
   Header (sticky, like the original)
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--indigo);
  color: var(--white);
}
.site-header .container { max-width: var(--header-container); display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 20px; }
.site-logo { display: block; flex-shrink: 0; }
.site-logo img { width: 300px; height: auto; }

.primary-nav { display: flex; align-items: center; gap: 24px; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.menu > li { position: relative; }
.menu a, .submenu-toggle {
  font-family: var(--font-body); font-size: 0.9375rem;
  color: var(--white); text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.menu > li > a, .submenu-toggle { display: flex; align-items: center; gap: 6px; padding: 0 15px; line-height: 5.25rem; }
.menu > li > a:hover, .submenu-toggle:hover { color: rgba(255,255,255,.85); }
.menu a[aria-current="page"], .menu > li.is-current > .submenu-toggle { color: rgba(255,255,255,.75); text-decoration: underline; text-underline-offset: 6px; }
.submenu-toggle svg { width: 10px; height: 8px; transition: transform .2s; }
.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.submenu {
  list-style: none; margin: 0; padding: 0;
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--periwinkle);
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
  display: none;
}
.submenu a { display: block; padding: 12px 20px; }
.submenu a:hover, .submenu a:focus { background: var(--indigo); color: var(--white); }
.submenu a[aria-current="page"] { background: var(--indigo-mid); text-decoration: none; color: var(--white); }
@media (hover: hover) and (min-width: 922px) {
  .menu > li:hover > .submenu { display: block; }
}
.submenu-toggle[aria-expanded="true"] + .submenu { display: block; }

.header-phone {
  display: inline-block; text-decoration: none;
  background: var(--butter); color: var(--text);
  padding: 10px 20px; font-size: 0.9375rem; line-height: 1;
}
.header-phone:hover, .header-phone:focus { background: #a6abe9; color: var(--text); }

.nav-toggle { display: none; background: transparent; border: 0; width: 44px; height: 44px; padding: 12px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: #fff; position: relative; transition: transform .2s, background-color .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 921px) {
  .site-header .container { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .primary-nav {
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    margin: 0 calc(var(--gutter) * -1);
    width: calc(100% + var(--gutter) * 2);
    background: var(--indigo);
    border-top: 1px solid rgba(255,255,255,.15);
    /* A tall expanded menu scrolls inside itself (important in landscape) */
    max-height: calc(100vh - 84px);
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
  }
  .primary-nav.is-open { display: flex; }
  .menu { flex-direction: column; align-items: stretch; }
  .menu > li > a, .submenu-toggle { line-height: 1.4; padding: 14px 25px; width: 100%; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.12); }
  .submenu { position: static; box-shadow: none; background: var(--indigo-mid); }
  .submenu a { padding-left: 40px; }
  .header-phone { margin: 16px 25px 20px; text-align: center; }
}
@media (max-width: 544px) {
  .site-logo img { width: 230px; }
}

/* ==========================================================================
   Heroes — photo is an absolutely-positioned layer behind the content, so the
   band grows with its text instead of clipping a long, wrapped title.
   ========================================================================== */
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ''; position: absolute; inset: 0; }

.home-hero { position: relative; isolation: isolate; min-height: 600px; }
.home-hero .hero-media img { object-position: bottom center; }

.page-hero {
  position: relative; isolation: isolate;
  padding: 8% 0;
  text-align: center;
}
.page-hero .hero-media::after { background: rgba(0, 0, 0, 0.68); }
.page-hero h1 { color: var(--white); margin: 0; font-size: 4.2rem; line-height: 1.2; }

@media (max-width: 1024px) {
  .home-hero { min-height: 420px; }
  h1, .size-h1 { font-size: 3.25rem; }
  .page-hero h1 { font-size: 3.4rem; }
}
@media (max-width: 767px) {
  .home-hero { min-height: 400px; }
  .home-hero .hero-media img { object-position: center; }
  h1, .size-h1 { font-size: 2.75rem; }
  h2, .size-h2 { font-size: 2.1rem; }
  h3, .size-h3 { font-size: 1.75rem; }
  h4, .size-h4 { font-size: 1.5rem; }
  .page-hero { padding: 60px 0; }
  .page-hero h1 { font-size: 2.6rem; }
}

/* ==========================================================================
   Sections & layout
   ========================================================================== */
.section { padding: 60px 0; }
.section--flush-top { padding-top: 20px; padding-bottom: 60px; }
.section--end { padding-bottom: 110px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.split--top { align-items: start; }
.split > * { min-width: 0; }
.col-pad { padding: 10px; }

.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; padding: 0 10px; }
.btn-pair .btn { width: 100%; }

.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.row-2-1-1 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; align-items: start; }
.row-2-1-1 img, .row-3 img { width: 100%; }

/* Masonry photo galleries (computed at build time; see build.py) */
.gallery, .gallery ul { list-style: none; margin: 0; padding: 0; }
.gallery { display: flex; gap: 10px; align-items: flex-start; }
.gallery-col { flex: 1 1 0; min-width: 0; }
.gallery-col li { margin-bottom: 10px; }
.gallery a { display: block; }
.gallery a:hover img, .gallery a:focus img { opacity: .88; }
.gallery img { width: 100%; }

/* Attractions directory */
.directory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 30px; margin-bottom: 30px; }
.directory h2 { font-size: 1.75rem; margin-bottom: 18px; }

/* Accessibility statement */
.statement h2 { margin-bottom: 24px; }
.statement h3 { font-size: 1.75rem; margin: 30px 0 14px; }

/* Contact */
.contact-card address { font-style: normal; font-weight: 700; line-height: 1.6; margin-bottom: 1em; }
.contact-lead::first-letter { font-family: var(--font-head); font-size: 1.6em; font-weight: 600; }
.contact-methods { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 16px; }
.contact-methods li { display: flex; gap: 12px; align-items: flex-start; }
.contact-methods svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; fill: var(--indigo-mid); }
.contact-methods strong { display: block; font-family: var(--font-head); font-size: 1.35rem; color: var(--heading); line-height: 1.2; }

@media (max-width: 1024px) {
  .directory { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .section { padding: 30px 0; }
  .split, .row-2-1-1 { grid-template-columns: 1fr; }
  .row-3 { grid-template-columns: 1fr; }
  .split .order-first-mobile { order: -1; }
  .directory { grid-template-columns: 1fr; }
  /* Phones: let the photos flow into two balanced columns */
  .gallery { display: block; column-count: 2; column-gap: 10px; }
  .gallery-col, .gallery-col ul { display: contents; }
  .gallery-col li { break-inside: avoid; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--indigo);
  border-top: 4px solid var(--indigo-mid);
  color: rgba(255,255,255,.75);
  font-size: 0.875rem;
}
.site-footer .container { max-width: var(--header-container); min-height: 120px; padding-top: 30px; padding-bottom: 30px; display: flex; align-items: center; }
.site-footer p { margin: 0; width: 100%; text-align: center; }
.site-footer a { color: var(--white); }
.site-footer a:hover, .site-footer a:focus { color: var(--butter); }
@media (max-width: 921px) {
  .site-footer .container { text-align: center; }
}

/* ==========================================================================
   Lightbox (progressive enhancement for gallery links)
   ========================================================================== */
.lightbox { border: 0; padding: 0; margin: auto; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: transparent; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 50px 60px; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox button { position: absolute; background: rgba(0,0,0,.5); color: #fff; border: 0; width: 48px; height: 48px; font-size: 1.75rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(0,0,0,.85); }
.lightbox .lb-close { top: 10px; right: 10px; }
.lightbox .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: .875rem; }
@media (max-width: 600px) { .lightbox-inner { padding: 60px 8px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 404 ---------- */
.notfound { text-align: center; }
.notfound ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 20px; }
