/* Moonwalk site. One world: night, with the Mac's own type.
   Each section is laid out for what it shows: the real app on a stage, words as the picture,
   two demos side by side, a fan of pages, two windows overlapped, a plain list, the price. */
:root {
  --black: #030406;
  --white: #FFFFFF;
  --grey: #A1A1A6;      /* Apple's secondary label grey on dark */
  --dim: #6E6E73;
  --line: #1B1D22;
  --signal: #3D7BFF;    /* the capture selection, as in the app */
  --mark: #FF3B30;      /* marks, as in the app */
  --type: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gap: clamp(72px, 13vh, 150px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--black); color: var(--white); font: 400 1.0625rem/1.5 var(--type); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; border-radius: 8px; }
main, footer { position: relative; z-index: 1; }
.defs { position: absolute; width: 0; height: 0; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

.mark { display: inline-block; color: var(--white); }
.mark svg { width: 100%; height: 100%; display: block; }

/* Header */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 12px clamp(20px, 4vw, 44px); background: rgba(3,4,6,.78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.brand .mark { width: 28px; height: 28px; }
.bar .right { display: flex; align-items: center; gap: 22px; font-size: .92rem; }
.bar .right a:not(.badge) { text-decoration: none; color: var(--grey); transition: color .2s; }
.bar .right a:not(.badge):hover { color: var(--white); }
.badge { display: inline-block; line-height: 0; border-radius: 9px; }
.badge img { height: 100%; width: auto; }
.badge.small { height: 34px; }
.badge.big { height: 54px; }
.badge.soon { cursor: default; }

/* Type: heavy, tight. One quiet line under each headline. */
h1, h2 { margin: 0; font-weight: 800; letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1; }
.lede { margin: 18px 0 0; max-width: 34rem; color: var(--grey); font-size: clamp(1.08rem, 1.45vw, 1.28rem); line-height: 1.4; font-weight: 500; letter-spacing: -.01em; text-wrap: pretty; }
.name { margin: 0 0 14px; font-weight: 600; font-size: 1rem; color: var(--grey); letter-spacing: -.01em; }
main > section { padding-block: var(--gap) 0; }

/* Plain text tabs: the chosen one is white and underlined. */
.tabs { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.tabs button { padding: 6px 0; border: 0; background: none; color: var(--dim); font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; cursor: pointer; border-bottom: 2px solid transparent; transition: color .25s, border-color .25s; }
.tabs button:hover { color: var(--grey); }
.tabs button[aria-pressed="true"] { color: var(--white); border-bottom-color: var(--white); }

/* Hero */
main > .hero { min-height: min(100svh, 860px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 60px); align-items: center; padding: 88px 0 24px; }
h1.word { display: flex; align-items: center; gap: .14em; font-size: clamp(3.2rem, 5.6vw, 5.4rem); line-height: .9; letter-spacing: -.05em; }
h1.word .mark { width: .6em; height: .6em; flex: none; }
.tag { margin: 18px 0 0; font-weight: 700; letter-spacing: -.03em; font-size: clamp(1.6rem, 2.7vw, 2.3rem); line-height: 1.08; }
.tag span { display: block; }
.get { display: flex; align-items: center; gap: 18px; margin-top: 34px; flex-wrap: wrap; }
.free { color: var(--grey); font-weight: 600; }

/* The sample window the demos act on */
.demo { position: relative; }
.desk { position: relative; width: 100%; padding: 50px 0 78px; }
.win { position: relative; border-radius: 12px; background: #F4F4F7; color: #1c1c1e; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06); aspect-ratio: 16 / 9.4; }
.win .title { height: 9%; display: flex; align-items: center; gap: 1.1%; padding: 0 2.4%; background: #E6E6EB; font-weight: 600; font-size: clamp(.6rem, 1.05vw, .9rem); }
.win .title i { width: 1.6%; aspect-ratio: 1; border-radius: 50%; background: #c9c9cf; }
.win .title em { margin-left: 2.5%; font-style: normal; }
.win .tools { display: flex; gap: 1.6%; padding: 3% 2.6% 0; }
.win .tools u { text-decoration: none; padding: .9% 2.2%; border-radius: 7px; border: 1px solid #d8d8de; background: #fff; font-weight: 500; font-size: clamp(.58rem, 1vw, .88rem); line-height: 1.6; white-space: nowrap; }
.win .tools u.go { background: #2F6BEE; color: #fff; border-color: #2F6BEE; }
.win .lines { padding: 3.5% 2.6%; display: grid; gap: clamp(7px, 1.3vw, 15px); }
.win .lines s { height: clamp(5px, .8vw, 9px); border-radius: 4px; background: #E4E4EA; width: 62%; text-decoration: none; }
.win .lines s:nth-child(3n) { width: 44%; } .win .lines s:nth-child(4n) { width: 54%; }
.win .lines s.who { font-weight: 500; font-size: clamp(.58rem, .95vw, .85rem); color: #3a3a40; height: auto; background: none; width: auto; }

/* Walk demo */
.ring { position: absolute; width: clamp(22px, 3vw, 38px); aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--mark); left: 11.5%; top: 18.6%; transform: translate(-50%,-50%) scale(0); }
.sel { position: absolute; left: 0; top: 56px; border: 2px dashed var(--signal); background: rgba(61,123,255,.08); border-radius: 4px; width: 0; height: 0; pointer-events: none; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.caption { position: absolute; left: 3%; right: 3%; bottom: 10px; height: 58px; border-radius: 18px; background: #1d1e22; box-shadow: 0 20px 40px rgba(0,0,0,.6); display: flex; align-items: center; gap: 12px; padding: 0 12px; opacity: 0; color: #f2f2f5; font-size: clamp(.82rem, 1.25vw, 1.05rem); font-weight: 500; }
.caption .n { width: 30px; height: 30px; border-radius: 50%; background: #f2f2f5; color: #111; display: grid; place-items: center; font-weight: 700; flex: none; }
.caption .mic { width: 18px; height: 18px; flex: none; stroke: #8b8f99; fill: none; stroke-width: 1.7; stroke-linecap: round; }
.caption .mic.on { stroke: #fff; }
.caption .t { position: relative; flex: 1; min-width: 0; height: 38px; border-radius: 9px; background: #121315; border: 1px solid #2c2d31; overflow: hidden; }
.caption .t span { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 10px; white-space: nowrap; }
.caption .t .raw { color: #b9bcc5; }
.caption .t .clean { font-weight: 700; color: #fff; opacity: 0; }

/* Stage: the real window, with two finished pages sliding out from behind it as you scroll. */
main > .stage { padding-top: clamp(40px, 8vh, 96px); }
.set { position: relative; width: min(1320px, 100% - 32px); margin: clamp(36px, 6vh, 64px) auto 0; padding: 0 clamp(0px, 9vw, 150px); }
.set .app { position: relative; z-index: 2; width: 100%; border-radius: 14px; box-shadow: 0 50px 120px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.08); }
.set .sheet { position: absolute; z-index: 1; top: 9%; width: 27%; border-radius: 5px; box-shadow: 0 30px 80px rgba(0,0,0,.8); }
.set .sheet.left { left: 0; transform: translateX(var(--out, 0%)) rotate(-5deg); transform-origin: 100% 100%; }
.set .sheet.right { right: 0; transform: translateX(calc(var(--out, 0%) * -1)) rotate(5deg); transform-origin: 0 100%; }

/* Smart Steps: what you said, then what it wrote, as big as a headline. */
.smart .said { margin: clamp(36px, 6vh, 60px) 0 0; max-width: 46rem; color: var(--dim); font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.4; font-weight: 500; letter-spacing: -.015em; }
.smart .said span { background: linear-gradient(var(--dim), var(--dim)) 0 58% / var(--struck, 0%) 2px no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.smart .out { position: relative; margin-top: 22px; min-height: 2.1em; font-weight: 800; letter-spacing: -.04em; font-size: clamp(2rem, 5.4vw, 4.6rem); line-height: 1.02; }
.smart .out span { position: absolute; left: 0; right: 0; top: 0; opacity: 0; text-wrap: balance; }
.smart .tabs { margin-top: 26px; }

/* Pair: two demos, side by side, a hairline between them. */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pair article { padding-right: clamp(24px, 4vw, 56px); }
.pair article + article { padding: 0 0 0 clamp(24px, 4vw, 56px); border-left: 1px solid var(--line); }
.pair h2 { font-size: clamp(1.9rem, 3.1vw, 2.7rem); line-height: 1.03; }
.pair .lede { font-size: clamp(1.02rem, 1.25vw, 1.15rem); }
.pair .desk { padding-top: 62px; padding-bottom: 70px; }
.pair .win .title { font-size: clamp(.6rem, .8vw, .8rem); }
.pair .win .tools u { font-size: clamp(.58rem, .78vw, .78rem); }
.pair .cards div { font-size: .72rem; padding: 9px 9px; }
.pair .cards b { margin-right: 5px; }

/* Click demo */
.menubar { position: absolute; right: 0; top: 16px; height: 34px; border-radius: 10px; background: #15171c; display: flex; align-items: center; gap: 8px; padding: 0 14px; font-weight: 700; }
.menubar .mark { width: 18px; height: 18px; }
.menubar .count { min-width: 1.2em; font-variant-numeric: tabular-nums; }
.ripple { position: absolute; width: 16%; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--signal); transform: translate(-50%,-50%) scale(0); opacity: 0; }
.cards { position: absolute; left: 0; right: 0; bottom: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cards div { padding: 10px 12px; border-radius: 12px; background: #15171c; font-size: .82rem; font-weight: 500; opacity: 0; transform: translateY(12px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards b { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--white); color: #0b0c10; font-size: .72rem; margin-right: 7px; }

/* Tools demo */
.toolstrip { position: absolute; left: 0; top: 12px; display: flex; align-items: center; gap: 3px; padding: 5px; border-radius: 13px; background: #1d1e22; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.toolstrip i { display: grid; place-items: center; width: 36px; height: 32px; border-radius: 9px; color: #9aa0ad; transition: background .3s, color .3s; }
.toolstrip i.on { background: var(--white); color: #0b0c10; }
.toolstrip svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toolstrip .dot { width: 13px; height: 13px; border-radius: 50%; background: var(--mark); margin: 0 9px 0 6px; }
.toolname { position: absolute; left: 0; bottom: 22px; margin: 0; font-weight: 700; font-size: 1.05rem; }
.arrow { position: absolute; inset: 0; width: 100%; height: 100%; }
.arrow path { stroke: var(--mark); stroke-width: .55; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.box { position: absolute; border: 3px solid var(--mark); border-radius: 6px; opacity: 0; }
.hl { position: absolute; background: rgba(255,214,10,.5); border-radius: 3px; opacity: 0; mix-blend-mode: multiply; }
.num { position: absolute; width: clamp(18px, 2.4vw, 28px); aspect-ratio: 1; border-radius: 50%; background: var(--mark); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: clamp(.6rem, 1vw, .85rem); transform: scale(0); }
.spot { position: absolute; border-radius: 10px; box-shadow: 0 0 0 200vmax rgba(3,4,6,.66); opacity: 0; }

/* Looks: five finished pages fanned across the screen; the chosen one steps forward. */
.looks .tabs { margin-top: 30px; }
.fan { --pw: clamp(190px, 21vw, 300px); display: flex; justify-content: center; align-items: flex-end; margin-top: clamp(56px, 9vh, 96px); padding: 30px 0 10px; }
.fan img { flex: none; width: var(--pw); border-radius: 5px; box-shadow: 0 30px 80px rgba(0,0,0,.85); cursor: pointer; filter: brightness(.72); transform: rotate(var(--tilt, 0deg)) translateY(var(--drop, 0px)); transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .45s ease; }
.fan img + img { margin-left: calc(var(--pw) * -.28); }
.fan img:nth-child(1) { --tilt: -9deg; --drop: 34px; z-index: 1; }
.fan img:nth-child(2) { --tilt: -4.5deg; --drop: 10px; z-index: 2; }
.fan img:nth-child(4) { --tilt: 4.5deg; --drop: 10px; z-index: 2; }
.fan img:nth-child(5) { --tilt: 9deg; --drop: 34px; z-index: 1; }
.fan img.on { filter: none; z-index: 4; transform: rotate(0deg) translateY(-26px) scale(1.12); }
.layoutname { margin-top: 30px; text-align: center; color: var(--grey); font-weight: 600; }

/* Filed: the library in front, Pick a Look behind and to the right. */
.filed { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.windows { position: relative; padding: 0 0 13% 0; }
.windows img { border-radius: 12px; box-shadow: 0 40px 100px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.08); }
.windows .back { width: 82%; margin-left: 18%; transform: translateY(var(--lift, 0px)); }
.windows .front { position: absolute; left: 0; bottom: 0; width: 56%; transform: translateY(calc(var(--lift, 0px) * -1)); }

/* Who: a plain list. Who is asking on the left, what they get on the right. */
.who dl { margin: clamp(36px, 6vh, 64px) 0 0; }
.who dl div { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.9fr); gap: 24px; align-items: baseline; padding: clamp(16px, 2.4vh, 24px) 0; border-top: 1px solid var(--line); }
.who dl div:last-child { border-bottom: 1px solid var(--line); }
.who dt { color: var(--grey); font-weight: 600; }
.who dd { margin: 0; font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.45rem, 2.9vw, 2.5rem); line-height: 1.06; }

/* Price */
.price { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.facts { list-style: none; margin: 34px 0 0; padding: 0; max-width: 34rem; }
.facts li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--grey); font-weight: 500; font-size: 1.08rem; }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts strong { color: var(--white); font-weight: 700; margin-right: .3em; }
.unlock { width: min(340px, 100%); justify-self: center; border-radius: 12px; box-shadow: 0 40px 100px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.08); }

/* Close */
main > .close { text-align: center; padding-bottom: clamp(64px, 11vh, 120px); }
.appicon { position: relative; width: clamp(104px, 11vw, 140px); aspect-ratio: 1; margin: 0 auto 30px; border-radius: 23%; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.8); }
.appicon img { width: 100%; height: 100%; }
.appicon::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), inset 0 1px 0 rgba(255,255,255,.28); }
.close h2 { position: relative; margin-bottom: 34px; }
.needs { margin: 18px 0 0; color: var(--grey); font-size: .92rem; }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 26px 0 30px; border-top: 1px solid var(--line); color: var(--grey); font-size: .9rem; }
footer nav { display: flex; gap: 22px; }

/* Five prints down the right edge; one lights for each stretch of the page. */
.trail { position: fixed; right: clamp(12px, 2vw, 28px); top: 50%; transform: translateY(-50%); display: grid; gap: 14px; z-index: 5; pointer-events: none; }
.trail .mark { width: 16px; height: 16px; opacity: .14; transition: opacity .45s ease; }
.trail .mark:nth-child(odd) { transform: translateX(-9px) scaleX(-1); }
.trail .mark.on { opacity: .95; }

@media (max-width: 1280px) { .trail { display: none; } }
@media (max-width: 900px) {
  main > .hero { grid-template-columns: 1fr; padding-top: 92px; min-height: 0; padding-bottom: 0; gap: 0; }
  h1.word { font-size: clamp(3rem, 14vw, 4.4rem); }
  .pair { grid-template-columns: 1fr; row-gap: var(--gap); }
  .pair article, .pair article + article { padding: 0; border: 0; }
  .pair .win .title { font-size: clamp(.6rem, 1.9vw, .9rem); }
  .pair .win .tools u { font-size: clamp(.58rem, 1.8vw, .88rem); }
  .filed, .price { grid-template-columns: 1fr; }
  .who dl div { grid-template-columns: 1fr; gap: 6px; }
  .set { padding: 0 6vw; }
  .set .sheet { width: 30%; }
}
@media (max-width: 560px) {
  :root { --gap: 84px; }
  .bar .right a:not(.badge) { display: none; }
  .fan { --pw: 37vw; }
  .fan img + img { margin-left: calc(var(--pw) * -.62); }
  .fan img.on { transform: rotate(0deg) translateY(-18px) scale(1.2); }
  .cards div { font-size: .7rem; padding: 9px 8px; }
  .cards b { margin-right: 4px; }
  .tabs { gap: 4px 20px; }
  .tabs button { font-size: 1rem; }
  /* On a phone the window runs off the right edge, so the steps stay readable. */
  .set { width: 100%; padding: 0 0 0 24px; overflow: hidden; }
  .set .app { width: 185%; max-width: none; border-radius: 10px; }
  .set .sheet { display: none; }
  .who h2 br, .stage h2 br { display: none; }
  .windows { padding-bottom: 20%; }
  .windows .front { width: 68%; }
  .caption { height: 50px; gap: 8px; padding: 0 9px; }
}
@media (prefers-reduced-motion: no-preference) {
  /* One entrance, once: the name, the line, the offer. */
  .hero .copy > * { animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
  .hero .copy > :nth-child(2) { animation-delay: .12s; }
  .hero .copy > :nth-child(3) { animation-delay: .24s; }
  .hero .copy > :nth-child(4) { animation-delay: .36s; }
  @keyframes rise { from { transform: translateY(18px); opacity: 0; } }
}
