/* Fenly website, draft 3 (2026-10-20 evening): Fenly's own look. Palette B "forest ledger", logo A, Inter (SIL OFL,
   self-hosted: the page asks no other site for anything). Simple on purpose. Without the script everything shows. */
@font-face { font-family: "Inter"; src: url("assets/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --forest: #173b34; --forest-2: #24524a; --fox: #e8772e; --fox-deep: #b5461a; --cream: #f4f1ea; --paper: #fffdf9;
  --ease-out: cubic-bezier(.23,1,.32,1);
  --mint: #c9e4d6; --mint-soft: #e6f2ec; --ink: #13221f; --muted: #5d6b67; --line: #e3ded2;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
section[id] { scroll-margin-top: 84px; }  /* a nav click lands below the sticky header, not under it */
p, li { text-wrap: pretty; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.0625rem/1.6 "Inter", system-ui, sans-serif;
  font-feature-settings: "cv11" 1; }
/* fixed-width digits only where amounts line up; on body text Inter's tabular setting widens the hyphen too */
.bar b, .owed-n, .finding-n, .num { font-feature-settings: "tnum" 1, "cv11" 1; }
a { color: var(--forest); }
:focus-visible { outline: 3px solid var(--fox); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 10px 14px; border-radius: 8px; z-index: 20; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }

/* top */
.top { position: sticky; top: 0; z-index: 10; background: rgba(244,241,234,.92); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.scrolled .top { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--forest); }
.logo img { width: 18px; height: 25px; }
.logo span { font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; }
.top nav { display: none; gap: 4px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.top nav a { transition: color .16s ease, background-color .16s ease; }
/* Sign in: always in the header (testers come back here), a quiet link beside the invite button */
.top .signin { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  border-radius: 8px; color: var(--forest); font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.top .btn.small { margin-left: 4px; white-space: nowrap; }
@media (min-width: 820px) { .top nav { display: flex; } .top .signin { margin-left: 8px; } }
@media (max-width: 380px) { .top-in { gap: 10px; } .top .btn.small { padding: 0 12px; } .logo span { font-size: 1.3rem; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 12px;
  background: var(--forest); color: #fff; text-decoration: none; font-weight: 700; font-size: 1rem;
  border: 0; font-family: inherit; cursor: pointer; }
/* pressed buttons give way a little: the page heard you */
.btn { transition: background-color .16s ease, transform .16s var(--ease-out); }
.btn:active { transform: scale(.97); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: .92rem; border-radius: 10px; }
.btn.light { background: var(--fox-deep); color: #fff; }  /* white on fox-deep: 5.3:1 */
.link { color: var(--forest); font-weight: 600; text-decoration: none; padding: 12px 6px; }
/* hover only where there is a mouse: on a phone a tap would leave it stuck */
@media (hover: hover) and (pointer: fine) {
  .top nav a:hover, .top .signin:hover { color: var(--forest); background: var(--mint-soft); }
  .btn:hover { background: var(--forest-2); }
  .btn.light:hover { background: #963a16; }
  .link:hover { text-decoration: underline; }
}

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding-block: 72px 88px; }
h1 { font-weight: 800; font-size: clamp(2.4rem, 5.6vw, 4.2rem); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 22px;
  color: var(--forest); text-wrap: balance; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); margin: 0 0 32px; max-width: 30ch; }
.actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* the three numbers */
.money { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 26px 26px 22px;
  box-shadow: 0 30px 60px -40px rgba(23,59,52,.35); }
.money figcaption { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; }
.bar { display: flex; flex-direction: column; justify-content: flex-end; height: 230px; }
/* true proportions of the example: billed is 98.2% of sold, collected 97.6% */
.fill { display: block; border-radius: 10px 10px 4px 4px; background: var(--forest); transform-origin: bottom; height: 160px; }
.bar:nth-child(2) .fill { height: calc(160px * .982); opacity: .82; }
.bar:nth-child(3) .fill { height: calc(160px * .976); opacity: .64; }
.bar b { display: block; margin-top: 10px; font-weight: 700; font-size: 1.02rem; }
.bar em { font-style: normal; color: var(--muted); font-size: .88rem; }
.owed { margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: #fdeee4; display: flex; gap: 14px; align-items: center; }
.owed-n { font-weight: 800; font-size: 1.6rem; color: var(--fox-deep); letter-spacing: -.02em; white-space: nowrap; }
.owed-t { color: #7a3a16; font-size: .92rem; line-height: 1.35; }

/* blocks */
.block { padding-block: 64px; border-top: 1px solid var(--line); }
h2 { font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 28px; color: var(--forest); }
h3 { font-weight: 700; font-size: 1.15rem; margin: 0 0 6px; letter-spacing: -.01em; }
.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how li { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.how p, .tile-w p { margin: 0; color: var(--muted); }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--mint);
  color: var(--forest); font-weight: 800; margin-bottom: 16px; }
.what { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile-w { background: var(--mint-soft); border-radius: 18px; padding: 22px; }
.tile-w h3 { color: var(--forest); }

.trust { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.sub { color: var(--muted); font-size: 1.1rem; margin: -12px 0 20px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 7px 0 7px 34px; font-weight: 500; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--mint); color: var(--forest); display: grid; place-items: center; font-size: .78rem; font-weight: 800; }
.finding { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--fox); border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 24px 50px -36px rgba(23,59,52,.35); }
.finding p { margin: 0; }
.finding-k { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.finding-t { font-weight: 700; font-size: 1.15rem; margin-top: 8px !important; }
.finding-n { font-weight: 800; font-size: 2rem; color: var(--fox-deep); letter-spacing: -.02em; }
.finding-s { color: var(--muted); font-size: .92rem; margin-top: 6px !important; }
.nb { white-space: nowrap; }

/* invite */
.invite { background: var(--forest); color: #fff; margin-top: 32px; }
.invite-in { text-align: center; padding-block: 72px; }
.invite-mark { width: 30px; height: 42px; margin-bottom: 14px; }
.invite h2 { color: #fff; margin-bottom: 12px; }
.invite-in > p { color: #cfe3da; margin: 0 auto 28px; max-width: 46ch; }

/* the sign-up form: a paper card on the forest band */
.signup[hidden], .signup-done[hidden] { display: none; }
.signup-card { max-width: 640px; margin: 0 auto; text-align: left; background: var(--paper); color: var(--ink);
  border-radius: 20px; padding: 28px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.signup { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.signup .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { font-weight: 600; font-size: .9rem; color: var(--ink); padding: 0; }
.opt { font-weight: 500; color: var(--muted); font-size: .82rem; margin-left: 6px; }
.field input, .field select { font: inherit; font-size: 1rem; color: var(--ink); background: #fff; height: 48px;
  padding: 0 14px; border: 1px solid #d6d0c2; border-radius: 12px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease; }
.field input:focus, .field select:focus { outline: none; border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(23,59,52,.12); }
.field [aria-invalid="true"] { border-color: var(--fox-deep); box-shadow: 0 0 0 4px rgba(181,70,26,.12); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid #d6d0c2; background: #fff; font-size: .92rem; font-weight: 500; cursor: pointer; user-select: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .16s var(--ease-out); }
.chip span:active { transform: scale(.97); }
.chip input:checked + span { background: var(--mint); border-color: var(--forest); color: var(--forest); }
.chip input:checked + span::before { content: ""; width: 5px; height: 10px; border: solid var(--forest);
  border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.chip input:focus-visible + span { outline: 3px solid var(--fox); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.submit-row .btn { position: relative; min-width: 200px; }
.fine { margin: 0; color: var(--muted); font-size: .85rem; }
.fine a { color: var(--forest); }
.form-msg { margin: 0; min-height: 0; color: var(--fox-deep); font-weight: 600; font-size: .92rem; }
.form-msg:empty { display: none; }
/* sending: the label fades out, a small spinner turns in its place */
.spin { position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; opacity: 0; transition: opacity .15s ease; }
.btn .label { transition: opacity .15s ease; }
.sending .btn .label { opacity: 0; }
.sending .btn .spin { opacity: 1; animation: spin .7s linear infinite; }
.sending .btn { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
/* done: the card's content swaps for the thank-you, which settles in */
.signup-done { text-align: center; padding: 18px 8px; }
.signup-done:focus { outline: none; }
.signup-done h3 { font-size: 1.4rem; color: var(--forest); margin: 14px 0 6px; }
.signup-done p { color: var(--muted); margin: 0 auto; max-width: 40ch; }
.done-tick { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--mint); }
.done-tick::after { content: ""; width: 12px; height: 22px; border: solid var(--forest); border-width: 0 3px 3px 0;
  transform: translateY(-2px) rotate(45deg); }
.motion .signup-done { animation: settle .32s var(--ease-out); }
@keyframes settle { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.foot-links { display: inline-flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .signup { grid-template-columns: 1fr; }
  .signup-card { padding: 22px 18px; }
  .submit-row .btn { width: 100%; }
}
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 28px 40px;
  color: var(--muted); font-size: .95rem; }
.foot a:not(.logo) { color: var(--muted); }

/* phones */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-block: 40px 56px; }
  .bar { height: 190px; } .fill { height: 120px; } .bar:nth-child(2) .fill { height: calc(120px * .982); } .bar:nth-child(3) .fill { height: calc(120px * .976); }
  .how, .trust { grid-template-columns: 1fr; }
  .what { grid-template-columns: 1fr 1fr; }
  .actions .btn, .actions .link { width: 100%; text-align: center; }
  .bar em { line-height: 1.35; min-height: 2.7em; }  /* every label keeps two lines, so the three numbers stay level */
}
@media (max-width: 420px) { .what { grid-template-columns: 1fr; } .owed { flex-direction: column; align-items: flex-start; gap: 4px; } }

/* motion: the bars grow once, sections fade up once (app.js adds .motion only when motion is welcome) */
.motion .fill { transform: scaleY(0); transition: transform .7s var(--ease-out); }
.motion .bar:nth-child(2) .fill { transition-delay: .08s; } .motion .bar:nth-child(3) .fill { transition-delay: .16s; }
.motion .owed { opacity: 0; transform: translateY(8px); transition: opacity .3s .5s, transform .3s .5s; }
.motion.go .fill { transform: none; }
.motion.go .owed { opacity: 1; transform: none; }
.motion .block > * { opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s var(--ease-out); }
/* cards inside a section follow their heading one after another (60 ms apart) */
.motion .block .how > li, .motion .block .what > div { opacity: 0; transform: translateY(10px);
  transition: opacity .3s, transform .3s var(--ease-out); }
.motion .block.in .how > li, .motion .block.in .what > div { opacity: 1; transform: none; }
.motion .block.in :is(.how > li, .what > div):nth-child(1) { transition-delay: .1s; }
.motion .block.in :is(.how > li, .what > div):nth-child(2) { transition-delay: .16s; }
.motion .block.in :is(.how > li, .what > div):nth-child(3) { transition-delay: .22s; }
.motion .block.in :is(.how > li, .what > div):nth-child(4) { transition-delay: .28s; }
.motion .block.in > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } .btn:active { transform: none; } }

/* plain pages: privacy, terms, thanks, try again */
.doc { max-width: 760px; padding-block: 48px 72px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin-bottom: 6px; }
.doc h2 { font-size: 1.35rem; letter-spacing: -.015em; margin: 36px 0 10px; }
.doc p, .doc li { color: #2c3a37; }
.doc ul { padding-left: 1.2em; margin: 0; }
.doc li { margin: 8px 0; }
.updated { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.lede-s { font-size: 1.1rem; }
.note { text-align: center; padding-block: 48px; }
.note h1 { margin-top: 16px; }
.note p { max-width: 46ch; margin-inline: auto; }
.page .top .signin { margin-left: auto; }   /* plain pages have no nav: sign in and the button sit right */
