/* Take Time — take-time.it landing page.
   Visual system: the app restyle and its Figma store art (pool water,
   lane ropes, white app cards, ink tags, Inter display, scoreboard clock). */

@font-face {
  font-family: "Inter";
  src: url("/legal/landing/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/legal/landing/fonts/BarlowCondensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/legal/landing/fonts/BarlowCondensed-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  /* App tokens (lib/theme/app_theme.dart, light theme) */
  --ink: #0d1e36;
  --navy: #193a69;
  --blue-700: #225090;
  --blue-600: #2b64b5;
  --blue-500: #3d7ad1;
  --blue-400: #6796db;
  --blue-200: #b1c9ec;
  --blue-100: #dae6f6;
  --blue-50: #eaf1fa;
  --blue-25: #f6f9fe;
  --cyan: #3086c4;
  --orange: #f2702b;
  --orange-300: #f59460;
  --orange-500: #e2570e;
  --orange-600: #b2450b;
  --orange-700: #873408;
  --orange-on-water: #ffa36b;
  --deck: #ebf1f5;
  --white: #fff;
  --grey-600: #646f77;
  --grey-500: #6b7680;
  --green: #317744;
  --green-bg: #d4edda;
  --red: #bb2f30;
  --red-bg: #f7dedf;
  --gold: #e0af14;
  --pink: #b84f82;

  --display: "Inter", system-ui, sans-serif;
  --clock: "Barlow Condensed", "Inter", sans-serif;

  --page: min(1240px, calc(100vw - 2 * var(--gutter)));
  --gutter: clamp(20px, 4vw, 56px);
  --radius-card: 28px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgb(13 30 54 / 0.06), 0 18px 40px -22px rgb(13 30 54 / 0.35);
  --shadow-lift: 0 2px 4px rgb(6 14 25 / 0.12), 0 36px 70px -28px rgb(6 14 25 / 0.6);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --rope-water: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='432' height='18'%3E%3Cg fill='%23F2702B'%3E%3Crect x='2' y='1' width='32' height='16' rx='8'/%3E%3Crect x='38' y='1' width='32' height='16' rx='8'/%3E%3Crect x='74' y='1' width='32' height='16' rx='8'/%3E%3Crect x='110' y='1' width='32' height='16' rx='8'/%3E%3Crect x='146' y='1' width='32' height='16' rx='8'/%3E%3Crect x='182' y='1' width='32' height='16' rx='8'/%3E%3C/g%3E%3Cg fill='%23FFFFFF'%3E%3Crect x='218' y='1' width='32' height='16' rx='8'/%3E%3Crect x='254' y='1' width='32' height='16' rx='8'/%3E%3Crect x='290' y='1' width='32' height='16' rx='8'/%3E%3Crect x='326' y='1' width='32' height='16' rx='8'/%3E%3Crect x='362' y='1' width='32' height='16' rx='8'/%3E%3Crect x='398' y='1' width='32' height='16' rx='8'/%3E%3C/g%3E%3C/svg%3E");
  --rope-deck: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='432' height='18'%3E%3Cg fill='%23F2702B'%3E%3Crect x='2' y='1' width='32' height='16' rx='8'/%3E%3Crect x='38' y='1' width='32' height='16' rx='8'/%3E%3Crect x='74' y='1' width='32' height='16' rx='8'/%3E%3Crect x='110' y='1' width='32' height='16' rx='8'/%3E%3Crect x='146' y='1' width='32' height='16' rx='8'/%3E%3Crect x='182' y='1' width='32' height='16' rx='8'/%3E%3C/g%3E%3Cg fill='%232B64B5'%3E%3Crect x='218' y='1' width='32' height='16' rx='8'/%3E%3Crect x='254' y='1' width='32' height='16' rx='8'/%3E%3Crect x='290' y='1' width='32' height='16' rx='8'/%3E%3Crect x='326' y='1' width='32' height='16' rx='8'/%3E%3Crect x='362' y='1' width='32' height='16' rx='8'/%3E%3Crect x='398' y='1' width='32' height='16' rx='8'/%3E%3C/g%3E%3C/svg%3E");
  --rope-orange: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='432' height='18'%3E%3Cg fill='%23FFFFFF'%3E%3Crect x='2' y='1' width='32' height='16' rx='8'/%3E%3Crect x='38' y='1' width='32' height='16' rx='8'/%3E%3Crect x='74' y='1' width='32' height='16' rx='8'/%3E%3Crect x='110' y='1' width='32' height='16' rx='8'/%3E%3Crect x='146' y='1' width='32' height='16' rx='8'/%3E%3Crect x='182' y='1' width='32' height='16' rx='8'/%3E%3C/g%3E%3Cg fill='%230D1E36'%3E%3Crect x='218' y='1' width='32' height='16' rx='8'/%3E%3Crect x='254' y='1' width='32' height='16' rx='8'/%3E%3Crect x='290' y='1' width='32' height='16' rx='8'/%3E%3Crect x='326' y='1' width='32' height='16' rx='8'/%3E%3Crect x='362' y='1' width='32' height='16' rx='8'/%3E%3Crect x='398' y='1' width='32' height='16' rx='8'/%3E%3C/g%3E%3C/svg%3E");
  --caustics: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='280' fill='none' stroke='%23FFFFFF' stroke-linecap='round'%3E%3Cpath stroke-opacity='.10' stroke-width='2' d='M0 30c53-16 107 16 160 0s107-16 160 0 107 16 160 0 107-16 160 0'/%3E%3Cpath stroke-opacity='.07' stroke-width='1.5' d='M0 92c40 12 80-14 120 0s80 14 120 0 80-14 120 0 80 14 120 0 80-14 120 0 80 14 120 0'/%3E%3Cpath stroke-opacity='.09' stroke-width='2' d='M0 150c64-20 128 20 192 0s128-20 192 0 128 20 192 0 64-6 64-6'/%3E%3Cpath stroke-opacity='.06' stroke-width='1.5' d='M0 214c32 10 64-12 96 0s64 12 96 0 64-12 96 0 64 12 96 0 64-12 96 0 64 12 96 0 64-12 64 0'/%3E%3Cpath stroke-opacity='.08' stroke-width='2' d='M0 262c80-14 160 14 240 0s160-14 240 0 160 14 160 0'/%3E%3C/svg%3E");
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-color: var(--blue-600) var(--deck);
}

body {
  margin: 0;
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--deck);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

::selection {
  background: var(--orange);
  color: var(--white);
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  top: 16px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: var(--page);
  margin-inline: auto;
}

.time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum", "cv11";
  white-space: nowrap;
}

