/* Sera — brand-true rebuild (April 2026)
   Palette sampled from the live serawinebar.com brand assets.
   Logo wordmark is an image (img/serawinebar-logo.png) — we don't try to font-substitute it.

   Font story — "Italian Deli" pairing (April 30 2026 swap):
     Bagel Fat One        — chunky food-packaging display (section headlines)
     DM Mono              — uppercase letterspaced eyebrows + nav + small labels
     Cormorant Garamond   — italic editorial body (menu copy, story page, taglines)
     Inter                — UI / forms / buttons / dashboard
     Caveat Brush         — hand display moments (used sparingly)
*/

@import url('https://fonts.googleapis.com/css2?family=Bagel+Fat+One&family=DM+Mono:wght@400;500&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@400;500;600;700&family=Caveat+Brush&display=swap');

:root {
  /* Brand palette — exact hex from serawinebar.com assets */
  --teal: #176767;          /* primary — logo, headlines, body type */
  --teal-deep: #0F4F4F;     /* hover/emphasis */
  --teal-soft: #2A7878;     /* secondary type, captions */
  --mint: #B0DAB6;          /* watercolor sage — page background */
  --mint-light: #C8E5CC;    /* lighter mint — cards, sections */
  --mint-pop: #91CEAD;      /* mint accent — links, badges, hover */
  --cream: #FAF6E8;         /* off-white cream — alt sections */
  --paper: #FFFFFF;         /* pure white — checker squares, contrast */
  --ink: #0E2828;           /* near-black for very small body type */
  --rule: rgba(23, 103, 103, 0.18);

  /* Font tokens */
  --font-display: 'Bagel Fat One', 'Cormorant Garamond', Georgia, serif;
  --font-eyebrow: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-edit:    'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-ui:      'Inter', system-ui, -apple-system, sans-serif;
  --font-hand:    'Caveat Brush', cursive;
  --font-mono:    'DM Mono', ui-monospace, monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.65;
  color: var(--teal);
  background: var(--mint);
  background-image: url('/winebar/img/serawinebar-paper.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* On long pages, fixed bg can flicker on iOS — let large content sections opt out */
@media (max-width: 720px) {
  body { background-attachment: scroll; }
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color .2s; }
a:hover { color: var(--teal-deep); }

/* Skip-link for a11y */
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 16px; top: 16px; background: var(--teal); color: var(--mint); padding: 8px 14px; z-index: 999; }

/* ============================================================
   TYPE
   ============================================================ */

h1, h2, h3, h4 { color: var(--teal); margin: 0 0 0.5em; line-height: 1.1; font-weight: 400; }

h1.display, .display-xl {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 132px);
  letter-spacing: 0;
  line-height: 1;
  font-weight: 400;
}

h2.section-title, .section-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 76px);
  letter-spacing: 0;
  line-height: 1.05;
  text-align: center;
  margin: 0 0 16px;
  font-weight: 400;
}

.eyebrow {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-block;
  font-weight: 500;
}

.editorial {
  font-family: var(--font-edit);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.5;
  color: var(--teal);
  font-weight: 400;
}

.handwritten {
  font-family: var(--font-hand);
  color: var(--teal);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.9;
}

p { margin: 0 0 1em; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

section { padding: 96px 0; position: relative; }

@media (max-width: 720px) {
  section { padding: 64px 0; }
}

/* Pages that override the watercolor wash with cream (menu, wine, dashboard) */
.bg-cream { background: var(--cream); }
.bg-cream body { background: var(--cream); }
.bg-paper { background: var(--paper); }
.bg-mint-light { background: var(--mint-light); }

/* ============================================================
   CHECKER MARQUEE — the Sera signature divider
   ============================================================ */

.checker-band {
  height: 96px;
  background-image: url('/winebar/img/serawinebar-checker-tile.png');
  background-repeat: repeat;
  background-size: 96px 96px;
  width: 100%;
  /* tiny inner shadow to feel printed-on */
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.05), inset 0 -1px 0 rgba(0,0,0,0.05);
}

.checker-band--slim { height: 56px; background-size: 56px 56px; }
.checker-band--tall { height: 144px; background-size: 144px 144px; }

