/* Stiffless website. One stylesheet, no build step.
   Brand colors come from docs/design-system/tokens.json (accent "clay", accent-soft, avatar-stage). */

:root {
  color-scheme: light dark;

  --accent: #ad4f2d;            /* accent, light */
  --accent-soft: #f9e9e2;       /* accent-soft, light */
  --stage: #f4eee8;             /* avatar-stage, light */
  --surface: #ffffff;           /* bg-grouped-secondary, light */
  --bg: #ffffff;                /* bg-primary, light */
  --bg-alt: #f2f2f7;            /* bg-grouped, light */
  --bar: rgba(244, 238, 232, 0.72);  /* avatar-stage, translucent */
  --bezel: #1d1d1f;
  --text: #1d1d1f;
  --text-secondary: #55555a;    /* solid, 4.5:1 or better on stage and surface */
  --separator: #ddd5cd;
  --focus: #ad4f2d;

  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --gutter: 16px;
  --measure: 42rem;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #ff9a70;          /* accent, dark */
    --accent-soft: #3b2219;     /* accent-soft, dark */
    --stage: #1f1b18;           /* avatar-stage, dark */
    --surface: #2c2c2e;         /* bg-tertiary, dark: lifts cards off the dark stage */
    --bg: #000000;              /* bg-primary, dark */
    --bg-alt: #1c1c1e;          /* bg-secondary, dark */
    --bar: rgba(31, 27, 24, 0.72);
    --bezel: #3a3a3c;
    --text: #f5f5f7;
    --text-secondary: #b4b4ba;
    --separator: #3a3430;
    --focus: #ff9a70;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--stage);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;          /* 17 px, the iOS body size */
  line-height: 1.55;
  overflow-wrap: break-word;
}

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

/* Skip link */
.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 1;
}

.skip:focus {
  top: 8px;
}

/* Header: a thin translucent bar that stays at the top */
.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
  padding: 2px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 22.5%;
}

/* Text */
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: 40px;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 24px;
}

p,
ul,
ol,
dl {
  margin: 12px 0 0;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 6px;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

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

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

strong {
  font-weight: 600;
}

.meta {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

main {
  padding-bottom: 48px;
}

/* Home: an Apple-style product page. Big centered headlines, quiet sections, the app itself as the picture. */
.wide {
  max-width: calc(980px + 2 * var(--gutter));
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home main {
  padding-bottom: 0;
}

.home h1,
.home h2 {
  letter-spacing: -0.022em;
  font-weight: 700;
}

.home h2 {
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  line-height: 1.08;
}

.center {
  text-align: center;
}

.narrow {
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 1.0625rem;
}

.body-lg {
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  line-height: 1.45;
  color: var(--text-secondary);
  margin-top: 16px;
}

.body-lg + .body-lg {
  margin-top: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

.pill.small {
  min-height: 30px;
  padding: 0 12px;
  font-size: 0.8125rem;
}

.more {
  font-size: 1.0625rem;
  text-decoration: none;
}

.more::after {
  content: " \203A";
}

.more:hover {
  text-decoration: underline;
}

.hero-icon {
  display: block;
  margin: 0 auto;
  border-radius: 22.5%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Hero: headline over the 3D guide on the warm stage */
.hero {
  background: var(--stage);
  text-align: center;
  padding-top: clamp(40px, 8vw, 80px);
  overflow: hidden;
}

.hero h1 {
  margin: 28px auto 0;
  max-width: 13em;
  font-size: clamp(2.5rem, 8vw, 4.75rem);
  line-height: 1.04;
}

.hero-lead {
  max-width: 32rem;
  margin: 20px auto 0;
  font-size: clamp(1.1875rem, 2.4vw, 1.5rem);
  line-height: 1.4;
  color: var(--text-secondary);
}

.cta {
  margin-top: 28px;
}

.hero-stage {
  width: min(100%, 600px);
  margin: clamp(8px, 3vw, 24px) auto 0;
  /* Fade every edge so the video frame never shows against the stage */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(#000 70%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(#000 70%, transparent);
  mask-composite: intersect;
}

.hero-stage video,
.hero-stage img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-stage .still,
.hero-stage .only-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .hero-stage .only-light {
    display: none;
  }

  .hero-stage video.only-dark {
    display: block;
  }

  .hero-icon {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

/* No autoplaying loop for people who ask for less motion: show a still frame instead */
@media (prefers-reduced-motion: reduce) {
  .hero-stage video.only-light,
  .hero-stage video.only-dark {
    display: none;
  }

  .hero-stage .still.only-light {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) and (prefers-color-scheme: dark) {
  .hero-stage .still.only-light {
    display: none;
  }

  .hero-stage .still.only-dark {
    display: block;
  }
}

/* Sections */
.band {
  background: var(--bg);
  padding: clamp(72px, 12vw, 128px) 0;
}

.band.alt {
  background: var(--bg-alt);
}

/* iPhone frame around a screenshot */
.phone {
  margin: 0;
}

.phone picture {
  display: block;
  border: 8px solid var(--bezel);
  border-radius: 48px;
  overflow: hidden;
  background: var(--bezel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}

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

.phone figcaption {
  margin-top: 18px;
  text-align: center;
  font-weight: 600;
}

/* Text beside a phone */
.split-grid {
  display: grid;
  gap: 56px;
  align-items: center;
}

.split .phone {
  width: min(78%, 320px);
  margin: 0 auto;
}

@media (min-width: 760px) {
  .split-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
  }
}

/* Highlight tiles */
.tiles {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  gap: 16px;
}

.tile {
  margin: 0;
  background: var(--surface);
  border-radius: 24px;
  padding: 32px 28px;
}

.tile h3 {
  margin: 0;
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tile p {
  margin-top: 8px;
  color: var(--text-secondary);
}

.tile .big-number {
  margin: 0;
  font-size: clamp(4rem, 12vw, 6rem);
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
}

@media (min-width: 640px) {
  .tiles {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Screens: a row on wide windows, a swipeable strip on phones */
.gallery {
  list-style: none;
  margin: 56px auto 0;
  padding: 0 var(--gutter) 32px;
  max-width: calc(980px + 2 * var(--gutter));
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(68%, 280px);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery li {
  margin: 0;
  scroll-snap-align: start;
}

@media (min-width: 900px) {
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    overflow: visible;
  }
}

/* Privacy */
.band.privacy {
  background: var(--stage);
}

.glyph {
  display: block;
  margin: 0 auto 20px;
  color: var(--accent);
}

/* Closing */
.closing h2 {
  margin-top: 24px;
}

/* Long pages (privacy, terms, support) */
.doc {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 20px 32px;
  margin-top: 16px;
}

.doc h1 + p {
  margin-top: 8px;
}

.doc h2:first-of-type {
  margin-top: 32px;
}

.summary {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 16px 16px 16px 2.25rem;
  margin-top: 20px;
}

.note {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 14px;
  margin-top: 20px;
}

@media (min-width: 640px) {
  .doc {
    padding: 32px 36px 40px;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--separator);
  padding: 20px 0 32px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.home .site-footer {
  background: var(--bg-alt);
}

.site-footer .fine {
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--separator);
  font-size: 0.8125rem;
}

.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.site-footer nav li {
  margin: 0;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer p {
  margin-top: 4px;
}
