/* ---------- Tokens (aligned with the CircuitCraft app) ---------- */
:root, [data-theme="light"] {
  --bg: #f6f7f9;
  --bg-2: #eef2f8;
  --card: #ffffff;
  --line: #dde5f0;
  --text: #15171c;
  --muted: #646b7a;
  --accent: #4f86e0;
  --accent-deep: #3f6cc4;
  --accent-2: #ee8a1f;
  --accent-glow: rgba(79, 134, 224, .35);
  --tint: #e3edfc;
  --lav: #ebe7fd;
  --lav-line: #cdc3f7;
  --lav-text: #5a3fc0;
  --glass: rgba(255, 255, 255, .7);
  --shade: 246, 247, 249;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #070a12;
  --bg-2: #0b1120;
  --card: #101827;
  --line: rgba(173, 196, 234, .14);
  --text: #f5f7fc;
  --muted: #9da9bd;
  --accent: #69a1ff;
  --accent-deep: #4f86e0;
  --accent-2: #ff9b42;
  --accent-glow: rgba(107, 155, 255, .4);
  --tint: rgba(107, 155, 255, .14);
  --lav: rgba(139, 115, 255, .16);
  --lav-line: rgba(160, 140, 255, .45);
  --lav-text: #c4b6ff;
  --glass: rgba(255, 255, 255, .08);
  --shade: 7, 10, 18;
  color-scheme: dark;
}
:root {
  --font-head: "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --radius: 22px;
  --gutter: 20px;
  --maxw: 1080px;
  --hero-grad: linear-gradient(145deg, rgba(5, 10, 28, .9) 0%, rgba(21, 47, 105, .72) 48%, rgba(10, 87, 111, .66) 100%);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background .4s, color .4s; }