@media (max-width: 720px) {
  .checker-band { height: 64px; background-size: 64px 64px; }
  .checker-band--slim { height: 40px; background-size: 40px 40px; }
  .checker-band--tall { height: 96px; background-size: 96px 96px; }
}

/* CSS-only fallback if image fails (renders at the same scale) */
.checker-band--css {
  background-image:
    repeating-conic-gradient(var(--teal) 0% 25%, var(--paper) 0% 50%);
  background-size: 96px 96px;
}

/* Optional: a thin top/bottom rule to terminate sections cleanly */
.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0;
}

/* ============================================================
   NAV (custom element <lf-nav>)
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(176, 218, 182, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.nav-logo img { height: 44px; width: auto; }

.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { border-bottom-color: var(--teal); }

.nav-cta {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  background: var(--teal);
  color: var(--mint);
  padding: 8px 26px 10px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .2s;
  line-height: 1.2;
}
.nav-cta:hover { background: var(--teal-deep); color: var(--mint); }

.nav-toggle {
  display: none;
  background: transparent; border: 0; cursor: pointer;
  width: 44px; height: 44px;
  color: var(--teal);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--mint); padding: 24px;
    border-bottom: 1px solid var(--rule);
  }
  .nav.is-open .nav-links a { padding: 14px 0; width: 100%; }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: var(--mint); }
.btn-primary:hover { background: var(--teal-deep); color: var(--mint); }
.btn-ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-ghost:hover { background: var(--teal); color: var(--mint); }
.btn-cream { background: var(--cream); color: var(--teal); border: 1px solid var(--rule); }
.btn-cream:hover { background: var(--paper); }

/* ============================================================
   HERO (homepage)
   ============================================================ */

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero-logo {
  width: 100%;
  max-width: min(820px, 94vw);
  margin: 0 auto 40px;
  filter: drop-shadow(0 2px 0 rgba(14, 40, 40, 0.05));
}
@media (max-width: 720px) {
  .hero-logo { max-width: 96vw; margin-bottom: 28px; }
  .hero { padding: 96px 16px 64px; }
}

/* ============================================================
   CRAYON-DRAW LOGO ANIMATION (hero only, runs once per session)
   ============================================================ */

.logo-draw {
  position: relative;
  width: 100%;
  max-width: min(820px, 94vw);
  margin: 0 auto 40px;
  isolation: isolate;
}
.logo-draw img {
  width: 100%; height: auto; display: block;
}

/* Faint pencil-sketch underlayer — visible from frame 1, never animated */
.logo-draw-ghost {
  position: absolute; inset: 0;
  opacity: 0.10;
  z-index: 1;
  transform: rotate(-0.4deg);
  filter: drop-shadow(0 1px 0 rgba(14, 40, 40, 0.04));
}

/* Inked layer — revealed left → right via clip-path with a wavy diagonal
   edge so the leading boundary looks like a crayon's wavering tip rather
   than a clean wipe. */
.logo-draw-ink {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 2px 0 rgba(14, 40, 40, 0.05));
  clip-path: polygon(
    0% 0%,
    0% 0%,
    -2% 35%, 1% 65%, -1% 100%,
    0% 100%
  );
  animation: crayon-draw 2.6s cubic-bezier(.55, .05, .25, 1) 0.25s forwards;
}

@keyframes crayon-draw {
  0% {
    clip-path: polygon(
      0% 0%,
      0% 0%,
      -2% 35%, 1% 65%, -1% 100%,
      0% 100%
    );
  }
  10% {
    clip-path: polygon(
      0% 0%,
      14% -2%,
      11% 38%, 13% 62%, 12% 102%,
      0% 100%
    );
  }
  30% {
    clip-path: polygon(
      0% 0%,
      32% 1%,
      28% 36%, 31% 64%, 30% 99%,
      0% 100%
    );
  }
  55% {
    clip-path: polygon(
      0% 0%,
      58% -1%,
      55% 38%, 57% 60%, 56% 101%,
      0% 100%
    );
  }
  78% {
    clip-path: polygon(
      0% 0%,
      82% 0%,
      79% 36%, 81% 64%, 80% 100%,
      0% 100%
    );
  }
  100% {
    clip-path: polygon(
      0% 0%,
      102% 0%,
      102% 36%, 102% 64%, 102% 100%,
      0% 100%
    );
  }
}

