/* ============================================================
   GEPPETTO CAFÉ — "Toymaker's Workshop" design system
   Palette: parchment / walnut ink / marionette red / fairy blue / honey
   Type:    Caprasimo (display) · Karla (body) · Caveat (annotations)
   Edit the tokens below to re-theme the whole site.
   ============================================================ */

:root {
  /* Color tokens */
  --parchment:      #FBF3E4;   /* page background */
  --parchment-deep: #F3E5C9;   /* alternating bands */
  --panel:          #FFFDF6;   /* cards / panels */
  --walnut:         #33231A;   /* primary text */
  --walnut-soft:    #6B5240;   /* secondary text */
  --walnut-line:    rgba(51, 35, 26, 0.14);
  --red:            #A8402F;   /* marionette red — primary actions */
  --red-deep:       #8C3325;
  --red-tint:       #F6E3DD;
  --blue:           #4A6FA5;   /* fairy blue — links, accents */
  --blue-deep:      #3A5984;
  --blue-tint:      #E3EAF4;
  --honey:          #E8B54A;   /* small highlights, stars */
  --honey-deep:     #B9892D;

  /* Type */
  --font-display: "Caprasimo", "Georgia", serif;
  --font-body:    "Karla", "Segoe UI", sans-serif;
  --font-hand:    "Caveat", cursive;

  /* Rhythm */
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-card: 0 2px 0 rgba(51,35,26,.06), 0 14px 34px -18px rgba(51,35,26,.28);
  --shadow-pop:  4px 4px 0 rgba(51,35,26,.16);
  --container: 1160px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--walnut);
  background-color: var(--parchment);
  /* faint paper grain */
  background-image: radial-gradient(rgba(51,35,26,.025) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: .01em;
  margin: 0 0 .5em;
  color: var(--walnut);
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
p  { margin: 0 0 1.1em; }
.lede { font-size: 1.16rem; color: var(--walnut-soft); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--deep { background: var(--parchment-deep); }
.section--panel { background: var(--panel); }

/* Hand-written annotation */
.hand {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--red);
  transform: rotate(-2deg);
  display: inline-block;
}

/* Eyebrow label with stars */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .82rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--red);
  margin-bottom: 14px;
}
.eyebrow::before, .eyebrow::after { content: "✦"; color: var(--honey-deep); font-size: .9em; }

