:root {
  color-scheme: light dark;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eceff2;
  --text: #151719;
  --muted: #5f6870;
  --line: #d8dde1;
  --accent: #087f8c;
  --accent-strong: #006874;
  --warm: #b84b35;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: 0;
  line-height: 1.5;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 10px max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px);
}
.brand { font-weight: 760; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent); }
.site-header nav { display: flex; justify-content: center; gap: 20px; min-width: 0; }
.site-header nav a { color: var(--muted); font-size: .88rem; text-decoration: none; white-space: nowrap; }
.site-header nav a:hover { color: var(--text); }
.language-picker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.language-picker select { max-width: 150px; padding: 7px 28px 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }

main { overflow: hidden; }
.home-hero, .product-hero, .band-inner, .more-apps, .app-stack {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}
.home-hero {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 72px;
}
.home-hero h1 { max-width: 820px; margin: 8px 0 18px; font-size: clamp(2.6rem, 6vw, 5.4rem); line-height: 1.02; font-weight: 780; }
.home-hero > p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.4rem); }
.eyebrow { margin: 0; color: var(--accent); font-size: .78rem; font-weight: 760; text-transform: uppercase; }

.app-stack { display: grid; gap: 28px; padding-bottom: 80px; }
.app-showcase {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 50px;
  padding: 50px 0;
  border-top: 1px solid var(--line);
}
.showcase-copy h2 { margin: 6px 0 10px; font-size: clamp(2rem, 4vw, 4rem); line-height: 1.05; }
.showcase-copy > p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.small-icon, .app-icon { border-radius: 22%; box-shadow: 0 12px 34px rgb(0 0 0 / .16); }
.small-icon { margin-bottom: 18px; }
.showcase-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 26px; }
.text-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.store-button { display: inline-flex; align-items: center; gap: 9px; width: fit-content; padding: 11px 16px; border-radius: 7px; background: var(--accent-strong); color: white; font-weight: 720; text-decoration: none; }
.store-button:hover { background: var(--accent); }
.showcase-visual { display: flex; justify-content: flex-end; align-items: center; min-height: 420px; overflow: hidden; }
.showcase-visual img { width: min(47%, 290px); max-height: 520px; object-fit: contain; filter: drop-shadow(0 18px 28px rgb(0 0 0 / .22)); }
.showcase-visual img + img { margin-inline-start: -4%; transform: translateY(30px); }

.more-apps { padding: 12px 0 80px; }
.more-apps .app-showcase { grid-template-columns: 1fr minmax(230px, .55fr); padding: 38px 0; }
.more-apps .showcase-copy h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
.more-apps .showcase-visual { min-height: 280px; }
.more-apps .showcase-visual img { max-height: 280px; width: auto; }

.product-hero {
  min-height: 580px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 70px;
  padding-block: 70px;
}
.product-identity { display: flex; align-items: center; gap: 32px; min-width: 0; }
.product-identity > div { min-width: 0; }
.product-identity .app-icon { width: clamp(112px, 15vw, 184px); flex: 0 0 auto; }
.product-identity h1 {
  margin: 6px 0;
  font-size: clamp(2.8rem, 6vw, 5.25rem);
  line-height: .98;
  overflow-wrap: normal;
  word-break: normal;
}
.subtitle { margin: 0; color: var(--muted); font-size: clamp(1.1rem, 2.4vw, 1.55rem); }
.hero-copy { align-self: end; padding-bottom: 54px; }
.hero-copy p { margin: 0 0 25px; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.35rem); }