/* Crayon tip — a small dark dot that wobbles along during the draw,
   making it feel like a kid is dragging a crayon */
.crayon-tip {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(23, 103, 103, 0.18);
  z-index: 3;
  top: 40%; left: 0;
  opacity: 0;
  pointer-events: none;
  animation: crayon-tip 2.6s cubic-bezier(.55, .05, .25, 1) 0.25s forwards;
}
@keyframes crayon-tip {
  0%   { opacity: 0; left: -2%; top: 38%; }
  4%   { opacity: 1; }
  18%  { left: 18%;  top: 32%; }
  35%  { left: 36%;  top: 44%; }
  52%  { left: 54%;  top: 30%; }
  70%  { left: 72%;  top: 42%; }
  86%  { left: 88%;  top: 34%; }
  96%  { left: 100%; top: 40%; opacity: 1; }
  100% { left: 100%; top: 40%; opacity: 0; }
}

/* Subtle "settle" wobble on the ink layer once the draw finishes */
.logo-draw-ink {
  animation: crayon-draw 2.6s cubic-bezier(.55, .05, .25, 1) 0.25s forwards,
             logo-settle 1.6s ease-out 2.7s 1;
  transform-origin: 50% 50%;
}
@keyframes logo-settle {
  0%   { transform: rotate(0deg); }
  30%  { transform: rotate(0.6deg); }
  60%  { transform: rotate(-0.3deg); }
  100% { transform: rotate(0deg); }
}

/* Static state — used when sessionStorage says we've already shown it */
.logo-draw.is-static .logo-draw-ghost { opacity: 0; }
.logo-draw.is-static .logo-draw-ink {
  animation: none;
  -webkit-mask-image: none;
          mask-image: none;
}
.logo-draw.is-static .crayon-tip { display: none; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .logo-draw-ink {
    animation: none;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .logo-draw-ghost { opacity: 0; }
  .crayon-tip { display: none; }
}

/* Visually-hidden but screen-reader-/SEO-accessible h1 paired with the logo image. */
.hero-h1-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.hero-tagline {
  font-family: var(--font-edit);
  font-style: italic;
  font-size: clamp(22px, 3vw, 36px);
  color: var(--ink);
  max-width: 720px;
  margin: 0 auto 40px;
  line-height: 1.4;
}

.hero-meta {
  font-family: var(--font-eyebrow);
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--teal-deep);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  align-items: center;
}
.hero-meta::before, .hero-meta::after { content: '✦'; color: var(--teal); }

.hero-cta-row {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-top: 36px;
}

/* Floating fig/grape badges on hero */
.hero-badge {
  position: absolute;
  width: 96px; height: 96px;
  opacity: 0.85;
  pointer-events: none;
}
.hero-badge--left  { top: 18%; left: 8%; transform: rotate(-12deg); }
.hero-badge--right { bottom: 22%; right: 10%; transform: rotate(8deg); }
@media (max-width: 880px) { .hero-badge { width: 64px; height: 64px; } }

/* ============================================================
   CARDS / FEATURE BLOCKS
   ============================================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 48px;
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 32px 28px;
  position: relative;
}
.feature-card .eyebrow { color: var(--mint-pop); margin-bottom: 12px; }
.feature-card h3 {
  font-family: var(--font-edit);
  font-style: italic;
  font-size: 28px;
  font-weight: 500;
  color: var(--teal);
  margin: 0 0 12px;
}
.feature-card p { font-size: 16px; color: var(--teal); }

/* ============================================================
   MENU LIST (used on /menu/, also as preview on home)
   ============================================================ */

.menu-section { margin: 56px 0; }

.menu-section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.2vw, 56px);
  letter-spacing: 0;
  line-height: 1;
  color: var(--teal);
  text-align: center;
  margin-bottom: 12px;
  font-weight: 400;
}

