/* The app's own type and its dark palette, as the video uses them, so the page, the film and the
   screens in it read as one thing. */

@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 400; font-display: swap; src: url(fonts/dm-mono-400.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --steel: #161818;
  --sunk: #0f1111;
  --paper: #232626;
  --ink: #eceae4;
  --ink-2: #c4c6c2;
  --ink-3: #a0a4a1;
  --rule: #3b3f3f;
  --ribbon: #ff7d70;
  --ribbon-deep: #ff9b91;
  --on-ribbon: #1f0907;
  --go: #4cc283;
  --bezel: #050606;
  --bezel-edge: #2c3030;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: Barlow, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", monospace;

  --gutter: 16px;
  --page: 1240px;
  --radius: 3px;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

html { background: var(--steel); scroll-padding-top: 24px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--steel);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 0.2em; }

:focus-visible { outline: 3px solid var(--ribbon); outline-offset: 3px; }

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

/* ---- Masthead: the app's, wordmark and all ---- */

.masthead {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 22px 0 14px;
  border-bottom: 2px solid var(--rule);
}

.wordmark {
  font: 700 2.25rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.masthead__note,
.kicker,
.set__on,
.index a,
.skip,
.footer {
  font-family: var(--mono);
  text-transform: uppercase;
}

.masthead__note { font-size: 0.9375rem; letter-spacing: 0.1em; color: var(--ink-3); }

.masthead__trial {
  align-self: center;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--ribbon);
  border-radius: var(--radius);
  color: var(--ink);
  font: 500 0.9375rem/1 var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.masthead__trial:hover { background: var(--ribbon); color: var(--on-ribbon); }

@media (max-width: 420px) {
  .masthead__note { display: none; }
}

/* ---- Hero: the film first ---- */

.hero { display: grid; gap: 36px; padding: 48px 0 80px; }

h1 {
  margin: 0;
  max-width: 15ch;
  font: 700 clamp(2.6rem, 7vw, 5rem)/0.9 var(--display);
  text-transform: uppercase;
  text-wrap: balance;
}

.lede {
  max-width: 46ch;
  margin-top: 22px;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  text-wrap: pretty;
}

/* Wide enough, the film sits beside the headline so the whole of it is in view on arrival. */
@media (min-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr);
    column-gap: 56px;
    align-items: center;
    padding: 64px 0 96px;
  }

  h1 { font-size: 3.2rem; }
  .lede { font-size: 1.125rem; }
}

.film {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--sunk);
  border-radius: var(--radius);
  box-shadow: 0 0 0 2px var(--bezel-edge), 0 40px 90px rgba(0, 0, 0, 0.55);
}

.film video { width: 100%; height: 100%; border-radius: var(--radius); }

.film__play {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 0 26px 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ribbon);
  color: var(--on-ribbon);
  font: 500 1.3125rem/1 var(--text);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}

.film__play[hidden] { display: none; }
.film__play svg { width: 18px; height: 20px; fill: currentColor; }
.film__play:hover { background: var(--ribbon-deep); }
.film__play:active { scale: 0.98; }
.film__play:focus-visible { outline-color: var(--ink); }

.film__time {
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--on-ribbon) 35%, transparent);
  font: 400 1rem/1 var(--mono);
  letter-spacing: 0.06em;
}

@media (max-width: 560px) {
  .film__play { min-height: 52px; padding: 0 18px 0 16px; gap: 10px; font-size: 1.0625rem; }
  .film__time { padding-left: 10px; font-size: 0.875rem; }
}

.skip { margin-top: 22px; font-size: 0.875rem; letter-spacing: 0.08em; color: var(--ink-3); }
.skip a { color: var(--ink-2); }
.skip a:hover { color: var(--ink); }

/* ---- The tour: an index beside the features on wide screens ---- */

.tour { border-top: 2px solid var(--rule); }

.index { display: none; }

@media (min-width: 1180px) {
  .tour {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    column-gap: 64px;
  }

  .index {
    display: block;
    position: sticky;
    top: 0;
    align-self: start;
    padding-top: 80px;
  }
}

.index ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--rule); }

.index a {
  display: flex;
  gap: 12px;
  margin-left: -2px;
  padding: 8px 0 8px 16px;
  border-left: 3px solid transparent;
  color: var(--ink-3);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-decoration: none;
}

.index a:hover { color: var(--ink); }
.index a[aria-current="true"] { color: var(--ink); border-left-color: var(--ribbon); }
.index a[aria-current="true"] span { color: var(--ribbon); }

.feature { padding: 80px 0 88px; }
.feature + .feature { border-top: 2px solid var(--rule); }

.kicker {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--ribbon);
  font-size: 0.875rem;
  letter-spacing: 0.14em;
}

.kicker__n { color: var(--ink-3); }

h2 {
  margin: 0;
  font: 700 clamp(2.1rem, 4.6vw, 3.5rem)/0.95 var(--display);
  text-transform: uppercase;
  text-wrap: balance;
}

.feature__say {
  max-width: 44rem;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  text-wrap: pretty;
}

.feature__say p + p { margin-top: 0.5em; }

/* ---- Devices ---- */

.shots { display: grid; gap: 40px; margin-top: 44px; align-items: start; }

@media (min-width: 900px) {
  .shots--pair { grid-template-columns: minmax(0, 1fr) 260px; gap: 36px; }
}

.set { display: grid; gap: 14px; align-content: start; }
.set--phone { justify-self: center; width: min(100%, 220px); }

@media (min-width: 900px) {
  .set--phone { justify-self: start; width: 260px; }
}

