/* ============================================================
   LEDURA — Website Design System
   Warm parchment + gold · Cormorant Garamond + Jost
   ============================================================ */

:root {
  /* Parchment (light) — primary skin */
  --bg:        #F4EEE5;  /* page background, warm sand */
  --surface:   #F8F3EB;  /* card surface */
  --surface-2: #FCF7F0;  /* inner / app surface */
  --elevated:  #FFFCF7;  /* tiles, inputs */
  --soft-tan:  #EFE7D7;  /* hero blocks, badges */

  /* Ink */
  --ink:       #2C2A26;  /* primary text */
  --body:      #6B6358;  /* body copy */
  --muted:     #9C9388;  /* captions */
  --faint:     #C7BCAB;  /* dividers */

  /* Gold — the only accent */
  --gold:      #C9A876;
  --gold-deep: #A6824E;
  --gold-soft: #E5D3B3;
  --champagne: #D9C6A4;

  /* Cosmos (dark) */
  --night-bg:      #0E0B08;
  --night-surface: #14100C;
  --night-ink:     #F0E4CE;
  --night-glow:    #D4A867;

  --hairline: rgba(44, 42, 38, 0.07);
  --hairline-strong: rgba(44, 42, 38, 0.12);

  /* gold intensity knob (tweakable) */
  --gold-strength: 1;

  --serif: 'Cormorant Garamond', 'Bodoni Moda', Georgia, serif;
  --sans:  'Jost', system-ui, -apple-system, sans-serif;
  --mono:  'SFMono-Regular', ui-monospace, 'JetBrains Mono', Consolas, monospace;

  /* shadows — warm, soft, never gray */
  --shadow-sm: 0 1px 2px rgba(60,45,25,.04), 0 4px 14px rgba(60,45,25,.05);
  --shadow:    0 1px 3px rgba(60,45,25,.05), 0 10px 30px rgba(60,45,25,.07);
  --shadow-lg: 0 2px 8px rgba(60,45,25,.06), 0 30px 70px rgba(60,45,25,.12);
  --shadow-phone: 0 4px 12px rgba(40,30,16,.10), 0 40px 90px rgba(40,30,16,.22);

  /* radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* paper grain texture, very subtle */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Typography primitives ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0;
}
.eyebrow--muted { color: var(--ink); opacity: .55; }

.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.h-section {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.lede {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--body);
  max-width: 46ch;
  text-wrap: pretty;
}
.serif-num {
  font-family: var(--serif);
  font-weight: 300;
  color: var(--gold-deep);
  line-height: 1;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(72px, 11vw, 140px);
}
.section--tight { padding-block: clamp(56px, 8vw, 100px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 30px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--gold-deep);
  color: #FFFCF7;
}
.btn--primary:hover { background: #94703f; }
.btn--ghost {
  background: transparent;
  color: var(--gold-deep);
  border-color: var(--gold);
}
.btn--ghost:hover { background: var(--gold-soft); }

/* App Store badge (Apple guideline proportions) */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 18px;
  background: #1A1714;
  color: #FFFCF7;
  border-radius: 13px;
  border: 1px solid rgba(255,252,247,.14);
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: var(--shadow-sm);
}
.appstore-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.appstore-badge svg { width: 26px; height: 26px; flex: none; }
.appstore-badge .ab-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore-badge .ab-small { font-size: 10px; letter-spacing: .04em; opacity: .82; font-weight: 400; }
.appstore-badge .ab-big { font-family: var(--sans); font-size: 19px; font-weight: 500; letter-spacing: .01em; }
.appstore-badge--ghost {
  background: rgba(255,252,247,.06);
  border-color: rgba(240,228,206,.28);
  color: var(--night-ink);
}

/* badge group, with platform note */
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.badge-soon {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
}
/* compact the store badges on small screens so the pair stays side-by-side */
@media (max-width: 560px) {
  .badge-row { gap: 10px; }
  .appstore-badge { padding: 10px 14px 10px 12px; gap: 9px; border-radius: 11px; }
  .appstore-badge svg { width: 22px; height: 22px; }
  .appstore-badge .ab-small { font-size: 9px; }
  .appstore-badge .ab-big { font-size: 16px; }
}

/* ---------- Cards & chips ---------- */
.card {
  background: var(--elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--soft-tan);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: .02em;
}

/* gold hairline rule with center sparkle */
.rule {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gold);
}
.rule::before, .rule::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--faint), transparent);
}
.spark { color: var(--gold); font-size: 14px; line-height: 1; }

