/* GainzFreak web — palette and voice follow docs/07-design-system.md.
   White surfaces, carbon type, burnt orange only for the logo and the Scan action.
   No gradients, no shadows. */

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

:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --card: #ffffff;
  --stone: #e9ece7;
  --line: #dde0db;
  --ink: #202320;
  --ash: #646863;
  --button: #252825;
  --on-button: #ffffff;
  --signature: #bf542c;
  --done: #587c65;
  --record: #8a7440;

  --gutter: clamp(20px, 5vw, 56px);
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121412;
    --card: #1c1e1c;
    --stone: #2a2d2a;
    --line: #343734;
    --ink: #f3f4f1;
    --ash: #a0a49f;
    --button: #f3f4f1;
    --on-button: #202320;
    --signature: #d2683f;
    --done: #7fa58c;
    --record: #bba477;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--signature);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 76rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  background: var(--card);
  padding: 8px 12px;
  z-index: 10;
}

/* Numbers are the heroes: wide, heavy, tabular. */
.num {
  font-stretch: 112%;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--ash);
}

/* ---------- Top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}
.top img {
  display: block;
  height: 34px;
  width: auto;
}
.top nav {
  display: flex;
  gap: 24px;
  font-size: 0.9375rem;
}
.top nav a {
  text-decoration: none;
  color: var(--ash);
}
.top nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(32px, 7vw, 88px) clamp(56px, 9vw, 120px);
}

.tagline {
  font-style: italic;
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(3.1rem, 9.2vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.tagline a {
  display: block;
  width: fit-content;
  text-decoration: none;
}
/* Each word is a jump link to its step; the underline draws in on hover or focus. */
.tagline a span {
  background: linear-gradient(var(--signature), var(--signature)) no-repeat 0 96% / 0 0.07em;
  transition: background-size 0.25s ease-out;
}
.tagline a:hover span,
.tagline a:focus-visible span {
  background-size: 100% 0.07em;
}

.lede {
  max-width: var(--measure);
  margin-top: clamp(24px, 3vw, 40px);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.45;
}

.status {
  display: inline-flex;
  flex-direction: column;
  margin-top: 28px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--button);
  color: var(--on-button);
  line-height: 1.25;
}
.status strong {
  font-weight: 650;
  font-stretch: 108%;
}
.status small {
  font-size: 0.8125rem;
  opacity: 0.72;
}

/* ---------- Phone illustration ---------- */

.phone {
  justify-self: center;
  width: min(100%, 340px);
}
.phone-body {
  border: 1px solid var(--line);
  border-radius: 44px;
  background: var(--card);
  padding: 12px;
}
.screen {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: var(--stone);
  aspect-ratio: 9 / 17;
  display: flex;
  flex-direction: column;
}
.viewfinder {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
}
.viewfinder svg {
  width: 62%;
  height: auto;
  overflow: visible;
}
.machine {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brackets {
  fill: none;
  stroke: var(--signature);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 100px 105px;
  animation: lock 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s both;
}
.sheet {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-radius: 28px 28px 0 0;
  padding: 18px 18px 22px;
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 1.15s both;
}
.sheet h2 {
  font-size: 1.375rem;
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.sheet .muted {
  font-size: 0.8125rem;
}

.confidence {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.8125rem;
}
.bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--stone);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--ink);
}

.target {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.target .num {
  display: block;
  font-size: 1.75rem;
  line-height: 1.1;
  margin-top: 2px;
}
.target p:last-child {
  margin-top: 6px;
  font-size: 0.875rem;
  line-height: 1.35;
}

.caption {
  margin-top: 14px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ash);
}

