/* ==========================================================================
   Calico — school board presentation
   Apple's product-page system: white to #f5f5f7, near-black type at 600, grey semibold body,
   28px cards, neutral shadows. A 1920×1080 stage (1rem = 10 design px) scaled to the window.
   The MacBook is three.js (stage3d.js); its screen is live HTML (screen.css).
   ========================================================================== */

@font-face { font-family: "SF Pro Display"; font-weight: 400; src: local("SF Pro Display"), local("SFProDisplay-Regular"), local("SF Pro Display Regular"); }
@font-face { font-family: "SF Pro Display"; font-weight: 500; src: local("SF Pro Display Medium"), local("SFProDisplay-Medium"); }
@font-face { font-family: "SF Pro Display"; font-weight: 600; src: local("SF Pro Display Semibold"), local("SFProDisplay-Semibold"), local("SF Pro Display Bold"), local("SFProDisplay-Bold"); }
@font-face { font-family: "SF Pro Display"; font-weight: 700; src: local("SF Pro Display Bold"), local("SFProDisplay-Bold"); }

:root {
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --card: #ffffff;
  --tile: #f5f5f7;
  --blue: #0071e3;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.04), 0 1.6rem 4.8rem rgba(0, 0, 0, 0.07);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: min(calc(100vw / 192), calc(100vh / 108)); background: #f5f5f7; color-scheme: light; }
body {
  margin: 0; height: 100vh; overflow: hidden;
  background: #f5f5f7; color: var(--ink);
  font-family: var(--font); font-size: 2rem; line-height: 1.3;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-synthesis: none;
  user-select: none; -webkit-user-select: none;
}
body.idle { cursor: none; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; }
svg.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
kbd { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.4em; padding: 0 0.38em; border-radius: 0.3em; font: 600 0.8em/1.3 var(--font); color: var(--ink); background: #fff; box-shadow: inset 0 0 0 0.1rem rgba(0,0,0,0.1), 0 0.2rem 0 rgba(0,0,0,0.12); vertical-align: 0.1em; }
kbd svg.i { width: 0.9em; height: 0.9em; }

/* ---------- background ---------- */
.bg { position: fixed; inset: 0; z-index: 0; background: radial-gradient(130% 90% at 50% -12%, #ffffff 0%, #fafafc 42%, #efeff3 100%); }

/* ---------- stage ---------- */
.deck { position: fixed; inset: 0; margin: auto; width: 192rem; height: 108rem; z-index: 1; }
@property --veil { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.stage3d { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; --veil: 0%; -webkit-mask-image: linear-gradient(90deg, transparent calc(var(--veil) - 24%), #000 var(--veil)); mask-image: linear-gradient(90deg, transparent calc(var(--veil) - 24%), #000 var(--veil)); transition: opacity 1.2s var(--ease), --veil 1.3s var(--ease); }
.stage3d.veil { --veil: 54%; }
.stage3d.ready { opacity: 1; }
.stage3d canvas, .stage3d .css3d { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; }
.stage3d .css3d { overflow: hidden; }

.slide { position: absolute; inset: 0; z-index: 2; pointer-events: none; visibility: hidden; transition: visibility 0s linear 0.7s; }
.slide.is-active { visibility: visible; transition: visibility 0s; }
.deck.jump .slide { transition: none; }

/* reveal: rise and fade, Apple's ease */
.r { opacity: 0; transform: translate3d(0, 3rem, 0); transition: opacity 0.35s ease, transform 0.6s var(--ease); }
.is-past .r { transform: translate3d(0, -2rem, 0); }
.is-active .r { opacity: 1; transform: none; transition: opacity 0.9s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s); }

/* ---------- type ---------- */
.copy { position: absolute; left: 14rem; top: 50%; width: 64rem; transform: translateY(-50%); }
.copy--top { left: 0; right: 0; width: auto; top: 9rem; transform: none; text-align: center; }
.copy--head { left: 14rem; right: 14rem; width: auto; top: 11rem; transform: none; }
.eyebrow { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 2.4rem; font-size: 2.8rem; font-weight: 600; letter-spacing: 0.002em; color: var(--ink); }
.copy--top .eyebrow { justify-content: center; }
.eyebrow-icon { width: 4.4rem; height: 4.4rem; border-radius: 22.5%; }
.ai-badge { width: 4.4rem; height: 4.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 2.3rem; }
.hl { font-size: 8.8rem; line-height: 1.04; font-weight: 600; letter-spacing: -0.024em; color: var(--ink); margin-bottom: 4.4rem; }
.s-title .hl, .s-close .hl { font-size: 11.2rem; letter-spacing: -0.03em; margin-bottom: 2.4rem; }
.sub { font-size: 3.6rem; line-height: 1.3; font-weight: 600; color: var(--ink-2); letter-spacing: -0.016em; }
.lines { display: grid; gap: 1.8rem; }
.lines li { font-size: 3.3rem; line-height: 1.3; font-weight: 600; color: var(--ink-2); letter-spacing: -0.018em; }
.lines li:not(.plain) { display: flex; align-items: center; gap: 2rem; }
.lines b, .lead b { color: var(--ink); font-weight: 600; }
.lead { margin-top: 3.4rem; font-size: 3.3rem; line-height: 1.32; font-weight: 600; color: var(--ink-2); letter-spacing: -0.018em; }
.lines + .lead { color: var(--ink); }
.fine { margin-top: 3.4rem; font-size: 1.9rem; font-weight: 500; color: var(--ink-2); }
.appi { flex: none; width: 6rem; height: 6rem; border-radius: 22.5%; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 0.1rem rgba(0,0,0,0.06), 0 0.4rem 1.4rem rgba(0,0,0,0.08); }
.appi img { width: 66%; height: 66%; object-fit: contain; }
.appi img.gm { width: 62%; height: 50%; }
.inl { display: inline-flex; align-items: center; gap: 0.32em; color: var(--ink); white-space: nowrap; }
.inl img { width: 1.05em; height: 1.05em; object-fit: contain; }
.inl img.gm { height: 0.84em; }
.pills { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 3.8rem; max-width: 62rem; }
.pills li { padding: 1rem 2.1rem; border-radius: 99rem; font-size: 2rem; font-weight: 600; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 0.1rem rgba(0,0,0,0.06), 0 0.2rem 0.8rem rgba(0,0,0,0.04); }

/* ==========================================================================
   Privacy: Apple's privacy card
   ========================================================================== */
.pcard { position: absolute; left: 50%; top: 50%; width: 146rem; margin-left: -73rem; transform: translateY(-50%); padding: 8rem 11rem 7rem; border-radius: 4.4rem; background: #fff; box-shadow: var(--shadow-card); text-align: center; }
.pcard.r { transform: translateY(calc(-50% + 3rem)); }
.is-active .pcard.r { transform: translateY(-50%); }
.is-past .pcard.r { transform: translateY(calc(-50% - 2rem)); }
.pcard-lock { display: inline-grid; place-items: center; width: 9rem; height: 9rem; margin-bottom: 3rem; border-radius: 50%; background: var(--tile); color: var(--ink); font-size: 4.6rem; }
.pcard .hl { margin-bottom: 2rem; }
.pcard-lead { font-size: 3.2rem; font-weight: 600; color: var(--ink-2); letter-spacing: -0.016em; }
.pchecks { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem 6rem; margin: 5.6rem 0 4.8rem; text-align: left; }
.pchecks li { display: flex; align-items: flex-start; gap: 1.6rem; font-size: 2.6rem; line-height: 1.3; font-weight: 600; color: var(--ink-2); letter-spacing: -0.014em; }
.pchecks li svg { width: 3.6rem; height: 3.6rem; margin-top: -0.1rem; color: var(--ink); stroke-width: 1.7; }
.pchecks b { color: var(--ink); font-weight: 600; }
.pcard-foot { max-width: 96rem; margin: 0 auto; font-size: 1.9rem; line-height: 1.45; font-weight: 500; color: var(--ink-2); }

/* ==========================================================================
   Why it matters: a media-card gallery
   ========================================================================== */
.gallery { position: absolute; left: 14rem; right: 14rem; top: 35rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2.4rem; }
.mcard { height: 58rem; display: flex; flex-direction: column; overflow: hidden; border-radius: 3rem; background: #fff; box-shadow: var(--shadow-card); }
.mviz { position: relative; height: 36rem; flex: none; background: var(--tile); overflow: hidden; }
.mtext { padding: 2.8rem 3rem 0; font-size: 2.6rem; line-height: 1.3; font-weight: 600; color: var(--ink-2); letter-spacing: -0.014em; }
.mtext b { color: var(--ink); font-weight: 600; }

/* three app icons glide together and become Calico */
.merge .appt, .merge .one { position: absolute; left: 50%; top: 50%; width: 8rem; height: 8rem; margin: -4rem 0 0 -4rem; border-radius: 22.5%; }
.merge .appt { display: grid; place-items: center; background: #fff; box-shadow: 0 0.4rem 1.6rem rgba(0,0,0,0.1); }
.merge .appt img { width: 64%; height: 64%; object-fit: contain; }
.merge .appt img.gm { height: 52%; }
.merge .t1 { transform: translate(-9.4rem, 0); } .merge .t3 { transform: translate(9.4rem, 0); }
.merge .one { width: 12rem; height: 12rem; margin: -6rem 0 0 -6rem; opacity: 0; transform: scale(0.6); box-shadow: 0 1.2rem 3rem rgba(0,0,0,0.22); }
.is-active .merge .t1 { animation: m1 6s var(--ease) 1.2s infinite; }
.is-active .merge .t2 { animation: m2 6s var(--ease) 1.2s infinite; }
.is-active .merge .t3 { animation: m3 6s var(--ease) 1.2s infinite; }
.is-active .merge .one { animation: mone 6s var(--ease) 1.2s infinite; }
@keyframes m1 { 0%, 18% { transform: translate(-9.4rem, 0); opacity: 1; } 34%, 82% { transform: translate(0, 0) scale(0.7); opacity: 0; } 100% { transform: translate(-9.4rem, 0); opacity: 1; } }
@keyframes m2 { 0%, 18% { transform: none; opacity: 1; } 34%, 82% { transform: scale(0.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes m3 { 0%, 18% { transform: translate(9.4rem, 0); opacity: 1; } 34%, 82% { transform: translate(0, 0) scale(0.7); opacity: 0; } 100% { transform: translate(9.4rem, 0); opacity: 1; } }
@keyframes mone { 0%, 26% { opacity: 0; transform: scale(0.6); } 40%, 80% { opacity: 1; transform: scale(1); } 92%, 100% { opacity: 0; transform: scale(0.6); } }

/* a countdown ring fills */
.ringviz svg { position: absolute; left: 50%; top: 50%; width: 22rem; height: 22rem; margin: -11rem 0 0 -11rem; transform: rotate(-90deg); }
.ringviz circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ringviz .rtrack { stroke: rgba(0,0,0,0.07); }
.ringviz .rfill { stroke: #ff9f0a; stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-active .ringviz .rfill { stroke-dashoffset: 0.18; transition: stroke-dashoffset 2.2s var(--ease) 1s; }
.ringtxt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; white-space: nowrap; }
.ringtxt b, .ringtxt small { display: block; }
.ringtxt b { font-size: 4.2rem; font-weight: 600; letter-spacing: -0.03em; }
.ringtxt small { font-size: 1.7rem; font-weight: 600; color: var(--ink-2); }

/* teacher mail rises */
.mailviz { padding: 3rem 1.8rem; }
.mrow { position: absolute; left: 2.4rem; right: 2.4rem; height: 6.6rem; display: flex; align-items: center; gap: 1.2rem; padding: 0 0.4rem; border-bottom: 0.1rem solid rgba(0,0,0,0.08); font-size: 1.8rem; font-weight: 600; }
.mrow i { width: 0.5rem; align-self: stretch; margin: 1.6rem 0; border-radius: 99rem; background: #c7c7cc; }
.mrow span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow em { font-style: normal; font-size: 1.4rem; padding: 0.4rem 1rem; border-radius: 99rem; color: var(--ink-2); background: var(--tile); }
.mrow.a i { background: #8e5cf7; } .mrow.a em { color: #6a3fd6; background: #efe9ff; }
.mrow.b i { background: #0a84ff; }
.mrow.c { opacity: 0.7; }
.mrow.a { top: 17rem; } .mrow.b { top: 3rem; } .mrow.c { top: 10rem; }
.is-active .mrow.a { animation: rowA 5s var(--ease) 1.4s infinite; }
.is-active .mrow.b { animation: rowB 5s var(--ease) 1.4s infinite; }
.is-active .mrow.c { animation: rowC 5s var(--ease) 1.4s infinite; }
@keyframes rowA { 0%, 15% { top: 17rem; } 35%, 85% { top: 3rem; } 100% { top: 17rem; } }
@keyframes rowB { 0%, 15% { top: 3rem; } 35%, 85% { top: 10rem; } 100% { top: 3rem; } }
@keyframes rowC { 0%, 15% { top: 10rem; } 35%, 85% { top: 17rem; } 100% { top: 10rem; } }

/* explain mode */
.askviz { padding: 3.6rem 2.2rem; }
.askmini { display: flex; align-items: center; gap: 1rem; padding: 1.6rem 1.8rem; border-radius: 99rem; background: #1d1d1f; color: #fff; font-size: 1.7rem; font-weight: 600; }
.askmini svg { font-size: 2rem; }
.askans { margin-top: 2.6rem; padding: 0 0.6rem; font-size: 2.1rem; line-height: 1.45; font-weight: 500; color: var(--ink); opacity: 0; transform: translateY(1.4rem); }
.is-active .askans { opacity: 1; transform: none; transition: opacity 0.9s var(--ease) 1.6s, transform 1s var(--ease) 1.6s; }

/* a week of work, planned */
.weekviz { display: flex; flex-direction: column; justify-content: flex-end; padding: 3rem 3rem 2.6rem; }
.weekviz .bars { flex: 1; display: flex; align-items: flex-end; gap: 1.4rem; }
.weekviz .bars i { flex: 1; height: calc(var(--h) * 100%); border-radius: 1rem; background: #d2d2d7; transform-origin: 50% 100%; transform: scaleY(0.05); }
.weekviz .bars i:nth-child(3) { background: #0a84ff; }
.is-active .weekviz .bars i { transform: none; transition: transform 1.2s var(--ease); }
.is-active .weekviz .bars i:nth-child(1) { transition-delay: 1s; } .is-active .weekviz .bars i:nth-child(2) { transition-delay: 1.1s; } .is-active .weekviz .bars i:nth-child(3) { transition-delay: 1.2s; } .is-active .weekviz .bars i:nth-child(4) { transition-delay: 1.3s; } .is-active .weekviz .bars i:nth-child(5) { transition-delay: 1.4s; }
.weekviz .days { display: flex; gap: 1.4rem; margin-top: 1.4rem; }
.weekviz .days span { flex: 1; text-align: center; font-size: 1.7rem; font-weight: 600; color: var(--ink-2); }
.weekviz .days span.on { color: #0a84ff; }

/* ==========================================================================
   Ready for school Macs: bento
   ========================================================================== */
.bento { position: absolute; left: 14rem; right: 14rem; top: 35rem; height: 58rem; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 2.4rem; }
.tile { padding: 4rem; border-radius: 3rem; background: #fff; box-shadow: var(--shadow-card); display: flex; flex-direction: column; justify-content: flex-end; }
.t-wide { grid-column: span 2; }
.tico { width: 6.4rem; height: 6.4rem; margin-bottom: auto; border-radius: 1.8rem; display: grid; place-items: center; background: var(--tile); color: var(--ink); font-size: 3.2rem; }
.tile h3 { font-size: 3.6rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.024em; }
.tile p { margin-top: 1rem; font-size: 2.3rem; line-height: 1.3; font-weight: 600; color: var(--ink-2); letter-spacing: -0.012em; }
.tile p.big { margin: 0 0 auto; font-size: 10rem; line-height: 1; font-weight: 600; color: var(--ink); letter-spacing: -0.04em; }

/* ==========================================================================
   The plan: a line that draws, with Calico travelling along it
   ========================================================================== */
.track { position: absolute; left: 14rem; right: 14rem; top: 46rem; height: 40rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem; }
.track-line { position: absolute; left: 3.6rem; right: 3.6rem; top: 3.5rem; height: 0.4rem; border-radius: 99rem; background: rgba(0,0,0,0.08); overflow: hidden; }
.track-line i { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.is-active .track-line i { transform: scaleX(0.714); transition: transform 2.6s var(--ease) 0.4s; }
.track-cat { position: absolute; left: 0; top: -1.2rem; width: 9.6rem; height: 9.6rem; border-radius: 22.5%; box-shadow: 0 1rem 2.6rem rgba(0,0,0,0.2); z-index: 2; transform: translateX(-1.2rem); }
.is-active .track-cat { transform: translateX(110.8rem); transition: transform 2.6s var(--ease) 0.4s; }
.step { position: relative; padding-top: 12rem; }
.step .num { position: absolute; left: 0; top: 0; width: 7.2rem; height: 7.2rem; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 0.3rem var(--ink); font-size: 3rem; font-weight: 600; z-index: 1; }
.step h3 { font-size: 5.2rem; line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }
.step p { margin-top: 1.2rem; font-size: 3rem; line-height: 1.3; font-weight: 600; color: var(--ink-2); letter-spacing: -0.016em; }

/* ---------- close ---------- */
.legal { position: absolute; left: 0; right: 0; bottom: 4rem; text-align: center; font-size: 1.6rem; font-weight: 500; color: var(--ink-2); }

/* ---------- chrome ---------- */
.brandmark { position: fixed; left: 3.2rem; top: 3rem; z-index: 20; display: flex; align-items: center; gap: 1.2rem; font-weight: 600; font-size: 2rem; letter-spacing: -0.01em; color: var(--ink); opacity: 1; transition: opacity 0.6s; }
.brandmark img { width: 3.4rem; height: 3.4rem; border-radius: 22.5%; }
body.on-title .brandmark, body.on-end .brandmark { opacity: 0; }
.hud { position: fixed; left: 50%; bottom: 2.4rem; z-index: 20; display: flex; align-items: center; gap: 0.8rem; height: 5.4rem; padding: 0 0.8rem; border-radius: 99rem; transform: translateX(-50%); background: rgba(255,255,255,0.72); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: inset 0 0 0 0.1rem rgba(0,0,0,0.06), 0 0.8rem 3rem rgba(0,0,0,0.1); transition: opacity 0.5s, transform 0.6s var(--ease); }
body.idle .hud { opacity: 0; transform: translateX(-50%) translateY(1.6rem); pointer-events: none; }
.hud button { width: 3.8rem; height: 3.8rem; border: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--ink); font-size: 2rem; cursor: pointer; transition: background-color 0.2s; }
.hud button:hover { background: rgba(0,0,0,0.06); }
.dots { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.6rem; }
.dots i { width: 0.8rem; height: 0.8rem; border-radius: 99rem; background: rgba(0,0,0,0.2); cursor: pointer; transition: width 0.5s var(--ease), background-color 0.3s; }
.dots i.on { width: 2.8rem; background: var(--ink); }
.count { min-width: 6.4rem; text-align: center; font: 600 1.5rem/1.3 var(--font); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.hint { position: fixed; left: 50%; bottom: 10rem; z-index: 20; transform: translateX(-50%); display: flex; align-items: center; gap: 1.2rem; font-size: 1.8rem; font-weight: 500; color: var(--ink-2); opacity: 0; transition: opacity 0.8s; pointer-events: none; }
.hint.show { opacity: 1; }
.loading { position: fixed; left: 50%; bottom: 10rem; z-index: 19; transform: translateX(-50%); font-size: 1.6rem; font-weight: 500; color: var(--ink-3); transition: opacity 0.6s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.2s !important; }
}
