/* ==========================================================================
   mengs.app — shared styles
   Apple-inspired: system type, generous whitespace, frosted navigation,
   light + dark themes driven by the tokens below.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-elevated: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hairline: rgba(0, 0, 0, 0.12);
  --link: #0066cc;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --nav-bg: rgba(251, 251, 253, 0.8);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 20px 40px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.08), 0 28px 56px rgba(0, 0, 0, 0.1);

  /* In-app mockup colours (mirror iOS system colours) */
  --ios-bg: #ffffff;
  --ios-card: rgba(255, 255, 255, 0.78);
  --ios-fill: rgba(118, 118, 128, 0.12);
  --ios-label: #000000;
  --ios-secondary: rgba(60, 60, 67, 0.6);
  --ios-tint: #007aff;

  --radius-tile: 28px;
  --radius-card: 18px;
  --content: 980px;
  --wide: 1200px;
  --gutter: 22px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #101012;
    --bg-elevated: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --hairline: rgba(255, 255, 255, 0.16);
    --link: #2997ff;
    --accent: #0071e3;
    --nav-bg: rgba(22, 22, 23, 0.8);
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 28px 56px rgba(0, 0, 0, 0.5);

    --ios-bg: #000000;
    --ios-card: rgba(44, 44, 46, 0.78);
    --ios-fill: rgba(118, 118, 128, 0.24);
    --ios-label: #ffffff;
    --ios-secondary: rgba(235, 235, 245, 0.6);
    --ios-tint: #0a84ff;
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #101012;
  --bg-elevated: #1c1c1e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --hairline: rgba(255, 255, 255, 0.16);
  --link: #2997ff;
  --nav-bg: rgba(22, 22, 23, 0.8);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 28px 56px rgba(0, 0, 0, 0.5);
  --ios-bg: #000000;
  --ios-card: rgba(44, 44, 46, 0.78);
  --ios-fill: rgba(118, 118, 128, 0.24);
  --ios-label: #ffffff;
  --ios-secondary: rgba(235, 235, 245, 0.6);
  --ios-tint: #0a84ff;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

p {
  margin: 0;
}

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

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.skip-link:focus {
  top: 8px;
}

/* ---------- Typography ---------- */

.eyebrow {
  font-size: 21px;
  line-height: 1.19;
  font-weight: 600;
  letter-spacing: 0.011em;
  color: var(--text-2);
}

