/* Free format breakdown page (breakdown.ekkobuild.com).
   Style: ekkoVintage Web v0.3 (parchment paper, Marine ink, one Clay hand note, no double lines),
   except the text face: the logo and headline stay in italic Libre Caslon; everything else is plain Avenir Next (not italic, not condensed).
   Avenir Next is built into iPhones and Macs; other devices get Nunito Sans (Google Fonts), which looks similar.
   Tokens and the button / field CSS are copied from ekkoVintage-web-kit.html.
   Light only: the page never switches to dark mode. */

:root {
  --ground: #F2EBDC;
  --paper: #F7F1E4;
  --sunken: #EAE1CE;
  --rule: #DED2BB;
  --hl: rgba(255, 252, 244, .92);
  --shn: rgba(118, 88, 48, .20);
  --shd: rgba(118, 88, 48, .34);
  --ink: #16233F;      /* Marine */
  --ink-2: #4A5468;
  --slate: #5A6578;
  --ghost: #8E8F8C;    /* placeholder text (kit's #B9BBBB, darkened to stay readable on the field) */
  --hero: #5F82A6;     /* Dusty blue: only the key number in the title */
  --clay: #B5502E;
  --olive: #4F5B3B;
  --f-serif: "Libre Caslon Text", Georgia, serif;
  --f-text: "Avenir Next", "Avenir", "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --f-ui: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --f-hand: "Noteworthy", "Caveat", "Bradley Hand", cursive;
  --r: 16px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .14 0 0 0 0 .25 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { background: var(--ground); }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.55;
  background-image: var(--grain);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
h1, h2, p { margin: 0; font-weight: 400; }
button, input { font: inherit; color: inherit; }
a { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: 600px; margin: 0 auto; padding: 0 20px; }

/* 1. Wordmark */
.top { padding-top: 28px; }
.logo {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

/* 2. Kicker + headline + sentence */
.hero { padding: 44px 0 0; }
.kick {
  font: 500 12px/1.6 var(--f-ui);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-2);
}
h1 {
  margin-top: 16px;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(32px, 8.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 .n { color: var(--hero); }
.lede {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* 3. Form: inset field, Marine button, small print */
.signup { position: relative; margin-top: 44px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inp {
  display: block;
  width: 100%;
  min-height: 54px;
  background: var(--sunken);
  box-shadow: inset 3px 3px 7px var(--shn), inset -3px -3px 7px var(--hl);
  border: 1.5px solid transparent;
  border-radius: calc(var(--r) * .6);
  padding: 12px 16px;
  font: 400 17px var(--f-text); /* 16px or more stops iPhones zooming in */
  color: var(--ink);
  transition: border-color .16s, box-shadow .16s;
}
.inp::placeholder { color: var(--ghost); }
.inp:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: inset 3px 3px 7px var(--shn), inset -3px -3px 7px var(--hl), 0 0 0 4px rgba(22, 35, 63, .10);
}
.inp[aria-invalid="true"] { border-color: var(--clay); }

.form-error {
  min-height: 0;
  margin-top: 8px;
  font: 500 14px/1.4 var(--f-text);
  color: var(--clay);
}
.form-error:empty { display: none; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  padding: 0 20px;
  border: 0;
  border-radius: calc(var(--r) * .7);
  background: var(--ink);
  color: var(--ground);
  font: 600 16px var(--f-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: -3px -3px 8px var(--hl), 4px 6px 12px var(--shd);
  transition: box-shadow .16s, transform .1s, filter .16s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 22px; height: 12px; flex: none; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); box-shadow: inset 3px 3px 7px rgba(0, 0, 0, .35), inset -2px -2px 5px rgba(255, 255, 255, .12); }
.btn[disabled] {
  background: var(--sunken);
  color: var(--slate);
  box-shadow: inset 3px 3px 7px var(--shn), inset -3px -3px 7px var(--hl);
  cursor: wait;
  filter: none;
  transform: none;
}

/* The one hand note on the screen */
.hand {
  position: absolute;
  right: 6px;
  top: -30px;
  font: 700 22px/1 var(--f-hand);
  color: var(--clay);
  transform: rotate(-4deg);
  white-space: nowrap;
  pointer-events: none;
}

.micro {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.micro a { color: var(--ink-2); }

/* Shown after a successful sign-up (script.js adds .on) */
.success { display: none; margin-top: 28px; padding: 24px; border-radius: var(--r); background: var(--paper); box-shadow: -7px -7px 16px var(--hl), 8px 10px 22px var(--shn); }
.success.on { display: block; }
.success:focus { outline: none; }
.success .big { font-family: var(--f-text); font-weight: 700; font-size: 28px; line-height: 1.15; letter-spacing: -.01em; }
.success .big .ok { color: var(--olive); }
.success .micro { margin-top: 10px; }

/* 4. "Inside the breakdown" preview card */
.inside { padding: 56px 0 64px; }
.card {
  position: relative;
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: -7px -7px 16px var(--hl), 8px 10px 22px var(--shn);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: .45;
  pointer-events: none;
}
.card-head {
  position: relative;
  padding: 18px 22px;
  background: var(--ink);
  color: var(--ground);
  font: 600 15px/1 var(--f-ui);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.card-body { position: relative; padding: 14px; }
/* Empty for now: the breakdown preview image goes here when it's ready */
.preview {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--sunken);
  box-shadow: inset 3px 3px 7px var(--shn), inset -3px -3px 7px var(--hl);
  overflow: hidden;
}
.preview img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* 5. Footer: one hairline, nothing else */
footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; }
footer p { font-size: 14px; line-height: 1.7; color: var(--slate); }
footer a { color: var(--slate); }

@media (min-width: 720px) {
  .top { padding-top: 40px; }
  .hero { padding-top: 64px; }
  .lede { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Screen-reader-only text */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
