/* stark. website. Colours and type follow apps/ios/Stark/DesignSystem (Palette.swift, Typography.swift). */

/* Playfair Display: SIL Open Font License, see assets/fonts/PlayfairDisplay-OFL-LICENSE.txt. */
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/PlayfairDisplay-Variable.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* Switzer: ITF Free Font License, self-hosted unmodified as the licence requires.
   See assets/fonts/Switzer-FFL-LICENSE.txt. */
@font-face {
  font-family: "Switzer";
  src: url("/assets/fonts/Switzer-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("/assets/fonts/Switzer-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("/assets/fonts/Switzer-Semibold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("/assets/fonts/Switzer-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f4f4f6;
  --card: #ffffff;
  --ink: #0b0b0c;
  --ink2: #3a3a3c;
  --muted: #6b6b70;
  --rule: #e4e4e8;
  --hair: #ededf0;
  --accent: #0026d1;
  --accent2: #0021b8;
  --tint: #e6e9fa;
  --ok-bg: #edf7ef;
  --ok-text: #1e6b34;
  --icon-top: #1238e6;
  --icon-bottom: #001fb0;

  --display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --text: "Switzer", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-card: 22px;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--card);
  padding: 8px 14px;
  border-radius: 10px;
}

/* Type */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  font-variant-numeric: lining-nums;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(46px, 8.4vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.04;
}

h3 {
  font-size: 24px;
  line-height: 1.15;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--ink2);
}

.wordmark {
  font-family: var(--text);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(244 244 246 / 0.82);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled {
  border-bottom-color: var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 20px;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink2);
}
.site-nav a:hover {
  color: var(--accent);
}
.site-header .badge {
  height: 40px;
}

/* App Store badge: Apple's artwork, unmodified, at least 40px tall with clear space around it. */
.badge {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
}
.badge img {
  height: 100%;
  width: auto;
}
.badge-lg {
  height: 54px;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 7vw, 88px) 0 0;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.hero-copy {
  padding-bottom: clamp(40px, 7vw, 96px);
}
.hero-copy .eyebrow {
  margin-bottom: 22px;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-copy .lede {
  margin-top: 26px;
  max-width: 30em;
}
.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 34px;
}
.hero-cta .note {
  font-size: 14px;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  align-self: end;
  display: flex;
  justify-content: center;
  min-height: 100%;
}

