/* Fern website: shared styles for every page. Colors, type and icons come from the app's UI kit (the Fern theme in
   prototype/index.html: THEMES.fern, --font-display/--font-body), so the site looks like the same product. */
:root {
  --bg: #F5F7F6;
  --surface: #FFFFFF;
  --control: #E9EDEB;
  --soft: #E2F1EA;
  --green: #2E7A60;
  --on-green: #FFFFFF;
  --ink: #17201C;
  --ink-2: #54635D;
  --ink-3: #5F6B66;              /* small gray text: 4.7:1 or more on every light section color (was #86938D, 2.97:1) */
  --line: #DDE3E0;
  --shadow: 0 1px 2px rgba(23, 32, 28, .05), 0 6px 20px rgba(23, 32, 28, .06);
  --shadow-lg: 0 20px 60px rgba(23, 32, 28, .16);
  --radius: 22px;
  --r-md: 14px;
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --section: clamp(64px, 9vw, 104px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121413;
    --surface: #1B1E1C;
    --control: #262A28;
    --soft: #1C3A31;
    --green: #5CC2A2;
    --on-green: #0E1512;
    --ink: #ECF1EE;
    --ink-2: #B3BEB9;
    --ink-3: #86938D;
    --line: #303532;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--green); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 6px; }
.cta :focus-visible { outline-color: var(--on-green); }   /* the card is green, so its ring takes the card's text color */
[id] { scroll-margin-top: 84px; }                         /* section jumps land below the sticky header */
.ic { width: 24px; height: 24px; flex: none; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }

/* Header: the same on every page */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); font: 700 1.2rem var(--font-display); letter-spacing: -.02em; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--green); color: var(--on-green); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: .95rem; }

/* Sections: one rhythm everywhere */
section { padding: var(--section) 0; }
section + section { padding-top: 0; }
section.band { padding: var(--section) 0; background: var(--surface); border-block: 1px solid var(--line); }
section.band + section { padding-top: var(--section); }
.eyebrow { color: var(--green); font-weight: 600; font-size: .92rem; margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 14px; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-2); margin: 0 0 28px; max-width: 34em; text-wrap: pretty; }
.muted { color: var(--ink-3); font-size: .92rem; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Hero */
.hero { padding: clamp(40px, 6vw, 72px) 0 var(--section); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero .lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }

/* Phone frame around a real screenshot */
.phone { width: min(320px, 80vw); margin-inline: auto; border-radius: 46px; padding: 10px; background: #111513; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.phone img { border-radius: 37px; width: 100%; height: auto; }
.phone.sm { width: min(270px, 70vw); }

/* Waitlist / download: one layout everywhere */
.signup { display: flex; gap: 10px; flex-wrap: wrap; max-width: 480px; }
.signup input[type=email] { flex: 1 1 230px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.signup .btn { flex: 0 0 auto; }
@media (max-width: 520px) { .signup .btn { flex: 1 1 100%; } }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup-note { margin: 10px 0 0; }
.signup-msg { margin: 10px 0 0; font-weight: 600; color: var(--green); min-height: 1.5em; }
.signup-msg:empty { min-height: 0; margin: 0; }
.signup-msg.err { color: #BC3B24; }
.appstore { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 18px; text-decoration: none; font-weight: 600; }
.appstore-badge { display: inline-block; line-height: 0; border-radius: 9px; }   /* Apple's badge, unchanged; 48 px tall (Apple's minimum is 40) */
.appstore-badge img { display: block; height: 48px; width: auto; }
.appstore small { display: block; font-weight: 400; font-size: .72rem; opacity: .8; }
.center .signup, .cta .signup { margin-inline: auto; justify-content: center; }

/* The problem: six apps */
.apps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin: 36px auto 0; }
@media (max-width: 640px) { .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.app { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 16px 8px 14px; text-align: center; font-size: .85rem; color: var(--ink-2); }
.app .ic { display: block; margin: 0 auto 8px; color: var(--ink-3); }
.load { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 760px; margin: 28px auto 0; padding: 0; list-style: none; }
.load li { background: var(--soft); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-size: .92rem; }

/* Set it up once */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; counter-reset: s; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--soft); color: var(--green); font-weight: 700; margin-bottom: 12px; }
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-2); }

