/* TableHop site base — tokens, type, buttons, nav, footer.
   Shared by every page on gotablehop.com and sales.gotablehop.com (keep the
   two copies identical). Palette and type follow brand/BRAND.md v1.1 ("Hop
   Trail"): dark-mode-first, Night Plum surfaces, Paper text, coral energy,
   gold accents, teal links. See docs/WEB_BRAND_STANDARDS.md.

   Theming: the brand constants (--th-coral, --th-plum, --th-paper, …) never
   change. Component rules use the semantic tokens below (--th-bg, --th-text,
   --th-muted, …), which are dark by default on :root and re-pointed to the
   light palette under :root[data-theme="light"] and, for visitors who never
   touch the toggle, under prefers-color-scheme: light. assets/site/theme.js
   sets data-theme on <html> from localStorage("th-theme"). */

:root {
  /* Brand constants */
  --th-coral:      #FF4D6D; /* Hop Coral — energy, kickers, the mark */
  --th-coral-700:  #E63358; /* Coral 700 — hover / pressed CTA, accents */
  --th-coral-800:  #C9204A; /* CTA fill: Paper text on it is 5.1:1 (Coral 700 is 3.9:1) */
  --th-coral-text: #C8213F; /* Coral Text — small coral text on Paper (5.2:1) */
  --th-gold:       #FFB648; /* Table Gold — badges, highlights (fills only in light mode) */
  --th-teal:       #2BB7A6; /* Dusk Teal — links on dark (7.5:1 on plum) */
  --th-teal-text:  #157A6E; /* Teal Text — links on Paper (4.8:1) */
  --th-plum:       #15101C; /* Night Plum 900 — base surface (dark), text (light) */
  --th-plum-800:   #1F1729; /* Night Plum 800 — elevated cards (dark) */
  --th-plum-700:   #2A2036; /* hover surface / input fill (dark) */
  --th-paper:      #FAF5F2; /* Paper — text on dark; base surface (light) */
  --th-white:      #FFFFFF; /* cards on Paper (light) */
  --th-smoke:      #8A8094; /* Smoke — muted text on dark (5.0:1 on plum, 4.6:1 on plum 800) */
  --th-slate:      #645A6E; /* Slate — muted text on Paper (6.0:1) */
  --th-hairline:   #E6DDD9; /* card hairlines and field borders on Paper */
  --th-trail:      linear-gradient(135deg, #FF4D6D 0%, #FFB648 100%); /* the Hop Trail gradient */

  /* Semantic theme tokens — dark (default) */
  color-scheme: dark;
  --th-bg:          var(--th-plum);       /* page, footer, flat cards on raised sections */
  --th-surface:     var(--th-plum-800);   /* raised sections, cards, quote, final CTA */
  --th-surface-2:   var(--th-plum-700);   /* hover surfaces */
  --th-field-bg:    var(--th-plum-800);   /* text inputs */
  --th-text:        var(--th-paper);      /* body, headings, nav */
  --th-muted:       var(--th-smoke);      /* secondary copy, footer links */
  --th-link:        var(--th-teal);       /* links in running text */
  --th-accent:      var(--th-coral);      /* small coral text: kickers, feature icons */
  --th-gold-text:   var(--th-gold);       /* gold as text/icon; Coral Text in light mode (gold has no light text variant) */
  --th-line:        rgba(250,245,242,0.10);
  --th-line-strong: rgba(250,245,242,0.18);
  --th-nav-bg:      rgba(21,16,28,0.86);
  --th-shadow:      rgba(0,0,0,0.35);
  --th-shadow-lg:   rgba(0,0,0,0.6);
  --th-focus:       var(--th-gold);       /* focus ring */
  --th-badge-bg:    var(--th-paper);      /* store badges: Paper on dark, Night Plum on light */
  --th-badge-fg:    var(--th-plum);
  --th-badge-sub:   #5A5364;

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
  --edge: clamp(16px, 5vw, 80px);
  --max: 1160px;
  --radius: 18px;
}

/* Light theme (brand/BRAND.md §4.5: base Paper, cards white, text Night Plum
   900, secondary Slate; links Teal Text; small coral text Coral Text; gold is
   a fill only). Applied explicitly by the toggle, or implicitly from the OS
   preference when the visitor has never chosen. */
:root[data-theme="light"] {
  color-scheme: light;
  --th-bg:          var(--th-paper);
  --th-surface:     var(--th-white);
  --th-surface-2:   #F1EAE6;
  --th-field-bg:    var(--th-white);
  --th-text:        var(--th-plum);
  --th-muted:       var(--th-slate);
  --th-link:        var(--th-teal-text);
  --th-accent:      var(--th-coral-text);
  --th-gold-text:   var(--th-coral-text);
  --th-line:        var(--th-hairline);
  --th-line-strong: #D4C8C2;
  --th-nav-bg:      rgba(250,245,242,0.88);
  --th-shadow:      rgba(21,16,28,0.10);
  --th-shadow-lg:   rgba(21,16,28,0.22);
  --th-focus:       var(--th-plum);
  --th-badge-bg:    var(--th-plum);
  --th-badge-fg:    var(--th-paper);
  --th-badge-sub:   var(--th-smoke);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --th-bg:          var(--th-paper);
    --th-surface:     var(--th-white);
    --th-surface-2:   #F1EAE6;
    --th-field-bg:    var(--th-white);
    --th-text:        var(--th-plum);
    --th-muted:       var(--th-slate);
    --th-link:        var(--th-teal-text);
    --th-accent:      var(--th-coral-text);
    --th-gold-text:   var(--th-coral-text);
    --th-line:        var(--th-hairline);
    --th-line-strong: #D4C8C2;
    --th-nav-bg:      rgba(250,245,242,0.88);
    --th-shadow:      rgba(21,16,28,0.10);
    --th-shadow-lg:   rgba(21,16,28,0.22);
    --th-focus:       var(--th-plum);
    --th-badge-bg:    var(--th-plum);
    --th-badge-fg:    var(--th-paper);
    --th-badge-sub:   var(--th-smoke);
  }
}