.menu-section-tag {
  font-family: var(--font-edit);
  font-style: italic;
  text-align: center;
  color: var(--teal-soft);
  margin-bottom: 36px;
  font-size: 17px;
}

.menu-list { list-style: none; padding: 0; margin: 0; max-width: 760px; margin: 0 auto; }
.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px dashed var(--rule);
}
.menu-item-name {
  font-family: var(--font-edit);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: var(--teal);
}
.menu-item-price {
  font-family: var(--font-eyebrow);
  font-size: 17px;
  letter-spacing: 0.05em;
  color: var(--teal-soft);
  white-space: nowrap;
}
.menu-item-desc {
  grid-column: 1 / -1;
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--teal-soft);
  margin-top: 6px;
}

/* ============================================================
   WINE LIST + CART
   ============================================================ */

.wine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.wine-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wine-card .eyebrow { font-size: 11px; color: var(--mint-pop); }
.wine-card h3 {
  font-family: var(--font-edit);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: var(--teal);
  margin: 0;
}
.wine-card .producer { font-size: 14px; color: var(--teal-soft); }
.wine-card .price {
  font-family: var(--font-eyebrow);
  font-size: 18px;
  letter-spacing: 0.05em;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wine-add {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--teal);
  color: var(--mint);
  border: 0;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s;
}
.wine-add:hover { background: var(--teal-deep); }
.wine-add:disabled { background: var(--teal-soft); cursor: not-allowed; opacity: 0.6; }

/* PA-cap notice */
.pa-notice {
  background: var(--mint-light);
  border: 1px solid var(--rule);
  padding: 16px 20px;
  font-family: var(--font-edit);
  font-style: italic;
  font-size: 16px;
  color: var(--teal);
  border-radius: 4px;
  margin: 24px 0;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

label {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], textarea, select {
  font-family: var(--font-ui);
  font-size: 16px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--teal);
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--mint-pop);
  outline-offset: 1px;
  border-color: var(--teal);
}

textarea { min-height: 120px; resize: vertical; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--teal);
  color: var(--mint);
  padding: 80px 0 32px;
  position: relative;
}

.footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer h4 {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mint-pop);
  margin: 0 0 18px;
}
.footer a { color: var(--mint); text-decoration: none; }
.footer a:hover { color: var(--mint-pop); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { padding: 4px 0; font-size: 14px; }
.footer-logo img { height: 56px; filter: brightness(0) invert(1) sepia(0.5) hue-rotate(60deg) saturate(2); }
.footer-blurb {
  font-family: var(--font-edit);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--mint-light);
  margin: 18px 0;
}
.footer-bottom {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid rgba(176, 218, 182, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-eyebrow);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mint-light);
}

@media (max-width: 880px) {
  .footer .container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer .container { grid-template-columns: 1fr; }
}

/* ============================================================
   UTILITIES
   ============================================================ */

/* Two-column split grid that collapses to one column on mobile.
   Used by /private-dining/ + /contact/ for form/aside layouts. */
.split-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  max-width: 1080px;
}
@media (max-width: 800px) {
  .split-grid { grid-template-columns: 1fr; gap: 32px; }
}

.center { text-align: center; }
.muted { color: var(--teal-soft); }
.italic { font-style: italic; }
.upper { text-transform: uppercase; letter-spacing: 0.18em; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; } .mt-6 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-4 { margin-bottom: 32px; } .mb-6 { margin-bottom: 48px; }
.hidden-mobile { }
@media (max-width: 720px) { .hidden-mobile { display: none; } }

/* ============================================================
   RESERVATION (OpenTable) WRAPPER
   ============================================================ */

.reserve {
  background: var(--cream);
  padding: 64px 24px;
  text-align: center;
}
.reserve-shell {
  max-width: 720px;
  margin: 32px auto 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(23, 103, 103, 0.08);
}
.reserve-shell iframe {
  width: 100%; min-height: 500px; border: 0;
}
.reserve-fallback {
  font-family: var(--font-edit);
  font-style: italic;
  color: var(--teal-soft);
  margin: 16px 0 0;
}
