/* ============================================================================
   Ferrily — public marketing pages design system
   Aesthetic: editorial cartography. Warm parchment paper, Fraunces display
   serif, vermilion + coral warm accents, teal->indigo glyph tiles, the Charon
   "obol seal" as the brand mark. Mostly CSS; no framework.
   Mirrors app-mall-sv/src/app.css tokens so marketing reads as the same brand.
   ========================================================================== */

:root {
  /* — brand —————————————————————————————————————————————————— */
  --vermilion: #e3622d;      /* primary (= app --primary) */
  --vermilion-600: #c8521f;  /* primary hover */
  --coral: #ff8a5b;          /* warm accent */
  --teal: #19cdce;           /* gradient origin port */
  --indigo: #1e3a8b;         /* gradient destination */
  --seal: #15120d;           /* brand dark (PWA theme color) */
  --seal-ink: #16120c;
  --parchment: #f2e9d6;      /* cream on dark */

  /* — warm-paper surfaces ———————————————————————————————————— */
  --paper: #faf7f1;          /* page background */
  --sand: #f3ecdf;           /* alternating band */
  --card: #ffffff;
  --ink: #211c14;            /* warm near-black text */
  --ink-soft: #6b6354;       /* muted warm text */
  --ink-faint: #94897650;    /* faint */
  --line: #e8dfcd;           /* hairline rule / border */
  --line-strong: #ddd2bb;

  /* — status (from app.css) ————————————————————————————————— */
  --success: #28995c;

  /* — gradients ——————————————————————————————————————————————— */
  --grad-glyph: linear-gradient(135deg, #19cdce 0%, #1e3a8b 100%);
  --grad-warm: linear-gradient(135deg, #ff8a5b 0%, #e3622d 100%);

  /* — type —————————————————————————————————————————————————— */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* — geometry (from app.css) ——————————————————————————————— */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius: 8px;
  --radius-card: 12px;
  --radius-lg: 18px;

  --shadow-1: 0 1px 2px rgba(33, 28, 20, .05), 0 2px 8px rgba(33, 28, 20, .04);
  --shadow-2: 0 4px 12px rgba(33, 28, 20, .07), 0 12px 32px rgba(33, 28, 20, .06);
  --shadow-glow: 0 10px 30px rgba(227, 98, 45, .18);

  --ease: cubic-bezier(.16, 1, .3, 1);

  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

/* — reset ————————————————————————————————————————————————————— */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* faint topographic warmth so the page isn't a flat fill */
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(255, 138, 91, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 8%, rgba(25, 205, 206, .06), transparent 55%);
  background-attachment: fixed;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 460; letter-spacing: -.02em; line-height: 1.08; font-optical-sizing: auto; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2.5px solid var(--vermilion); outline-offset: 3px; border-radius: 3px; }
::selection { background: rgba(227, 98, 45, .18); }

/* — layout ———————————————————————————————————————————————————— */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.band { background: var(--sand); border-block: 1px solid var(--line); }

/* — eyebrow / section rule ————————————————————————————————————— */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans); font-size: 12px; font-weight: 650;
  letter-spacing: .14em; text-transform: uppercase; color: var(--vermilion);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--coral); box-shadow: 0 0 0 3px rgba(255, 138, 91, .22);
}
.section-head { max-width: 46ch; }
.section-head .lede { margin-top: 16px; font-size: clamp(16px, 1.6vw, 18px); color: var(--ink-soft); }

/* fluid display sizes */
.h-hero { font-size: clamp(40px, 6.4vw, 78px); line-height: 1.02; letter-spacing: -.03em; }
.h-2 { font-size: clamp(28px, 3.8vw, 46px); }
.h-3 { font-size: clamp(21px, 2.3vw, 27px); }
.serif-italic { font-style: italic; font-weight: 440; color: var(--vermilion); }

/* — buttons ——————————————————————————————————————————————————— */
.btn {
  --bg: var(--vermilion); --fg: #fff; --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1;
  padding: 14px 22px; border-radius: var(--radius); cursor: pointer;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); background: var(--vermilion-600); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: 17px 30px; font-size: 16px; }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line-strong); }
