/* maileryield.com: one style file for the home page and the trade pages. Same type and colors as the area pages (web/page.css, dark theme). Copy source: ../SITE-COPY.md. */
:root {
  --bg: #0b100d; --fg: #e3e8e1; --muted: #9aa59d; --line: #263029; --card: #141b16;
  --accent: #ffbf3a; --tree: #6cf064; --tree-dim: #1b4a2f; --paper: #f1eddd; --ink: #17201a;
  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box }
html { scroll-behavior: smooth }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 18px/1.55 var(--body); overflow-x: hidden }
/* The survey grid and the green glow from the video. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(108, 240, 100, .13), transparent 70%),
    radial-gradient(700px 500px at 0% 38%, rgba(255, 191, 58, .05), transparent 70%),
    linear-gradient(rgba(227, 232, 225, .035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(227, 232, 225, .035) 1px, transparent 1px) 0 0 / 56px 56px }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)) }
p { margin: 0 0 14px }
a { color: var(--accent) }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px }
.mono { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 22px }
.brand { font: 800 19px/1 var(--display); font-stretch: 88%; letter-spacing: .005em }
.brand small { display: block; margin-top: 5px; font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted) }
.bar > a { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; white-space: nowrap }
.bar > a:hover { border-color: var(--accent); color: var(--accent) }

.hero { padding-block: clamp(28px, 6vw, 72px) 20px }
.tag { display: inline-block; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(255, 191, 58, .35); border-radius: 999px; padding: 7px 12px }
.tag::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px }
h1 { font: 800 clamp(36px, 9.5vw, 96px)/.96 var(--display); font-stretch: 78%; letter-spacing: -.012em; margin: 20px 0 22px }
h1 span { display: block; white-space: nowrap }
h1 em, h2 em { font-style: normal; color: var(--accent); white-space: nowrap }
.lead { font-size: clamp(18px, 2.1vw, 21px); max-width: 640px; color: var(--fg) }

.film { margin-top: clamp(24px, 4vw, 44px); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(108, 240, 100, .08), 0 30px 90px -20px rgba(108, 240, 100, .22) }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #05080a }
.undervideo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px 8px }
.btn { display: inline-block; font: 800 18px/1 var(--display); font-stretch: 88%; letter-spacing: .01em; color: #0e1310; background: var(--accent); text-decoration: none; border-radius: 6px; padding: 17px 24px; transition: transform .15s, box-shadow .15s }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(255, 191, 58, .55) }
.btn::after { content: "\2192"; margin-left: 10px }

section { padding-block: clamp(56px, 9vw, 112px); border-top: 1px solid var(--line) }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: center }
.split.flip > .words { order: 2 }
h2 { font: 780 clamp(27px, 4.4vw, 50px)/1.02 var(--display); font-stretch: 80%; letter-spacing: -.008em; margin: 14px 0 20px }
h2 span { display: block }
.words p { max-width: 520px }
.num { font: 500 12px/1 var(--mono); letter-spacing: .1em; color: var(--accent) }

/* Two routes, side by side. */
.routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.route { background: #0e1310; border: 1px solid var(--line); border-radius: 8px; overflow: hidden }
.route svg { display: block; width: 100%; height: auto; background: #0a0f0c }
.route div { padding: 14px 16px 16px }
.route b { display: block; font: 600 clamp(30px, 4.6vw, 46px)/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--tree) }
.route.low b { color: #8fa0a8 }
.route span { display: block; margin-top: 6px; font-size: 15px; color: var(--muted) }
.route i { display: block; height: 5px; margin-top: 12px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden }
.route i::after { content: ""; position: absolute; inset: 0; width: var(--w); border-radius: 3px; background: linear-gradient(90deg, var(--tree-dim), var(--tree)); transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1) .25s }
.route.low i::after { background: #8fa0a8 }
.in .route i::after { transform: none }
.same { margin-top: 12px; text-align: center }

/* The label, like the ingredients on a can. */
.labelwrap { display: grid; place-items: center; padding: 10px }
.label { width: min(100%, 400px); background: var(--paper); color: var(--ink); padding: 20px 22px 18px; border-radius: 3px; transform: rotate(-2.2deg);
  box-shadow: 0 26px 60px -18px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .3); font-family: var(--mono) }
.label h3 { margin: 0; font: 800 34px/1 var(--display); font-stretch: 76%; letter-spacing: .01em; text-transform: uppercase }
.label .sub { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; letter-spacing: .04em; padding: 8px 0 9px; border-bottom: 9px solid var(--ink) }
.label dl { margin: 0 }
.label dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--ink) }
.label dt { font-size: 14px }
.label dd { margin: 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap }
.label dl div.big { border-bottom-width: 5px }
.label dl div.big dd { font-size: 26px }
.label .fine { margin: 10px 0 0; font-size: 11px; line-height: 1.45; letter-spacing: .02em }

