/* Archivo variable (wdth 62-125, wght 100-900). OFL: /fonts/OFL.txt */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #e3e6e4;
  --ink: #1f2731;
  --ink-soft: #46505b;
  --sheet: #fbfcfb;
  --ember: #e39b2d;
  --brick: #8e3f31;
  --rule: #b9c0be;
  --later: #9aa3a6;
  --on-ember: #1f2731;
  --step-0: 1.125rem;
  --step-1: 1.4rem;
  --step-2: clamp(1.75rem, 3.5vw, 2.6rem);
  --step-3: clamp(2.75rem, 8vw, 6rem);
  color-scheme: light dark;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--ground);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #161c23;
    --ink: #e3e6e4;
    --ink-soft: #b4bcbf;
    --sheet: #1f2731;
    --brick: #c2654f;
    --rule: #3c4752;
    --later: #5d6873;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-size: var(--step-0);
  line-height: 1.55;
  font-stretch: 100%;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 { font-stretch: 66%; font-weight: 800; line-height: 1.05; margin: 0 0 1rem; }
h1 { font-size: var(--step-2); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); font-stretch: 80%; font-weight: 700; }
p, li { max-width: 68ch; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Header and footer */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: baseline; padding-top: 1rem; padding-bottom: 1rem; gap: 1rem; }
.brand { font-weight: 800; font-stretch: 70%; font-size: 1.5rem; text-decoration: none; }
.header-cta { font-weight: 600; }

main { padding-top: 2.5rem; padding-bottom: 4rem; }
main > :not(section) { max-width: 44rem; }
main > h1, article > h1 { font-size: var(--step-2); }

.site-footer { border-top: 1px solid var(--rule); font-size: 1rem; color: var(--ink-soft); }
.site-footer .wrap { padding-top: 1.5rem; padding-bottom: 2.5rem; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding: 0; margin: 0 0 0.75rem; }

/* Sections: 12-column grid */
section { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; margin-bottom: 5rem; }
section > * { grid-column: 1 / -1; min-width: 0; }

.hero h1 { grid-column: 1 / span 8; font-size: var(--step-3); font-stretch: 64%; line-height: 1; letter-spacing: -0.01em; }
.hero .sub { grid-column: 1 / span 6; font-size: 1.3rem; color: var(--ink-soft); margin: 0.5rem 0 0; }

/* The due strip */
.strip h2 { font-size: var(--step-1); font-stretch: 80%; }
.months { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.4rem; align-items: end; border-bottom: 2px solid var(--ink); }
.month { display: flex; flex-direction: column; align-items: stretch; padding: 0.4rem 0.25rem 0; max-width: none; }
.marks { display: flex; flex-direction: column-reverse; gap: 3px; min-height: 9.5rem; justify-content: flex-start; }
.month-name { font-stretch: 75%; font-weight: 600; font-size: 0.95rem; text-align: center; padding: 0.35rem 0; }
.month-now { background: var(--ember); color: var(--on-ember); border-radius: 4px 4px 0 0; }
.month-now .month-name { font-weight: 800; }

.mark { display: block; height: 0.65rem; border-radius: 2px; background: var(--ink); }
.mark-due { background: var(--ink); }
.month-now .mark-due { background: var(--sheet); }
.mark-sent { background: var(--ink-soft); }
.mark-later { background: transparent; border: 2px solid var(--later); }

.legend { list-style: none; padding: 0; margin: 0.75rem 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font-size: 0.95rem; }
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.legend .mark { width: 1.25rem; }
.legend .mark-due { background: var(--ember); }

.sheet { background: var(--sheet); border-top: 6px solid var(--ember); padding: 1.25rem 1.5rem; box-shadow: 0 1px 0 var(--rule), 0 12px 24px -18px rgb(31 39 49 / 0.5); }
.sheet h3 { font-size: var(--step-1); }
.sheet-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 1rem; }
th, td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th { font-stretch: 80%; font-weight: 700; }
.sheet-more { margin: 0.75rem 0 0; color: var(--ink-soft); font-size: 1rem; }
.caption { margin: 0.75rem 0 0; font-size: 1rem; color: var(--ink-soft); font-style: italic; }

/* One motion moment: marks fill in month by month, once */
@media (prefers-reduced-motion: no-preference) {
  .month .mark { animation: fill-in 0.35s ease-out both; animation-delay: calc(var(--m) * 90ms + 150ms); }
}
@keyframes fill-in {
  from { opacity: 0; transform: scaleY(0.2); }
  to { opacity: 1; transform: scaleY(1); }
}

/* How it works: a real sequence */
.step-list { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.step-list li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.step-list li::before { content: counter(step); display: block; font-size: 3rem; font-weight: 800; font-stretch: 62%; line-height: 1; margin-bottom: 0.5rem; }
.step-list p { margin: 0; color: var(--ink-soft); }

.objection > * { grid-column: 1 / span 7; }

/* Offer and signup */
.order > * { grid-column: 1 / span 7; }
.price { font-size: var(--step-1); font-weight: 800; font-stretch: 80%; margin: 0 0 0.5rem; }
.small { font-size: 1rem; color: var(--ink-soft); }
.signup { margin-top: 1rem; }
.signup label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.row input[type="email"] { flex: 1 1 14rem; min-width: 0; padding: 0.75rem; font: inherit; color: var(--ink); background: var(--sheet); border: 2px solid var(--ink); border-radius: 4px; }
.row button, .buy { padding: 0.75rem 1.4rem; font: inherit; font-weight: 700; color: var(--on-ember); background: var(--ember); border: 2px solid var(--ember); border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; }
.row button:hover, .buy:hover { border-color: var(--ink); }
.notice { padding: 0.75rem 1rem; border-left: 4px solid var(--ink); background: var(--sheet); }
.notice.error { border-left-color: var(--brick); }

/* Questions */
.faq-item { grid-column: 1 / span 8; border-top: 1px solid var(--rule); padding-top: 1rem; margin-bottom: 1rem; }
.faq-item h3 { margin-bottom: 0.5rem; }
.faq-item p { margin: 0; }

/* Guide and legal pages */
article h2, main > h2 { font-size: var(--step-1); font-stretch: 80%; margin-top: 2rem; }
pre { white-space: pre-wrap; background: var(--sheet); border-left: 4px solid var(--rule); padding: 1rem; font: inherit; font-size: 1rem; }
.note { border-top: 2px solid var(--ink); padding-top: 1rem; }

@media (max-width: 48rem) {
  .hero h1, .hero .sub, .objection > *, .order > *, .faq-item { grid-column: 1 / -1; }
  .step-list { grid-template-columns: 1fr; gap: 1.25rem; }
  .months { gap: 0.15rem; }
  .month { padding: 0.25rem 0.1rem 0; }
  .marks { min-height: 7rem; gap: 2px; }
  .mark { height: 0.45rem; }
  .month-name { font-size: 0.75rem; }
  .sheet { padding: 1rem; }
  section { margin-bottom: 3.5rem; }
}