.btn--ghost:hover { --bg: #fff; box-shadow: var(--shadow-1); }
.btn--on-dark { --bg: var(--parchment); --fg: var(--seal); }
.btn--on-dark:hover { --bg: #fff; background: #fff; }
.btn--ghost-dark { --bg: transparent; --fg: var(--parchment); --bd: rgba(242, 233, 214, .3); }
.btn--ghost-dark:hover { --bg: rgba(242, 233, 214, .08); box-shadow: none; background: rgba(242, 233, 214, .08); }

.textlink { color: var(--vermilion); font-weight: 600; border-bottom: 1.5px solid rgba(227, 98, 45, .3); transition: border-color .15s; }
.textlink:hover { border-color: var(--vermilion); }
.textlink::after { content: " →"; }

/* — nav ———————————————————————————————————————————————————————— */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 241, .82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--serif); font-weight: 500; font-size: 21px; letter-spacing: -.02em; }
.brand svg { width: 32px; height: 32px; border-radius: 9px; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: 14px; }
.nav__links a {
  font-size: 14.5px; font-weight: 530; color: var(--ink-soft);
  padding: 8px 12px; border-radius: var(--radius-md); transition: color .15s, background .15s;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); background: rgba(33, 28, 20, .045); }
.nav__cta { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav__signin { font-size: 14.5px; font-weight: 560; color: var(--ink); padding: 9px 14px; border-radius: var(--radius-md); }
.nav__signin:hover { background: rgba(33, 28, 20, .045); }

/* — hero ——————————————————————————————————————————————————————— */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 8vw, 104px) clamp(48px, 7vw, 88px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__lede { margin-top: 22px; font-size: clamp(17px, 1.7vw, 20px); color: var(--ink-soft); max-width: 42ch; }
.hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__note { margin-top: 16px; font-size: 13.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.hero__note b { color: var(--success); font-weight: 700; }

/* the obol seal display mark */
.seal { aspect-ratio: 1; width: min(420px, 90%); margin-inline: auto; filter: drop-shadow(0 24px 48px rgba(33, 28, 20, .14)); }
.hero__art { position: relative; display: grid; place-items: center; }
.hero__art::before {
  content: ""; position: absolute; inset: 6% ; border-radius: 50%;
  background: var(--grad-glyph); opacity: .10; filter: blur(34px);
}

/* — generic grids ————————————————————————————————————————————— */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* — glyph tile (teal->indigo) ————————————————————————————————— */
.glyph { width: 46px; height: 46px; border-radius: 12px; background: var(--grad-glyph); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(30, 58, 139, .22); flex: none; }
.glyph svg { width: 26px; height: 26px; }
.glyph--warm { background: var(--grad-warm); box-shadow: 0 6px 16px rgba(227, 98, 45, .22); }

/* — cards ———————————————————————————————————————————————————— */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 26px; box-shadow: var(--shadow-1); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.card h3 { font-size: 19px; margin: 18px 0 8px; letter-spacing: -.01em; }
.card p { color: var(--ink-soft); font-size: 15px; }

/* value props (numbered, editorial) */
.value { display: flex; gap: 18px; align-items: flex-start; padding: 22px 0; border-top: 1px solid var(--line); }
.value__no { font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--vermilion); padding-top: 4px; min-width: 2.4ch; }
.value h3 { font-size: 20px; margin: 0 0 6px; }
.value p { color: var(--ink-soft); font-size: 15.5px; }

/* — steps ————————————————————————————————————————————————————— */
.steps { counter-reset: step; display: grid; gap: 2px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--line); align-items: start; }
.step__coin {
  counter-increment: step; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 18px;
  color: var(--seal); background: var(--parchment); border: 1.5px solid var(--line-strong);
}
.step__coin::before { content: counter(step); }
.step h3 { font-size: 19px; margin: 4px 0 6px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* — pricing ——————————————————————————————————————————————————— */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.tier { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 26px 22px; display: flex; flex-direction: column; box-shadow: var(--shadow-1); }
.tier--featured { border-color: var(--vermilion); box-shadow: var(--shadow-2); position: relative; }
.tier--featured::before {
  content: "Most popular"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--vermilion); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.tier__name { font-family: var(--serif); font-size: 21px; font-weight: 520; }
.tier__price { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 2px; }
.tier__amt { font-family: var(--serif); font-size: 40px; font-weight: 540; letter-spacing: -.03em; }
.tier__per { font-size: 14px; color: var(--ink-soft); }
.tier__annual { font-size: 13px; color: var(--ink-soft); min-height: 1.2em; }
.tier__cta { margin: 20px 0; }
.tier__cta .btn { width: 100%; }
.tier ul { display: grid; gap: 11px; font-size: 14.5px; }
.tier li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.tier li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--success); }
.tier li.muted { color: var(--ink-soft); }
.tier li.muted svg { color: var(--line-strong); }

