/* The home page (#610): a navy hero, then a round told chapter by chapter, the 3D green on a navy
   stage, privacy, and a closing call to action. Built on /tokens.css and /style.css. Motion is
   transform and opacity only, driven by the scroll where the browser can (CSS scroll-driven
   animations), else by home.js; none of it runs when Reduce Motion is on. */

.home main { flex: 1; }
.home figure { margin: 0; }
.display { font-size: clamp(36px, 6.4vw, 80px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }

/* ---------- Devices: CSS frames round the real screenshots ---------- */
.device { position: relative; flex: none; }
.device img { display: block; width: 100%; height: 100%; object-fit: cover; }
.device.phone { aspect-ratio: 340 / 739; padding: 3.2%; border-radius: 16.5% / 7.6%; background: var(--stage-night);
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.16), inset 0 0 0 4px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(120 130 145 / 0.45), var(--shadow-device); }
.device.phone img { border-radius: 13.4% / 6.2%; }
/* The Dynamic Island (screenshots leave its gap in the status bar). */
.device.phone::before { content: ""; position: absolute; z-index: 1; top: 3.9%; left: 50%; width: 29%; height: 3.5%; translate: -50% 0;
  border-radius: 999px; background: #000; }
.device.watch { aspect-ratio: 422 / 514; padding: 7.5%; border-radius: 28% / 23%; background: var(--stage-night);
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.14), inset 0 0 0 5px #000, 0 0 0 1px rgb(120 130 145 / 0.5), var(--shadow-device); }
.device.watch img { border-radius: 20% / 16.5%; }
/* The Digital Crown and side button. */
.device.watch::after { content: ""; position: absolute; right: -4.5%; top: 22%; width: 5.5%; height: 17%; border-radius: 4px 6px 6px 4px;
  background: linear-gradient(90deg, #5A6573, #9AA5B3 60%, #5A6573); }
.device.watch::before { content: ""; position: absolute; right: -2.6%; top: 50%; width: 3%; height: 20%; border-radius: 2px 4px 4px 2px; background: #5A6573; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; margin-top: -61px; padding: calc(61px + clamp(40px, 8vw, 110px)) 0 clamp(64px, 9vw, 130px);
  background:
    radial-gradient(60% 55% at 72% 48%, rgb(61 186 106 / 0.30), transparent 70%),
    radial-gradient(45% 40% at 15% 10%, rgb(42 113 204 / 0.22), transparent 70%),
    linear-gradient(180deg, var(--stage) 0%, var(--stage-deep) 55%, var(--stage-night) 100%); }
.hero-sky { position: absolute; inset: -10% -5%; z-index: -1; opacity: 0.2; pointer-events: none;
  background: url("/home/contours.svg") center / cover no-repeat;
  -webkit-mask-image: radial-gradient(70% 70% at 65% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(70% 70% at 65% 45%, #000 20%, transparent 75%); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(40px, 7vw, 72px); align-items: center; }
.hero-copy { max-width: 640px; }
.hero-name { margin: 0 0 18px; }
.hero-name .wordmark { display: block; font-size: clamp(60px, 13vw, 132px); color: #fff; letter-spacing: -0.035em; }
.hero-name .wordmark span { color: var(--stage-green); }
.hero h1 { color: #fff; font-size: clamp(28px, 4.4vw, 52px); font-weight: 700; letter-spacing: -0.025em; margin: 0 0 18px; }
.hero-lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: rgb(255 255 255 / 0.76); margin: 0 0 30px; max-width: 34em; }
.hero .cta-soon, .finale .cta-soon { background: rgb(255 255 255 / 0.1); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14); }
.hero .cta-soon::before, .finale .cta-soon::before { background: var(--stage-green); box-shadow: 0 0 0 4px rgb(61 186 106 / 0.28); }
.hero-stage { display: flex; justify-content: center; perspective: 1400px; padding: 0 0 0 12%; }
.hero-depth { position: relative; transform-style: preserve-3d; transform: rotateY(var(--ry, -12deg)) rotateX(var(--rx, 5deg));
  transition: transform 0.9s var(--ease); will-change: transform; }
.hero-phone { width: clamp(230px, 62vw, 320px); }
.hero-watch { position: absolute; width: clamp(96px, 26vw, 132px); left: -28%; bottom: 10%; transform: translateZ(90px); }
@media (max-width: 480px) {
  .hero-stage { padding-left: 16%; }
  .hero-watch { left: -22%; width: 92px; }
}
@media (min-width: 1800px) {
  :root { --wide: 1400px; }
  .hero-phone { width: 380px; }
  .hero-watch { width: 156px; }
  .duo .phone { width: min(46%, 310px); }
  .green3d { max-width: 1000px; }
}
@media (min-width: 900px) {
  .hero { min-height: min(100vh, 1000px); display: flex; align-items: center; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .hero-stage { padding: 0; }
}

/* ---------- The story ---------- */
.story-intro { text-align: center; padding-top: clamp(88px, 12vw, 170px); padding-bottom: clamp(8px, 2vw, 24px); }
.story-intro .display { max-width: 16ch; margin: 0 auto; }
.chapter { padding: clamp(72px, 10vw, 150px) 0; }
.chapter-grid { display: grid; grid-template-columns: 1fr; gap: clamp(44px, 7vw, 100px); align-items: center; }
.chapter h2 { font-size: clamp(32px, 4.8vw, 58px); letter-spacing: -0.03em; margin: 0 0 22px; }
.chapter-copy { max-width: 560px; }
.chapter-copy > p:not(.eyebrow):not(.small) { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--slate); }
.chapter-copy .small { margin-top: 24px; }
.chapter-media { display: flex; justify-content: center; align-items: center; min-width: 0; }
@media (min-width: 900px) {
  .chapter-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .chapter.flip .chapter-media { order: -1; }
  .chapter.flip .chapter-copy { justify-self: end; }
}

/* Front, centre and back, as on the round screen. */
.yardages { display: flex; align-items: flex-end; gap: clamp(20px, 4vw, 40px); margin: 32px 0 8px; }
.yardages div { display: flex; flex-direction: column-reverse; }
.yardages dt { font-size: 14px; font-weight: 600; color: var(--slate); }
.yardages dd { margin: 0; font: 700 clamp(34px, 5vw, 54px)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.yardages .centre dd { font-size: clamp(60px, 9vw, 104px); font-weight: 800; color: var(--fairway); }

.panel { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-device); }
.panel img { display: block; width: 100%; }
.hole-panel { width: min(100%, 460px); }

/* Two phones overlapping, the back one a little lower. */
.duo .phone { width: min(46%, 270px); }
.duo .back { margin-right: -9%; margin-top: 14%; z-index: 0; filter: saturate(0.92) brightness(0.97); }
.duo .front { z-index: 1; }

.pull { margin: 30px 0 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--clay); }
.pull p { margin: 0; font: 600 clamp(22px, 2.6vw, 30px)/1.3 var(--font-display); letter-spacing: -0.015em; color: var(--ink); }
.pull strong { color: var(--clay); font-weight: 800; }

/* ---------- The 3D green, on a navy stage ---------- */
.stage { color: #fff; background:
  radial-gradient(50% 45% at 50% 55%, rgb(61 186 106 / 0.18), transparent 70%),
  linear-gradient(180deg, var(--stage-night) 0%, var(--stage) 30%, var(--stage-deep) 75%, var(--stage-night) 100%); }
.stage h2 { color: #fff; }
.stage .eyebrow { color: var(--stage-green); }
.stage-head { text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); }
.stage-head p:not(.eyebrow) { font-size: clamp(17px, 1.6vw, 20px); color: rgb(255 255 255 / 0.74); }
.green-wrap { display: grid; grid-template-columns: 1fr; gap: 48px; justify-items: center; align-items: center; }
.green3d { width: 100%; max-width: 860px; }
.green3d-host { position: relative; aspect-ratio: 10 / 7; border-radius: var(--radius-xl); overflow: hidden;
  background: radial-gradient(70% 70% at 50% 55%, rgb(61 186 106 / 0.12), transparent 70%); }
.green3d-still img { display: block; width: 100%; height: 100%; object-fit: cover; }
.green3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; outline-offset: -3px; }
.green3d-canvas:active { cursor: grabbing; }
.green3d.live .green3d-still { visibility: hidden; }
.green3d-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 16px; }
.green3d-read { margin: 0; font: 600 clamp(17px, 1.8vw, 20px)/1.35 var(--font-display); color: var(--stage-flag); }
.green3d-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.green3d-controls[hidden], .green3d [hidden] { display: none; }
.chip { min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.2); background: rgb(255 255 255 / 0.08);
  color: #fff; font: 600 15px/1 var(--font-text); cursor: pointer; transition: background 0.2s var(--ease); }
.chip:hover { background: rgb(255 255 255 / 0.16); }
.chip[aria-pressed="true"] { background: #fff; color: var(--stage); }
.stage :focus-visible { outline-color: var(--stage-green); }
.green3d figcaption { margin-top: 10px; font-size: 15px; color: rgb(255 255 255 / 0.7); }
.green-phone { width: min(60vw, 260px); }
.credit { margin: clamp(40px, 6vw, 64px) auto 0; max-width: 860px; font-size: 13px; line-height: 1.55; color: rgb(255 255 255 / 0.66); text-align: center; }
.credit a { color: inherit; }
@media (min-width: 1100px) {
  .green-wrap { grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; }
}

/* ---------- Watch and lock screen ---------- */
.wrist { position: relative; flex-direction: column; }
.live-activity { width: min(100%, 400px); padding: 26px 18px 22px; border-radius: 40px; color: #fff;
  background: radial-gradient(90% 60% at 30% 0%, rgb(42 113 204 / 0.55), transparent 70%), linear-gradient(165deg, var(--stage) 10%, #1C773A 140%);
  box-shadow: var(--shadow-device); }
.ls-clock { text-align: center; margin-bottom: 20px; }
.ls-clock span { display: block; font-size: 15px; font-weight: 600; color: rgb(255 255 255 / 0.82); }
.ls-clock b { display: block; font: 600 clamp(64px, 18vw, 86px)/1 var(--font-text); letter-spacing: -0.02em; color: rgb(255 255 255 / 0.95); }
.la { border-radius: 24px; padding: 12px 14px 12px; background: rgb(6 12 22 / 0.62); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-family: ui-rounded, "SF Pro Rounded", var(--font-text); }
.la i { font-style: normal; color: rgb(255 255 255 / 0.62); font-size: 12px; }
.la-top { display: flex; align-items: baseline; gap: 8px; font-size: 16px; }
.la-top > span:first-child i { font-size: 14px; }
.la-course { flex: 1; min-width: 0; text-align: right; font-size: 12px; color: rgb(255 255 255 / 0.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.la-yards { display: flex; align-items: flex-end; gap: 6px; margin: 6px 0 8px; }
.la-yards > div { display: flex; flex-direction: column; align-items: center; min-width: 46px; }
.la-yards b { font: 600 20px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.la-yards .la-centre { font-size: 36px; font-weight: 700; min-width: 72px; text-align: center; }
.la-from { margin-right: auto; align-items: flex-start !important; gap: 4px; }
.la-club, .la-buttons .on { background: var(--stage-green); color: var(--stage); }
.la-club { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.la-buttons { display: flex; gap: 6px; }
.la-buttons span { flex: 1; display: grid; place-items: center; height: 40px; border-radius: 999px; background: rgb(255 255 255 / 0.2); font-size: 13px; font-weight: 700; }
.la-flag { color: var(--stage-flag); }
.live-activity figcaption { margin-top: 16px; color: rgb(255 255 255 / 0.74); text-align: center; padding: 0 8px; }
.wrist-watch { width: clamp(130px, 34vw, 170px); margin-top: -64px; margin-left: 52%; z-index: 1; }

/* ---------- Privacy ---------- */
.privacy-band { background: var(--card); }
.privacy-head { text-align: center; margin-bottom: clamp(36px, 5vw, 64px); }
.promises, .tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.promises li { position: relative; padding: 64px 26px 26px; border-radius: var(--radius-l); background: var(--bg); box-shadow: var(--shadow); }
.promises li::before { content: ""; position: absolute; top: 24px; left: 26px; width: 28px; height: 28px; border-radius: 50%; background: var(--mint); }
.promises li::after { content: ""; position: absolute; top: 31px; left: 35px; width: 6px; height: 11px; border: solid var(--fairway); border-width: 0 2.5px 2.5px 0; rotate: 45deg; }
.promises h3, .tiles h3 { font-size: 20px; margin: 0 0 8px; }
.promises p, .tiles p { margin: 0; color: var(--slate); font-size: 16px; }
.privacy-more { text-align: center; margin: 36px 0 0; font-weight: 600; }

/* ---------- More ---------- */
.more { padding-top: clamp(72px, 10vw, 140px); padding-bottom: clamp(72px, 10vw, 140px); }
.more h2 { font-size: clamp(30px, 4vw, 46px); text-align: center; margin: 0 0 clamp(32px, 5vw, 56px); }
.tiles li { padding: 26px; border-radius: var(--radius-l); background: var(--card); }

/* ---------- Finale ---------- */
.finale { color: #fff; text-align: center; padding: clamp(88px, 12vw, 170px) 0;
  background: radial-gradient(55% 60% at 50% 100%, rgb(61 186 106 / 0.32), transparent 70%), linear-gradient(180deg, var(--stage) 0%, var(--stage-night) 100%); }
.finale h2 { color: #fff; margin: 20px 0 16px; }
.finale p { color: rgb(255 255 255 / 0.76); font-size: clamp(17px, 1.8vw, 20px); max-width: 34em; margin: 0 auto 30px; }
.finale a { color: #fff; }
.finale .cta { justify-content: center; }
.finale-mark { width: 72px; height: 72px; }

/* ---------- Motion (none of it with Reduce Motion) ---------- */
@keyframes reveal { from { opacity: 0; translate: 0 36px; } to { opacity: 1; translate: 0 0; } }
@keyframes parallax { from { translate: 0 var(--p, 40px); } to { translate: 0 calc(var(--p, 40px) * -1); } }
@keyframes float { 50% { translate: 0 -10px; } }
@keyframes rise { from { opacity: 0; translate: 0 24px; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 1s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
  .hero-stage { animation: rise 1.2s 0.15s var(--ease) both; }
  .hero-phone { animation: float 7s ease-in-out infinite; }
  .hero-watch img { animation: float 7s 0.6s ease-in-out infinite; }
  /* Without scroll-driven animations, home.js reveals things as they come into view (html.reveals). */
  html.reveals .reveal { opacity: 0; translate: 0 36px; transition: opacity 0.9s var(--ease), translate 0.9s var(--ease); }
  html.reveals .reveal.in { opacity: 1; translate: 0 0; }
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .parallax { animation: parallax linear both; animation-timeline: view(); animation-range: cover; }
  }
}
