/* UltraNotch site. One page, Apple-product-page craft: black canvas, the notch as the hero. */
:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #121214;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --accent: #a08cff;
  --line: rgba(255, 255, 255, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-notch: cubic-bezier(0.32, 0.72, 0, 1);
  --gutter: clamp(20px, 5vw, 40px);
  --page: min(1120px, calc(100% - 2 * var(--gutter)));
  --section: clamp(96px, 13vw, 168px);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scrollbar-color: #3a3a3c var(--bg); scroll-padding-top: 64px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(124, 92, 255, 0.55); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--text); color: #000;
  font-weight: 600; text-decoration: none; transition: top 0.2s var(--ease-out);
}
.skip:focus { top: 12px; }

/* Navigation: functional glass over scrolling content. */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { width: var(--page); height: 52px; margin-inline: auto; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; margin-right: auto; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.012em; text-decoration: none; }
.brand img { width: 24px; height: 24px; }
.nav-links { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
.nav-links a { font-size: 0.8125rem; color: var(--text-2); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-status { font-size: 0.8125rem; color: var(--text); }
@media (max-width: 640px) { .nav-links { display: none; } }

/* Hero */
.hero { padding-top: clamp(56px, 8vw, 96px); text-align: center; overflow: hidden; }
.hero h1 { font-size: clamp(3.25rem, 8.6vw, 6rem); font-weight: 600; line-height: 1; letter-spacing: -0.032em; }
.hero-line { max-width: 22ch; margin: 0.32em auto 0; font-size: clamp(1.625rem, 3.4vw, 2.625rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.024em; }
.hero-body { width: var(--page); max-width: 40em; margin: 1.15em auto 0; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.45; color: var(--text-3); }

/* A MacBook's top edge. Everything inside is sized in app points: --u is one point. */
.device, .band { container-type: inline-size; margin-inline: auto; }
.device {
  width: min(1180px, calc(100% - 2 * var(--gutter)));
  margin-top: clamp(44px, 6vw, 72px);
  -webkit-mask-image: linear-gradient(#000 64%, transparent 100%);
  mask-image: linear-gradient(#000 64%, transparent 100%);
}
.bezel {
  --u: calc(100cqw / 1180);
  padding: calc(14 * var(--u)) calc(14 * var(--u)) 0;
  border-radius: calc(46 * var(--u)) calc(46 * var(--u)) 0 0;
  background: #0a0a0b;
  box-shadow: 0 0 0 1px #3a3a3d, inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.screen { position: relative; overflow: hidden; aspect-ratio: 1152 / 640; border-radius: calc(32 * var(--u)) calc(32 * var(--u)) 0 0; background: #000; }
.wallpaper { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
@media (max-width: 720px) {
  .device .bezel { --u: calc(100cqw / 700); }
  .device .screen { aspect-ratio: 672 / 470; }
  .menu-extra { display: none; }
}

.menubar {
  position: absolute; inset: 0 0 auto; height: calc(34 * var(--u));
  display: flex; align-items: center; gap: calc(19 * var(--u)); padding-inline: calc(22 * var(--u));
  font-size: calc(13.5 * var(--u)); font-weight: 500; color: rgba(255, 255, 255, 0.92); white-space: nowrap;
}
.menu-app { font-weight: 700; }
.menu-right { margin-left: auto; display: flex; align-items: center; gap: calc(15 * var(--u)); }
.menu-right svg { height: calc(12.5 * var(--u)); width: auto; }

/* The notch: one black surface whose clip grows from the camera housing into the panel. */
.notch {
  --ear: calc(10 * var(--u));
  --shift: calc(225 * var(--u));
  position: absolute; top: 0; left: 50%;
  width: calc(640 * var(--u)); height: calc(285 * var(--u));
  transform: translateX(-50%);
}
.notch::before, .notch::after {
  content: ""; position: absolute; top: 0; width: var(--ear); height: var(--ear);
  transition: transform 0.46s var(--ease-notch);
}
.notch::before {
  left: calc(-1 * var(--ear));
  background: radial-gradient(circle at 0 100%, transparent calc(var(--ear) - 0.5px), #000 var(--ear));
  transform-origin: 100% 0; transform: translateX(var(--shift)) scale(0.6);
}
.notch::after {
  right: calc(-1 * var(--ear));
  background: radial-gradient(circle at 100% 100%, transparent calc(var(--ear) - 0.5px), #000 var(--ear));
  transform-origin: 0 0; transform: translateX(calc(-1 * var(--shift))) scale(0.6);
}
.notch-body {
  position: absolute; inset: 0; background: #000;
  clip-path: inset(0 var(--shift) calc(100% - 34 * var(--u)) round 0 0 calc(10 * var(--u)) calc(10 * var(--u)));
  transition: clip-path 0.46s var(--ease-notch);
}
.notch-panels {
  position: absolute; top: 0; left: calc(-1 * var(--ear));
  width: calc(660 * var(--u)); height: 100%;
  opacity: 0; transform: scale(0.95); transform-origin: 50% 0; filter: blur(calc(6 * var(--u)));
  transition: opacity 0.14s linear, transform 0.46s var(--ease-notch), filter 0.2s linear;
}
/* The panel sits inside the notch's clip, so its focus ring is drawn inside it. */
.notch-panels:focus-visible { outline: none; }
.notch-panels:focus-visible::after {
  content: ""; position: absolute; inset: 0 var(--ear); z-index: 1;
  border-radius: 0 0 calc(28 * var(--u)) calc(28 * var(--u));
  box-shadow: inset 0 0 0 2px var(--accent);
}
.notch-panels img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.24s var(--ease-out); }
.notch-panels img.is-active { opacity: 1; }
.notch[data-state="open"]::before { transform: none; transition-duration: 0.62s; }
.notch[data-state="open"]::after { transform: none; transition-duration: 0.62s; }
.notch[data-state="open"] .notch-body { clip-path: inset(0 0 0 round 0 0 calc(28 * var(--u)) calc(28 * var(--u))); transition-duration: 0.62s; }
.notch[data-state="open"] .notch-panels {
  opacity: 1; transform: none; filter: none;
  transition: opacity 0.3s linear 0.14s, transform 0.62s var(--ease-notch), filter 0.36s linear 0.1s;
}
.notch-toggle {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: max(44px, calc(190 * var(--u))); height: max(30px, calc(34 * var(--u)));
  padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 0 0 calc(10 * var(--u)) calc(10 * var(--u));
}
.notch-toggle:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.notch[data-state="open"] .notch-toggle { cursor: default; }

/* Tabs under the device, like the app's own tab bar. */
.switcher, .segmented { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: var(--page); margin: 22px auto 0; }
.switcher button, .segmented button {
  min-height: 40px; padding: 9px 17px; border: 0; border-radius: 999px; background: transparent;
  font-size: 0.9375rem; font-weight: 500; color: var(--text-2); cursor: pointer;
  transition: background-color 0.24s var(--ease-out), color 0.24s var(--ease-out);
}
.switcher button:hover, .segmented button:hover { color: var(--text); }
.switcher button[aria-selected="true"], .segmented button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.13); color: var(--text); }
.switcher button:active, .segmented button:active { background: rgba(255, 255, 255, 0.2); }
.hint { min-height: 1.5em; margin-top: 14px; font-size: 0.875rem; color: var(--text-3); }

/* Section rhythm */
.live, .chapter, .more, .details { padding-top: var(--section); }
.intro, .chapter .copy { max-width: 760px; }
.intro, .center .copy, .more > h2, .details > h2, .privacy, .closing { margin-inline: auto; text-align: center; }
h2 { font-size: clamp(2.125rem, 4.6vw, 3.5rem); font-weight: 600; line-height: 1.07; letter-spacing: -0.028em; }
.intro p, .chapter p, .privacy p { margin-top: 0.9em; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.45; color: var(--text-3); }
.intro { width: var(--page); }

/* Live Activities */
.band { width: min(980px, calc(100% - 2 * var(--gutter))); margin-top: clamp(40px, 6vw, 64px); -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.band .bezel { --u: calc(100cqw / 790); }
.band .screen { aspect-ratio: 762 / 150; }
.band .wallpaper { object-position: 50% 47%; }
.hw-notch {
  position: absolute; top: 0; left: 50%; width: calc(185 * var(--u)); height: calc(32 * var(--u));
  transform: translateX(-50%); background: #000; border-radius: 0 0 calc(10 * var(--u)) calc(10 * var(--u));
}
.activity {
  position: absolute; top: 0; left: 50%; width: calc(760 * var(--u)); height: calc(70 * var(--u)); max-width: none;
  transform: translateX(-50%); opacity: 0;
  clip-path: inset(0 calc(50% - 92.5 * var(--u)) calc(100% - 32 * var(--u)) round 0 0 calc(10 * var(--u)) calc(10 * var(--u)));
  transition: clip-path 0.34s var(--ease-notch), opacity 0.12s linear 0.22s;
}
.activity.is-active { opacity: 1; clip-path: inset(0 0 0 round 0); transition: clip-path 0.6s var(--ease-notch), opacity 0.1s linear; }

/* Feature chapters: each page shown where it lives, hanging from the top of a screen. */
.chapter { width: var(--page); margin-inline: auto; }
.stage { position: relative; container-type: inline-size; overflow: hidden; margin-top: clamp(40px, 5vw, 64px); aspect-ratio: 16 / 11; border-radius: 28px; background: #000; }
.stage.wide { aspect-ratio: 16 / 8.6; }
.stage-wall { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--wall, 50% 70%); }
.stage::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(#000 12%, rgba(0, 0, 0, 0.62) 46%, rgba(0, 0, 0, 0.08)); }
/* The screen's edge, drawn over everything so the panel visibly hangs from it. */
.stage::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13); pointer-events: none; }
.stage-panel { position: absolute; top: 0; left: 50%; z-index: 2; width: 92cqw; transform: translateX(-50%); }
.stage.wide .stage-panel { width: 66cqw; }
.split { display: grid; grid-template-columns: minmax(0, 4.6fr) minmax(0, 7.4fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split .stage { margin-top: 0; }
.split.reverse { grid-template-columns: minmax(0, 7.4fr) minmax(0, 4.6fr); }
.split.reverse .copy { order: 2; }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .copy { order: 0; }
  .split .copy { text-align: center; margin-inline: auto; }
  .stage.wide { aspect-ratio: 4 / 3; }
  .stage.wide .stage-panel { width: 92cqw; }
}

/* More features */
.more { width: var(--page); margin-inline: auto; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: clamp(40px, 5vw, 64px); }
.tile { container-type: inline-size; display: flex; flex-direction: column; overflow: hidden; border-radius: 28px; background: var(--surface); }
.tile.wide { grid-column: span 2; }
.tile > img { width: 92cqw; margin-inline: auto; }
.tile.wide > img { width: 62cqw; }
.tile-copy { padding: clamp(18px, 2.4vw, 26px) clamp(24px, 3vw, 34px) clamp(26px, 3vw, 34px); }
.tile.wide .tile-copy { text-align: center; }
h3 { font-size: 1.3125rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.016em; }
.tile-copy p { margin-top: 0.35em; color: var(--text-3); }
.also { max-width: 40em; margin: 36px auto 0; text-align: center; color: var(--text-3); }
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; }
  .tile.wide { grid-column: auto; }
  .tile.wide > img { width: 92cqw; }
  .tile.wide .tile-copy { text-align: left; }
}

/* Details */
.details { width: var(--page); margin-inline: auto; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); margin-top: clamp(40px, 5vw, 60px); padding-top: 32px; border-top: 1px solid var(--line); }
.facts dt { font-weight: 600; letter-spacing: -0.01em; }
.facts dd { margin-top: 0.35em; color: var(--text-3); }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }

/* Privacy */
.privacy { width: var(--page); max-width: 760px; padding-block: var(--section); }
.privacy-mark { width: 56px; height: 56px; margin: 0 auto 28px; color: var(--text); }

/* Closing */
.closing { width: var(--page); padding-bottom: clamp(88px, 11vw, 140px); }
.closing-icon { width: clamp(112px, 14vw, 156px); margin: 0 auto 18px; filter: drop-shadow(0 18px 40px rgba(61, 123, 255, 0.28)); }
.closing h2 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -0.03em; }
.closing-line { margin-top: 0.3em; font-size: clamp(1.375rem, 2.6vw, 1.75rem); font-weight: 600; letter-spacing: -0.016em; }
.closing-note { margin-top: 0.8em; color: var(--text-3); }

.footer { width: var(--page); margin-inline: auto; padding: 22px 0 40px; border-top: 1px solid var(--line); font-size: 0.75rem; line-height: 1.5; color: var(--text-3); }
.footer p + p { margin-top: 0.6em; }

@media (prefers-reduced-motion: reduce) {
  .notch::before, .notch::after, .notch-body, .activity { transition: none !important; }
  .notch-panels { transform: none !important; filter: none !important; transition: opacity 0.2s linear !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