@keyframes lock {
  from {
    transform: scale(1.32);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes rise {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ---------- The four steps ---------- */

.steps {
  border-top: 1px solid var(--line);
}
.step {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 4fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
  padding-block: clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.step h2 {
  font-style: italic;
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.5rem, 5.4vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.step h2 small {
  display: block;
  margin-bottom: 14px;
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-size: 0.9375rem;
  letter-spacing: 0;
  color: var(--ash);
}
.step-copy p + p {
  margin-top: 14px;
}
.step-copy p:first-child {
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 550;
}

/* UI fragments: bordered 16 px cards like the app's GFCard. */
.frag {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 18px;
  font-size: 0.9375rem;
}
.frag + .frag {
  margin-top: 12px;
}
.frag h3 {
  font-size: 1.125rem;
  font-weight: 700;
  font-stretch: 108%;
  line-height: 1.2;
}

.scan-demo {
  display: flex;
  align-items: center;
  gap: 16px;
}
.scan-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--signature);
}
.scan-btn svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.chips li {
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--stone);
  font-size: 0.8125rem;
}

.sets li {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  align-items: center;
  gap: 10px;
  padding-block: 9px;
  border-bottom: 1px solid var(--line);
}
.sets li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.sets .num {
  font-size: 1.125rem;
}
.sets .tick {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--done);
}
.sets .tick svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.finish {
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--button);
  color: var(--on-button);
  font-size: 0.8125rem;
  font-weight: 600;
}
.rest {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.rest .num {
  font-size: 1.5rem;
}

.reco .num {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
  margin-block: 2px 10px;
}
.reasons li {
  position: relative;
  padding-left: 16px;
}
.reasons li + li {
  margin-top: 4px;
}
.reasons li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1.5px;
  background: var(--ash);
}

.provenance {
  display: grid;
  gap: 8px;
}
.provenance li {
  display: grid;
  grid-template-columns: 14px 6.5rem 1fr;
  gap: 10px;
  align-items: center;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
}
.dot.full {
  background: var(--ink);
}
.dot.half {
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
}

/* ---------- Hybrid ---------- */

.hybrid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  gap: clamp(20px, 3vw, 48px);
  padding-block: clamp(56px, 8vw, 112px);
}
.section-title {
  font-weight: 750;
  font-stretch: 118%;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hybrid-body {
  max-width: 40rem;
}
.hybrid-body > p {
  font-size: 1.25rem;
  line-height: 1.4;
}
.hybrid-body .frag {
  margin-top: 24px;
}

/* ---------- Refusals ---------- */

.wont {
  background: var(--card);
  border-block: 1px solid var(--line);
  padding-block: clamp(56px, 8vw, 112px);
}
.wont-list {
  margin-top: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 5vw, 72px);
}
.wont-list li {
  padding-block: 20px;
  border-top: 1px solid var(--line);
}
.wont-list h3 {
  font-size: 1.25rem;
  font-weight: 650;
  font-stretch: 108%;
  line-height: 1.25;
}
.wont-list p {
  margin-top: 6px;
  max-width: var(--measure);
  color: var(--ash);
}

/* ---------- Plans ---------- */

.plans {
  padding-block: clamp(56px, 8vw, 112px);
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 5vw, 72px);
  margin-top: clamp(28px, 4vw, 48px);
}
.plan h3 {
  font-size: 1.25rem;
  font-weight: 700;
  font-stretch: 112%;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.plan li {
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.plans-note {
  margin-top: 24px;
  max-width: var(--measure);
  color: var(--ash);
  font-size: 0.9375rem;
}

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding-block: 32px 48px;
  font-size: 0.9375rem;
  color: var(--ash);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}
.foot nav {
  display: flex;
  gap: 24px;
}
.foot p + p,
.foot-row + p {
  margin-top: 12px;
  max-width: 44rem;
}

/* ---------- Legal and plain pages ---------- */

.doc {
  max-width: 42rem;
  padding-block: clamp(32px, 6vw, 72px) clamp(56px, 8vw, 112px);
}
.doc h1 {
  font-style: italic;
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.doc h2 {
  font-size: 1.375rem;
  font-weight: 700;
  font-stretch: 108%;
  line-height: 1.2;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
}
.doc p,
.doc ul,
.doc ol {
  margin-bottom: 1em;
}
.doc ul {
  list-style: disc;
  padding-left: 1.25em;
}
.doc ol {
  list-style: decimal;
  padding-left: 1.25em;
}
.doc li + li {
  margin-top: 0.4em;
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .phone {
    width: min(100%, 300px);
  }
  .step {
    grid-template-columns: 1fr;
  }
  .step h2 small {
    margin-bottom: 8px;
  }
  .hybrid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .wont-list,
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .top nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .brackets,
  .sheet {
    animation: none;
  }
  .tagline a span {
    transition: none;
  }
}