/* ---------- Bar ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--white);
  transition: background-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.bar.is-solid {
  background: rgb(25 58 105 / 0.97);
  box-shadow: 0 10px 30px -18px rgb(6 14 25 / 0.7);
}
.bar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.bar__logo {
  display: inline-flex;
  flex: none;
}
.bar__logo img {
  width: 148px;
  height: auto;
}
.bar__inner > nav {
  margin-inline: auto;
}
.bar__lanes {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bar__lanes a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  color: rgb(255 255 255 / 0.86);
  transition: background-color 0.25s, color 0.25s;
}
.bar__lanes a:hover {
  background: rgb(255 255 255 / 0.1);
  color: var(--white);
}
.bar__lanes a[aria-current="true"] {
  background: rgb(255 255 255 / 0.14);
  color: var(--white);
}
.bar__lanes b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--clock);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1;
}
.bar__cta {
  flex: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 24px 10px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background-color 0.25s;
}
.btn svg {
  flex: none;
  width: 24px;
  height: 24px;
}
.btn span {
  display: grid;
  line-height: 1.1;
  text-align: left;
}
.btn small {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.8;
}
.btn strong {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.btn--store {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2px 4px rgb(6 14 25 / 0.12), 0 16px 30px -18px rgb(6 14 25 / 0.55);
}
.btn--store:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgb(6 14 25 / 0.14), 0 24px 40px -18px rgb(6 14 25 / 0.6);
}
.btn--store:active {
  transform: translateY(0);
}
.btn--ink {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 2px 4px rgb(6 14 25 / 0.2), 0 16px 30px -18px rgb(6 14 25 / 0.7);
}
.btn--ink:hover {
  transform: translateY(-2px);
  background: var(--navy);
}
.btn--small {
  min-height: 44px;
  padding: 8px 20px;
  font-weight: 800;
  font-size: 0.9375rem;
  background: var(--orange);
  color: var(--ink);
}
.btn--small:hover {
  background: var(--orange-300);
}
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Ink tag (store art) ---------- */