.states { display: flex; flex-wrap: wrap; gap: 8px; }
.states[hidden] { display: none; }

.states button {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-2);
  font: 500 0.9375rem/1 var(--text);
  cursor: pointer;
}

.states button:hover { border-color: var(--ink-3); color: var(--ink); }
.states button:active { background: var(--paper); }

.states button[aria-pressed="true"] {
  border-color: var(--ink-2);
  background: var(--ink-2);
  color: var(--steel);
  cursor: default;
}

.device {
  padding: clamp(7px, 1.2vw, 14px);
  border-radius: clamp(14px, 2vw, 24px);
  background: var(--bezel);
  box-shadow: 0 0 0 2px var(--bezel-edge), 0 34px 80px rgba(0, 0, 0, 0.55);
}

.device--phone { padding: 8px; border-radius: 34px; }

.device__glass {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1180 / 820;
  border-radius: clamp(4px, 0.6vw, 8px);
  background: var(--steel);
}

.device--phone .device__glass { aspect-ratio: 390 / 844; border-radius: 27px; }

.device__glass img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.device__glass img.is-on { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .device__glass img { transition: opacity 0.22s ease; }
}

.set__on { margin-top: 6px; color: var(--ink-3); font-size: 0.8125rem; letter-spacing: 0.1em; }
.set__caption { max-width: 46ch; color: var(--ink-2); text-wrap: pretty; }

/* ---- Offline diagram ---- */

.diagram { margin: 44px 0 0; padding: clamp(16px, 3vw, 40px); background: var(--sunk); border-radius: var(--radius); box-shadow: 0 0 0 2px var(--bezel-edge); }
.diagram svg { width: 100%; height: auto; font-family: var(--mono); }
.diagram text { text-anchor: middle; letter-spacing: 0.12em; }
.diagram__lost { stroke: var(--ribbon); stroke-opacity: 0.55; stroke-width: 2; stroke-dasharray: 8 8; }
.diagram__server { fill: var(--sunk); stroke: var(--rule); stroke-width: 2; }
.diagram__server-name { fill: var(--ink-3); font-size: 19px; }
.diagram__cut { fill: var(--sunk); stroke: var(--ribbon); stroke-width: 2; }
.diagram__cut-name { fill: var(--ribbon); font-size: 16px; }
.diagram__device { fill: var(--steel); stroke: var(--ink-2); stroke-width: 2; }
.diagram__device-name { fill: var(--ink); font-size: 19px; }
.diagram__wifi { stroke: var(--go); stroke-width: 4; }
.diagram__wifi-name { fill: var(--go); font-size: 16px; }

/* ---- Close: the film's end card ---- */

.close {
  padding: 120px var(--gutter) 128px;
  border-top: 2px solid var(--rule);
  text-align: center;
}

.close__word {
  font: 700 clamp(6rem, 24vw, 17rem)/0.82 var(--display);
  text-transform: uppercase;
}

.close__line { margin-top: 28px; color: var(--ink-2); font-size: clamp(1.3rem, 2.6vw, 2.1rem); }
.close__note { max-width: 40ch; margin: 18px auto 0; color: var(--ink-3); }

/* ---- Trial request: the one form on the page ---- */

.trial { padding: 96px 0 112px; border-top: 2px solid var(--rule); background: var(--sunk); }

.trial__inner { display: grid; gap: 40px; }

@media (min-width: 960px) {
  .trial__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); column-gap: 72px; align-items: start; }
}

.trial__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 18px 20px;
}

.trial__form[hidden] { display: none; }
.trial__field { display: grid; gap: 8px; }
.trial__field--wide, .trial__check, .trial__send, .trial__status { grid-column: 1 / -1; }

.trial__label {
  font: 400 0.8125rem/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.trial__optional { color: var(--ink-3); text-transform: none; letter-spacing: 0.02em; }

.trial__input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid var(--rule);
  border-radius: var(--radius);
  background: var(--steel);
  color: var(--ink);
  font: 400 1.0625rem/1.4 var(--text);
}

textarea.trial__input { resize: vertical; min-height: 120px; }
.trial__input::placeholder { color: var(--ink-3); }
.trial__input:hover { border-color: var(--ink-3); }
.trial__input:focus-visible { outline: 3px solid var(--ribbon); outline-offset: 0; border-color: var(--ribbon); }

.trial__check { min-height: 65px; }

.trial__send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

.trial__button {
  min-height: 56px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ribbon);
  color: var(--on-ribbon);
  font: 500 1.1875rem/1 var(--text);
  cursor: pointer;
}

.trial__button:hover { background: var(--ribbon-deep); }
.trial__button:active { scale: 0.98; }
.trial__button:focus-visible { outline-color: var(--ink); }
.trial__button:disabled { background: var(--rule); color: var(--ink-3); cursor: progress; scale: 1; }

.trial__privacy { color: var(--ink-3); font-size: 0.9375rem; }

.trial__status:empty { display: none; }
.trial__status[data-tone="error"] { color: var(--ribbon); }

.trial__thanks {
  padding: 28px;
  border-left: 6px solid var(--go);
  background: var(--paper);
  font: 700 clamp(1.6rem, 3vw, 2.25rem)/1.05 var(--display);
  text-transform: uppercase;
}

.trial__thanks span { display: block; margin-top: 12px; font: 400 1.0625rem/1.5 var(--text); text-transform: none; color: var(--ink-2); }

.footer {
  padding: 18px 0 28px;
  border-top: 2px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
}
