/* impast.app — "Forno" layout in the Basilico palette.
 *
 * Dark is the night of the app's Proofing ring icon: tomato for the time,
 * the ring and the button, basil for the words that matter and for the
 * features sheet, flour for what sits on that sheet. Light is the same three on
 * flour, deepened to read on it (the app's Margherita look). The dough ball
 * stays dough in both.
 *
 * Every colour is a token below; nothing else in this file names one, except
 * the dough ball. Light or dark follows the device unless the visitor picks
 * one with the button in the header (js/theme.js). The pages are written by web/build/build.mjs; the
 * calculator's markup by js/site.js. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* Until Bricolage has loaded, text is set in Arial (Roboto on Android)
 * scaled to Bricolage's widths and line metrics, so the lines break in the
 * same places and nothing moves when the web font takes over. The sizes
 * are measured on these pages: regular Bricolage runs about 4% wider than
 * Arial, bold about as wide as Arial Bold. Bricolage: ascent 0.93,
 * descent 0.27, no line gap; the overrides are divided by size-adjust,
 * which scales them again. */
@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  font-weight: 200 549;
  size-adjust: 104%;
  ascent-override: 89.42%;
  descent-override: 25.96%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Roboto Bold"), local("Roboto-Bold");
  font-weight: 550 800;
  size-adjust: 101%;
  ascent-override: 92.08%;
  descent-override: 26.73%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;

  --bg: #f4efe4;           /* flour on the worktop */
  --surface: #fbf9f3;
  --surface-2: #ebe6da;
  --control-on: #fffdf8;
  --text: #1a1e19;
  --text-2: #4f574d;
  --text-3: #5d655b;
  --display: #b64242;      /* tomato: the time, the ring, the stops */
  --basil: #446f4b;
  --line: rgba(26, 30, 25, 0.13);
  --line-strong: rgba(26, 30, 25, 0.24);
  --cold: #7f9cb6;
  --cold-text: #3d6386;
  --focus: #446f4b;

  --button: #b64242;
  --button-ink: #fff8f2;

  --track: #e5e0d3;
  --prog: #b64242;
  --tick: #d6d0c2;
  --tick-major: #8a8f82;

  --frame: #1a1e19;
  --frame-line: rgba(26, 30, 25, 0.2);
  --shot-shadow: rgba(30, 34, 28, 0.26);

  --panel: #2f5536;        /* the features sheet: basil */
  --panel-ink: #f6f3ea;
  --panel-ink-2: #cbd8cb;
  --panel-accent: #f3e2c3; /* flour */
  --panel-line: rgba(246, 243, 234, 0.22);

  --to-top: #fffdf8;       /* a disc of flour */
  --to-top-ink: #b64242;
  --to-top-line: rgba(26, 30, 25, 0.16);
  --to-top-shadow: rgba(30, 34, 28, 0.22);

  --font: "Bricolage Grotesque", "Bricolage Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: 40px;
  --section: clamp(96px, 11vw, 150px);
}

/* Dark: the device's setting, or the visitor's choice with the button in
 * the header. js/theme.js sets data-theme before the page is drawn. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0f1411;
  --surface: #18201a;
  --surface-2: #253027;
  --control-on: #36433a;
  --text: #eef0ea;
  --text-2: #b6bcb2;
  --text-3: #98a095;
  --display: #e0645a;
  --basil: #95c69b;
  --line: rgba(238, 240, 234, 0.12);
  --line-strong: rgba(238, 240, 234, 0.24);
  --cold: #5d7f9c;
  --cold-text: #8fb0cc;
  --focus: #95c69b;

  --button: #e0645a;
  --button-ink: #1a0d0b;

  --track: #253027;
  --prog: #e0645a;
  --tick: #313c33;
  --tick-major: #98a095;

  --frame: #070908;
  --frame-line: rgba(238, 240, 234, 0.1);
  --shot-shadow: rgba(0, 0, 0, 0.55);

  --panel: #2f5536;
  --panel-ink: #f6f3ea;
  --panel-ink-2: #cbd8cb;
  --panel-accent: #f3e2c3;
  --panel-line: rgba(246, 243, 234, 0.22);

  --to-top: #f6f3ea;
  --to-top-ink: #b64242;
  --to-top-line: rgba(0, 0, 0, 0.3);
  --to-top-shadow: rgba(0, 0, 0, 0.5);
}

/* --- Base --- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.55 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

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

a {
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 650;
  text-decoration: none;
}

.skip:focus {
  top: 16px;
}

.lead {
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 34em;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 650;
  color: var(--basil);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.link svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 22px 0 26px;
  border-radius: 18px;
  background: var(--button);
  color: var(--button-ink);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.button svg {
  width: 20px;
  height: 20px;
  transform: rotate(90deg);
}

.button:hover {
  filter: brightness(1.08);
}

.button:active {
  transform: scale(0.98);
}

/* --- Header --- */

