/* ===================================================================
   Menuscript landing — "a menu you can hold."
   Skeuomorphic parchment aesthetic, matched 1:1 to the iOS app:
   palette from Color+Extensions.swift, Libre Baskerville titles,
   real materials (paper grain, stitched leather, wax seal, brass).
   =================================================================== */

:root {
  /* ---- App palette (Color+Extensions.swift) ---- */
  --bg:            #F5F0E6; /* appBackground — cream parchment */
  --bg-warm:       #EFE7D7; /* slightly deeper parchment for depth */
  --card:          #FAFAF5; /* cardBackground */
  --elevated:      #EBE5DB; /* elevatedSurface */
  --espresso:      #3A2A18; /* navBackground */
  --espresso-dark: #281810; /* navDarker */
  --cork:          #BF8E52; /* corkBoard */
  --cork-dark:     #A5763F;
  --leather:       #7A5C38; /* sectionLeather */
  --leather-dark:  #5E4527;
  --divider:       #D8D0C4; /* dividerWarm */
  --gold:          #A67E2E; /* accentGold */
  --gold-lite:     #C9A24B;
  --green:         #4A6640; /* accentGreen */
  --text:          #1C1812; /* textPrimary */
  --text-2:        #6E6358; /* textSecondary */
  --text-3:        #9E9890; /* textTertiary */

  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Soft, top-down "real light" shadows */
  --shadow-sm: 0 1px 2px rgba(40,24,16,0.10);
  --shadow-md: 0 6px 18px rgba(40,24,16,0.14);
  --shadow-lg: 0 22px 48px rgba(40,24,16,0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  /* Layered parchment: soft vignette + warm gradient */
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(255,255,255,0.55), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
  background-attachment: fixed;
}

/* Faint paper-fiber grain over everything — mirrors PaperGrain in the app.
   feTurbulence noise, kept very low opacity so it reads as texture, not noise. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

main, header, footer { position: relative; z-index: 2; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ===================================================================
   Header — espresso bar, exactly like the app's nav
   =================================================================== */
.site-header {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), transparent 40%),
    linear-gradient(180deg, var(--espresso), var(--espresso-dark));
  border-bottom: 2px solid var(--espresso-dark);
  box-shadow: 0 2px 0 rgba(166,126,46,0.35), var(--shadow-md); /* brass hairline + drop */
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-glyph {
  width: 36px; height: 36px; display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
}
.brand-word {
  font-family: var(--serif); font-weight: 700; font-size: 20px;
  color: #F3E9D6; letter-spacing: 0.02em; margin: 0;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.header-cta {
  font-family: var(--sans); font-weight: 600; font-size: 0.9rem;
  color: #EBDCC1; text-decoration: none;
  padding: 9px 16px; border-radius: 8px;
  border: 1px solid rgba(203,162,75,0.5);
  background: linear-gradient(180deg, rgba(203,162,75,0.16), rgba(203,162,75,0.04));
  transition: background 0.15s ease, transform 0.05s ease;
}
.header-cta:hover { background: linear-gradient(180deg, rgba(203,162,75,0.28), rgba(203,162,75,0.10)); }
.header-cta:active { transform: translateY(1px); }

/* ===================================================================
   Hero
   =================================================================== */
.hero { padding: 68px 0 40px; }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 20px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.headline {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.5rem, 5.2vw, 4rem); line-height: 1.06;
  color: var(--text); margin: 0 0 22px; letter-spacing: -0.01em;
}
.headline em { font-style: italic; color: var(--leather); }
.subhead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-2);
  max-width: 40ch; margin: 0 0 32px;
}
.trust {
  margin: 20px 0 0; font-size: 0.85rem; color: var(--text-3);
  display: flex; align-items: center; gap: 8px;
}
.trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(74,102,64,0.15); }

/* ===================================================================
   Waitlist form — premium inset field + physical espresso button
   =================================================================== */
