/* ============================================================
   Apple™ (the fruit) — shared design system
   A faithful homage to apple.com's typography, color, spacing,
   nav, footer and motion language.
   ============================================================ */

:root {
  /* Apple's real palette */
  --text:        #1d1d1f;
  --text-soft:   #6e6e73;
  --text-mute:   #86868b;
  --link:        #0066cc;
  --link-hover:  #0077ed;
  --blue:        #0071e3;
  --blue-hover:  #0077ed;
  --white:       #ffffff;
  --offwhite:    #fbfbfd;
  --gray:        #f5f5f7;
  --gray-2:      #e8e8ed;
  --black:       #000000;
  --hairline:    rgba(0,0,0,0.10);

  /* Apple's content widths */
  --w-content:   980px;
  --w-wide:      1280px;
  --w-full:      1680px;

  /* Apple's signature easing curves */
  --ease:        cubic-bezier(0.28, 0.11, 0.32, 1);
  --ease-soft:   cubic-bezier(0.25, 0.10, 0.25, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.30, 1);

  --nav-h: 44px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  overflow-x: hidden;
}

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

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

/* ---------- Type scale (Apple "Display" tracking) ---------- */

.eyebrow {
  font-size: 21px;
  line-height: 1.19;
  font-weight: 600;
  letter-spacing: 0.011em;
}

