/* TODO(design: D31): formalise the web layouts based on Onb-Welcome. */
@font-face {
  font-family: 'Sofia Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/sofia-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Sofia Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/sofia-sans-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Sofia Sans Extra Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/sofia-sans-extra-condensed-latin-800-normal.woff2')
    format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f0f0ee;
  --ink: #0a0a0a;
  --inv: #ffffff;
  --muted: #55585e;
  --line: #dededa;
  --frame: #0a0a0a;
  --frame-line: #0a0a0a;
  --gym: #d6341a;
  --running: #1f5be0;
  --cycling: #9a6a00;
  --swimming: #00808a;
  --skating: #8e2fcb;
  --surfing: #1e7b34;
  --onsport: #ffffff;
  --body-font: 'Sofia Sans', system-ui, sans-serif;
  --display-font: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  --mono-font: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #17181a;
    --ink: #ffffff;
    --inv: #000000;
    --muted: #a9acb3;
    --line: #2b2c30;
    --frame: #17181a;
    --frame-line: #2b2c30;
    --gym: #ff6b4a;
    --running: #5c93ff;
    --cycling: #f2b632;
    --swimming: #2cc9d1;
    --skating: #c07bff;
    --surfing: #4ade80;
    --onsport: #0a0a0b;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 32px;
}

body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px / 1.55 var(--body-font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

::selection {
  color: var(--inv);
  background: var(--ink);
}

.shell {
  width: min(100% - 96px, 1120px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1;
  top: 12px;
  left: 20px;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--inv);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font: 800 36px / 1 var(--display-font);
  text-transform: uppercase;
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: 9px;
}

.header-caption {
  color: var(--muted);
  font-size: 15px;
}

.home {
  flex: 1;
  display: grid;
  align-items: center;
  padding-block: 84px 100px;
}

.home-content {
  max-width: 750px;
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.home h1 {
  margin: 0 0 36px;
  font: 800 clamp(100px, 13vw, 180px) / 0.85 var(--display-font);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.home-copy {
  margin-bottom: 4px;
  font-size: clamp(23px, 2.8vw, 30px);
  font-weight: 700;
}

.landing .display {
  margin: 0;
  font-family: var(--display-font);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.landing picture {
  display: block;
}
.landing .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 64px;
  align-items: center;
  padding-block: 96px 104px;
}
.landing .h1 {
  font-size: 100px;
}
.landing .lead {
  max-width: 520px;
  margin: 32px 0 36px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}
.landing .badge {
  display: inline-block;
  line-height: 0;
}
.landing .badge img {
  display: block;
  width: auto;
  height: 60px;
}
.landing .note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.landing .cal {
  max-width: 480px;
  padding: 28px 28px 24px;
  background: var(--surface);
  border-radius: 20px;
}
.landing .cal-title {
  font-size: 40px;
}
.landing .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0 20px;
  font-size: 15px;
  font-weight: 700;
}
.landing .legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.landing .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.landing .grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px 4px;
  text-align: center;
}
.landing .dow {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.landing .day {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 700;
}
.landing .gym {
  background: var(--gym);
  color: var(--onsport);
}
.landing .running {
  background: var(--running);
  color: var(--onsport);
}
.landing .cycling {
  background: var(--cycling);
  color: var(--onsport);
}
.landing .swimming {
  background: var(--swimming);
  color: var(--onsport);
}
.landing .skating {
  background: var(--skating);
  color: var(--onsport);
}
.landing .surfing {
  background: var(--surfing);
  color: var(--onsport);
}
.landing .run-skate {
  background: linear-gradient(90deg, var(--running) 50%, var(--skating) 50%);
  color: var(--onsport);
}
.landing .gym-skate {
  background: linear-gradient(90deg, var(--gym) 50%, var(--skating) 50%);
  color: var(--onsport);
}
.landing .cal-foot {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.landing .section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  align-items: center;
  padding-block: 96px;
  border-top: 1px solid var(--line);
}
.landing .section .text {
  max-width: 520px;
}
.landing .section.flip .text {
  order: 2;
}
.landing .h2 {
  font-size: 76px;
}
.landing .body {
  margin: 24px 0 0;
  font-size: 20px;
  line-height: 1.5;
}
.landing .small {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.landing .phone {
  width: 320px;
  max-width: 100%;
  margin-inline: auto;
  padding: 10px;
  background: var(--frame);
  border-radius: 50px;
  box-shadow: 0 0 0 1px var(--frame-line);
}
.landing .phone img {
  display: block;
  width: 100%;
  height: 650px;
  border-radius: 40px;
  object-fit: cover;
  object-position: top;
}
.landing .cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding-block: 96px;
  border-top: 1px solid var(--line);
}
.landing .card {
  display: flex;
  flex-direction: column;
  padding: 40px 40px 0;
  overflow: hidden;
  background: var(--surface);
  border-radius: 20px;
}
.landing .h3 {
  font-size: 44px;
}
.landing .card .body {
  margin-top: 20px;
  font-size: 18px;
}
.landing .card .small {
  margin-top: 14px;
}
/* Cards in a row stretch to the taller one; keep each phone flush with the bottom edge. */
.landing .card > p:last-of-type {
  margin-bottom: auto;
}
.landing .card .phone {
  margin-top: 36px;
  padding-bottom: 0;
  border-radius: 50px 50px 0 0;
}
.landing .card .phone img {
  height: 400px;
  border-radius: 40px 40px 0 0;
}
.landing .facts {
  padding-block: 96px;
  border-top: 1px solid var(--line);
}
.landing .tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: 40px;
}
.landing .tile {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.landing .tile .h3 {
  font-size: 32px;
}
.landing .tile p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}
.landing .closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: 112px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.landing .closing .icon {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 32px;
  border-radius: 16px;
}
.landing .closing .body {
  max-width: 560px;
  margin: 24px auto 36px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer a[aria-current] {
  font-weight: 700;
}

.legal {
  flex: 1;
  padding-block: 40px 100px;
}
.legal-heading {
  margin-bottom: 56px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
}
.legal h1 {
  margin: 32px 0 20px;
  font: 800 clamp(60px, 8vw, 100px) / 0.92 var(--display-font);
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.updated {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}
.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}
.contents {
  padding: 20px;
  background: var(--surface);
  border-radius: 16px;
  font-size: 15px;
}
.contents h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.contents ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contents a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-block: 8px;
  line-height: 1.3;
}
.legal-copy {
  min-width: 0;
  max-width: 720px;
  overflow-wrap: anywhere;
}
.legal-copy section + section {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.legal-copy h2 {
  font: 800 36px / 1 var(--display-font);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.legal-copy h3 {
  font-size: 20px;
  line-height: 1.3;
  margin-block: 28px 12px;
}
.legal-copy p,
.legal-copy ul,
.legal-copy ol {
  margin-bottom: 18px;
}
.legal-copy ul,
.legal-copy ol {
  padding-left: 24px;
}
.legal-copy li + li {
  margin-top: 10px;
}
.legal-copy strong {
  font-weight: 700;
}
.legal-copy section > :last-child {
  margin-bottom: 0;
}
.legal-copy table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 18px;
  font-size: 16px;
}
.legal-copy th,
.legal-copy td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  /* `anywhere` would let auto table layout shrink a column to one character. */
  overflow-wrap: break-word;
}
.legal-copy code {
  font: 400 0.86em / 1.5 var(--mono-font);
}
.legal-copy :not(pre) > code {
  padding: 1px 5px;
  background: var(--surface);
  border-radius: 5px;
}
.legal-copy pre {
  margin: 0 0 18px;
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--surface);
  border-radius: 12px;
  overflow-wrap: normal;
  white-space: pre;
}
.legal-copy pre code {
  font-size: 15px;
}