.waitlist { display: flex; gap: 10px; max-width: 460px; flex-wrap: wrap; }
.waitlist input[type="email"] {
  flex: 1 1 220px; min-width: 0;
  padding: 15px 18px; font-size: 1rem; font-family: var(--sans);
  color: var(--text); background: #FFFDF7;
  border: 1px solid var(--divider); border-radius: 11px;
  box-shadow: inset 0 2px 4px rgba(40,24,16,0.06); /* pressed-paper inset */
  outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.waitlist input::placeholder { color: var(--text-3); }
.waitlist input[type="email"]:focus {
  border-color: var(--gold);
  box-shadow: inset 0 2px 4px rgba(40,24,16,0.06), 0 0 0 3px rgba(166,126,46,0.18);
}
.waitlist button {
  flex: 0 0 auto; padding: 15px 26px; font-size: 1rem; font-weight: 700;
  font-family: var(--sans); color: #F5ECDA; cursor: pointer;
  border: 1px solid var(--espresso-dark); border-radius: 11px;
  background: linear-gradient(180deg, #4a361f, var(--espresso) 55%, var(--espresso-dark));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), var(--shadow-md);
  transition: filter 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
.waitlist button:hover { filter: brightness(1.08); }
.waitlist button:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.35);
}
.waitlist button:disabled { opacity: 0.6; cursor: default; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-status { min-height: 1.4em; margin: 14px 0 0; font-size: 0.92rem; font-weight: 600; }
.form-status.success { color: var(--green); }
.form-status.error   { color: #7A2020; }
.form-status.pending { color: var(--text-3); }

/* ===================================================================
   Device frame — floating phone with real drop shadow
   =================================================================== */
.device {
  position: relative; width: 100%; max-width: 320px; margin: 0 auto;
  padding: 10px; border-radius: 44px;
  background: linear-gradient(160deg, #2a2016, #120c07);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.14),
    inset 0 0 0 1px rgba(0,0,0,0.6),
    var(--shadow-lg);
}
.device img { display: block; width: 100%; border-radius: 34px; }
/* subtle screen glare */
.device::after {
  content: ""; position: absolute; inset: 10px; border-radius: 34px;
  pointer-events: none;
  background: linear-gradient(150deg, rgba(255,255,255,0.10) 0%, transparent 38%);
}
.hero .device { transform: rotate(1.5deg); }

/* ===================================================================
   Leather stitched separator — recreation of LeatherSectionSeparator
   =================================================================== */
.leather-sep {
  position: relative; margin: 30px 0; padding: 15px 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 30%),
    linear-gradient(180deg, var(--leather), var(--leather-dark));
  border-top: 1px solid rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(0,0,0,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), var(--shadow-sm);
  text-align: center;
}
/* dashed "stitching" lines */
.leather-sep::before, .leather-sep::after {
  content: ""; position: absolute; left: 5%; right: 5%; height: 0;
  border-top: 2px dashed rgba(240,225,200,0.45);
}
.leather-sep::before { top: 7px; }
.leather-sep::after  { bottom: 7px; }
.leather-sep .badge {
  display: inline-block; font-family: var(--sans); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #FBF1DD; padding: 6px 20px; border-radius: 20px;
  background: linear-gradient(180deg, #96703f, #6b4e2c);
  border: 1px solid rgba(0,0,0,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 4px rgba(0,0,0,0.25);
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

/* ===================================================================
   Feature rows — editorial, screenshot + copy, alternating
   =================================================================== */
.features { padding: 30px 0 12px; }
.feature {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px;
  align-items: center; padding: 44px 0;
}
.feature:nth-child(even) .feature-media { order: 2; }
.feature-media { display: flex; justify-content: center; }
.feature-media .device { max-width: 290px; transform: rotate(-1.2deg); }
.feature:nth-child(even) .feature-media .device { transform: rotate(1.2deg); }

.feature-kicker {
  font-family: var(--sans); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 12px;
}
.feature h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.14;
  color: var(--text); margin: 0 0 14px;
}
.feature p { color: var(--text-2); font-size: 1.06rem; margin: 0 0 18px; max-width: 42ch; }
.feature-points { list-style: none; margin: 0; padding: 0; }
.feature-points li {
  position: relative; padding-left: 26px; margin: 9px 0;
  color: var(--text-2); font-size: 0.98rem;
}
.feature-points li::before {
  content: "✦"; position: absolute; left: 0; top: 0;
  color: var(--gold); font-size: 0.9rem;
}

/* Media placeholder (for slots awaiting screenshots) */
.media-placeholder {
  aspect-ratio: 9 / 19.5; width: 290px; border-radius: 34px;
  background:
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0 10px, transparent 10px 20px),
    var(--elevated);
  border: 1px dashed var(--divider);
  display: grid; place-items: center; text-align: center;
  color: var(--text-3); font-size: 0.8rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 20px;
}

/* ===================================================================
   How it works — three brass-numbered steps
   =================================================================== */
.steps { padding: 40px 0 20px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: linear-gradient(180deg, var(--card), #F3EFE6);
  border: 1px solid var(--divider); border-radius: 14px;
  padding: 30px 24px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.step-num {
  width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: #3a2c12;
  background: radial-gradient(circle at 35% 30%, var(--gold-lite), var(--gold) 65%, #7d5d22);
  border: 1px solid #6b4f1e;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.5), inset 0 -2px 3px rgba(0,0,0,0.25), var(--shadow-sm);
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
.step h3 { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 8px; color: var(--text); }
.step p { color: var(--text-2); font-size: 0.95rem; margin: 0; }

/* ===================================================================
   Closing CTA — parchment card with wax seal
   =================================================================== */
.cta { padding: 56px 0 20px; }
.cta-card {
  position: relative; max-width: 720px; margin: 0 auto; text-align: center;
  background: linear-gradient(180deg, var(--card), #F1ECE1);
  border: 1px solid var(--divider); border-radius: 18px;
  padding: 54px 40px 46px;
  box-shadow: var(--shadow-md);
}
.cta-card::after { /* warm inner ring, letterpress-style */
  content: ""; position: absolute; inset: 6px; border-radius: 13px;
  border: 1px solid rgba(216,208,196,0.6); pointer-events: none;
}
.cta-icon {
  position: absolute; top: -36px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  width: 72px; height: 72px;
  filter: drop-shadow(0 6px 12px rgba(58,42,24,0.35)) drop-shadow(0 1px 2px rgba(58,42,24,0.3));
}
.cta-card h2 {
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  color: var(--text); margin: 14px 0 10px;
}
.cta-card p { color: var(--text-2); font-size: 1.08rem; margin: 0 0 28px; }
.cta-card .waitlist { justify-content: center; margin: 0 auto; }

/* ===================================================================
   Footer
   =================================================================== */
.footer {
  margin-top: 40px; text-align: center; color: #C9BCA6;
  background: linear-gradient(180deg, var(--espresso), var(--espresso-dark));
  border-top: 2px solid var(--espresso-dark);
  box-shadow: inset 0 2px 0 rgba(166,126,46,0.3);
  padding: 40px 0 44px;
}
.footer-icon {
  width: 44px; height: 44px; margin-bottom: 10px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.footer .brand-word { font-size: 18px; }
.footer p { margin: 8px 0 0; font-size: 0.85rem; }
.footer a { color: #E6D3AE; text-decoration: none; }

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .eyebrow, .waitlist { justify-content: center; }
  .subhead, .feature p { margin-left: auto; margin-right: auto; }
  .hero .device { grid-row: 1; max-width: 280px; }
  .feature { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .feature:nth-child(even) .feature-media { order: 0; }
  .feature-points { display: inline-block; text-align: left; }
  .steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .waitlist { flex-direction: column; }
  .waitlist button { width: 100%; }
  .header-cta { display: none; }
}