/* 676 mailboxes, 255 mailed. 26 x 26 = 676. */
.boxes { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: clamp(2px, .45vw, 4px); max-width: 470px; margin-inline: auto }
.boxes i { aspect-ratio: 1; border-radius: 1.5px; background: #1c2520 }
.boxes i.fit { transition: background .5s, box-shadow .5s; transition-delay: calc(var(--d) * 1ms) }
.in .boxes i.fit { background: var(--tree); box-shadow: 0 0 6px rgba(108, 240, 100, .5) }
.tally { display: flex; justify-content: center; gap: clamp(20px, 5vw, 48px); margin-top: 22px; text-align: center }
.tally b { display: block; font: 600 clamp(32px, 5vw, 48px)/1 var(--mono); font-variant-numeric: tabular-nums }
.tally div:last-child b { color: var(--tree) }
.tally span { font-size: 15px; color: var(--muted) }

.plain { text-align: center }
.plain h2 { font-size: clamp(34px, 7vw, 84px); font-stretch: 76%; margin-bottom: 28px }
.plain p, .ask p { text-wrap: balance }
.plain p { max-width: 560px; margin-inline: auto; font-size: clamp(18px, 2.1vw, 21px) }
.plain p.muted { color: var(--muted); font-size: 16px }

.ask { text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: clamp(36px, 7vw, 80px) 20px;
  background: radial-gradient(520px 260px at 50% 0%, rgba(255, 191, 58, .12), transparent 70%), var(--card) }
.ask h2 { font-size: clamp(34px, 6.4vw, 72px); margin-top: 0 }
.ask h2 span { display: inline-block }
.ask p { max-width: 500px; margin: 0 auto 28px; font-size: clamp(18px, 2.1vw, 21px) }

footer { padding-block: 30px 60px; color: var(--muted); font-size: 14px }
footer b { color: var(--fg); font: 800 15px/1.2 var(--display) }

.rise { opacity: 0; transform: translateY(22px); transition: opacity .7s, transform .7s cubic-bezier(.2, .7, .2, 1) }
.rise.in { opacity: 1; transform: none }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } .rise, .route i::after, .boxes i.fit { transition: none } .rise { opacity: 1; transform: none } }
@media (max-width: 820px) {
  body { font-size: 17px }
  .split { grid-template-columns: minmax(0, 1fr) }
  .split.flip > .words { order: 0 }
  .bar > a { display: none }
  .undervideo { justify-content: flex-start }
  .btn { width: 100%; text-align: center }
  .ask .btn { width: 100% }
}

/* The four trades on the home page. */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 30px }
.tile { display: flex; flex-direction: column; gap: 12px; min-height: 230px; padding: 20px 18px 18px; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--fg); border-radius: 3px; color: var(--fg); text-decoration: none; transition: transform .15s, box-shadow .15s }
.tile .mono { color: var(--accent) }
.tile b { font: 780 clamp(22px, 2.4vw, 28px)/1.08 var(--display); font-stretch: 82% }
.tile small { margin-top: auto; font-size: 14px; color: var(--muted) }
a.tile { border-top-color: var(--accent) }
a.tile:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -18px rgba(255, 191, 58, .5) }
a.tile i { font: 500 12px/1 var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--accent) }
a.tile i::after { content: "\2192"; margin-left: 8px }
.brand a { color: inherit; text-decoration: none; border: 0; padding: 0; font: inherit; letter-spacing: inherit; text-transform: none }
@media (max-width: 820px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 520px) { .tiles { grid-template-columns: minmax(0, 1fr) } .tile { min-height: 0 } }

/* Footer links, and the Privacy and Terms pages. */
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px }
footer nav a { color: var(--fg); text-decoration: none }
footer nav a:hover { color: var(--accent) }
.legal { max-width: 700px; padding-block: clamp(24px, 5vw, 56px) 40px }
.legal h1 { font-size: clamp(36px, 7vw, 64px); margin: 0 0 10px }
.legal .date { margin-bottom: 36px }
.legal h2 { font-size: clamp(22px, 3vw, 28px); margin: 40px 0 12px }
.legal ul { margin: 0 0 14px; padding-left: 22px }
.legal li { margin-bottom: 8px }

/* The form. It posts to /api/lead (worker/index.ts). */
.lead { display: grid; gap: 16px; max-width: 640px; margin: 0 auto; text-align: left }
.lead .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px }
.lead label { display: grid; gap: 6px; font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
.lead input, .lead select { width: 100%; font: 400 17px/1.3 var(--body); letter-spacing: 0; text-transform: none; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 12px }
.lead input:focus, .lead select:focus { outline: 2px solid var(--accent); outline-offset: 1px }
.lead .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden }
.lead .btn { justify-self: start; border: 0; cursor: pointer }
.lead .btn:disabled { opacity: .5; cursor: not-allowed }
.ask .lead .fine, .lead .fine { margin: 0; max-width: none; font-size: 14px; color: var(--muted) }
@media (max-width: 640px) { .lead .grid { grid-template-columns: minmax(0, 1fr) } }