@media (max-width: 1060px) {
  .landing .hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  .shell {
    width: calc(100% - 40px);
  }
  .site-header {
    min-height: 88px;
  }
  .header-caption {
    font-size: 13px;
    max-width: 120px;
    text-align: right;
  }
  .home {
    padding-block: 64px 80px;
  }
  .home h1 {
    font-size: clamp(100px, 22vw, 150px);
  }
  .landing .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding-block: 56px 64px;
  }
  .landing .h1 {
    font-size: 64px;
  }
  .landing .lead {
    margin: 24px 0 28px;
    font-size: 20px;
  }
  .landing .cal {
    padding: 20px 18px 18px;
  }
  .landing .cal-title {
    font-size: 32px;
  }
  .landing .legend {
    gap: 6px 14px;
    font-size: 14px;
  }
  .landing .day {
    font-size: 15px;
  }
  .landing .section {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-block: 64px;
  }
  .landing .section.flip .text {
    order: 0;
  }
  .landing .h2 {
    font-size: 56px;
  }
  .landing .body {
    font-size: 18px;
  }
  .landing .phone {
    width: 280px;
    padding: 8px;
    border-radius: 44px;
  }
  .landing .phone img {
    height: 572px;
    border-radius: 36px;
  }
  .landing .cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-block: 64px;
  }
  .landing .card {
    padding: 28px 24px 0;
  }
  .landing .h3 {
    font-size: 36px;
  }
  .landing .card .phone {
    margin-top: 28px;
  }
  .landing .card .phone img {
    height: 360px;
  }
  .landing .facts {
    padding-block: 64px;
  }
  .landing .tiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 28px;
  }
  .landing .closing {
    padding-block: 72px;
  }
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 20px;
  }
  .site-footer nav {
    gap: 0 24px;
  }
  .legal {
    padding-block: 24px 64px;
  }
  .legal-heading {
    margin-bottom: 32px;
  }
  .legal h1 {
    margin-top: 24px;
  }
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .contents {
    max-width: none;
  }
  .legal-copy {
    font-size: 17px;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --ink: #0a0a0a;
    --muted: #55585e;
    --line: #dededa;
  }
  .site-header,
  .site-footer,
  .contents,
  .back-link,
  .skip-link {
    display: none;
  }
  .shell {
    width: 100%;
  }
  .legal {
    padding: 0;
  }
  .legal-layout {
    display: block;
  }
  .legal-copy {
    max-width: none;
  }
  .legal h1 {
    font-size: 48px;
  }
  .legal-copy h2 {
    break-after: avoid;
  }
  .legal-copy pre {
    white-space: pre-wrap;
  }
}