.headline-hero {
  font-size: clamp(44px, 8vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.headline-section {
  font-size: clamp(32px, 5.4vw, 56px);
  line-height: 1.07;
  letter-spacing: -0.005em;
}

.headline-tile {
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: 0;
}

.lead {
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.33;
  font-weight: 400;
  letter-spacing: 0.009em;
  color: var(--text-2);
}

.lead strong {
  color: var(--text);
  font-weight: 600;
}

.gradient-text {
  background: linear-gradient(120deg, #2f80ff 0%, #5e5ce6 45%, #bf5af2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footnote {
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.01em;
  color: var(--text-3);
}

/* ---------- Links & buttons ---------- */

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 19px;
  letter-spacing: 0.012em;
}

.link-more::after {
  content: "›";
  font-size: 1.15em;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

/* An underline would stop short of the chevron, so nudge it instead */
.link-more:hover {
  text-decoration: none;
}

.link-more:hover::after {
  transform: translate(3px, -1px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border: 0;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.button-secondary {
  background: transparent;
  color: var(--link);
  box-shadow: inset 0 0 0 1px var(--link);
}

.button-secondary:hover {
  background: var(--link);
  color: #fff;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 980px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.badge-soon svg {
  width: 18px;
  height: 18px;
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.pill-accent {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--link);
}

/* ---------- Global navigation ---------- */

.globalnav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 48px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.globalnav .container-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.globalnav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.globalnav-brand:hover {
  text-decoration: none;
}

.globalnav-brand img {
  width: 24px;
  height: 24px;
}

.globalnav-links {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.globalnav-links a {
  white-space: nowrap;
  color: var(--text);
  opacity: 0.8;
  font-size: 13px;
  letter-spacing: -0.01em;
  transition: opacity 0.2s ease;
}

.globalnav-links a:hover,
.globalnav-links a[aria-current="page"] {
  opacity: 1;
  text-decoration: none;
}

/* Local (per-product) navigation, like Apple's product pages */
.localnav {
  position: sticky;
  top: 48px;
  z-index: 40;
  height: 52px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.localnav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.localnav-title {
  color: var(--text);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.011em;
  white-space: nowrap;
}

.localnav-title:hover {
  text-decoration: none;
}

.localnav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
}

.localnav-menu a:not(.localnav-cta) {
  color: var(--text);
  opacity: 0.8;
}

.localnav-menu a[aria-current="page"] {
  opacity: 0.5;
  pointer-events: none;
}

.localnav-cta {
  padding: 4px 11px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

.localnav-cta:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.localnav-cta.is-soon {
  background: var(--bg-alt);
  color: var(--text-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

@media (max-width: 560px) {
  .globalnav-links {
    gap: 18px;
  }

  .localnav-title {
    font-size: 19px;
  }

  .localnav-menu {
    gap: 14px;
  }

  .localnav-menu .hide-sm {
    display: none;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(72px, 10vw, 120px) 0;
}

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

.section-header {
  max-width: 760px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

.section-header .lead {
  margin-top: 16px;
}

.section-header .eyebrow {
  margin-bottom: 10px;
}

/* ---------- Home: hero ---------- */

.home-hero {
  padding: clamp(80px, 12vw, 140px) 0 clamp(56px, 8vw, 96px);
  text-align: center;
}

.home-hero .lead {
  max-width: 640px;
  margin: 20px auto 0;
}

/* ---------- Home: app tiles ---------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 820px) {
  .tile-grid {
    grid-template-columns: 1fr;
  }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 580px;
  padding: 52px 32px 0;
  overflow: hidden;
  border-radius: var(--radius-tile);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  color: inherit;
  text-align: center;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

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

.tile:hover {
  box-shadow: var(--shadow-hover);
}

.tile-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 18px;
  border-radius: 22.37%;
  box-shadow: 0 6px 18px rgba(0, 40, 140, 0.22);
}

.tile .lead {
  margin-top: 10px;
  font-size: 19px;
}

.tile-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.tile-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin-top: 20px;
}

.tile-art {
  margin-top: auto;
  padding-top: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* A phone peeking up from the bottom of a tile */
.tile-art .phone {
  --phone-w: 260px;
  margin-bottom: -115px;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile:hover .tile-art .phone {
  transform: translateY(-10px);
}

.tile-placeholder {
  justify-content: center;
  min-height: 580px;
  padding-bottom: 52px;
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--hairline);
}

.section-alt .tile-placeholder {
  background: transparent;
}

.tile-placeholder:hover {
  box-shadow: inset 0 0 0 2px var(--hairline);
}

.placeholder-icons {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  gap: 14px;
  margin-bottom: 28px;
}

.placeholder-icons span {
  width: 56px;
  height: 56px;
  border-radius: 22.37%;
  background: var(--bg-alt);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.placeholder-icons span:nth-child(5) {
  background: linear-gradient(135deg, #4f9bff, #0a45c4);
  box-shadow: none;
  opacity: 0.9;
}

.tile-placeholder .lead {
  max-width: 340px;
}

/* ---------- Home: principles ---------- */

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

@media (max-width: 820px) {
  .feature-row {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 32px 28px;
  border-radius: var(--radius-card);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.section-alt .feature-card {
  background: var(--bg);
}

.feature-card .symbol {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 21px;
  line-height: 1.19;
  letter-spacing: 0.011em;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-2);
}

/* ---------- Product hero ---------- */

.product-hero {
  padding: clamp(56px, 9vw, 96px) 0 0;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--bg);
}

.product-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  border-radius: 22.37%;
  box-shadow: 0 10px 30px rgba(0, 40, 140, 0.25);
}

.product-hero .lead {
  max-width: 620px;
  margin: 20px auto 0;
}

.product-hero .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 24px;
  margin-top: 32px;
}

.product-hero .phone-stage {
  display: flex;
  justify-content: center;
  margin-top: clamp(48px, 7vw, 72px);
}

.product-hero .phone {
  --phone-w: 320px;
  margin-bottom: -120px;
}

@media (max-width: 420px) {
  .product-hero .phone {
    --phone-w: 280px;
  }
}

/* ---------- Product feature blocks ---------- */

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 820px) {
  .style-grid {
    grid-template-columns: 1fr;
  }
}

.style-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  border-radius: var(--radius-card);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.section-alt .style-card {
  background: var(--bg);
}

.style-card .symbol {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  color: var(--accent);
}

.style-card h3 {
  font-size: 24px;
  line-height: 1.17;
  margin-bottom: 8px;
}

.style-card p {
  color: var(--text-2);
}

.style-card .demo {
  margin-top: auto;
  padding-top: 28px;
}

/* Split layout: copy on one side, visual on the other */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}

.split.reverse .split-visual {
  order: -1;
}

@media (max-width: 820px) {
  .split {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .split.reverse .split-visual {
    order: 0;
  }
}

.split-copy .eyebrow {
  margin-bottom: 10px;
}

.split-copy .lead {
  margin-top: 18px;
}

.split-copy ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.split-copy li {
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  color: var(--text-2);
}

.split-copy li strong {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 820px) {
  .split-copy ul {
    text-align: left;
  }
}

.split-visual {
  display: flex;
  justify-content: center;
}

/* Detail grid (small facts) */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 28px;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail .symbol {
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  color: var(--accent);
}

.detail h3 {
  font-size: 19px;
  line-height: 1.21;
  margin-bottom: 6px;
}

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

/* Closing call to action */
.cta {
  text-align: center;
}

.cta .product-icon {
  width: 96px;
  height: 96px;
}

.cta .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 24px;
  margin-top: 28px;
}

.cta .footnote {
  margin-top: 24px;
}

/* ==========================================================================
   iPhone mockup (pure CSS, scales with --phone-w)
   ========================================================================== */

.phone {
  --phone-w: 300px;
  --u: calc(var(--phone-w) / 300);
  position: relative;
  flex: none;
  width: var(--phone-w);
  aspect-ratio: 300 / 620;
  padding: calc(11 * var(--u));
  border-radius: calc(52 * var(--u));
  background: #1d1d1f;
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) #3a3a3c,
    0 calc(30 * var(--u)) calc(60 * var(--u)) rgba(0, 0, 0, 0.25);
}

.phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: calc(42 * var(--u));
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--ios-tint) 18%, var(--ios-bg)), var(--ios-bg) 70%);
  color: var(--ios-label);
  font-family: var(--font);
  letter-spacing: -0.01em;
}

.phone-island {
  position: absolute;
  top: calc(10 * var(--u));
  left: 50%;
  width: calc(88 * var(--u));
  height: calc(26 * var(--u));
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(14 * var(--u)) calc(26 * var(--u)) 0;
  height: calc(46 * var(--u));
  font-size: calc(13 * var(--u));
  font-weight: 600;
}

.phone-status .status-icons {
  display: flex;
  gap: calc(4 * var(--u));
  align-items: center;
}

.phone-status .status-icons i {
  display: block;
  width: calc(16 * var(--u));
  height: calc(9 * var(--u));
  border-radius: calc(2.5 * var(--u));
  background: currentColor;
}

.phone-status .status-icons i:first-child {
  width: calc(14 * var(--u));
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  border-radius: 0;
}

.phone-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: calc(6 * var(--u)) calc(16 * var(--u)) 0;
  color: var(--ios-tint);
}

.phone-toolbar svg {
  width: calc(20 * var(--u));
  height: calc(20 * var(--u));
}

.phone-title {
  padding: calc(2 * var(--u)) calc(16 * var(--u)) 0;
  font-size: calc(26 * var(--u));
  font-weight: 700;
  letter-spacing: 0.01em;
}

.phone-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: calc(14 * var(--u));
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(12 * var(--u));
  margin: auto 0;
  padding: calc(22 * var(--u)) calc(12 * var(--u));
  border-radius: calc(26 * var(--u));
  background: var(--ios-card);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 calc(6 * var(--u)) calc(18 * var(--u)) rgba(0, 0, 0, 0.08);
}

.app-card .speaker {
  width: calc(42 * var(--u));
  height: calc(42 * var(--u));
  color: var(--ios-tint);
}

.app-readout {
  font-family: var(--font-rounded);
  font-size: calc(26 * var(--u));
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Wheel picker */
.wheel {
  position: relative;
  display: flex;
  align-items: center;
  font-family: var(--font-rounded);
  font-variant-numeric: tabular-nums;
}

.wheel::before {
  content: "";
  position: absolute;
  left: calc(-6 * var(--u));
  right: calc(-6 * var(--u));
  top: 50%;
  height: calc(28 * var(--u));
  transform: translateY(-50%);
  border-radius: calc(8 * var(--u));
  background: var(--ios-fill);
}

.wheel-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(64 * var(--u));
  height: calc(124 * var(--u));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}

.wheel-col.narrow {
  width: calc(44 * var(--u));
}

.wheel-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wheel-track span {
  display: block;
  height: calc(28 * var(--u));
  line-height: calc(28 * var(--u));
  font-size: calc(19 * var(--u));
  color: var(--ios-label);
}

.wheel-sep {
  position: relative;
  padding: 0 calc(2 * var(--u));
  font-size: calc(22 * var(--u));
  font-weight: 600;
}

.wheel-unit {
  position: relative;
  padding-left: calc(4 * var(--u));
  font-size: calc(19 * var(--u));
  color: var(--ios-secondary);
}

.mute-capsule {
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--u));
  padding: calc(8 * var(--u)) calc(15 * var(--u));
  border: 0;
  border-radius: 999px;
  background: var(--ios-fill);
  color: var(--ios-label);
  font: inherit;
  font-size: calc(13 * var(--u));
  font-weight: 500;
  cursor: pointer;
}

