/* Hero, scroll statement, highlights gallery, how it works. */

/* hero */
.hero { margin-top: -53px; padding-block: calc(53px + clamp(56px, 8vw, 96px)) 0; overflow: hidden; }
.hero .name { margin: 0; font-size: clamp(64px, 12vw, 152px); font-weight: 700; letter-spacing: -.045em; line-height: .95; }
.hero .tag { margin: 18px 0 0; font-size: clamp(28px, 4.6vw, 56px); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; }
.hero .intro { margin: 18px auto 0; max-width: 640px; font-size: clamp(17px, 1.7vw, 21px); color: var(--k-fg-2); line-height: 1.42; text-wrap: balance; }
.hero-stage { position: relative; margin-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(48px, 7vw, 96px); perspective: 2000px; }
.hero-tilt { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; transform: rotateX(var(--rx, 18deg)) scale(var(--sc, .92)); transform-origin: 50% 100%; will-change: transform; }
.hero-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 70%; pointer-events: none; background: radial-gradient(55% 60% at 50% 100%, rgba(120, 90, 255, .32), transparent 70%); }

/* hero entrance: a short, ordered rise on first load */
.hero .eyebrow, .hero .name, .hero .tag, .hero .intro, .hero .ctas { animation: riseIn 1s var(--ease) both; }
.hero .name { animation-delay: .08s; } .hero .tag { animation-delay: .2s; } .hero .intro { animation-delay: .32s; } .hero .ctas { animation-delay: .44s; }
.hero-stage { animation: stageIn 1.6s var(--ease) .45s both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes stageIn { from { opacity: 0; transform: translateY(80px); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }

/* the AI glow frame (rotating gradient halo, as on Apple Intelligence pages) */
.glow { position: relative; border-radius: clamp(18px, 2.4vw, 26px); padding: 2px; background: var(--ai-conic); animation: spin 6s linear infinite; }
.glow::before { content: ""; position: absolute; inset: -10px; z-index: -1; border-radius: inherit; background: var(--ai-conic); filter: blur(28px); opacity: .75; animation: spin 6s linear infinite; }
.glow > .app { border-radius: clamp(16px, 2.2vw, 24px); }
@keyframes spin { to { --spin: 360deg; } }

/* live toasts over the hero app */
.toasts { position: absolute; top: clamp(64px, 9%, 90px); right: clamp(10px, 2.4%, 28px); z-index: 3; display: grid; gap: 8px; width: min(340px, 72%); pointer-events: none; }
.toast-l { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); box-shadow: 0 10px 30px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .06); color: #1d1d1f; font-size: 13px; line-height: 1.3; opacity: 0; transform: translateY(-10px) scale(.96); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.toast-l.on { opacity: 1; transform: none; }
.toast-l svg { width: 28px; height: 28px; flex: none; }
.toast-l b { display: block; font-weight: 600; }
.toast-l span { color: #6e6e73; }
.toast-l time { margin-left: auto; align-self: flex-start; color: #8e8e93; font-size: 11px; }
@container (max-width: 640px) {
  .toasts { top: auto; bottom: 64px; left: 10px; right: 10px; width: auto; }
  .toast-l:nth-child(n+2) { display: none; }
}
.demo-note { position: relative; margin: 18px var(--gutter) 0; font-size: 14px; color: #a1a1a6; text-align: center; }

/* scroll-driven statement */
.scrub { height: 300vh; background: var(--k-bg); color: var(--k-fg); }
.scrub .stick { position: sticky; top: 52px; height: calc(100vh - 52px); display: flex; align-items: center; }
.scrub p { margin: 0; font-size: clamp(34px, 5.8vw, 72px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.scrub .w { opacity: .18; transition: opacity .35s ease; }
.scrub .w.on { opacity: 1; }
.scrub .w.hi.on { background: var(--ai); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 833px), (prefers-reduced-motion: reduce) {
  .scrub { height: auto; padding-block: 64px; }
  .scrub .stick { position: static; height: auto; }
  .scrub .w { opacity: 1; }
}
@media (max-width: 833px) {
  .hero { padding-top: 100px; }
  .hero-stage { margin-top: 36px; padding-bottom: 40px; }
  .hero-tilt { transform: none; }
  .sec { padding-block: 64px; }
  .sec.hero { padding-block: 100px 0; }
  .hero .name { font-size: clamp(60px, 16vw, 90px); }
}

/* highlights gallery */
.hl-head { width: min(1000px, 100% - 2 * var(--gutter)); margin-inline: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.hl-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 48px max(var(--gutter), calc((100vw - 1000px) / 2)) 30px; scroll-padding-inline: max(var(--gutter), calc((100vw - 1000px) / 2)); }
.hl-track::-webkit-scrollbar { display: none; }
.hl-card { position: relative; flex: 0 0 min(1000px, 100vw - 2 * var(--gutter)); height: clamp(500px, 58vw, 640px); border-radius: 28px; overflow: hidden; scroll-snap-align: start; container-type: inline-size; background: #000; color: #f5f5f7; }
.hl-card.light { background: #fbfbfd; color: #1d1d1f; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.hl-cap { position: absolute; top: clamp(28px, 4cqw, 48px); left: clamp(26px, 4.5cqw, 52px); right: 26px; z-index: 4; margin: 0; max-width: 560px; font-size: clamp(22px, 3.1cqw, 30px); font-weight: 600; line-height: 1.17; letter-spacing: -.01em; text-wrap: balance; }
.hl-cap span { color: #86868b; }
.hl-card.light .hl-cap span { color: #6e6e73; }
.hl-scene { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(700px, 90%); font-size: clamp(13px, 1.8cqw, 18px); }
.hl-scene.mid { bottom: auto; top: 50%; transform: translate(-50%, -38%); }
.hl-ctl { display: flex; justify-content: center; align-items: center; gap: 14px; }
.hl-dots { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 26px; border-radius: 28px; background: var(--chip); }
.hl-dots button { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--fg-2); opacity: .55; cursor: pointer; overflow: hidden; transition: width .5s var(--ease), opacity .3s; }
.hl-dots button[aria-current="true"] { width: 48px; opacity: 1; background: color-mix(in srgb, var(--fg-2) 45%, transparent); }
.hl-dots button i { position: absolute; inset: 0; width: 0; border-radius: inherit; background: var(--fg); }
.hl-dots button[aria-current="true"] i { width: var(--prog, 0%); }
.hl-play { width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--chip); display: grid; place-items: center; cursor: pointer; }
.hl-play svg { width: 18px; height: 18px; fill: var(--fg); }

/* scene: mail */
.mailw { border-radius: 18px 18px 0 0; background: #fff; box-shadow: 0 -10px 60px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .05); padding: 1.3em 1.4em 2.2em; color: #1d1d1f; }
.mailw .hd { display: flex; align-items: center; gap: .6em; font-weight: 600; padding-bottom: .9em; border-bottom: 1px solid #ececf0; }
.mailw .hd svg { width: 1.6em; }
.mail-in { display: flex; gap: .8em; padding: 1em 0; border-bottom: 1px solid #ececf0; }
.mail-in .ap-ic { width: 2.6em; height: 2.6em; }
.mail-in small { color: #6e6e73; display: block; }
.reply { margin-top: 1em; margin-left: auto; width: 88%; padding: 1em 1.2em; border-radius: 1.2em 1.2em .3em 1.2em; background: #0071e3; color: #fff; line-height: 1.4; }
.sent { display: flex; justify-content: flex-end; margin-top: .7em; }

/* scene: night chat */
.hl-card.night { background: radial-gradient(120% 90% at 70% 0%, #1c2a5c 0%, #0a0f24 55%, #04060f 100%); }
.stars { position: absolute; inset: 0; background-image: radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 30% 12%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 55% 28%, #cfe0ff 50%, transparent 51%), radial-gradient(1px 1px at 72% 9%, #fff 50%, transparent 51%), radial-gradient(1.6px 1.6px at 86% 34%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 40% 40%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 8% 52%, #cfe0ff 50%, transparent 51%), radial-gradient(1px 1px at 93% 58%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 62% 48%, #fff 50%, transparent 51%); opacity: .8; }
@container (max-width: 560px) { .clock-big { display: none; } }
.clock-big { position: absolute; right: clamp(26px, 5cqw, 56px); top: clamp(26px, 4cqw, 44px); z-index: 3; font-size: clamp(44px, 9cqw, 96px); font-weight: 200; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: #fff; }
.wa { border-radius: 22px; background: #efeae2; color: #111; padding: 1em; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.wa .hd { display: flex; align-items: center; gap: .6em; margin: -1em -1em .9em; padding: .9em 1em; border-radius: 22px 22px 0 0; background: #f7f7f7; font-weight: 600; }
.wa .hd svg { width: 1.8em; }
.wa .hd small { display: block; color: #6e6e73; font-weight: 400; }
.wa .m { max-width: 82%; padding: .6em .85em; border-radius: .9em; background: #fff; margin-bottom: .55em; line-height: 1.35; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.wa .m.me { margin-left: auto; background: #d9fdd3; }
.wa .m time { display: block; text-align: right; color: #8696a0; font-size: .75em; }

/* scene: legacy software */
.hl-card.teal { background: linear-gradient(160deg, #0b5e5e 0%, #063c3c 100%); }
.hl-card.teal .win98 { font-size: clamp(11px, 1.5cqw, 14px); }

/* scene: website updates */
.wp { border-radius: 18px 18px 0 0; background: #fff; color: #1d1d1f; box-shadow: 0 -10px 60px rgba(0, 0, 0, .1), 0 0 0 1px rgba(0, 0, 0, .05); overflow: hidden; }
.wp .hd { display: flex; align-items: center; gap: .6em; padding: .9em 1.2em; background: #1d2327; color: #fff; font-weight: 600; }
.wp .hd svg { width: 1.6em; }
.wp .hd time { margin-left: auto; font-weight: 400; color: #a7aaad; font-size: .9em; }
.wp .rw { display: grid; grid-template-columns: 1fr 38% 1.4em; gap: 1em; align-items: center; padding: .85em 1.2em; border-bottom: 1px solid #f0f0f1; }
.wp .bar { height: .45em; border-radius: 1em; background: #e5e5e5; overflow: hidden; }
.wp .bar i { display: block; height: 100%; border-radius: inherit; background: #2271b1; }
.play .wp .bar i { animation: fillw .9s var(--ease) var(--d) both; }
@keyframes fillw { from { width: 0; } to { width: 100%; } }
.wp .end { padding: 1em 1.2em 1.8em; }

/* scene: approval on the lock screen */
.noti { border-radius: 22px; padding: .95em 1.05em; background: rgba(245, 245, 247, .82); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); color: #1d1d1f; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.noti .row1 { display: flex; align-items: center; gap: .6em; font-size: .85em; color: #6e6e73; }
.noti .row1 svg { width: 1.6em; }
.noti .row1 time { margin-left: auto; }
.noti b { display: block; margin-top: .35em; font-weight: 600; }
.noti .acts { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; margin-top: .9em; }
.noti .acts .act { padding: .7em; border-radius: 14px; background: rgba(255, 255, 255, .9); text-align: center; font-weight: 600; color: #0071e3; }
.noti .acts .act.ok { background: #e5f6ec; color: #13703b; }
.hl-card.aura { background: radial-gradient(90% 70% at 20% 10%, #3a1d6e 0%, transparent 60%), radial-gradient(80% 70% at 90% 90%, #6e1d4a 0%, transparent 60%), #08070d; }

/* scene: spreadsheet */
.sheet-x { border-radius: 18px 18px 0 0; background: #fff; color: #1d1d1f; overflow: hidden; box-shadow: 0 -10px 60px rgba(0, 0, 0, .1), 0 0 0 1px rgba(0, 0, 0, .05); }
.sheet-x .hd { display: flex; align-items: center; gap: .6em; padding: .8em 1.1em; background: #107c41; color: #fff; font-weight: 600; }
.sheet-x .hd svg { width: 1.6em; background: #fff; border-radius: .3em; padding: .1em; }
.sheet-x .rw { display: grid; grid-template-columns: 5.2em 1fr 6.5em 2em; gap: .6em; padding: .65em 1.1em; border-bottom: 1px solid #ececf0; font-variant-numeric: tabular-nums; }
.sheet-x .rw.h { background: #f3f9f5; font-weight: 600; color: #107c41; }
.sheet-x .rw .ok { color: #107c41; font-weight: 700; }
.sheet-x .tot { display: flex; justify-content: space-between; padding: 1em 1.1em 1.8em; font-weight: 700; font-size: 1.1em; }

/* how it works */
.how-ctl { display: flex; justify-content: center; margin-top: 40px; overflow-x: auto; scrollbar-width: none; }
.how-cap { min-height: 4.6em; margin: 28px auto 0; max-width: 680px; text-align: center; font-size: clamp(17px, 1.6vw, 21px); color: var(--fg-2); }
.how-cap b { color: var(--fg); font-weight: 600; }
.how-stage { position: relative; margin-top: 18px; }
.how-pane { position: absolute; top: 0; left: 0; right: 0; opacity: 0; visibility: hidden; transform: scale(.98); transition: opacity .6s var(--ease), transform .6s var(--ease), visibility .6s; }
.how-pane.on { position: relative; opacity: 1; visibility: visible; transform: none; }
.how-pane .app { box-shadow: 0 30px 90px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .06); height: 100%; }
.run-step { display: grid; grid-template-columns: 1.6em 1fr auto; gap: .8em; align-items: center; padding: .75em 0; border-top: 1px solid #ececf0; }
.run-step .ev { display: flex; gap: .35em; }
.run-step .ev i { width: 2.4em; height: 1.6em; border-radius: .3em; background: linear-gradient(135deg, #e8eefc, #dfe6f5); box-shadow: inset 0 0 0 1px #d6dcea; }
.meter { height: .5em; border-radius: 1em; background: #ececf0; overflow: hidden; margin-top: 1em; }
.meter i { display: block; height: 100%; border-radius: inherit; background: #0071e3; width: 75%; }
.play .meter i { animation: meter 3.2s var(--ease) .2s both; }
@keyframes meter { from { width: 0; } to { width: 75%; } }
@container (max-width: 640px) { .run-step .ev { display: none; } .run-step { grid-template-columns: 1.6em 1fr auto; } }