/* The app icon's graded bars, rising beside the front phone; the last one tucks behind it. */
.bars {
  position: absolute;
  inset: auto auto 0 -14%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 10%;
  width: 36%;
  height: 62%;
  pointer-events: none;
}
.bars span {
  width: 17.5%;
  border-radius: 999px 999px 0 0;
  transform-origin: bottom;
  animation: rise 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.bars span:nth-child(1) {
  height: 40%;
  background: linear-gradient(to top, #c9d2ff, #dde3ff);
}
.bars span:nth-child(2) {
  height: 60%;
  background: linear-gradient(to top, #dde3ff, #e6e9fa);
  animation-delay: 0.08s;
}
.bars span:nth-child(3) {
  height: 80%;
  background: linear-gradient(to top, #c9d2ff, #e6e9fa);
  animation-delay: 0.16s;
}
.bars span:nth-child(4) {
  height: 100%;
  background: linear-gradient(to top, #b6c2ff, #e6e9fa);
  animation-delay: 0.24s;
}
@keyframes rise {
  from {
    transform: scaleY(0.2);
    opacity: 0;
  }
}

.hero-phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  padding-top: 8px;
}
.hero-phones .phone {
  width: min(310px, 62%);
  margin-bottom: -18%;
}
.hero-phones .phone.back {
  position: absolute;
  width: min(270px, 52%);
  right: 0;
  bottom: 12%;
  margin: 0;
  transform: rotate(4deg);
  opacity: 0.98;
}

/* Device frame: a CSS iPhone around a real 1206 × 2622 simulator screenshot. */

.phone {
  --bezel: 3.4%;
  position: relative;
  aspect-ratio: 1206 / 2622;
  border-radius: 15% / 7%;
  padding: var(--bezel);
  background: #0e0e10;
  box-shadow:
    inset 0 0 0 1.5px #3a3a3e,
    inset 0 0 0 4px #0e0e10,
    0 1px 0 1px #c9c9cf,
    0 30px 60px -20px rgb(11 11 40 / 0.35),
    0 18px 36px -18px rgb(11 11 40 / 0.3);
}
.phone::after {
  /* Dynamic Island */
  content: "";
  position: absolute;
  top: 4.6%;
  left: 50%;
  width: 30%;
  height: 3.9%;
  translate: -50% 0;
  border-radius: 999px;
  background: #000;
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12.4% / 5.7%;
  background: var(--bg);
}

/* Steps strip */

.strip {
  position: relative;
  z-index: 2;
  background: var(--card);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.strip ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.strip li {
  padding: 30px clamp(16px, 3vw, 36px);
  border-left: 1px solid var(--rule);
}
.strip li:first-child {
  border-left: 0;
  padding-left: 0;
}
.strip .num {
  font-family: var(--display);
  font-weight: 600;
  font-variant-numeric: lining-nums;
  font-size: 22px;
  color: var(--accent);
}
.strip h3 {
  font-size: 22px;
  margin: 6px 0 6px;
}
.strip p {
  color: var(--muted);
  font-size: 15.5px;
}

/* Features */

.section {
  padding: clamp(72px, 11vw, 140px) 0;
}
.section-head {
  max-width: 40em;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head .eyebrow {
  margin-bottom: 14px;
}
.section-head .lede {
  margin-top: 18px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 110px);
  align-items: center;
}
.feature + .feature {
  margin-top: clamp(80px, 12vw, 150px);
}
.feature.flip .feature-copy {
  order: 2;
}
.feature-copy h2 {
  margin: 14px 0 18px;
}
.feature-shot {
  position: relative;
  display: flex;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px) 0;
}
.feature-shot::before {
  content: "";
  position: absolute;
  inset: 0 6%;
  border-radius: 40px;
  background: linear-gradient(180deg, var(--tint), rgb(230 233 250 / 0));
}
.feature-shot .phone {
  width: min(300px, 74%);
}

.points {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.points li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink2);
  font-size: 16px;
}
.points li::before {
  content: "";
  width: 9px;
  height: 9px;
  margin: 8px 0 0 3px;
  border-radius: 3px;
  background: var(--accent);
}
.points strong {
  color: var(--ink);
  font-weight: 600;
}

/* Callout card inside a feature, styled like the app's cards. */
.app-card {
  margin-top: 26px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
}
.app-card .label {
  font-size: 13px;
  color: var(--muted);
}
.app-card .title {
  font-weight: 700;
  font-size: 17px;
  margin: 2px 0 4px;
}
.app-card .body {
  font-size: 15px;
  color: var(--ink2);
}
.app-card .actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.app-card .chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
}
.app-card .chip.quiet {
  background: var(--bg);
  color: var(--ink);
}

/* Around the workout */

.around {
  background: var(--card);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.tile {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--bg);
}
.tile h3 {
  font-size: 23px;
  margin: 20px 0 8px;
}
.tile p {
  color: var(--ink2);
  font-size: 15.5px;
}
.tile-art {
  height: 150px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Lock Screen Live Activity, drawn after the widget's SwiftUI layout. */
.lock {
  background: linear-gradient(160deg, #1b2a8a, #0a0f3a 70%);
}
.activity {
  width: 88%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgb(0 0 0 / 0.72);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}
.activity .name {
  font-weight: 600;
  font-size: 15px;
}
.activity .now {
  font-size: 13px;
}
.activity .progress {
  font-size: 11.5px;
  opacity: 0.6;
}
.activity .clock {
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.activity .rest {
  font-size: 13px;
  font-weight: 600;
  color: #ff9f0a;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.health {
  background: var(--card);
  border: 1px solid var(--rule);
}
.health-rows {
  width: 86%;
  font-size: 14px;
}
.health-rows div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--hair);
}
.health-rows div:last-child {
  border-bottom: 0;
}
.toggle {
  width: 38px;
  height: 23px;
  border-radius: 999px;
  background: #34c759;
  position: relative;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}

.sync {
  background: var(--tint);
}
.sync-stack {
  display: grid;
  gap: 8px;
  width: 80%;
}
.sync-stack span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.sync-stack .apple {
  background: #000;
  color: #fff;
}
.sync-stack .mail {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.sync-stack small {
  text-align: center;
  font-size: 12.5px;
  color: var(--accent2);
  font-weight: 500;
}

.details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 28px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.details h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.details p {
  font-size: 14.5px;
  color: var(--muted);
}

/* Closing band */

.closing {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, var(--icon-top), var(--icon-bottom));
  text-align: center;
  padding: clamp(80px, 12vw, 140px) 0;
}
.closing .icon {
  width: 104px;
  height: 104px;
  margin: 0 auto 30px;
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.2),
    0 24px 50px -12px rgb(0 0 0 / 0.45);
}
.closing h2 {
  font-size: clamp(40px, 6.6vw, 72px);
}
.closing p {
  margin: 18px auto 0;
  max-width: 28em;
  color: rgb(255 255 255 / 0.8);
  font-size: 18px;
}
.closing .badge {
  margin-top: 34px;
}

/* Footer */

.site-footer {
  padding: 40px 0 48px;
  font-size: 14.5px;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.site-footer .brand {
  font-size: 17px;
}
.site-footer .brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.site-footer nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.site-footer nav a {
  text-decoration: none;
  color: var(--ink2);
  font-weight: 500;
}
.site-footer nav a:hover {
  color: var(--accent);
}
.site-footer .legal-note {
  flex-basis: 100%;
  font-size: 12.5px;
}

/* Legal pages */

.legal {
  padding: clamp(48px, 8vw, 96px) 0 clamp(72px, 10vw, 120px);
}
.legal .wrap {
  max-width: 760px;
}
.legal h1 {
  font-size: clamp(42px, 7vw, 64px);
  margin-bottom: 28px;
}
.legal-body {
  min-height: 30vh;
  color: var(--ink2);
}
.legal-body h2 {
  font-size: 28px;
  margin: 40px 0 12px;
}
.legal-body h3 {
  font-size: 20px;
  margin: 28px 0 8px;
}
.legal-body p,
.legal-body ul {
  margin: 0 0 14px;
}

/* The iubenda privacy policy, embedded by iubenda.js. Its own stylesheet draws a white card
   with a green top bar and repeats the title; blend it into the page instead. Its table of
   contents sits beside the text, so this page gets a wider column. */
.legal .wrap:has(.iub-policy) {
  max-width: 1040px;
}
.iub-policy #iub-legalDoc {
  border-top: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
  font-family: inherit;
  color: var(--ink2);
}
.iub-policy #iub-legalDoc .main-header h1 {
  display: none;
}

/* Reveal on scroll (only when JS runs and motion is allowed). */
.js .reveal {
  opacity: 0;
  translate: 0 24px;
  transition:
    opacity 0.7s ease,
    translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js .reveal.in {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .bars span {
    animation: none;
  }
  .js .reveal {
    opacity: 1;
    translate: 0 0;
    transition: none;
  }
}

/* Tablet */

@media (max-width: 960px) {
  .site-nav {
    display: none;
  }
  .site-header .badge {
    margin-left: auto;
  }
  .tiles {
    grid-template-columns: 1fr 1fr;
  }
  .tiles .tile:last-child {
    grid-column: 1 / -1;
  }
  .details {
    grid-template-columns: 1fr 1fr;
    gap: 22px 28px;
  }
}

/* Phone */

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .site-header .wrap {
    height: 58px;
  }
  .site-header .badge {
    height: 40px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding-bottom: 8px;
  }
  .hero-visual {
    min-height: 0;
  }
  .hero-phones .phone {
    width: 62%;
  }
  .hero-phones .phone.back {
    width: 50%;
    right: -2%;
  }
  .strip ol {
    grid-template-columns: 1fr;
  }
  .strip li,
  .strip li:first-child {
    padding: 22px 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .strip li:first-child {
    border-top: 0;
  }
  .feature {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .feature.flip .feature-copy {
    order: 0;
  }
  .feature-shot .phone {
    width: min(270px, 70%);
  }
  .tiles {
    grid-template-columns: 1fr;
  }
  .details {
    grid-template-columns: 1fr;
  }
  .site-footer nav {
    margin-left: 0;
    flex-basis: 100%;
  }
}