.mute-capsule svg {
  width: calc(15 * var(--u));
  height: calc(15 * var(--u));
}

.mute-capsule[aria-pressed="true"] {
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
}

.presets {
  display: flex;
  gap: calc(6 * var(--u));
  margin-top: calc(12 * var(--u));
}

.preset {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(1 * var(--u));
  padding: calc(6 * var(--u)) 0;
  border: 0;
  border-radius: 999px;
  background: var(--ios-fill);
  color: var(--ios-label);
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.preset:active {
  transform: scale(0.95);
}

.preset b {
  font-size: calc(11 * var(--u));
  font-weight: 500;
}

.preset small {
  font-size: calc(9.5 * var(--u));
  color: var(--ios-secondary);
}

.phone-home-indicator {
  width: calc(110 * var(--u));
  height: calc(4.5 * var(--u));
  margin: calc(4 * var(--u)) auto calc(8 * var(--u));
  border-radius: 999px;
  background: var(--ios-label);
  opacity: 0.85;
}

/* ---------- Small demo controls inside style cards ---------- */

.demo-slider {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--ios-fill);
}

.demo-slider::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value, 62%);
  border-radius: inherit;
  background: var(--ios-tint);
}

.demo-slider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--value, 62%);
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15), 0 3px 8px rgba(0, 0, 0, 0.18);
}