/* Gradient text (the coral→gold Hop Trail clipped to a headline) is a dark-
   surface treatment: on Paper the gold end drops under 2:1. In the light
   theme those elements are plain Coral Text (5.2:1 on Paper). The selectors
   are listed here, not in the page <style> blocks, so both sites get the same rule. */
:root[data-theme="light"] .th-hero__headline em,
:root[data-theme="light"] .th-social__card-num,
:root[data-theme="light"] h1 em {
  background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--th-coral-text);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .th-hero__headline em,
  :root:not([data-theme="dark"]) .th-social__card-num,
  :root:not([data-theme="dark"]) h1 em {
    background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--th-coral-text);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; background: var(--th-bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; overflow-x: clip;
  background: var(--th-bg); color: var(--th-text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-wrap: pretty;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 0; color: var(--th-text); text-wrap: balance; }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--th-link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--th-focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(255,77,109,0.45); color: var(--th-text); }

/* Skip link: first focusable element on the page, off-screen until focused. */
.th-skip {
  position: absolute; left: 12px; top: -64px; z-index: 200;
  padding: 10px 16px; border-radius: 10px; background: var(--th-coral-800); color: var(--th-paper);
  font-weight: 700; font-size: 14px; text-decoration: none;
}
.th-skip:focus { top: 12px; color: var(--th-paper); }
main:focus { outline: none; }

.th-wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--edge); }
.th-muted { color: var(--th-muted); }
.th-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 700; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--th-accent); margin-bottom: 16px;
}
.th-kicker::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--th-trail); }
.th-kicker--gold { color: var(--th-gold-text); }
.th-h2 { font-size: clamp(30px, 4vw, 48px); }
.th-sub { font-size: clamp(16px, 1.6vw, 18px); line-height: 1.6; color: var(--th-muted); margin-top: 16px; max-width: 54ch; }
.th-section { padding: clamp(56px, 8vw, 96px) 0; }
.th-section--raised { background: var(--th-surface); border-top: 1px solid var(--th-line); border-bottom: 1px solid var(--th-line); }