/* ---------- Buttons: "sticker" storybook style ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 14px 28px; border-radius: 12px;
  border: 2px solid var(--walnut);
  cursor: pointer; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: var(--shadow-pop);
  min-height: 48px;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(51,35,26,.16); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-deep); color: #fff; transform: translate(-1px,-1px); box-shadow: 5px 5px 0 rgba(51,35,26,.18); }
.btn--ghost { background: var(--panel); color: var(--walnut); }
.btn--ghost:hover { background: var(--blue-tint); color: var(--walnut); transform: translate(-1px,-1px); box-shadow: 5px 5px 0 rgba(51,35,26,.18); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-deep); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 243, 228, .92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--walnut-line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 14px 24px; max-width: var(--container); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 42px; height: 42px; flex: none; }
.brand__name {
  font-family: var(--font-display); font-size: 1.5rem; color: var(--walnut); line-height: 1;
}
.brand__tag { display: block; font-family: var(--font-hand); font-size: .95rem; color: var(--red); line-height: 1; margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-weight: 700; font-size: .98rem; color: var(--walnut);
  text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--red); }
.nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--honey); }
.nav .btn { padding: 10px 20px; min-height: 42px; box-shadow: 3px 3px 0 rgba(51,35,26,.16); }

.nav-toggle {
  display: none; background: none; border: 2px solid var(--walnut);
  border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--walnut);
  min-width: 48px; min-height: 44px;
}
.nav-toggle svg { display: block; }

@media (max-width: 980px) {
  .nav {
    position: fixed; inset: 0; z-index: 200; flex-direction: column; justify-content: center;
    background: var(--parchment); gap: 22px; font-size: 1.2rem;
    transform: translateX(100%); transition: transform .3s ease; visibility: hidden;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; }
  .nav a { font-size: 1.25rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; z-index: 300; position: relative; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--walnut); color: #EFE4D4;
  padding: clamp(56px, 7vw, 84px) 0 32px;
  margin-top: 0;
}
.site-footer a { color: #F4D9A8; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid; gap: 40px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-family: var(--font-display); font-size: 1.6rem; color: #fff; margin-bottom: 8px; }
.footer-hand { font-family: var(--font-hand); font-size: 1.3rem; color: var(--honey); }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; font-size: .98rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14); margin-top: 48px; padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .88rem; color: rgba(239,228,212,.75);
}

/* ---------- Cards ---------- */
.card {
  background: var(--panel);
  border: 2px solid var(--walnut-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card__body { padding: 26px 26px 28px; }
.card__img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }

/* Photo frames: slightly tilted polaroid feel */
.tilt-l { transform: rotate(-1.2deg); }
.tilt-r { transform: rotate(1.2deg); }

/* ---------- Marionette string decoration ---------- */
.string {
  width: 2px; height: 64px; margin: 0 auto;
  background-image: linear-gradient(var(--walnut-soft) 55%, transparent 55%);
  background-size: 2px 9px;
  position: relative;
}
.string::after {
  content: "✦"; position: absolute; left: 50%; bottom: -16px;
  transform: translateX(-50%); color: var(--honey-deep); font-size: 15px;
}

/* ---------- Wavy section divider ---------- */
.wave { display: block; width: 100%; height: 34px; }

/* ---------- Key facts table (AEO) ---------- */
.facts {
  width: 100%; border-collapse: collapse; background: var(--panel);
  border: 2px solid var(--walnut-line); border-radius: var(--radius); overflow: hidden;
  font-size: .98rem;
}
.facts th, .facts td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--walnut-line); vertical-align: top; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 34%; color: var(--red); font-weight: 700; white-space: nowrap; }

/* Quick answer box (AEO) */
.quick-answer {
  background: var(--blue-tint); border: 2px solid var(--blue);
  border-radius: var(--radius); padding: 22px 26px; margin: 0 0 36px;
}
.quick-answer strong { color: var(--blue-deep); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.form-grid .form-field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 7px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 13px 15px; font: inherit; color: var(--walnut);
  background: var(--panel); border: 2px solid var(--walnut-line); border-radius: 10px;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 3px solid var(--honey); outline-offset: 1px; border-color: var(--walnut);
}
.form-note { font-size: .88rem; color: var(--walnut-soft); }
.form-success {
  display: none; background: #E7F0E2; border: 2px solid #5E8C4A; color: #2F4A22;
  padding: 18px 22px; border-radius: var(--radius); font-weight: 700;
}
.form-success.is-visible { display: block; }

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

/* ---------- Review cards ---------- */
.review-card {
  background: var(--panel); border: 2px solid var(--walnut-line);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 14px;
}
.review-card__stars { color: var(--honey-deep); letter-spacing: 3px; font-size: 1.05rem; }
.review-card blockquote { margin: 0; font-size: 1.02rem; }
.review-card cite { font-style: normal; font-weight: 700; color: var(--walnut-soft); font-size: .92rem; }

/* ---------- Menu list ---------- */
.menu-section { margin-bottom: clamp(44px, 6vw, 64px); }
.menu-section__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.menu-section__head .hand { font-size: 1.3rem; }
.menu-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 44px; margin-top: 18px; }
@media (max-width: 760px) { .menu-items { grid-template-columns: 1fr; } }
.menu-item { padding: 14px 0; border-bottom: 1px dashed var(--walnut-line); }
.menu-item h4 { font-family: var(--font-body); font-weight: 800; font-size: 1.04rem; margin: 0 0 3px; }
.menu-item p { margin: 0; font-size: .95rem; color: var(--walnut-soft); }

/* ---------- Skip link & a11y ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--walnut); color: #fff; padding: 12px 20px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Utility ---------- */
.grid-2 { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: 1fr 1fr; align-items: center; }
.grid-3 { display: grid; gap: 26px; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: 26px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