.top {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-block: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  text-decoration: none;
}

/* The app icon beside the wordmark is decoration (the word says it), so it
 * is a background, not an image of the page. */
.brand-icon {
  flex: none;
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 22.5%;
  background: url("/img/icons/pswirl-light.webp") center / cover no-repeat;
}

:root[data-theme="dark"] .brand-icon {
  background-image: url("/img/icons/pswirl-dark.webp");
}

.nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
  font-size: 16px;
}

.nav a,
.langs a {
  color: var(--text-2);
  text-decoration: none;
  padding-block: 6px;
}

.nav a:hover,
.langs a:hover {
  color: var(--text);
}

.langs {
  display: flex;
  gap: 4px;
  font-size: 15px;
  font-weight: 600;
}

.langs a {
  padding: 6px 8px;
  border-radius: 8px;
}

.langs a[aria-current] {
  color: var(--text);
  background: var(--surface-2);
}

.nav + .langs {
  margin-left: 0;
}

.top > .langs:nth-child(2) {
  margin-left: auto;
}

/* Light or dark: shows the moon in light, the sun in dark. Hidden until
   js/theme.js can make it work. */
.theme-switch {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.theme-switch[hidden] {
  display: none;
}

.theme-switch:hover {
  color: var(--text);
  background: var(--surface-2);
}

.theme-switch:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.theme-switch svg {
  width: 22px;
  height: 22px;
}

.theme-switch .sun,
:root[data-theme="dark"] .theme-switch .moon {
  display: none;
}

:root[data-theme="dark"] .theme-switch .sun {
  display: block;
}

/* --- Hero --- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-block: clamp(24px, 5vw, 64px) 40px;
}

.when {
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-2);
}

.clock {
  margin: 6px 0 34px -0.045em;
  color: var(--display);
  font-size: clamp(112px, 17vw, 236px);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.clock small {
  margin-left: 0.08em;
  font-size: 0.32em;
  letter-spacing: -0.02em;
}

.hero h1 {
  max-width: 15em;
  margin-bottom: 20px;
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--basil);
}

.hero .lead {
  max-width: 28em;
  margin-bottom: 34px;
}

/* The button, then the badges, then the note under them. */
.hero-actions {
  display: grid;
  justify-items: start;
  gap: 26px;
}

/* The stores' own badges, as they publish them, with the note that the app
   is not in the stores yet. */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badges img {
  width: auto;
  height: 48px;
}

.stores-note {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-3);
}

/* The dial: a dough ball in the app's progress ring, three quarters done. */

.dial {
  justify-self: end;
  width: 100%;
  max-width: 520px;
}

.dial svg {
  width: 100%;
  height: auto;
}

.dial .tick {
  stroke: var(--tick);
  stroke-width: 6;
  stroke-linecap: round;
}

.dial .tick-major {
  stroke: var(--tick-major);
}

.dial .track,
.dial .prog {
  fill: none;
  stroke-width: 56;
}

.dial .track {
  stroke: var(--track);
}

.dial .prog {
  stroke: var(--prog);
  stroke-linecap: round;
  stroke-dasharray: 75 100;
  animation: dial-fill 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
}

@keyframes dial-fill {
  from {
    stroke-dasharray: 0 100;
  }
}

.dial .dough-shade {
  fill: #c8a876;
}

.dial .dough {
  fill: #ead5ae;
}

.dial .dough-hi {
  fill: #fff6e6;
}

.dial figcaption {
  margin-top: 10px;
  text-align: center;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.35;
}

.dial figcaption b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- The example plan under the hero --- */

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

.ribbon ol {
  display: grid;
  grid-template-columns: 1fr 1fr 2.1fr 1fr 1fr 1fr;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.stop {
  position: relative;
  padding: 32px 16px 0 0;
}

.stop::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--display);
}