.content-band { padding-block: 72px; border-top: 1px solid var(--line); background: var(--surface); }
.content-band:nth-of-type(even) { background: var(--surface-2); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.section-heading h2, .section-heading h3 { margin: 0; line-height: 1.1; }
.section-heading h2 { font-size: clamp(1.9rem, 4vw, 3.4rem); }
.section-heading h3 { font-size: 1.15rem; }
.section-heading span { color: var(--muted); }
.body-copy { columns: 2 340px; column-gap: 54px; }
.body-copy p, .release-notes p { margin-top: 0; margin-bottom: 1.4em; break-inside: avoid; color: var(--muted); font-size: 1.04rem; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 28px; }
.video-frame { margin: 0; }
.video-frame video { width: 100%; max-height: 620px; border-radius: 8px; background: #000; }
.video-frame figcaption { margin-top: 10px; color: var(--muted); font-weight: 680; }

.preview-row + .preview-row { margin-top: 56px; }
.screenshot-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 32%); gap: 18px; overflow-x: auto; padding: 2px 2px 22px; scroll-snap-type: x proximity; scrollbar-color: var(--accent) var(--line); }
.screenshot-rail figure { margin: 0; scroll-snap-align: start; }
.screenshot-rail img { width: 100%; height: 540px; object-fit: contain; object-position: top; border-radius: 8px; background: color-mix(in srgb, var(--surface) 88%, var(--line)); }
.screenshot-rail.ipados { grid-auto-columns: minmax(380px, 48%); }
.screenshot-rail.macos { grid-auto-columns: minmax(560px, 70%); }
.screenshot-rail.macos img { height: 410px; }
.screenshot-rail.watchos { grid-auto-columns: minmax(210px, 25%); }
.utility-links { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; }
.utility-links > a:not(.store-button) { color: var(--accent); font-weight: 720; }

footer { min-height: 130px; display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(calc(100% - 48px), var(--max)); margin-inline: auto; color: var(--muted); }
.not-found { width: min(calc(100% - 48px), 720px); min-height: 70vh; margin-inline: auto; display: flex; flex-direction: column; justify-content: center; }
.not-found h1 { margin: 0; font-size: 7rem; }

[dir="rtl"] .showcase-visual { justify-content: flex-start; }
[dir="rtl"] .showcase-actions, [dir="rtl"] .utility-links { flex-direction: row-reverse; justify-content: flex-end; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --surface: #171a1d;
    --surface-2: #20252a;
    --text: #f4f6f7;
    --muted: #aeb7be;
    --line: #343b40;
    --accent: #55c8d0;
    --accent-strong: #087f8c;
    --warm: #ff8068;
  }
}

@media (max-width: 960px) {
  .site-header { grid-template-columns: 1fr auto; gap: 12px; }
  .site-header nav { display: none; }
  .product-hero, .app-showcase, .more-apps .app-showcase { grid-template-columns: 1fr; gap: 28px; }
  .product-hero { min-height: auto; padding-block: 54px; }
  .hero-copy { align-self: auto; padding-bottom: 0; }
  .showcase-visual { justify-content: center; min-height: 360px; }
  [dir="rtl"] .showcase-visual { justify-content: center; }
  .more-apps .showcase-visual { min-height: 230px; }
  .screenshot-rail { grid-auto-columns: minmax(260px, 60%); }
  .screenshot-rail.ipados, .screenshot-rail.macos { grid-auto-columns: minmax(340px, 82%); }
}

@media (max-width: 620px) {
  .site-header { min-height: 58px; padding-inline: 16px; }
  .language-picker > span { display: none; }
  .language-picker select { max-width: 132px; }
  .home-hero, .product-hero, .band-inner, .more-apps, .app-stack, footer { width: min(calc(100% - 32px), var(--max)); }
  .home-hero { min-height: 330px; padding-block: 48px; }
  .home-hero h1 { font-size: clamp(2.35rem, 13vw, 3.7rem); }
  .product-identity { align-items: flex-start; gap: 18px; }
  .product-identity h1 { font-size: 2rem; line-height: 1.05; }
  .product-identity .app-icon { width: 88px; }
  .app-showcase { padding: 34px 0; }
  .showcase-visual { min-height: 310px; }
  .showcase-visual img { width: 54%; max-height: 390px; }
  .showcase-visual img + img { margin-inline-start: -12%; }
  .content-band { padding-block: 50px; }
  .screenshot-rail, .screenshot-rail.ipados, .screenshot-rail.macos, .screenshot-rail.watchos { grid-auto-columns: 86%; }
  .screenshot-rail img { height: 470px; }
  .screenshot-rail.macos img { height: 290px; }
  footer { flex-direction: column; align-items: flex-start; justify-content: center; }
}

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