/* ============================================================
   Star Cafe — design system
   Organic / pastel-soft · serif editorial · warm earthy palette
   Tokens from DESIGN.md: #6B705C (sage) · #CB997E (clay) · #FFE8D6 (cream)
   ============================================================ */

:root {
  /* palette */
  --sage:   #6B705C;
  --sage-deep: #565a49;
  --clay:   #CB997E;
  --clay-deep: #b57f63;
  --cream:  #FFE8D6;
  --bg:     #FBF6EF;   /* warm off-white page */
  --bg-2:   #F4EADD;   /* soft panel */
  --ink:    #3A342B;   /* warm near-black text */
  --ink-soft: #6c6455;
  --line:   #e7dccd;

  /* type */
  --display: "Fraunces", "Georgia", "Times New Roman", serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* space + shape */
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 14px 40px -18px rgba(58,52,43,.28);
  --shadow-soft: 0 6px 20px -12px rgba(58,52,43,.25);
  --wrap: 1140px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.05rem;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--sage-deep); text-decoration: none; }
h1,h2,h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; color: var(--ink); margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-optical-sizing: auto; }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
p { margin: 0 0 1rem; }
.wrap { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }
.eyebrow { font-family: var(--body); font-weight: 800; text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; color: var(--clay-deep); }
.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--body); font-weight: 800; font-size: .95rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
  will-change: transform;
}
.btn-primary { background: var(--sage); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--sage-deep); transform: translateY(-3px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--clay); color: var(--clay-deep); transform: translateY(-3px); }