.stop::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 20px;
  right: 6px;
  height: 2px;
  background: var(--line-strong);
}

.stop.cold::after {
  background: repeating-linear-gradient(90deg, var(--cold) 0 10px, transparent 10px 16px);
}

.stop.ready::before {
  background: var(--display);
  box-shadow: none;
}

.stop.ready::after {
  display: none;
}

.stop-time {
  display: block;
  font-size: 14px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.stop b {
  display: block;
  margin-top: 2px;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.stop-note {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-3);
}

.stop.cold .stop-note {
  color: var(--cold-text);
}

.ribbon figcaption {
  margin-top: 30px;
  font-size: 15px;
  color: var(--text-3);
}

/* --- Sections --- */

.section-head {
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-head h2,
.promise h2 {
  max-width: 14em;
  margin-bottom: 22px;
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-head .lead {
  text-wrap: pretty;
}

/* --- Styles: a menu whose price column is the hydration --- */

.styles {
  padding-bottom: var(--section);
}

.styles-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(48px, 7vw, 110px);
  align-items: start;
}

.menu-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-3);
}

.family + .family {
  margin-top: 44px;
}

.family h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--text);
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.family h3 span {
  font-size: 16px;
  font-weight: 450;
  letter-spacing: 0;
  color: var(--text-3);
}

.style {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}

.style-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--display);
}

.style-icon svg {
  width: 24px;
  height: 24px;
}

.style-text {
  display: grid;
  gap: 3px;
}

.style-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.style-desc {
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-2);
}

.style-kind {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}

.style-kind.kind-disciplinare {
  color: var(--basil);
}

.style-hyd {
  padding-top: 1px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--display);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.styles-side {
  position: sticky;
  top: 32px;
}

.own {
  margin-top: 44px;
}

