/* Vynt pages. Colour values are filled in by the builder from the palette in
   src/main.rs, which a test checks for contrast; edit them there, not here. */

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

:root {
  --paper:#f2f5f5;--ink:#0d2630;--muted:#3f5962;--link:#006b73;--line:#f2b705;--glow:#fff6cc;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root { --paper:#0b1c23;--ink:#e3eeef;--muted:#9fb6bb;--link:#5fd3db;--line:#f2b705;--glow:#fff6cc; }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-stretch: 100%;
  overflow-x: hidden;
}

/* Wordmark above the line on the left, words below it on the right: on a wide
   screen the composition uses the whole width instead of a phone-width column. */
main {
  --mark-size: clamp(4.5rem, 17vw, 16rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  padding-block: var(--gutter);
}

.mark {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  padding-inline: var(--gutter);
  font-weight: 800;
  font-stretch: 125%;
  font-size: var(--mark-size);
  line-height: 0.8;
  letter-spacing: -0.035em;
}

.product {
  font-weight: 500;
  font-stretch: 100%;
  font-size: max(0.2em, 1.1rem);
  letter-spacing: 0;
  margin-inline-start: 0.4em;
}

/* The fibre: a full-bleed line with one pulse of light run along it. */
.fiber {
  grid-column: 1 / -1;
  grid-row: 3;
  position: relative;
  height: 3px;
  /* Clears the descender of the "y" at every size: tied to the wordmark. */
  margin-top: calc(var(--mark-size) * 0.26);
  background: var(--line);
}

.fiber::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 16rem;
  height: 16px;
  background: radial-gradient(closest-side, var(--glow), color-mix(in srgb, var(--line) 60%, transparent) 50%, transparent);
  transform: translate(-100%, -50%);
  opacity: 0;
  animation: pulse 2.8s cubic-bezier(0.45, 0.05, 0.2, 1) 0.5s 1 both;
}

@keyframes pulse {
  0% { transform: translate(-100%, -50%); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(100vw, -50%); opacity: 0; }
}

.copy {
  grid-column: 2;
  grid-row: 4;
  align-self: start;
  max-width: 36rem;
  padding: clamp(1.5rem, 3vw, 2.75rem) var(--gutter) 0 0;
}

.lead {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.3vw, 2.1rem);
  line-height: 1.18;
  font-weight: 560;
  text-wrap: balance;
}

.status {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--muted);
}

a { color: var(--link); text-underline-offset: 0.2em; }

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

@media (max-width: 52rem) {
  main { grid-template-columns: minmax(0, 1fr); }
  .copy { grid-column: 1; padding-inline-start: var(--gutter); }
}

@media (prefers-reduced-motion: reduce) {
  .fiber::after { animation: none; display: none; }
}