.tag {
  display: inline-block;
  padding: 9px 16px 8px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 18px -10px rgb(6 14 25 / 0.7);
}
.tag--orange {
  background: var(--orange);
  color: var(--ink);
}

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

.phone {
  position: relative;
  margin: 0;
  width: var(--phone-w, 300px);
  rotate: var(--tilt, 0deg);
}
.phone__frame {
  position: relative;
  padding: 9px;
  border-radius: 46px;
  background: #0e0f11;
  box-shadow: var(--shadow-lift), inset 0 0 0 1.5px #3a3f45;
}
.phone__frame::after {
  /* punch-hole camera */
  content: "";
  position: absolute;
  top: 19px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: #050607;
  box-shadow: inset 0 0 0 2px #1b1e22;
}
.phone__frame img {
  width: 100%;
  aspect-ratio: 1344 / 2992;
  border-radius: 37px;
  background: var(--deck);
}
.phone .tag {
  position: absolute;
  top: var(--tag-top, 18%);
  left: var(--tag-left, auto);
  right: var(--tag-right, -18px);
  rotate: var(--tag-tilt, 0deg);
}

/* ---------- Lanes (sections) ---------- */

.lane {
  position: relative;
  padding-block: clamp(80px, 11vw, 150px);
}
.lane--water {
  color: var(--white);
  background-color: var(--blue-700);
  background-image: var(--caustics), linear-gradient(180deg, #1e4887 0%, #23559c 55%, #245aa3 100%);
  background-size: 640px 280px, 100% 100%;
  animation: drift 40s linear infinite;
}
.lane--deck {
  background: var(--deck);
}
.lane--orange {
  color: var(--ink);
  background: linear-gradient(170deg, #ec6a26 0%, #e86624 45%, #e4601a 100%);
}

@keyframes drift {
  to {
    background-position: 640px 0, 0 0;
  }
}

.rope {
  height: 18px;
  background-image: var(--rope-water);
  background-size: 432px 18px;
  background-repeat: repeat-x;
  animation: rope 26s linear infinite;
}
.rope--deck {
  background-image: var(--rope-deck);
}
.rope--orange {
  background-image: var(--rope-orange);
}
.rope--edge {
  position: absolute;
  inset: auto 0 -9px;
  z-index: 3;
}
@keyframes rope {
  to {
    background-position: 432px 0;
  }
}

/* pool-floor lane line with the T at the wall */
.floor-line {
  position: absolute;
  inset: auto 0 var(--floor-y, 26%);
  height: 30px;
  background: rgb(6 14 25 / 0.16);
  pointer-events: none;
}
.floor-line::after {
  content: "";
  position: absolute;
  right: 7%;
  top: -54px;
  width: 30px;
  height: 138px;
  background: inherit;
}

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

.hero {
  padding-top: calc(72px + clamp(28px, 4vh, 48px));
  padding-bottom: 0;
  overflow: clip;
  --hero-phone: clamp(220px, calc((100vh - 330px) * 0.46), 290px);
}
.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(3rem, 5.6vw, 5.25rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero h1 span,
.lane--water h2 span {
  display: block;
  color: var(--orange-on-water);
}
.hero__deck {
  max-width: 40ch;
  margin: 0 0 28px;
  font-size: clamp(1.125rem, 1.55vw, 1.3125rem);
  line-height: 1.5;
  color: rgb(255 255 255 / 0.9);
}
.hero__note {
  margin: 16px 0 0;
  font-size: 0.9375rem;
  color: rgb(255 255 255 / 0.78);
}
.hero__phones {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero__phones .phone--back {
  position: absolute;
  top: 40px;
  left: max(0px, calc(50% - var(--hero-phone) * 1.05));
  --phone-w: calc(var(--hero-phone) * 0.86);
  --tilt: -7deg;
}
.hero__phones .phone--front {
  --phone-w: var(--hero-phone);
  --tilt: 3deg;
  margin-left: calc(var(--hero-phone) * 0.5);
}

/* Race clock (results board) */
.board {
  position: relative;
  z-index: 2;
  margin-top: clamp(24px, 3vh, 40px);
  margin-bottom: clamp(56px, 6vw, 80px);
  border-radius: 22px;
  background: linear-gradient(180deg, #0f2240, var(--ink));
  color: var(--white);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), var(--shadow-lift);
  overflow: hidden;
}
.board__title,
.results__title {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
}
.board__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 16px 24px 14px;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
  font-family: var(--clock);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.board__head em {
  font-style: normal;
  color: var(--orange-300);
}
.board__body {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.25fr);
}
.board__leg {
  display: grid;
  gap: 2px;
  padding: 16px 20px 18px;
  border-right: 1px solid rgb(255 255 255 / 0.08);
  text-decoration: none;
  color: rgb(255 255 255 / 0.62);
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
.board__leg:hover {
  background: rgb(255 255 255 / 0.04);
  color: var(--white);
}
.board__leg span {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.board__leg b {
  font-family: var(--clock);
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.board__leg.is-active {
  background: rgb(242 112 43 / 0.16);
  color: var(--white);
  box-shadow: inset 0 -3px 0 var(--orange);
}
.board__leg.is-done {
  color: var(--white);
}
.board__leg.is-done b {
  color: var(--orange-300);
}
.board__total {
  display: grid;
  align-content: center;
  padding: 12px 24px;
  background: rgb(242 112 43 / 0.08);
}
.board__total span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(255 255 255 / 0.7);
}
.board__total output {
  font-family: var(--clock);
  font-size: clamp(2.5rem, 4.4vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  color: var(--orange-300);
  font-variant-numeric: tabular-nums;
}
.board__foot {
  margin: 0;
  padding: 12px 24px 14px;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.72);
}

/* Floating clock that swims with the scroll */
.pace {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(560px, calc(100vw - 24px));
  padding: 10px 12px 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 24px 50px -20px rgb(6 14 25 / 0.8);
  translate: -50% 140%;
  opacity: 0;
  transition: translate 0.6s var(--ease-out), opacity 0.4s var(--ease-out);
}
.pace.is-visible {
  translate: -50% 0;
  opacity: 1;
}
.pace__leg {
  flex: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(255 255 255 / 0.74);
}
.pace__lane {
  position: relative;
  flex: 1;
  height: 12px;
  background-image: var(--rope-water);
  background-size: 216px 9px;
  background-repeat: repeat-x;
  background-position: 0 50%;
  opacity: 0.85;
}
.pace__swimmer {
  position: absolute;
  top: 50%;
  left: calc(var(--p, 0) * 100%);
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 4px rgb(242 112 43 / 0.9);
}
.pace output {
  flex: none;
  min-width: 5.4ch;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.08);
  font-family: var(--clock);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--orange-300);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Legs ---------- */

.leg {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
}
.leg__block {
  /* starting block: lane number and the leg's real split */
  position: sticky;
  top: 112px;
  align-self: start;
  display: grid;
  justify-items: start;
  gap: 6px;
}
.leg__num {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--clock);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: var(--shadow-card);
}
.lane--water .leg__num {
  background: var(--white);
  color: var(--blue-700);
}
.lane--orange .leg__num {
  background: var(--ink);
}
.leg__split {
  font-family: var(--clock);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.leg__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--grey-600);
}
.lane--water .leg__label {
  color: rgb(255 255 255 / 0.78);
}
.lane--orange .leg__label {
  color: var(--ink);
}

.leg h2,
.finish h2 {
  margin: 0 0 24px;
  max-width: 14ch;
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.lane--deck h2 span {
  display: block;
  color: var(--orange-500);
}
.lane--orange h2 span {
  display: block;
  color: var(--white);
}
.lane--orange .leg__lede {
  color: var(--ink);
}
.leg__lede {
  max-width: 58ch;
  margin: 0 0 40px;
  font-size: clamp(1.125rem, 1.45vw, 1.25rem);
  line-height: 1.55;
}
.lane--deck .leg__lede {
  color: #2d3a4a;
}
.lane--water .leg__lede {
  color: rgb(255 255 255 / 0.9);
}

.fact {
  margin: 28px 0 0;
  font-size: 0.9375rem;
  color: var(--grey-600);
}
.fact strong {
  font-weight: 800;
  color: var(--ink);
}
.lane--water .fact {
  color: rgb(255 255 255 / 0.8);
}
.lane--water .fact strong {
  color: var(--white);
}

/* Leg 1: live */
.live {
  display: grid;
  gap: clamp(48px, 5vw, 72px);
}
.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.flow li {
  display: grid;
  gap: 18px;
  justify-items: center;
}
.flow .phone {
  --phone-w: 100%;
  max-width: 270px;
}
.flow li:nth-child(1) .phone {
  --tilt: -3deg;
}
.flow li:nth-child(2) {
  margin-top: 48px;
}
.flow li:nth-child(3) {
  margin-top: 96px;
}
.flow li:nth-child(3) .phone {
  --tilt: 3deg;
}
.flow p {
  margin: 0;
  max-width: 24ch;
  font-size: 0.9375rem;
  line-height: 1.4;
  text-align: center;
  color: var(--grey-600);
}
.flow p b {
  display: block;
  font-size: 1rem;
  color: var(--ink);
}

.programme {
  /* one grouped list, as the app groups a session's races */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
  margin: 0;
  padding: 6px 28px;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
  list-style: none;
}
.programme li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--blue-50);
}
.programme li:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.programme div {
  flex: 1;
}
.programme b {
  display: block;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}
.programme span {
  font-size: 0.9375rem;
  color: var(--grey-600);
}
.programme svg {
  flex: none;
  width: 34px;
  height: 34px;
}
.programme__head {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Leg 2: race detail */
.race {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
.race__phones {
  --w: clamp(168px, 14vw, 214px);
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 16px 0 24px;
  list-style: none;
}
.race__phones li {
  position: relative;
  flex: none;
  width: var(--w);
  margin-inline: calc(var(--w) * -0.07);
}
.race__phones li:nth-child(1) {
  --tilt: -4deg;
  margin-top: 56px;
  z-index: 1;
}
.race__phones li:nth-child(2) {
  z-index: 2;
}
.race__phones li:nth-child(3) {
  --tilt: 4deg;
  margin-top: 56px;
  z-index: 1;
}
.race__phones .phone {
  --phone-w: 100%;
}
.race__phones .tag {
  z-index: 3;
  font-size: 0.6875rem;
}
.race__points {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.race__points li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 18px;
  padding: 22px 0;
  border-top: 2px solid rgb(255 255 255 / 0.28);
}
.race__points li:first-child {
  border-top: 0;
  padding-top: 0;
}
.race__points svg {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 14px;
  background: var(--white);
  color: var(--blue-600);
  box-shadow: var(--shadow-card);
}
.race__points b {
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.race__points p {
  grid-column: 2;
  margin: 0;
  max-width: 46ch;
  color: rgb(255 255 255 / 0.9);
}
.diff,
.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.diff--slower {
  background: var(--red-bg);
  color: var(--red);
}
.diff--faster {
  background: var(--green-bg);
  color: #245731;
}
.badge {
  padding-inline: 6px;
  border-radius: 6px;
  font-weight: 800;
}
.badge--pb {
  background: var(--orange);
  color: var(--ink);
}
.badge--sb {
  background: var(--white);
  color: var(--blue-600);
}

/* Leg 3: diary */
.diary {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.device {
  position: relative;
  justify-self: center;
  width: min(360px, 100%);
  padding: 9px;
  border-radius: 46px;
  background: #0e0f11;
  box-shadow: var(--shadow-lift), inset 0 0 0 1.5px #3a3f45;
  rotate: -2deg;
}
.device__screen {
  padding: 46px 16px 22px;
  border-radius: 37px;
  background: var(--deck);
}
.device__title {
  margin: 0 0 12px;
  padding-left: 2px;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--white);
  box-shadow: 0 1px 2px rgb(13 30 54 / 0.08);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}
.seg span {
  padding: 7px 0;
  border-radius: var(--radius-pill);
  color: var(--blue-600);
}
.seg span:first-child {
  background: var(--blue-600);
  color: var(--white);
}
.cal {
  padding: 14px 10px 10px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 1px 2px rgb(13 30 54 / 0.06);
}
.cal__month {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
}
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 2px;
  text-align: center;
}
.cal__dow {
  padding-bottom: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--grey-500);
}
.cal__day {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
}
button.cal__day {
  cursor: pointer;
}
button.cal__day:hover {
  background: var(--blue-50);
}
.cal__day[aria-pressed="true"] {
  background: var(--blue-600);
  color: var(--white);
}
.cal__dots {
  position: absolute;
  bottom: 1px;
  left: 50%;
  display: flex;
  gap: 2px;
  translate: -50% 0;
}
.cal__dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c);
}
.cal__day[aria-pressed="true"] .cal__dots {
  bottom: -7px;
}
.events {
  display: grid;
  gap: 8px;
  min-height: 236px;
  margin-top: 14px;
}
.events__day {
  margin: 0 0 2px;
  padding-left: 8px;
  border-left: 2px solid var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  color: #2d3a4a;
}
.event {
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 1px 2px rgb(13 30 54 / 0.06);
}
.event .event__type {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.event .event__type--nazionale {
  background: #fdece2;
  color: var(--orange-600);
}
.event .event__type--regionale {
  background: var(--blue-100);
  color: var(--blue-700);
}
.event .event__type--allenamento {
  background: #fff6cc;
  color: #6b5200;
}
.event .event__type--tempo {
  background: var(--green-bg);
  color: #245731;
}
.event b {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.3;
}
.event span {
  font-size: 0.8125rem;
  color: var(--grey-600);
}
.event span em {
  font-style: normal;
  font-weight: 600;
  color: var(--blue-600);
}
.device-wrap {
  display: grid;
  justify-items: center;
  gap: 22px;
  margin: 0;
}
.device__note {
  max-width: 34ch;
  margin: 0;
  font-size: 0.875rem;
  text-align: center;
  color: var(--grey-600);
}

.diary__steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.diary__steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  padding: 22px 0;
  border-bottom: 1px solid #cad6df;
}
.diary__steps li:first-child {
  padding-top: 0;
}
.diary__steps b {
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.diary__steps p {
  grid-column: 2;
  margin: 0;
  max-width: 46ch;
  color: #2d3a4a;
}
.chipset {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.chip {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--white);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2d3a4a;
  box-shadow: 0 1px 2px rgb(13 30 54 / 0.08);
}
.chip--strong {
  background: var(--ink);
  color: var(--white);
}
.diary__icon {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 14px;
  background: var(--white);
  color: var(--blue-600);
  box-shadow: var(--shadow-card);
}

/* Leg 4: restyle fan */
.fan {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 24px 0 0;
  padding: 24px 0 0;
  list-style: none;
}
.fan li {
  position: relative;
  flex: none;
  width: clamp(170px, 17vw, 236px);
  margin-inline: calc(clamp(170px, 17vw, 236px) * -0.1);
}
.fan li:nth-child(1) {
  --tilt: -11deg;
  margin-top: 70px;
  z-index: 1;
}
.fan li:nth-child(2) {
  --tilt: -5deg;
  margin-top: 24px;
  z-index: 2;
}
.fan li:nth-child(3) {
  --tilt: 0deg;
  z-index: 3;
  width: clamp(200px, 20vw, 276px);
}
.fan li:nth-child(4) {
  --tilt: 5deg;
  margin-top: 24px;
  z-index: 2;
}
.fan li:nth-child(5) {
  --tilt: 11deg;
  margin-top: 70px;
  z-index: 1;
}
.fan .phone {
  --phone-w: 100%;
  transition: translate 0.5s var(--ease-out);
}
.fan li:hover .phone {
  translate: 0 -14px;
}
.fan .phone .tag {
  --tag-top: -16px;
  --tag-right: auto;
  --tag-left: 50%;
  translate: -50% 0;
  rotate: 0deg;
  font-size: 0.6875rem;
}
.restyle__more {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 88px 0 0;
  padding: 0;
  list-style: none;
}
.restyle__more li {
  padding-top: 18px;
  border-top: 2px solid rgb(13 30 54 / 0.85);
}
.restyle__more b {
  display: block;
  margin-bottom: 4px;
  font-size: 1.125rem;
}
.restyle__more span {
  color: #2b1103;
}

/* ---------- Finish ---------- */

.finish {
  background-color: var(--navy);
  background-image: var(--caustics), linear-gradient(180deg, #225090 0%, #193a69 60%, #0f2a52 100%);
  background-size: 640px 280px, 100% 100%;
}
.finish__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.touch {
  display: grid;
  gap: 6px;
  margin-bottom: 28px;
}
.touch span {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgb(255 255 255 / 0.78);
}
.touch output {
  font-family: var(--clock);
  font-size: clamp(4.5rem, 10vw, 8.5rem);
  font-weight: 800;
  line-height: 0.85;
  color: var(--orange-300);
  font-variant-numeric: tabular-nums;
}
.finish h2 {
  max-width: none;
}
.finish__deck {
  max-width: 40ch;
  margin: 0 0 32px;
  font-size: 1.1875rem;
  color: rgb(255 255 255 / 0.9);
}
.who {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 72px 0 0;
  padding: 0;
  list-style: none;
}
.who li {
  padding-top: 16px;
  border-top: 2px solid rgb(255 255 255 / 0.3);
}
.who b {
  display: block;
  margin-bottom: 4px;
  font-size: 1.125rem;
}
.who span {
  color: rgb(255 255 255 / 0.84);
}

.results {
  border-radius: 22px;
  background: linear-gradient(180deg, #0f2240, var(--ink));
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), var(--shadow-lift);
  overflow: hidden;
}
.results__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
  font-family: var(--clock);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.results__head em {
  font-style: normal;
  color: var(--orange-300);
}
.results ol {
  margin: 0;
  padding: 6px 12px;
  list-style: none;
}
.results li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
  font-family: var(--clock);
  text-transform: uppercase;
}
.results li:last-child {
  border-bottom: 0;
}
.results li:first-child {
  border: 1px solid rgb(242 112 43 / 0.7);
  border-radius: 12px;
  background: rgb(242 112 43 / 0.14);
}
.results__rank {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
}
.results__what {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgb(255 255 255 / 0.82);
}
.results__value {
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  font-weight: 800;
  color: var(--orange-300);
  font-variant-numeric: tabular-nums;
}
.results p {
  margin: 0;
  padding: 12px 24px 16px;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.72);
}

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