.own h3,
.feature-text h3,
.more-sub h3 {
  margin-bottom: 10px;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.own p {
  font-size: 17px;
  color: var(--text-2);
}

/* --- Phone screenshots --- */

.phone {
  width: 100%;
  max-width: 320px;
  padding: 9px;
  border-radius: 48px;
  background: var(--frame);
  box-shadow:
    0 0 0 1px var(--frame-line),
    0 40px 80px -30px var(--shot-shadow);
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: 39px;
}

/* --- The calculator --- */

.calc {
  padding-bottom: var(--section);
}

.calc-noscript {
  padding: 22px 26px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: start;
}

.calc-inputs,
.calc-output {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.calc-output {
  position: sticky;
  top: 24px;
}

.card {
  position: relative;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.card-title {
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.card-note {
  margin-top: 16px;
  font-size: 15px;
  color: var(--text-3);
}

/* The card with the answer: framed in tomato. */
.card-results {
  border: 2px solid var(--display);
}

.field {
  margin-bottom: 20px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
}

.field-hint {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-3);
}

.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

.input:focus-visible {
  outline: none;
  border-color: var(--focus);
}

input[type="datetime-local"].input {
  font-variant-numeric: tabular-nums;
}

.stepper {
  display: flex;
  align-items: stretch;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--surface-2);
  overflow: hidden;
}

.stepper:focus-within {
  border-color: var(--focus);
}

.stepper .input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stepper-button {
  width: 52px;
  flex: none;
  border: 0;
  background: none;
  color: var(--basil);
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
}

.stepper-button:hover {
  background: var(--line);
}

.stepper-button:focus-visible {
  outline-offset: -3px;
}

.segmented {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
}

.field .segmented {
  margin-bottom: 0;
}

.segment {
  flex: 1;
  min-height: 42px;
  padding: 8px 6px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

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

.segment-selected {
  background: var(--control-on);
  color: var(--text);
  font-weight: 650;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.result-row:last-child {
  border-bottom: 0;
}

.result-labels {
  min-width: 0;
}

.result-label {
  display: block;
  font-weight: 550;
}

.result-hint {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--text-3);
}

.result-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.result-total .result-row {
  align-items: end;
  margin-top: 6px;
  padding-bottom: 0;
  border-top: 2px solid var(--text);
  border-bottom: 0;
}

/* The answer, set like the clock at the top of the page. */
.result-total .result-value {
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--display);
}

.timeline-item {
  position: relative;
  padding: 12px 0 12px 24px;
  border-left: 2px solid var(--surface-2);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 19px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 2.5px var(--display);
}

.timeline-item:last-child {
  border-left-color: transparent;
}

.timeline-item:last-child::before {
  background: var(--display);
  box-shadow: none;
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 14px;
}

.timeline-title {
  font-weight: 650;
}

.timeline-time {
  font-size: 15px;
  color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.timeline-desc {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-3);
}

/* --- The app, step by step --- */

.app {
  padding-bottom: var(--section);
}

.feature-row {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
}

.feature-row + .feature-row {
  margin-top: clamp(72px, 9vw, 120px);
}

.feature-row.flip {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.feature-row.flip .phone {
  order: 2;
}

.feature-text p {
  max-width: 30em;
  font-size: clamp(18px, 1.5vw, 20px);
  color: var(--text-2);
}

/* --- More: the flour (or basil) sheet --- */

.more {
  padding-block: clamp(96px, 11vw, 140px) calc(var(--section) + 40px);
  border-radius: 40px 40px 0 0;
  background: var(--panel);
  color: var(--panel-ink);
}

.more h2 {
  max-width: 10em;
  margin-bottom: 26px;
  font-size: clamp(46px, 7vw, 100px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.more .lead {
  color: var(--panel-ink-2);
  font-weight: 500;
  max-width: 31em;
}

.feats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 56px;
  margin-top: clamp(56px, 6vw, 80px);
  padding-top: 44px;
  border-top: 2px solid var(--panel-ink);
}

.feat-icon {
  display: block;
  margin-bottom: 14px;
  color: var(--panel-accent);
}

.feat-icon svg {
  width: 30px;
  height: 30px;
}

.feats h3 {
  margin-bottom: 6px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.feats p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--panel-ink-2);
}

.looks,
.icons,
.get-app {
  margin-top: clamp(96px, 11vw, 150px);
}

.more-sub {
  max-width: 36em;
}

.more-sub p {
  font-size: 18px;
  color: var(--panel-ink-2);
}

.looks-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 56px;
}

.looks-row figure {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.looks-row .phone {
  max-width: 290px;
}

.looks-row figcaption {
  font-size: 19px;
  font-weight: 700;
}

.icons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 44px;
  margin-top: 48px;
}

.icons-row li {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: 128px;
  text-align: center;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
}

.app-icon img {
  width: 112px;
  height: 112px;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px var(--panel-line);
}

.icons-row small {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  font-weight: 500;
  color: var(--panel-ink-2);
}

.get-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 56px;
  align-items: end;
  padding-top: 44px;
  border-top: 2px solid var(--panel-ink);
}

.more .stores-note {
  color: var(--panel-ink-2);
}

/* --- The privacy promise: the next sheet, laid over the one before --- */

.promise {
  position: relative;
  margin-top: -40px;
  padding-block: var(--section);
  border-radius: 40px 40px 0 0;
  background: var(--bg);
}

.promise-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: start;
}

.promise h2 {
  margin-bottom: 0;
}

.promise p {
  font-size: clamp(19px, 1.6vw, 22px);
  color: var(--text-2);
}

.promise p + p {
  margin-top: 22px;
}

.promise .link {
  font-size: 18px;
}

/* --- Footer --- */

.foot {
  padding-block: 40px 56px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--text-2);
}

.foot-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
}

.foot-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-right: auto;
}

.foot-brand .brand {
  color: var(--text);
  font-size: 24px;
}

.foot-brand .brand-icon {
  width: 40px;
  height: 40px;
}

.foot-links,
.foot-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.foot a {
  text-decoration: none;
}

.foot-links a:hover,
.foot-langs a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot-langs a[aria-current] {
  color: var(--text);
  font-weight: 650;
}

/* --- Legal pages and 404 --- */

.legal-main,
.missing {
  max-width: calc(780px + 2 * var(--gutter));
  padding-block: clamp(40px, 6vw, 80px) var(--section);
}

.legal-main h1,
.missing h1 {
  margin-bottom: 20px;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.updated {
  margin-top: 18px;
  font-size: 15px;
  color: var(--text-3);
}

.legal-body {
  margin-top: 24px;
}

.legal-body h2 {
  margin-top: 56px;
  margin-bottom: 14px;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.legal-body h3 {
  margin-top: 30px;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
}

.legal-body p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-2);
}

