/* ==========================================================================
   Wyzo — landing styles
   Design tokens live here and nowhere else. Nothing outside :root is allowed.
   The 20° slant and the circle are lifted straight from the Wyzo mark.
   ========================================================================== */

/* One self-hosted file: Montserrat variable, subset to Latin + Cyrillic.
   The wght axis covers both weights we use (400 and 600). */
@font-face {
  font-family: Montserrat;
  src: url("assets/fonts/montserrat-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* colour — exactly five */
  --bg: #f7f8f7;
  --text: #0d0f0d;
  --muted: #5b5f5b;
  --accent: #30f2ae;
  --accent-hover: #17d492;

  /* type — exactly five sizes, fluid between mobile and desktop */
  --fs-1: clamp(2rem, 1.15rem + 3.4vw, 3rem);        /* 32 → 48 */
  --fs-2: clamp(1.5rem, 1.28rem + 0.9vw, 2rem);      /* 24 → 32 */
  --fs-3: clamp(1.125rem, 1.06rem + 0.28vw, 1.25rem);/* 18 → 20 */
  --fs-4: 1rem;                                      /* 16 */
  --fs-5: 0.875rem;                                  /* 14 */

  /* spacing — 8px base scale */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 96px;

  /* one radius, everywhere */
  --r: 8px;

  --wrap: 1120px;
  --header-h: 64px;
  --slant: 20deg;
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Montserrat, ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  font-size: var(--fs-4);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, figure { margin: 0; }
ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

/* ------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s3);
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s3);
}

.section { padding-block: var(--s6); }

.section-head {
  font-size: var(--fs-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--s4);
}

.kicker {
  font-size: var(--fs-5);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* -------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid rgb(13 15 13 / 0.1);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  text-decoration: none;
  font-size: var(--fs-3);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand img { width: 46px; height: 22px; }

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--s1);
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--s2);
  font-size: var(--fs-5);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.lang:hover { color: var(--text); }

/* --------------------------------------------------------------- button -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s3);
  border: 0;
  border-radius: var(--r);
  background: var(--accent);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.btn:hover { background: var(--accent-hover); }

.btn-sm {
  min-height: 44px;
  padding: 0 var(--s2);
  font-size: var(--fs-5);
}

/* ----------------------------------------------------------------- hero -- */

.hero {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-content: center;
  padding-block: var(--s4);
}

.hero-grid { align-items: center; row-gap: var(--s4); }

.hero-copy { grid-column: 1 / -1; }

.hero h1 {
  font-size: var(--fs-1);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.03em;
  margin-block: var(--s2) var(--s3);
  max-width: 18ch;
}

/* The one inset highlight on the page: accent under the phrase that matters.
   Kept on a single line so the bar never collides with the line below. */
.hl {
  white-space: nowrap;
  box-shadow: inset 0 -0.22em 0 var(--accent);
}

.hero-sub {
  font-size: var(--fs-3);
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: var(--s4);
}

.hero-note {
  font-size: var(--fs-5);
  color: var(--muted);
  margin-top: var(--s2);
}

/* hero figure — the Wyzo pipeline, drawn with the mark's own geometry */

.flow {
  grid-column: 1 / -1;
  border: 1px solid rgb(13 15 13 / 0.12);
  border-radius: var(--r);
  background: #fff;
  padding: var(--s3);
}

.flow-label {
  font-size: var(--fs-5);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s3);
}

.flow-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: baseline;
  column-gap: var(--s2);
  padding-block: var(--s2);
}

.flow-step + .flow-step { border-top: 1px solid rgb(13 15 13 / 0.08); }

/* the slanted bar, 20° — same angle as the two strokes in the logo */
.bar {
  width: 9px;
  height: 22px;
  background: var(--text);
  transform: skewX(var(--slant));
  align-self: center;
}

.flow-step.last .bar {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  transform: none;
}

.flow-step.last .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 9px;
  background: var(--text);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.flow-step b {
  display: block;
  font-size: var(--fs-4);
  font-weight: 600;
}

.flow-step span {
  display: block;
  font-size: var(--fs-5);
  color: var(--muted);
}

/* The <br> only exists so the label and its line stay apart with CSS off. */
.flow-step br { display: none; }

/* -------------------------------------------------- subject switch (CSS) --
   Radio inputs, not JS: the switch keeps working with scripting disabled and
   arrow keys move between options for free.                                 */

.switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  margin-bottom: var(--s3);
}

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

.switch label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--s2);
  border: 1px solid rgb(13 15 13 / 0.16);
  border-radius: var(--r);
  font-size: var(--fs-5);
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.switch label:hover { color: var(--text); border-color: var(--text); }