/* Hop Trail motif: three ascending dots, usable as a decorative divider */
.th-trail { display: inline-flex; align-items: flex-end; gap: 6px; height: 22px; }
.th-trail i { display: block; border-radius: 50%; background: var(--th-trail); }
.th-trail i:nth-child(1) { width: 8px; height: 8px; }
.th-trail i:nth-child(2) { width: 11px; height: 11px; margin-bottom: 5px; }
.th-trail i:nth-child(3) { width: 14px; height: 14px; margin-bottom: 10px; }

/* Logo lockups: the white/Paper lockup on dark, the standard lockup on light.
   Each <a>/<div> carries both <img>s; CSS shows one, so the swap needs no JS. */
.th-logo--light { display: none; }
:root[data-theme="light"] .th-logo--dark { display: none; }
:root[data-theme="light"] .th-logo--light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .th-logo--dark { display: none; }
  :root:not([data-theme="dark"]) .th-logo--light { display: block; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px; line-height: 1.2;
  padding: 14px 24px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--th-coral-800); color: var(--th-paper); }
.btn-primary:hover { background: var(--th-coral-700); color: var(--th-paper); }
.btn-secondary { background: transparent; color: var(--th-text); border-color: var(--th-line-strong); }
.btn-secondary:hover { border-color: var(--th-text); color: var(--th-text); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* Nav */
.th-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--th-nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s;
}
.th-nav.scrolled { border-color: var(--th-line); box-shadow: 0 1px 24px var(--th-shadow); }
.th-nav__inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--edge); height: 68px; display: flex; align-items: center; gap: 8px; }
.th-nav__logo { margin-right: auto; display: flex; align-items: center; color: var(--th-text); }
.th-nav__logo:hover { text-decoration: none; }
.th-nav__logo img { height: 36px; width: auto; }
.th-nav__links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.th-nav__links a { display: block; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--th-text); border-radius: 8px; }
.th-nav__links a:hover { background: var(--th-surface-2); text-decoration: none; }
.th-nav__cta { margin-left: 10px; }

/* Theme toggle (assets/site/theme.js): a quiet round button after the nav
   CTA. The sun shows on dark ("Switch to light theme"), the moon on light. */
.th-theme-toggle {
  flex-shrink: 0; width: 40px; height: 40px; margin-left: 4px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid var(--th-line-strong); background: transparent;
  color: var(--th-text); cursor: pointer; transition: background-color 0.15s, border-color 0.15s;
}
.th-theme-toggle:hover { background: var(--th-surface-2); border-color: var(--th-text); }
.th-theme-toggle svg { width: 18px; height: 18px; }
.th-theme-toggle .th-icon-moon { display: none; }
:root[data-theme="light"] .th-theme-toggle .th-icon-sun { display: none; }
:root[data-theme="light"] .th-theme-toggle .th-icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .th-theme-toggle .th-icon-sun { display: none; }
  :root:not([data-theme="dark"]) .th-theme-toggle .th-icon-moon { display: block; }
}

/* Phones: the section links go (they are in the footer); a link marked
   .th-nav__keep stays as a small text link, so "For restaurants" is always
   one tap away without a menu. */
@media (max-width: 720px) {
  .th-nav__links li:not(.th-nav__keep) { display: none; }
  .th-nav__links .th-nav__keep a { padding: 8px 6px; font-size: 13px; line-height: 1.15; text-align: right; }
  .th-nav__inner { height: 60px; } .th-nav__logo img { height: 30px; }
}
@media (max-width: 420px) {
  .th-nav__inner { gap: 6px; }
  .th-nav__logo img { height: 26px; }
  .th-nav__cta { margin-left: 4px; }
  .th-nav .btn-sm { padding: 9px 12px; font-size: 13px; }
  .th-theme-toggle { width: 36px; height: 36px; margin-left: 0; }
  .th-nav__links .th-nav__keep a { font-size: 12px; padding: 6px 2px; }
}