/* Proof: a real screen next to what it does */
.show { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.show + .show { margin-top: var(--section); }
.show.flip .show-img { order: 2; }
@media (max-width: 800px) { .show { grid-template-columns: 1fr; gap: 28px; } .show.flip .show-img { order: 0; } }
.show h3 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin-bottom: 10px; }
.show p { color: var(--ink-2); margin: 0 0 14px; max-width: 32em; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.ticks .ic { width: 20px; height: 20px; color: var(--green); margin-top: 3px; }
.also { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: var(--section); }
@media (max-width: 800px) { .also { grid-template-columns: 1fr; } }
.also > div { display: flex; gap: 14px; align-items: flex-start; }
.also .ic { color: var(--green); margin-top: 2px; }
.also h3 { font-size: 1.05rem; margin-bottom: 4px; }
.also p { margin: 0; color: var(--ink-2); font-size: .97rem; }

/* Fern AI Assistant */
.assist { background: var(--soft); border-radius: 32px; padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 800px) { .assist { grid-template-columns: 1fr; } }
.assist .eyebrow { display: flex; align-items: center; gap: 8px; }
.assist .eyebrow .ic { width: 20px; height: 20px; }
.said { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.said .you { font-size: 1.05rem; margin: 0 0 16px; }
.said .you b { display: block; font-size: .8rem; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.said ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.said li { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: .95rem; }
.said li .ic { width: 20px; height: 20px; color: var(--green); }
.said li small { margin-left: auto; color: var(--ink-3); font-size: .8rem; }

/* Why Fern */
.why { width: 100%; max-width: 760px; margin: 36px auto 0; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .97rem; }
.why th, .why td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.why tr:last-child th, .why tr:last-child td { border-bottom: 0; }
.why th:first-child, .why td:first-child { text-align: left; }
.why thead th { font-size: .85rem; color: var(--ink-3); font-weight: 600; }
.why thead th.us { color: var(--green); }
.why td.us { background: color-mix(in srgb, var(--soft) 60%, transparent); }
.why .yes { color: var(--green); font-weight: 700; }
.why .no { color: var(--ink-3); }
@media (max-width: 520px) { .why th, .why td { padding: 12px 8px; font-size: .88rem; } }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 820px; margin: 36px auto 0; text-align: left; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.plan.pro { border: 2px solid var(--green); }
.plan h3 { font-size: 1.3rem; margin-bottom: 4px; }
.plan .price { font: 700 1.7rem var(--font-display); letter-spacing: -.02em; margin: 6px 0 2px; }
.plan .price small { font: 500 .95rem var(--font-body); color: var(--ink-3); letter-spacing: 0; }
.plan .ticks { margin-top: 16px; }
.founding { margin-top: 14px; background: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: .95rem; }
.founding b { color: var(--green); }

/* FAQ: chevrons like the app */
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details p { margin: 0 0 16px; color: var(--ink-2); }

/* Final call to action */
.cta { background: var(--green); color: var(--on-green); border-radius: 32px; padding: clamp(40px, 6vw, 64px) 24px; text-align: center; }
.cta h2 { color: var(--on-green); }
.cta .lead { color: var(--on-green); margin-inline: auto; }                 /* 5.2:1 on the green card */
.cta .signup input[type=email] { border-color: transparent; }
.cta .btn.primary { background: var(--on-green); color: var(--green); }
.cta .signup-msg { color: var(--on-green); }
.cta .muted { color: color-mix(in srgb, var(--on-green) 92%, transparent); }   /* 4.6:1 light, 7.5:1 dark */

/* Cards (Maple page) */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 32px; }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card.big { padding: 28px; }
.card .ic { color: var(--green); margin-bottom: 12px; }
.card p { margin: 0; color: var(--ink-2); }
.tag { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--green); background: var(--soft); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }

/* Footer: the same on every page */
footer { padding: 40px 0 56px; color: var(--ink-3); font-size: .92rem; border-top: 1px solid var(--line); margin-top: var(--section); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
footer a { color: var(--ink-2); text-decoration: none; display: inline-block; padding: 10px 0; }
footer a:hover { color: var(--ink); text-decoration: underline; }

/* Legal and support pages */
.doc { padding: 48px 0 0; }
.doc h1 { font-size: clamp(2.1rem, 4.5vw, 2.8rem); }
.doc h2 { font-size: 1.35rem; margin-top: 36px; }
.doc p, .doc li { color: var(--ink-2); }
.doc .tbl { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 12px 0 16px; }
.doc .tbl th, .doc .tbl td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.doc .tbl th { color: var(--ink); font-weight: 600; background: var(--soft); }
.doc .note { background: var(--soft); border-radius: 12px; padding: 12px 16px; font-size: .95rem; }
/* On phones each table row becomes a small card, so nothing is cut off */
@media (max-width: 640px) {
  .doc .tbl, .doc .tbl tbody, .doc .tbl tr, .doc .tbl td { display: block; width: 100%; }
  .doc .tbl thead { display: none; }
  .doc .tbl tr { border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px; margin-bottom: 12px; background: var(--surface); }
  .doc .tbl td { border: 0; padding: 6px 0; }
  .doc .tbl td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 600; color: var(--ink-3); }
}

.small-page { padding: 56px 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: up .6s ease both; }
  @keyframes up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

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

/* The logo swaps to its dark version in dark mode; the <picture> wrapper must not change layout */
picture { display: contents; }

/* Footer: one line icon per account, 44 px tap area, opens in a new tab */
.socials { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 12px; color: var(--ink-2); transition: color .15s, background-color .15s; }
@media (hover: hover) { .socials a:hover { color: var(--green); background: var(--soft); } }
/* when the icons drop to their own row (phones), they sit centered and evenly spaced */
@media (max-width: 899px) { .socials { flex-basis: 100%; justify-content: center; gap: 12px; } }