.demo-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.demo-stepper span {
  padding: 6px 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ios-tint) 13%, transparent);
  color: var(--ios-tint);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.demo-number {
  margin-bottom: 14px;
  font-family: var(--font-rounded);
  font-size: 36px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.demo-number span {
  color: var(--text-3);
}

.demo-wheel {
  display: flex;
  justify-content: center;
}

.demo-wheel .wheel {
  --u: 1px;
  color: var(--text);
}

/* ---------- Shortcuts / Siri list ---------- */

.shortcut-list {
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border-radius: var(--radius-tile);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.section-alt .shortcut-list {
  background: var(--bg);
}

.shortcut-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  text-align: left;
}

.shortcut-list li + li {
  border-top: 1px solid var(--hairline);
  border-radius: 0 0 16px 16px;
}

.shortcut-glyph {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
}

.shortcut-glyph svg {
  width: 24px;
  height: 24px;
}

.shortcut-list b {
  display: block;
  font-size: 17px;
  font-weight: 600;
}

.shortcut-list small {
  display: block;
  font-size: 14px;
  color: var(--text-2);
}

.siri-bubble {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 18px;
  border-radius: 20px 20px 20px 6px;
  background: linear-gradient(120deg, #2f80ff, #bf5af2);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
}

/* ==========================================================================
   Document pages (privacy, support)
   ========================================================================== */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 88px) var(--gutter) clamp(72px, 10vw, 120px);
}

.doc-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hairline);
}

.doc-header h1 {
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.003em;
}

.doc-header .lead {
  margin-top: 14px;
  font-size: 21px;
}

.doc-header .footnote {
  margin-top: 16px;
  font-size: 14px;
}