/* Footer */
.th-footer { background: var(--th-bg); border-top: 1px solid var(--th-line); padding: 64px 0 36px; }
.th-footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--th-line); }
.th-footer__logo img { height: 44px; width: auto; }
.th-footer__tagline { margin-top: 16px; font-size: 14px; line-height: 1.6; color: var(--th-muted); max-width: 30ch; }
.th-footer__socials { display: flex; gap: 8px; margin-top: 20px; }
.th-footer__slink {
  width: 44px; height: 44px; border-radius: 12px; background: var(--th-surface); border: 1px solid var(--th-line);
  display: flex; align-items: center; justify-content: center; color: var(--th-text); transition: background 0.15s, border-color 0.15s;
}
.th-footer__slink:hover { background: var(--th-coral-800); border-color: var(--th-coral-800); color: var(--th-paper); text-decoration: none; }
.th-footer__col h4 { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--th-text); margin: 0 0 8px; }
.th-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.th-footer__col a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--th-muted); }
.th-footer__col a:hover { color: var(--th-text); text-decoration: none; }
.th-footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; padding-top: 24px; font-size: 13px; color: var(--th-muted); }
.th-footer__bottom nav { display: flex; gap: 20px; }
.th-footer__bottom nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--th-muted); font-size: 13px; }
.th-footer__bottom nav a:hover { color: var(--th-text); text-decoration: none; }
@media (max-width: 860px) { .th-footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .th-footer__top { grid-template-columns: 1fr; gap: 28px; } }

/* Photography (docs/BRAND.md §8.3; sources and licences in PHOTO_CREDITS.md —
   CC0 only). .th-photo is a rounded frame. .th-strip is a row of frames that
   turns into a swipeable rail on phones (.th-strip--3 is the three-up,
   landscape variant). .th-band is a full-bleed photo behind copy: it is dark
   in BOTH themes — it re-points the semantic tokens to their dark values and
   lays a Night Plum 900 scrim (76–90 %) over the photo, so Paper text (8:1),
   the 86 % Paper sub-line (6.5:1) and a gold kicker (4.9:1) all clear AA even
   over a pure-white highlight. */
.th-photo { position: relative; margin: 0; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius); border: 1px solid var(--th-line); background: var(--th-surface); }
.th-photo img { width: 100%; height: 100%; object-fit: cover; }
.th-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.th-strip--3 { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.th-strip--3 .th-photo { aspect-ratio: 3 / 2; }
@media (max-width: 760px) {
  .th-strip {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px;
    margin: 0 calc(-1 * var(--edge)); padding: 0 var(--edge) 4px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--edge);
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .th-strip::-webkit-scrollbar { display: none; }
  .th-strip > * { scroll-snap-align: start; }
  .th-strip--3 { grid-auto-columns: 82%; }
}

.th-band {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(72px, 11vw, 136px) 0; background: var(--th-plum); color: var(--th-paper);
  --th-text: var(--th-paper); --th-muted: rgba(250,245,242,0.86); --th-link: var(--th-teal);
  --th-accent: var(--th-gold); --th-gold-text: var(--th-gold);
  --th-line-strong: rgba(250,245,242,0.36); --th-focus: var(--th-gold);
}
.th-band__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.th-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(21,16,28,0.90) 0%, rgba(21,16,28,0.82) 55%, rgba(21,16,28,0.76) 100%);
}
.th-band__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Scroll reveal (home.js). The hidden start state applies only under html.js,
   which theme.js sets from <head>: with scripts blocked or failing to load,
   every [data-reveal] block is simply visible. */
[data-reveal] { transition: opacity 0.5s ease, transform 0.5s ease; }
.js [data-reveal] { opacity: 0; transform: translateY(18px); }
.js [data-reveal].revealed { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.06s; }
[data-reveal][data-delay="2"] { transition-delay: 0.12s; }
[data-reveal][data-delay="3"] { transition-delay: 0.18s; }
[data-reveal][data-delay="4"] { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) { [data-reveal], .js [data-reveal] { opacity: 1; transform: none; transition: none; } }