[data-theme="dark"] body { background: radial-gradient(80% 24% at 50% 0%, rgba(65, 118, 213, .11), transparent 72%), var(--bg); }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em; line-height: 1.08; margin: 0; }
em { font-style: italic; color: var(--accent-2); }
p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kicker { display: inline-block; font: 800 .74rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: .7em 1.2em; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); }
.kicker--accent { color: var(--accent); background: var(--tint); border-color: transparent; }
.kicker .sep { margin: 0 .5em; }
.title { font-size: clamp(2rem, 6vw, 3.6rem); text-align: center; margin: 1rem auto 0; max-width: 16ch; }
.section__sub { color: var(--muted); text-align: center; max-width: 46ch; margin: 1.2rem auto 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: 800 1rem/1 var(--font-body); padding: 1.05em 1.6em; border-radius: 999px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .25s, background .25s, border-color .25s; white-space: nowrap; color: var(--text); }
.btn:active { transform: scale(.98); }
.btn--primary { color: #fff; background: linear-gradient(180deg, #6a9bf0, var(--accent)); box-shadow: 0 10px 30px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.3); }
.btn--primary:hover { box-shadow: 0 14px 40px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.3); }
.btn--outline { border: 2px solid var(--line); background: var(--card); }
.btn--outline:hover { border-color: var(--muted); }
.btn--glass { background: var(--glass); border-color: var(--line); backdrop-filter: blur(12px); }
.btn--glass svg { fill: none; stroke: currentColor; stroke-width: 2; }
.btn--glass svg .fill { fill: currentColor; stroke: none; }
.btn--sm { padding: .7em 1.1em; font-size: .9rem; }
.btn--wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- Header ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 60; display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled, .nav.is-open { background: rgba(var(--shade), .85); backdrop-filter: blur(16px) saturate(1.4); border-color: var(--line); }
.nav:not(.is-scrolled):not(.is-open) { --text: #fff; --line: rgba(255, 255, 255, .3); --glass: rgba(255, 255, 255, .14); color: var(--text); }
.nav:not(.is-scrolled):not(.is-open) .logo__c1 { color: #fff; }
.nav:not(.is-scrolled):not(.is-open) .logo__mark { filter: brightness(0) invert(1); }
.logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font: 900 1.15rem/1 var(--font-head); letter-spacing: .01em; }
.logo__mark { width: 32px; height: 32px; flex: none; object-fit: contain; }
.logo__c1 { color: #5b8def; transition: color .3s; }
.logo__c2 { color: var(--accent-2); }
.nav__actions { display: flex; gap: .5rem; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--text); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(10px); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-btn path { transition: transform .25s, opacity .2s; transform-origin: 12px 12px; }
.i-moon { fill: currentColor !important; stroke: none !important; }
[data-theme="dark"] .i-sun, [data-theme="light"] .i-moon { display: none; }
.nav.is-open .m1 { transform: translateY(5px) rotate(45deg); }
.nav.is-open .m2 { opacity: 0; }
.nav.is-open .m3 { transform: translateY(-5px) rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 55; background: rgba(var(--shade), .96); backdrop-filter: blur(20px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem; animation: menuIn .3s ease; }
.menu a:not(.btn) { font: 500 clamp(1.6rem, 6vw, 2.4rem)/1 var(--font-head); text-decoration: none; letter-spacing: -.02em; }
.menu a:not(.btn):hover { color: var(--accent); }
.menu .btn { margin-top: 1rem; }
@keyframes menuIn { from { opacity: 0; } }

/* ---------- Hero ---------- */
/* Video sections stay dark in both themes so the footage reads well. */
.hero, .public { --shade: 7, 15, 33; --text: #fff; --muted: rgba(255, 255, 255, .8); --line: rgba(255, 255, 255, .3); --glass: rgba(255, 255, 255, .1); --tint: rgba(255, 255, 255, .14); --accent: #fff; --accent-2: #ffad5c; color: var(--text); background: #081027; }
.hero .kicker, .public .kicker { color: #fff; }
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; isolation: isolate; padding: 110px var(--gutter) 90px; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; opacity: .78; filter: saturate(1.08) contrast(1.08); transform: scale(1.1); animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.22) translateX(-2%); } }
.hero__shade { position: absolute; inset: 0; z-index: -2; background: radial-gradient(circle at 14% 16%, rgba(105,161,255,.16) 0 17%, transparent 17.2%), radial-gradient(circle at 88% 84%, rgba(255,155,66,.1) 0 24%, transparent 24.2%), linear-gradient(180deg, rgba(3,7,18,.12), rgba(3,7,18,.34)), var(--hero-grad); }
.hero__motion { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .7; transform: translate3d(var(--hero-shift-x, 0), var(--hero-shift-y, 0), 0); transition: transform .8s var(--ease-out); }
.hero__motion svg { width: 100%; height: 100%; overflow: visible; }
.hero__trace { fill: none; stroke: rgba(143, 188, 255, .48); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: .12 .055; animation: circuitFlow 5.5s linear infinite; }
.hero__trace--two { stroke: rgba(255, 174, 92, .48); animation-duration: 6.8s; animation-direction: reverse; }
.hero__trace--three { stroke: rgba(78, 220, 190, .38); animation-duration: 7.4s; }
.hero__trace--four { stroke: rgba(222, 97, 229, .36); animation-duration: 6.2s; animation-direction: reverse; }
.hero__nodes circle { fill: #fff; filter: drop-shadow(0 0 8px #69a1ff); animation: nodePulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero__nodes circle:nth-child(2) { animation-delay: -.7s; fill: #ffad5c; }
.hero__nodes circle:nth-child(3) { animation-delay: -1.3s; fill: #4edcbe; }
.hero__nodes circle:nth-child(4) { animation-delay: -1.8s; fill: #de61e5; }
@keyframes circuitFlow { to { stroke-dashoffset: -1; } }
@keyframes nodePulse { 50% { opacity: .35; transform: scale(.55); } }
.hero__inner { position: relative; z-index: 2; width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; transform: translate3d(var(--hero-copy-x, 0), var(--hero-copy-y, 0), 0); transition: transform .9s var(--ease-out); }
.hero__title { font-size: clamp(3.4rem, 13vw, 7.5rem); font-weight: 900; margin: 1.3rem 0 1.2rem; }
.hero__title .line { display: block; overflow: hidden; padding: 0 .08em .06em; }
.hero__title .line > span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease-out) .1s forwards; }
.hero__title .line:nth-child(2) > span { animation-delay: .25s; }
@keyframes rise { to { transform: none; } }
.hero__sub { color: var(--muted); font-size: 1.05rem; max-width: 40ch; animation: fade 1s .5s both; }
.hero__sub { color: rgba(255,255,255,.88) !important; }
.hero .kicker { animation: fade 1s both; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } }
.hero .btn--primary { background: #fff; color: #2e5db2; box-shadow: 0 12px 30px -10px rgba(10, 30, 80, .5); }
.hero .btn--outline, .public .btn--glass { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); color: #fff; }
.hero__ctas { width: 100%; max-width: 420px; display: grid; gap: .7rem; margin-top: 2.2rem; animation: fade 1s .7s both; }
.hero__row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.hero__row .btn { padding-inline: .8em; }
.film-label { position: absolute; z-index: 2; right: var(--gutter); bottom: 22px; display: inline-flex; align-items: center; gap: .55em; background: none; border: 0; color: var(--muted); font: 500 .62rem/1 var(--font-body); letter-spacing: .28em; text-transform: uppercase; cursor: pointer; padding: .6em 0; }
.film-dot { width: 7px; height: 7px; border-radius: 50%; background: #5ee08f; box-shadow: 0 0 10px #5ee08f; animation: pulse 1.6s infinite; }
.film-label.is-paused .film-dot { background: var(--muted); box-shadow: none; animation: none; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Sections ---------- */
.section { padding: clamp(5rem, 12vw, 8.5rem) var(--gutter); text-align: center; max-width: var(--maxw); margin: 0 auto; }

/* ---------- Carousel ---------- */
.carousel { position: relative; margin-top: 2.6rem; }
.carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { flex: 0 0 100%; scroll-snap-align: center; }
.dots { display: flex; justify-content: center; gap: .15rem; margin-top: 1.6rem; }
.dots button { position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; transition: width .3s; }
.dots button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 99px; background: var(--line); transform: translate(-50%, -50%); transition: width .3s, background .3s; }
[data-theme="dark"] .dots button::after { background: rgba(255,255,255,.18); }
.dots button.is-active { width: 32px; }
.dots button.is-active::after { width: 22px; background: var(--accent); }
.arrows { display: flex; justify-content: center; gap: .8rem; margin-top: 1.8rem; }
.arrow { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--accent); background: transparent; color: var(--accent); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.arrow:hover { background: var(--accent); color: #fff; }
.arrow svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Feature slides */
.feature { padding: 1rem var(--gutter) 0; display: flex; flex-direction: column; align-items: center; }
.glyph { width: min(240px, 70vw); height: auto; fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 8px 18px var(--accent-glow)); }
.glyph .speed { stroke: var(--accent-2); opacity: .8; stroke-width: 3; }
.feature.is-active .glyph .speed { animation: speed 1.2s ease-out infinite; }
@keyframes speed { 0% { transform: translateX(10px); opacity: 0; } 40% { opacity: .6; } 100% { transform: translateX(-10px); opacity: 0; } }
.feature .glyph > :not(.speed) { stroke-dasharray: 180; stroke-dashoffset: 180; opacity: .22; }
.feature.is-active .glyph > :not(.speed) { animation: glyphDraw .85s var(--ease-out) forwards; }
.feature.is-active .glyph { animation: glyphLift .9s var(--ease-out) both; }
@keyframes glyphDraw { 65% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes glyphLift { from { opacity: 0; transform: translate3d(22px, 12px, 0) scale(.92); filter: blur(7px) drop-shadow(0 8px 18px var(--accent-glow)); } }
.feature__name { font: 900 .8rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 1.8rem 0 1rem; }
.feature p { color: var(--muted); max-width: 34ch; font-size: 1.02rem; }
.feature.is-active .feature__name, .feature.is-active p { animation: featureCopy .65s var(--ease-out) .16s both; }
@keyframes featureCopy { from { opacity: 0; transform: translateY(12px); } }

/* Part cards */
.carousel--cards { margin-inline: calc(50% - 50vw); }
.carousel--cards .carousel__track { gap: 1rem; padding: 0 calc(50% - min(270px, 42vw)); scroll-padding: 0 calc(50% - min(270px, 42vw)); }
.carousel--cards .carousel__track > * { flex: 0 0 min(540px, 84vw); }
.part-card { background: var(--card); border: 2px solid var(--line); border-radius: 26px; box-shadow: 0 10px 30px -18px rgba(30, 60, 120, .25); padding: 1rem 1rem 1.8rem; display: flex; flex-direction: column; align-items: center; gap: .55rem; opacity: .4; transform: scale(.94); transition: opacity .4s, transform .4s; }
.part-card.is-active { opacity: 1; transform: none; }
.part-card__img { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; margin-bottom: 1.1rem; background: var(--bg-2); }
.part-card__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.4); }
.part-card h3 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-top: .2rem; }
.part-card p:not(.kicker) { color: var(--muted); max-width: 42ch; }
.part-card__lesson { font: 800 .82rem var(--font-body); color: var(--lav-text) !important; background: var(--lav); border: 1px solid var(--lav-line); padding: .45em 1em; border-radius: 999px; margin-top: .5rem; }

/* ---------- Robot product stage ---------- */
.robot-stage { position: relative; width: min(980px, 100%); margin: clamp(3rem, 7vw, 5.5rem) auto 4.5rem; opacity: 0; transform: translateY(48px) scale(.97); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); }
.robot-stage.is-in { opacity: 1; transform: none; }
.robot-stage__glow { position: absolute; inset: -18%; z-index: -1; background: radial-gradient(circle at 50% 55%, rgba(79,134,224,.2), transparent 60%); filter: blur(18px); }
.robot-stage__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid rgba(142, 178, 231, .24); border-radius: 30px; background: #f4f4f1; box-shadow: 0 40px 100px -56px rgba(71, 128, 226, .8), 0 28px 70px -46px #000; }
.robot-stage__media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.06), transparent 55%), radial-gradient(circle at 50% 50%, transparent 55%, rgba(5,9,20,.16)); }
.robot-stage__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 53%; transform: scale(1.04); transition: transform 1.8s var(--ease-out), filter 1.2s; }
.robot-stage.is-in .robot-stage__media img { transform: scale(1); }
.robot-stage__scan { position: absolute; inset: 0 auto 0 -30%; z-index: 2; width: 24%; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(95,157,255,.1), rgba(255,255,255,.54), rgba(79,221,191,.12), transparent); transform: skewX(-12deg); mix-blend-mode: screen; animation: robotScan 5.8s ease-in-out 1.2s infinite; }
@keyframes robotScan { 0%, 18% { left: -30%; opacity: 0; } 28% { opacity: 1; } 62%, 100% { left: 112%; opacity: 0; } }
.robot-pin { position: absolute; z-index: 3; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .7rem; align-items: center; min-width: 150px; padding: .75rem .9rem; text-align: left; color: #fff; background: rgba(6, 12, 26, .82); border: 1px solid rgba(126, 173, 255, .34); border-radius: 15px; box-shadow: 0 14px 34px -18px #000; backdrop-filter: blur(12px); opacity: 0; transform: translateY(14px) scale(.94); transition: opacity .6s var(--ease-out), transform .75s var(--ease-out), border-color .25s; }
.robot-stage.is-in .robot-pin { opacity: 1; transform: none; }
.robot-stage.is-in .robot-pin--brain { transition-delay: .14s; }
.robot-stage.is-in .robot-pin--power { transition-delay: .28s; }
.robot-stage.is-in .robot-pin--move { transition-delay: .42s; }
.robot-pin:hover { border-color: var(--accent); }
.robot-pin > span { grid-row: 1 / 3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #07101f; background: var(--accent); font-size: .68rem; font-weight: 900; }
.robot-pin strong { align-self: end; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.robot-pin small { align-self: start; color: rgba(255,255,255,.64); font-size: .72rem; }
.robot-pin--sensor { left: 3%; top: 44%; }
.robot-pin--brain { left: 27%; top: 20%; }
.robot-pin--power { right: 6%; top: 23%; }
.robot-pin--move { right: 2%; bottom: 9%; }

/* ---------- App story ---------- */
.app-story { position: relative; isolation: isolate; max-width: var(--maxw); }
.app-story::before { content: ""; position: absolute; z-index: -2; inset: 0 50%; width: 100vw; transform: translateX(-50%); background: radial-gradient(60% 42% at 50% 45%, rgba(79,134,224,.17), transparent 74%), linear-gradient(180deg, transparent, var(--bg-2) 16%, var(--bg-2) 84%, transparent); }
.app-stage { --app-tilt-x: 0deg; --app-tilt-y: 0deg; display: grid; place-items: center; min-height: clamp(390px, 56vw, 620px); margin: clamp(3rem, 7vw, 5rem) calc(50% - 50vw) 2rem; perspective: 1400px; opacity: 0; transition: opacity .7s ease; }
.app-stage.is-in { opacity: 1; }
.app-shot { grid-area: 1 / 1; position: relative; width: min(820px, 68vw); overflow: hidden; border: 1px solid rgba(160, 190, 240, .24); border-radius: 20px; background: #fff; box-shadow: 0 36px 90px -48px #000; opacity: 0; transform: translateY(54px) scale(.82); transition: opacity .8s var(--ease-out), transform 1s var(--ease-out), filter .5s; will-change: transform; }
.app-shot img { width: 100%; height: auto; }
.app-shot figcaption { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: .55rem; padding: .55rem .8rem; color: #fff; background: rgba(7,12,24,.84); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; backdrop-filter: blur(10px); font-size: .76rem; font-weight: 800; box-shadow: 0 10px 24px -14px #000; }
.app-shot figcaption span { color: #86b2ff; font-size: .66rem; letter-spacing: .12em; }
.app-stage.is-in .app-shot--home { opacity: .72; transform: translate(-22%, 9%) rotate(-7deg) scale(.84); transition-delay: .05s; }
.app-stage.is-in .app-shot--build { opacity: .72; transform: translate(22%, 10%) rotate(7deg) scale(.84); transition-delay: .16s; }
.app-stage.is-in .app-shot--code { z-index: 3; opacity: 1; transform: translateY(-4%) rotateX(var(--app-tilt-x)) rotateY(var(--app-tilt-y)); transition-delay: .28s; box-shadow: 0 50px 120px -58px #000, 0 22px 70px -42px rgba(79,134,224,.8); }
.app-stage:hover .app-shot--home, .app-stage:hover .app-shot--build { opacity: .9; filter: saturate(1.06); }
.app-steps { display: grid; gap: .8rem; margin-top: 1rem; text-align: left; }
.app-step { padding: 1.25rem; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--card) 86%, transparent); opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out), border-color .25s; }
.app-step.is-in { opacity: 1; transform: none; }
.app-step:nth-child(2) { transition-delay: .12s; }
.app-step:nth-child(3) { transition-delay: .24s; }
.app-step:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.app-step span { display: block; margin-bottom: .45rem; color: var(--accent); font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.app-step p { color: var(--muted); font-size: .92rem; }
@media (min-width: 760px) { .app-steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Building in public ---------- */
.public { position: relative; min-height: min(80svh, 720px); margin: 0 var(--gutter); border-radius: 32px; max-width: calc(var(--maxw) + 120px); margin-inline: auto; width: calc(100% - 2 * var(--gutter)); display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; isolation: isolate; padding: 6rem var(--gutter); }
.public__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.3) rotate(-3deg); }
.public__shade { position: absolute; inset: 0; z-index: -1; background: var(--hero-grad); }
.public__inner { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.public .title { margin: 0; max-width: 18ch; }

/* ---------- Waitlist ---------- */
.join__mark { width: 96px; height: 96px; margin: 0 auto 2rem; filter: drop-shadow(0 10px 30px var(--accent-glow)); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.waitlist { max-width: 440px; margin: 2.2rem auto 0; display: grid; gap: .8rem; position: relative; }
.waitlist--external .btn { width: 100%; }
.waitlist__note { color: var(--muted); font-size: .84rem; text-align: center; }

/* ---------- FAQ ---------- */
.faq { max-width: 640px; margin: 2.4rem auto 0; display: grid; gap: .7rem; text-align: left; }
.faq details { background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 0 1.2rem; transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 0; font-weight: 800; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 1.25rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 3.5rem var(--gutter) max(2.5rem, env(safe-area-inset-bottom)); text-align: center; display: grid; gap: 1.2rem; justify-items: center; }
.logo--big { font-size: clamp(1.8rem, 7vw, 2.6rem); gap: .7rem; }
.logo--big .logo__mark { width: 52px; height: 52px; }
.footer__tag { font: italic 800 .95rem var(--font-head); color: var(--muted); letter-spacing: .06em; margin-top: .4rem; }
.footer__about { color: var(--muted); font-size: .85rem; max-width: 46ch; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; font-size: .85rem; }
.footer__links a { color: var(--muted); text-decoration: none; }
.footer__links a:hover { color: var(--text); }
.footer__copy { color: var(--muted); font-size: .78rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero__motion { opacity: .42; }
  .robot-stage { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
  .robot-stage__glow, .robot-stage__media { grid-column: 1 / -1; }
  .robot-stage__media { aspect-ratio: 4 / 3; border-radius: 22px; }
  .robot-pin { position: relative; inset: auto; min-width: 0; padding: .7rem; }
  .robot-pin > span { width: 29px; height: 29px; }
  .robot-pin strong { font-size: .72rem; }
  .robot-pin small { font-size: .66rem; }
  .app-stage { min-height: 330px; margin-top: 2.6rem; }
  .app-shot { width: 92vw; border-radius: 14px; }
  .app-shot figcaption { left: 8px; bottom: 8px; padding: .45rem .65rem; font-size: .67rem; }
  .app-stage.is-in .app-shot--home { transform: translate(-10%, 16%) rotate(-5deg) scale(.82); }
  .app-stage.is-in .app-shot--build { transform: translate(10%, 17%) rotate(5deg) scale(.82); }
  .app-stage.is-in .app-shot--code { transform: translateY(-9%) rotateX(var(--app-tilt-x)) rotateY(var(--app-tilt-y)); }
}
@media (max-width: 380px) {
  .hero__row { grid-template-columns: 1fr; }
  .robot-stage { grid-template-columns: 1fr; }
  .robot-stage__glow, .robot-stage__media { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .hero__title .line > span { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .hero__motion, .robot-stage__scan { display: none; }
  .feature .glyph > :not(.speed) { stroke-dashoffset: 0; opacity: 1; }
  .robot-stage, .robot-pin, .app-stage, .app-shot, .app-step { opacity: 1; }
  .robot-stage, .robot-pin, .app-step { transform: none; }
  .app-shot { will-change: auto; }
}