/* ---------- sticky nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,246,239,.72);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -20px rgba(58,52,43,.5); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 600; font-size: 1.35rem; color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: .5rem .85rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem; color: var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav-links a:hover { background: var(--cream); color: var(--clay-deep); }
.nav-links a[aria-current="page"] { color: var(--clay-deep); background: var(--cream); }
.nav-cta { margin-left: .4rem; }
.nav-toggle { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .6rem 1.2rem 1.1rem; box-shadow: var(--shadow-soft);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav[data-open="true"] .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: .7rem .9rem; }
  .nav-cta { margin: .4rem 0 0; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(3rem,7vw,6rem) 0 clamp(3.5rem,7vw,6rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 60%;
  background: radial-gradient(60% 80% at 30% 20%, rgba(203,153,126,.30), transparent 70%),
              radial-gradient(50% 70% at 85% 10%, rgba(107,112,92,.22), transparent 70%);
  z-index: 0; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem,4vw,3.5rem); align-items: center; }
.hero-copy h1 { margin-top: .4rem; }
.hero-copy h1 .accent { color: var(--clay-deep); font-style: italic; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.hero-figure { position: relative; }
.hero-figure img {
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  aspect-ratio: 4/3; object-fit: cover; width: 100%;
  transform: rotate(1.2deg);
}
.hero-figure .badge {
  position: absolute; left: -14px; bottom: -18px;
  background: var(--sage); color: var(--cream);
  font-family: var(--display); font-style: italic; font-size: 1.05rem;
  padding: .8rem 1.15rem; border-radius: 16px; box-shadow: var(--shadow-soft);
  transform: rotate(-3deg);
}
@media (max-width: 780px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure img { transform: none; aspect-ratio: 16/11; }
}

/* ---------- sections ---------- */
.section { padding: clamp(3rem,7vw,5.5rem) 0; }
.section-head { max-width: 62ch; margin-bottom: 2.4rem; }
.section.tint { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.section.sage { background: var(--sage); color: var(--cream); }
.section.sage h2, .section.sage h3 { color: #fff; }
.section.sage .eyebrow { color: var(--cream); }

/* feature cards */
.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.3rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; box-shadow: var(--shadow-soft);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card .ic { width: 46px; height: 46px; color: var(--clay-deep); margin-bottom: .7rem; }
.card h3 { margin-bottom: .3rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
@media (max-width: 780px){ .cards { grid-template-columns: 1fr; } }

/* ---------- gallery grid ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; grid-auto-flow: dense; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; transition: transform .6s var(--ease); }
.gallery figure.tall img { aspect-ratio: 3/4; }
.gallery figure.wide { grid-column: span 2; }
.gallery figure.wide img { aspect-ratio: 16/10; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.4rem .95rem .8rem; color: #fff; font-family: var(--display); font-size: 1.05rem;
  background: linear-gradient(180deg, transparent, rgba(58,52,43,.72));
  opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.gallery figure:hover figcaption, .gallery figure:focus-within figcaption { opacity: 1; transform: none; }
@media (max-width: 860px){ .gallery { grid-template-columns: repeat(2,1fr); } .gallery figure.wide { grid-column: span 2; } }
@media (max-width: 520px){ .gallery { grid-template-columns: 1fr; } .gallery figure.wide { grid-column: span 1; } }

/* ---------- menu / shop list ---------- */
.menu { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.6rem 2.6rem; }
.menu-item { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: baseline; padding-bottom: 1rem; border-bottom: 1px dashed var(--line); }
.menu-item h3 { grid-column: 1; margin: 0; }
.menu-item .price { grid-column: 2; font-family: var(--display); color: var(--clay-deep); font-size: 1.15rem; }
.menu-item p { grid-column: 1 / -1; margin: .2rem 0 0; color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 700px){ .menu { grid-template-columns: 1fr; } }

.shop-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 1.3rem; }
.product { background:#fff; border:1px solid var(--line); border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow-soft); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product img { aspect-ratio: 4/3; object-fit: cover; width:100%; }
.product .body { padding: 1.1rem 1.2rem 1.3rem; }
.product h3 { margin:0 0 .2rem; }
.product .price { color: var(--clay-deep); font-family: var(--display); font-size: 1.15rem; }
.product p { color: var(--ink-soft); font-size:.92rem; margin:.3rem 0 0; }
@media (max-width: 860px){ .shop-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .shop-grid { grid-template-columns: 1fr; } }

/* ---------- about split ---------- */
.split { display:grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3.5rem); align-items:center; }
.split.rev { direction: rtl; } .split.rev > * { direction: ltr; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; width:100%; }
@media (max-width: 780px){ .split { grid-template-columns: 1fr; } .split img { aspect-ratio: 16/11; } }

/* ---------- contact ---------- */
.form { display: grid; gap: 1rem; max-width: 560px; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 800; font-size: .9rem; }
.field input, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  padding: .8rem .95rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 4px rgba(203,153,126,.2); }
.info-list { list-style:none; margin:0; padding:0; display:grid; gap:1.1rem; }
.info-list li { display:flex; gap:.8rem; align-items:flex-start; }
.info-list .ic { width:24px; height:24px; color: var(--clay-deep); flex:none; margin-top:.15rem; }

/* ---------- socials ---------- */
.socials { display:flex; flex-wrap:wrap; gap:.7rem; }
.social {
  display:inline-flex; align-items:center; gap:.5rem; font-weight:800; font-size:.92rem;
  padding:.65rem 1.05rem; border-radius:999px; background:#fff; border:1px solid var(--line); color:var(--ink);
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.social:hover { transform: translateY(-3px); border-color: var(--clay); background: var(--cream); color: var(--clay-deep); }
.social svg { width:20px; height:20px; }
/* footer sits on the dark ink bg — keep the white pills' text dark & readable
   (overrides the generic `.footer a { color: cream }` which made them cream-on-white) */
.footer .social { color: var(--ink); background:#fff; border-color: transparent; }
.footer .social:hover { color: var(--clay-deep); background: var(--cream); }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #efe7da; padding: 3rem 0 2rem; margin-top: 2rem; }
.footer a { color: var(--cream); }
.footer-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer h4 { font-family: var(--display); font-size:1.05rem; margin:0 0 .7rem; color:#fff; }
.footer ul { list-style:none; margin:0; padding:0; display:grid; gap:.4rem; }
.footer .fine { border-top:1px solid rgba(255,255,255,.12); margin-top:2rem; padding-top:1.2rem; font-size:.85rem; color:#bdb2a1; display:flex; justify-content:space-between; flex-wrap:wrap; gap:.5rem; }
@media (max-width: 700px){ .footer-grid { grid-template-columns: 1fr; gap:1.6rem; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* ---------- parallax ---------- */
.parallax { will-change: transform; }

/* page hero (interior pages) */
.page-hero { padding: clamp(2.5rem,6vw,4.5rem) 0 clamp(1.5rem,4vw,2.5rem); text-align:center; position:relative; }
.page-hero .eyebrow { display:block; margin-bottom:.6rem; }
.page-hero p { margin-inline:auto; }

/* misc */
.center { text-align:center; }
.mt { margin-top: 1.6rem; }
.divider { height:1px; background: var(--line); border:0; margin: 0; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .parallax { transform: none !important; }
  .hero-figure img { transform: none; }
}