/* comparison table */
.cmp { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cmp caption { text-align: left; }
.cmp th, .cmp td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.cmp th:first-child, .cmp td:first-child { text-align: left; color: var(--ink); font-weight: 500; }
.cmp thead th { font-family: var(--serif); font-size: 17px; font-weight: 520; }
.cmp tbody th { font-weight: 500; }
.cmp td svg { width: 18px; height: 18px; color: var(--success); display: inline-block; vertical-align: middle; }
.cmp .dash { color: var(--line-strong); }
.cmp tr:hover td, .cmp tr:hover th { background: rgba(33, 28, 20, .025); }

/* — FAQ (native details) —————————————————————————————————————— */
.faq { display: grid; gap: 0; max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 44px 22px 2px; position: relative;
  font-family: var(--serif); font-size: clamp(17px, 1.8vw, 20px); font-weight: 480; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px;
  margin-top: -6px; border-right: 2px solid var(--vermilion); border-bottom: 2px solid var(--vermilion);
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--vermilion); }
.faq__a { padding: 0 44px 24px 2px; color: var(--ink-soft); font-size: 15.5px; max-width: 64ch; }

/* — trust / honest framing band —————————————————————————————— */
.trust { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; justify-content: center; text-align: center; }
.trust span { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink-soft); font-weight: 500; }
.trust svg { width: 18px; height: 18px; color: var(--vermilion); }

/* — dark CTA band (obol seal) ————————————————————————————————— */
.dark { background: var(--seal); color: var(--parchment); position: relative; overflow: hidden; border: none; }
.dark::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 380px at 80% 0%, rgba(255, 138, 91, .16), transparent 60%), radial-gradient(600px 360px at 0% 100%, rgba(25, 205, 206, .12), transparent 60%); pointer-events: none; }
.dark h2 { color: #fff; }
.dark .eyebrow { color: var(--coral); }
.dark .lede, .dark p { color: rgba(242, 233, 214, .8); }
.cta-band { position: relative; text-align: center; max-width: 640px; margin-inline: auto; }
.cta-band .hero__cta { justify-content: center; }

/* — footer ————————————————————————————————————————————————————— */
.footer { background: var(--seal-ink); color: rgba(242, 233, 214, .72); padding-block: 64px 36px; font-size: 14.5px; }
.footer a { color: rgba(242, 233, 214, .72); transition: color .15s; }
.footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px 24px; }
.footer .brand { color: var(--parchment); }
.footer__tag { margin-top: 14px; max-width: 30ch; color: rgba(242, 233, 214, .55); }
.footer__col h4 { font-family: var(--sans); font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: rgba(242, 233, 214, .45); margin-bottom: 14px; }
.footer__col li { margin-bottom: 9px; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(242, 233, 214, .12); color: rgba(242, 233, 214, .5); font-size: 13px; }

/* — language switcher (footer) ——————————————————————————————— */
.lang { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(242, 233, 214, .12); }
.lang a { font-size: 13px; font-weight: 500; color: rgba(242, 233, 214, .6); padding: 6px 12px; border-radius: var(--radius-md); border: 1px solid transparent; transition: color .15s, background .15s, border-color .15s; }
.lang a:hover { color: #fff; background: rgba(242, 233, 214, .07); }
.lang a[aria-current="true"] { color: var(--parchment); border-color: rgba(242, 233, 214, .22); }

/* — wave divider —————————————————————————————————————————————— */
.wave { display: block; width: 100%; height: 22px; color: var(--line); }

/* — load animation (hero only; respects reduced-motion) ————————— */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .7s var(--ease) both; }
.rise-1 { animation-delay: .05s; } .rise-2 { animation-delay: .14s; }
.rise-3 { animation-delay: .23s; } .rise-4 { animation-delay: .32s; } .rise-5 { animation-delay: .41s; }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } html { scroll-behavior: auto; } }

/* — utilities ————————————————————————————————————————————————— */
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-l { margin-top: clamp(36px, 5vw, 56px); }
.muted { color: var(--ink-soft); }
.lead-list { display: grid; gap: 14px; max-width: 60ch; }
.lead-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); font-size: 15.5px; }
.lead-list li svg { width: 20px; height: 20px; color: var(--vermilion); flex: none; margin-top: 1px; }

/* — responsive ———————————————————————————————————————————————— */
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .seal { width: min(300px, 70%); }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .tier--featured::before { top: -11px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .nav__links { display: none; }
}
@media (max-width: 560px) {
  .grid--3, .grid--4, .grid--2, .tiers { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .nav__signin { display: none; }
  .cmp { font-size: 13px; }
  .cmp th, .cmp td { padding: 11px 8px; }
}