.foot {
  padding-block: 64px 40px;
  background: var(--ink);
  color: rgb(255 255 255 / 0.82);
}
.foot__grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px 48px;
  align-items: start;
}
.foot__logo {
  width: 132px;
}
.foot nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.foot nav a {
  text-decoration: none;
  font-weight: 500;
}
.foot nav a:hover {
  color: var(--white);
  text-decoration: underline;
}
.social {
  display: flex;
  gap: 10px;
}
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  transition: background-color 0.25s;
}
.social a:hover {
  background: var(--orange);
}
.social svg {
  width: 20px;
  height: 20px;
  fill: var(--white);
}
.foot__legal {
  grid-column: 1 / -1;
  margin: 24px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.6);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .bar__lanes {
    display: none;
  }
  .bar__cta {
    margin-left: auto;
  }
  .live {
    grid-template-columns: 1fr;
  }
  .flow li:nth-child(2) {
    margin-top: 28px;
  }
  .flow li:nth-child(3) {
    margin-top: 56px;
  }
}

@media (max-width: 900px) {
  .hero__grid,
  .race,
  .diary,
  .finish__grid {
    grid-template-columns: 1fr;
  }
  .hero {
    --hero-phone: 250px;
  }
  .hero__phones {
    padding-bottom: 16px;
  }
  .board__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .board__total {
    grid-column: 1 / -1;
    padding: 16px 20px;
  }
  .board__leg {
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
  }
  .leg {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .leg__block {
    position: static;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 16px;
  }
  .leg__num {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    font-size: 2.75rem;
  }
  .leg__label {
    font-size: 0.875rem;
  }
  .restyle__more,
  .who {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .restyle__more {
    margin-top: 40px;
  }
  .programme {
    grid-template-columns: 1fr;
    padding: 4px 20px;
  }
  .programme li:nth-last-child(2) {
    border-bottom: 1px solid var(--blue-50);
  }
  .diary .device {
    order: -1;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 1rem;
  }
  .bar__logo img {
    width: 124px;
  }
  .hero h1 {
    font-size: clamp(2.75rem, 12.5vw, 3.75rem);
  }
  .hero__phones .phone--back {
    display: none;
  }
  .hero__phones .phone--front {
    margin-left: 0;
  }
  .stores .btn {
    flex: 1 1 200px;
    justify-content: center;
  }
  .board__head {
    font-size: 1.0625rem;
    padding: 14px 18px 12px;
  }
  .board__leg {
    padding: 12px 16px 14px;
  }
  .flow {
    display: flex;
    gap: 16px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 8px var(--gutter) 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .flow li {
    flex: 0 0 68%;
    scroll-snap-align: center;
  }
  .flow li:nth-child(n) {
    margin-top: 0;
  }
  .fan {
    justify-content: flex-start;
    gap: 20px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 24px var(--gutter) 40px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .fan li,
  .fan li:nth-child(3) {
    width: 62%;
    margin: 0 !important;
    --tilt: 0deg !important;
    scroll-snap-align: center;
  }
  .race__phones {
    --w: 62vw;
    justify-content: flex-start;
    gap: 20px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 24px var(--gutter) 32px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .race__phones li,
  .race__phones li:nth-child(n) {
    margin: 0;
    --tilt: 0deg;
    scroll-snap-align: center;
  }
  .results__head {
    font-size: 1.125rem;
  }
  .results li {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    padding: 12px 8px;
  }
  .results__what {
    font-size: 1.0625rem;
  }
  .results__value {
    font-size: 1.625rem;
  }
  .hero {
    --hero-phone: min(260px, 72vw);
  }
  .foot__grid {
    grid-template-columns: 1fr;
  }
  .pace {
    gap: 10px;
    padding-left: 16px;
  }
  .pace__leg {
    max-width: 9ch;
    line-height: 1.2;
  }
  .pace output {
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .lane--water,
  .rope {
    animation: none;
  }
  .pace,
  .fan .phone,
  .btn {
    transition: none;
  }
}