.doc h2 {
  margin: 44px 0 12px;
  font-size: 24px;
  line-height: 1.17;
}

.doc p,
.doc li {
  color: var(--text-2);
}

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

.doc ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

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

.doc strong {
  color: var(--text);
  font-weight: 600;
}

.summary-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--bg-alt);
}

.summary-card svg {
  flex: none;
  width: 36px;
  height: 36px;
  color: var(--accent);
}

.summary-card h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--bg-alt);
}

.contact-card h2 {
  margin: 0 0 4px;
  font-size: 21px;
}

/* FAQ disclosure list */
.faq {
  margin-top: 8px;
  border-top: 1px solid var(--hairline);
}

.faq details {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.012em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: var(--text-2);
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq .answer {
  padding: 0 0 22px;
}

.faq .answer p + p,
.faq .answer ol,
.faq .answer ul {
  margin-top: 10px;
}

.faq ol {
  padding-left: 22px;
  color: var(--text-2);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 36px 0 28px;
  background: var(--bg-alt);
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.01em;
}

.footer a {
  color: var(--text-2);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
}

.footer-nav h2 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.footer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav li + li {
  margin-top: 8px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 16px;
}

.footer-breadcrumb {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
}

.footer-breadcrumb a {
  color: var(--text-2);
}

.footer-breadcrumb span {
  padding: 0 6px;
}

/* ==========================================================================
   Motion
   ========================================================================== */

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

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

/* Content stays visible if scripts don't run */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

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

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

  .tile,
  .tile-art .phone,
  .wheel-track {
    transition: none;
  }
}

/* In the cropped home-tile phone, keep the card near the top so it shows */
.tile-art .app-card {
  margin: calc(16 * var(--u)) 0 0;
}

@media (max-width: 820px) {
  .tile-placeholder {
    min-height: 0;
    padding-top: 44px;
    padding-bottom: 44px;
  }
}

/* ---------- Appearance toggle ---------- */

.globalnav-end {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: -6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  opacity: 1;
  background: var(--bg-alt);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

/* Moon offers dark while light is showing; sun offers light while dark is. */
.theme-toggle .icon-sun {
  display: none;
}

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

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

@media (max-width: 480px) {
  .globalnav-end {
    gap: 12px;
  }

  .globalnav-links {
    gap: 14px;
  }

  /* Per-app links live under Apps; keep the site-wide ones */
  .globalnav-links li:nth-child(2) {
    display: none;
  }
}

/* ==========================================================================
   General support page
   ========================================================================== */

.app-help {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.app-help-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: var(--bg-alt);
  color: var(--text);
  transition: background-color 0.2s ease;
}

.app-help-row:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--bg-alt) 85%, var(--text) 6%);
}

.app-help-row::after {
  content: "›";
  margin-left: auto;
  font-size: 24px;
  line-height: 1;
  color: var(--text-3);
}

.app-help-row img {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 22.37%;
}

.app-help-row b {
  display: block;
  font-size: 17px;
  font-weight: 600;
}

.app-help-row small {
  display: block;
  font-size: 14px;
  color: var(--text-2);
}

/* Form */

.support-form {
  display: grid;
  gap: 20px;
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--bg-alt);
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 560px) {
  .support-form {
    padding: 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

.field label {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.field .optional {
  color: var(--text-3);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.section-alt .field input,
.doc .field input,
.doc .field select,
.doc .field textarea {
  background: var(--bg);
}

.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  cursor: pointer;
}

.field textarea {
  resize: vertical;
  line-height: 1.4;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-3);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.field [aria-invalid="true"] {
  border-color: #ff3b30;
}

.field-hint {
  font-size: 13px;
  color: var(--text-3) !important;
}

.form-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 59, 48, 0.12);
  color: #d70015 !important;
  font-size: 15px;
}

:root[data-theme="dark"] .form-error {
  color: #ff6961 !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-error {
    color: #ff6961 !important;
  }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.form-actions .footnote {
  flex: 1 1 220px;
}

.qa-more {
  margin-top: 36px;
  font-size: 17px;
}

/* A closing CTA right after another white section gets a hairline divider */
.section:not(.section-alt) + .cta {
  padding-top: 0;
}

.section:not(.section-alt) + .cta > .container::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: clamp(72px, 10vw, 120px);
  background: var(--hairline);
}