.switch input:checked + label {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.switch input:focus-visible + label {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Product is the default, so it survives even without :has() support. */
.v-service,
.v-other { display: none; }

.flow:has(#subj-service:checked) .v-product,
.flow:has(#subj-other:checked) .v-product { display: none; }

.flow:has(#subj-service:checked) .v-service,
.flow:has(#subj-other:checked) .v-other { display: grid; }

/* ------------------------------------------------------------- problem -- */

.cards { row-gap: var(--s4); }

.card { grid-column: 1 / -1; }

.card h3 {
  font-size: var(--fs-3);
  font-weight: 600;
  letter-spacing: -0.01em;
  padding-top: var(--s2);
  border-top: 2px solid var(--text);
  margin-bottom: var(--s1);
}

.card p { color: var(--muted); }

/* --------------------------------------------------------------- steps -- */

.steps { border-top: 1px solid rgb(13 15 13 / 0.12); }

.step {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: baseline;
  gap: var(--s2);
  padding-block: var(--s3);
}

.step + .step { border-top: 1px solid rgb(13 15 13 / 0.08); }

/* Accent is reserved for the action. The numbers carry the slant instead. */
.step-n {
  font-size: var(--fs-1);
  line-height: 1;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transform: skewX(var(--slant));
}

.step p { font-size: var(--fs-3); }

/* ------------------------------------------------------ inverted bands -- */

.invert {
  background: var(--text);
  color: var(--bg);
}

/* On the dark ground the accent clears 12.9:1, so it can carry text here. */
.kicker-accent { color: var(--accent); margin-bottom: var(--s2); }

/* ------------------------------------------------------ store + catalog -- */

.store { padding-block: var(--s6); }

.store-copy { grid-column: 1 / -1; }

.store h2 {
  font-size: var(--fs-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--s2);
}

.store-copy p {
  color: rgb(247 248 247 / 0.72);
  max-width: 40ch;
}

.store-list {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-list li {
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: var(--s2);
  padding-block: var(--s3);
  border-top: 1px solid rgb(247 248 247 / 0.16);
}

.store-n {
  font-size: var(--fs-2);
  font-weight: 600;
  line-height: 1.15;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  transform: skewX(var(--slant));
  transition: transform 0.2s ease;
}

.store-list li:hover .store-n { transform: skewX(var(--slant)) translateX(4px); }

.store-list b {
  display: block;
  font-size: var(--fs-3);
  font-weight: 600;
}

.store-list span {
  display: block;
  color: rgb(247 248 247 / 0.72);
}

.store-list br { display: none; }

/* The mark blown up as ground texture: two 20° strokes and the circle. */
.final {
  position: relative;
  overflow: hidden;
  padding-block: var(--s6);
}

.final::before,
.final::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.final::before {
  right: -80px;
  bottom: -140px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgb(48 242 174 / 0.09);
}

.final::after {
  right: 320px;
  top: -60px;
  bottom: -60px;
  width: 96px;
  background: rgb(247 248 247 / 0.05);
  transform: skewX(var(--slant));
  box-shadow: 152px 0 0 rgb(247 248 247 / 0.05);
}

.final > * { position: relative; }

.final h2 {
  font-size: var(--fs-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--s2);
}

.final p {
  color: rgb(247 248 247 / 0.72);
  max-width: 42ch;
  margin-bottom: var(--s4);
}

.site-footer {
  border-top: 1px solid rgb(247 248 247 / 0.16);
  padding-block: var(--s4);
  font-size: var(--fs-5);
}

.footer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) var(--s3);
}

.footer-line + .footer-line { margin-top: var(--s2); }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-size: var(--fs-4);
  font-weight: 600;
  text-decoration: none;
}

.footer-brand img { width: 40px; height: 19px; }

.site-footer a { color: rgb(247 248 247 / 0.72); }
.site-footer a:hover { color: var(--bg); }
.site-footer .muted { color: rgb(247 248 247 / 0.72); }

/* ------------------------------------------------------------- < 768px -- */

/* The hero has to clear 100vh on a 390×844 phone, so the fold tightens up. */
@media (max-width: 767px) {
  .hero { padding-block: var(--s3); }
  .hero-grid { row-gap: var(--s3); }
  .hero-sub { margin-bottom: var(--s3); }
  .flow { padding: var(--s2); }
  .flow-label { margin-bottom: var(--s2); }
  .flow-step { padding-block: var(--s1); }
  .section { padding-block: var(--s5); }
  .final { padding-block: var(--s5); }
  .store { padding-block: var(--s5); }
  .final::after { display: none; }

  /* The switch now labels the card, so the caption can go and pay for it. */
  .flow-label { display: none; }
  .switch { margin-bottom: var(--s2); }
  .store-list li { padding-block: var(--s2); }
}

/* On a 360px screen the H1 needs a fourth line, so the fold gives it back. */
@media (max-width: 400px) {
  .hero { padding-block: var(--s1); }
  .hero-grid { row-gap: var(--s1); }
  .hero-sub { margin-bottom: var(--s2); }
  .hero-note { margin-top: var(--s1); }
}

/* ------------------------------------------------------------ ≥ 768px -- */

@media (min-width: 768px) {
  .card { grid-column: span 4; }
  .store-copy { grid-column: 1 / span 5; }
  .store-list { grid-column: 7 / span 6; }
  .step { grid-template-columns: 128px 1fr; }
}

@media (min-width: 1024px) {
  .hero-copy { grid-column: 1 / span 6; }
  .flow { grid-column: 8 / span 5; padding: var(--s4); }
  .store-list { grid-column: 7 / span 5; }
  .hero h1 { margin-block: var(--s3) var(--s3); }
}

/* ------------------------------------------------------------- motion -- */

/* Cards answer the pointer through the rule they already have. */
.card h3 { transition: border-top-color 0.2s ease; }
.card:hover h3 { border-top-color: var(--accent); }

.step-n { transition: transform 0.2s ease; }
.step:hover .step-n { transform: skewX(var(--slant)) translateX(6px); }

.flow-step.last .bar { transition: transform 0.25s ease; }
.flow:hover .flow-step.last .bar { transform: scale(1.12); }

/* Sections fade up once. The class is set by script, so with JS off — and with
   reduced motion asked for — nothing is ever hidden. */
.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-on [data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------- reduced motion -- */

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