/* ---------- Reveal animation (progressive enhancement) ----------
   Visible by default. JS adds `.js` to <html> and `.is-hidden` to each
   .reveal only when motion is allowed; revealing = removing .is-hidden,
   so there is never a cascade fight over the visible state. */
html.js .reveal {
  transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1);
  will-change: opacity, transform;
}
html.js .reveal.is-hidden {
  opacity: 0;
  transform: translateY(22px);
}
html.js .reveal[data-delay="1"] { transition-delay: .08s; }
html.js .reveal[data-delay="2"] { transition-delay: .16s; }
html.js .reveal[data-delay="3"] { transition-delay: .24s; }
html.js .reveal[data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { transition: none; }
  html.js .reveal.is-hidden { opacity: 1; transform: none; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--hairline);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 27px;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1;
}
.wordmark sup {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-left: 6px;
  vertical-align: 8px;
}
/* image logo variant (header) — replaces the text wordmark on light backgrounds */
.wordmark--logo { display: inline-flex; line-height: 0; }
.wordmark--logo img { height: 54px; width: auto; display: block; }
@media (max-width: 560px) { .wordmark--logo img { height: 44px; } }
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links {
  display: flex;
  gap: 30px;
}
.nav-links a {
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--body);
  transition: color .2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 1px;
  background: var(--gold-deep);
  transition: width .25s ease;
}
.nav-links a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 18px; }

/* language switcher */
.lang {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  padding: 3px;
  background: var(--surface-2);
}
.lang button {
  appearance: none;
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 11px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.lang button:hover { color: var(--ink); }
.lang button.is-active {
  color: #FFFCF7;
  background: var(--gold-deep);
}

.header-cta { display: inline-flex; }
.menu-toggle {
  display: none;
  appearance: none; border: none; background: transparent; cursor: pointer;
  color: var(--ink); padding: 6px; line-height: 0;
}

/* mobile nav drawer — hidden on desktop */
.mobile-nav { display: none; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px var(--gutter) 22px;
    border-top: 1px solid var(--hairline);
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height .35s ease, opacity .25s ease, padding .35s ease;
  }
  .mobile-nav.is-open { max-height: 340px; opacity: 1; pointer-events: auto; }
  .mobile-nav a {
    font-size: 17px; color: var(--ink); padding: 12px 2px;
    border-bottom: 1px solid var(--hairline);
  }
  .mobile-nav a.btn { border: none; margin-top: 12px; justify-content: center; color: #FFFCF7; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .header-cta .btn { padding: 12px 20px; }
}
@media (max-width: 560px) {
  .header-cta { display: none; }
  .wordmark { font-size: 23px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--night-bg);
  color: var(--night-ink);
  padding-block: clamp(56px, 8vw, 88px);
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  position: relative;
}
.footer-brand .wordmark { color: var(--night-ink); font-size: 30px; }
.footer-tag {
  margin-top: 14px;
  color: rgba(240,228,206,.6);
  max-width: 32ch;
  font-size: 15px;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--night-glow);
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-col a {
  color: rgba(240,228,206,.74);
  font-size: 15px;
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--night-ink); }
.footer-lang {
  display: inline-flex;
  border: 1px solid rgba(240,228,206,.18);
  border-radius: var(--r-pill);
  padding: 3px;
  margin-top: 4px;
}
.footer-lang button {
  appearance: none; border: none; background: transparent;
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(240,228,206,.55);
  padding: 6px 12px; border-radius: var(--r-pill); cursor: pointer;
  transition: color .2s, background .2s;
}
.footer-lang button.is-active { color: var(--night-bg); background: var(--night-glow); }

.footer-bottom {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid rgba(240,228,206,.12);
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  justify-content: space-between;
  align-items: center;
}
.footer-disclaimer {
  font-size: 13px;
  color: rgba(240,228,206,.5);
  max-width: 60ch;
  line-height: 1.55;
}
.footer-meta { font-size: 13px; color: rgba(240,228,206,.5); }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  width: 38px; height: 38px;
  border: 1px solid rgba(240,228,206,.18);
  border-radius: 50%;
  display: grid; place-items: center;
  color: rgba(240,228,206,.7);
  transition: border-color .2s, color .2s, background .2s;
}
.footer-social a:hover { color: var(--night-bg); background: var(--night-glow); border-color: var(--night-glow); }
.footer-social svg { width: 17px; height: 17px; }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