.legal-body p + p {
  margin-top: 14px;
}

.legal-body a {
  color: var(--basil);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.back {
  margin-top: 64px;
}

.missing section + section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.missing h2 {
  margin-bottom: 20px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.missing p {
  font-size: 19px;
  color: var(--text-2);
}

.missing p + p {
  margin-top: 16px;
}

/* --- Back to top: the header stays at the top, so this takes you to it --- */

.to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 10;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--to-top);
  color: var(--to-top-ink);
  box-shadow:
    0 0 0 1px var(--to-top-line),
    0 10px 28px -8px var(--to-top-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0s linear 0.25s;
}

.to-top.shown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.to-top svg {
  width: 24px;
  height: 24px;
  transform: rotate(-90deg);
}

.to-top:hover {
  transform: translateY(-2px);
}

.to-top:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.choose {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
  font-size: 22px;
  font-weight: 650;
}

/* --- Arrival --- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .dial .prog {
    animation: none;
  }

  .to-top,
  .to-top.shown {
    transform: none;
    transition: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Narrower screens --- */

@media (max-width: 1080px) {
  .styles-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .calc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .calc-output {
    position: static;
  }

  .feats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --gutter: 20px;
  }

  body {
    font-size: 17px;
  }

  .top {
    gap: 12px;
    padding-block: 16px;
  }

  .brand {
    gap: 12px;
    font-size: 27px;
  }

  .brand-icon {
    width: 46px;
    height: 46px;
  }

  .nav {
    display: none;
  }

  .top > .langs {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding-top: 28px;
  }

  .clock {
    margin-bottom: 26px;
  }

  .hero-actions {
    gap: 22px;
  }

  .hero .lead {
    margin-bottom: 28px;
  }

  .dial {
    justify-self: center;
    max-width: 360px;
  }

  .ribbon ol {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 32px;
  }

  .stop {
    padding: 0 0 26px 34px;
  }

  .stop::before {
    top: 3px;
  }

  .stop::after {
    top: 22px;
    left: 6px;
    right: auto;
    bottom: 2px;
    width: 2px;
    height: auto;
  }

  .stop.cold::after {
    background: repeating-linear-gradient(180deg, var(--cold) 0 8px, transparent 8px 13px);
  }

  .stop.ready {
    padding-bottom: 0;
  }

  .ribbon figcaption {
    margin-top: 26px;
  }

  .styles-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .styles-side {
    position: static;
    display: grid;
    justify-items: center;
  }

  .styles-side .phone {
    max-width: 290px;
  }

  .own {
    justify-self: stretch;
  }

  .style {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 14px;
  }

  .style-icon {
    width: 40px;
    height: 40px;
  }

  .style-hyd {
    font-size: 19px;
  }

  .feature-row,
  .feature-row.flip {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .feature-row .phone,
  .feature-row.flip .phone {
    order: 0;
    justify-self: center;
    max-width: 290px;
  }

  .more {
    border-radius: 28px 28px 0 0;
  }

  .feats {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .looks-row {
    display: flex;
    gap: 16px;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .looks-row::-webkit-scrollbar {
    display: none;
  }

  .looks-row figure {
    flex: 0 0 74%;
    scroll-snap-align: center;
  }

  .icons-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 12px;
  }

  .icons-row li {
    width: auto;
    font-size: 15px;
  }

  .app-icon img {
    width: 84px;
    height: 84px;
  }

  .get-app {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .promise {
    margin-top: -28px;
    border-radius: 28px 28px 0 0;
  }

  .promise-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .card {
    border-radius: 22px;
  }
}

@media (max-width: 420px) {
  .top {
    gap: 6px;
  }

  .brand {
    gap: 10px;
    font-size: 25px;
  }

  .brand-icon {
    width: 42px;
    height: 42px;
  }

  .langs {
    gap: 0;
  }

  .langs a {
    padding-inline: 7px;
  }

  .theme-switch {
    width: 36px;
  }

  .badges {
    gap: 10px;
  }

  .badges img {
    height: 44px;
  }
}

@media (max-width: 360px) {
  .clock {
    font-size: 96px;
  }
}

/* The smallest phones: the header still in one line. */
@media (max-width: 350px) {
  .brand {
    gap: 8px;
    font-size: 21px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .langs a {
    padding-inline: 5px;
  }
}