.headline {
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.headline-xl {
  font-size: clamp(56px, 11vw, 140px);
  line-height: 1.0;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.subhead {
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.21;
  font-weight: 400;
  letter-spacing: 0.004em;
}

.eyebrow-sm {
  font-size: 17px;
  line-height: 1.23;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.gradient-text {
  background: linear-gradient(90deg, #ff5e3a, #ff2d55 35%, #c644fc 70%, #5856d6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Pill buttons + text links ---------- */

.btn {
  display: inline-block;
  font-size: 17px;
  line-height: 1.18;
  font-weight: 400;
  letter-spacing: -0.022em;
  padding: 11px 22px;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color .25s var(--ease-soft);
}
.btn:hover { background: var(--blue-hover); text-decoration: none; color:#fff; }

.btn-secondary {
  background: transparent;
  color: var(--link);
  border: 1px solid var(--link);
  padding: 10px 21px;
}
.btn-secondary:hover { background: var(--link); color:#fff; }

.link-arrow {
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--link);
}
.link-arrow:hover { text-decoration: underline; }
.link-arrow::after {
  content: "›";
  margin-left: 2px;
  display: inline-block;
  transition: transform .2s var(--ease-soft);
}
.link-arrow:hover::after { transform: translateX(3px); }

.cta-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; justify-content: center; }

/* ---------- Global nav (translucent, blurred) ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 9999;
  height: var(--nav-h);
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.nav.dark {
  background: rgba(22,22,23,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.nav-inner {
  max-width: var(--w-wide);
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav ul { list-style: none; display: flex; align-items: center; gap: 0; }
.nav li { display: flex; }
.nav a {
  color: rgba(0,0,0,0.80);
  font-size: 12px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.01em;
  padding: 0 10px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  opacity: .92;
  transition: opacity .2s;
}
.nav a:hover { opacity: 1; color: rgba(0,0,0,0.92); text-decoration: none; }
.nav.dark a { color: #f5f5f7; opacity: .8; }
.nav.dark a:hover { opacity: 1; color: #fff; }
.nav .logo svg { width: 14px; height: 44px; }
.nav .logo path { fill: rgba(0,0,0,0.85); }
.nav.dark .logo path { fill: #f5f5f7; }
.nav .nav-icon { width: 14px; height: 44px; }
.nav-spacer { height: 0; }

/* ---------- Sections & layout ---------- */

section { position: relative; }

.section {
  padding: 100px 22px;
  text-align: center;
}
.section.tight { padding: 70px 22px; }
.section.tall  { padding: 140px 22px; }

.container { max-width: var(--w-content); margin: 0 auto; }
.container-wide { max-width: var(--w-wide); margin: 0 auto; }

.bg-gray   { background: var(--gray); }
.bg-offwhite { background: var(--offwhite); }
.bg-black  { background: var(--black); color: #f5f5f7; }
.bg-black .subhead, .bg-black .text-soft { color: #a1a1a6; }

.text-soft { color: var(--text-soft); }
.measure { max-width: 740px; margin-left: auto; margin-right: auto; }
.mt-s { margin-top: 8px; }
.mt-m { margin-top: 18px; }
.mt-l { margin-top: 34px; }

/* ---------- The glossy apple component ---------- */

.apple-art { display: inline-block; position: relative; }
.apple-art .glow {
  position: absolute;
  inset: -18% -18% -10% -18%;
  background: radial-gradient(closest-side, rgba(255,90,60,0.30), transparent 72%);
  filter: blur(10px);
  z-index: 0;
}
.apple-art svg { position: relative; z-index: 1; filter: drop-shadow(0 30px 50px rgba(0,0,0,0.22)); }

/* ---------- Scroll-reveal motion primitives ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }

[data-reveal][data-reveal="scale"] { transform: scale(1.06); }
[data-reveal][data-reveal="scale"].in { transform: scale(1); }

[data-reveal][data-reveal="left"]  { transform: translateX(-48px); }
[data-reveal][data-reveal="right"] { transform: translateX(48px); }
[data-reveal][data-reveal="left"].in,
[data-reveal][data-reveal="right"].in { transform: none; }

[data-delay="1"] { transition-delay: .10s; }
[data-delay="2"] { transition-delay: .20s; }
[data-delay="3"] { transition-delay: .30s; }
[data-delay="4"] { transition-delay: .40s; }
[data-delay="5"] { transition-delay: .50s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Bento / tiles ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: var(--w-wide);
  margin: 0 auto;
}
.tile {
  background: var(--gray);
  border-radius: 28px;
  padding: 48px 40px;
  text-align: center;
  overflow: hidden;
  position: relative;
}
.tile.dark { background: #101012; color: #f5f5f7; }
.tile.span-2 { grid-column: 1 / -1; }
.tile h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.08; }
.tile p  { color: var(--text-soft); font-size: 19px; margin-top: 12px; line-height: 1.42; }
.tile.dark p { color: #a1a1a6; }

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

/* ---------- Chips / stat figures ---------- */

.figs { display: flex; flex-wrap: wrap; gap: 60px 80px; justify-content: center; }
.fig .num {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.fig .lbl { color: var(--text-soft); font-size: 17px; margin-top: 10px; max-width: 220px; }
.bg-black .fig .lbl { color: #a1a1a6; }

/* ---------- Footer (Apple's tall legal footer) ---------- */

.foot {
  background: var(--gray);
  color: var(--text-mute);
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.01em;
}
.foot-inner { max-width: var(--w-wide); margin: 0 auto; padding: 0 22px; }
.foot .notes {
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--gray-2);
}
.foot .notes p { margin-bottom: 8px; max-width: 980px; }
.foot .cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--gray-2);
}
.foot .cols h4 { font-size: 12px; color: var(--text); font-weight: 600; margin-bottom: 10px; }
.foot .cols ul { list-style: none; }
.foot .cols li { margin-bottom: 8px; }
.foot .cols a { color: var(--text-mute); }
.foot .cols a:hover { color: var(--text); text-decoration: underline; }
.foot .legal {
  padding: 17px 0 30px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.foot .legal a { color: var(--link); }

@media (max-width: 833px) {
  .foot .cols { grid-template-columns: repeat(2, 1fr); }
  .nav .hide-mobile { display: none; }
}

/* ---------- Sticky-scroll scaling media (used on /1 & /2) ---------- */

.pin-wrap { height: 220vh; position: relative; }
.pin-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* ---------- Marquee chip strip ---------- */
.chipstrip { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.chip {
  border:1px solid var(--hairline);
  border-radius: 980px;
  padding: 8px 16px;
  font-size: 15px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.6);
}
.bg-black .chip { border-color: rgba(255,255,255,0.16); color:#a1a1a6; background: rgba(255,255,255,0.04); }
