/* Ervo website: depth and motion layer. Loaded after design.css.
   Everything here adds the third dimension: the owl stage in the hero, lit and layered cards,
   raised tiles and buttons. Colors, type and layout stay in design.css. */

/* ---------- 1. Tokens ---------- */
:root {
  --lift-1: 0 1px 2px rgba(28, 18, 48, 0.06), 0 10px 24px -14px rgba(28, 18, 48, 0.22);
  --lift-2: 0 2px 4px rgba(28, 18, 48, 0.05), 0 22px 44px -22px rgba(28, 18, 48, 0.3), 0 44px 80px -40px rgba(109, 40, 217, 0.22);
  --lift-3: 0 4px 8px rgba(28, 18, 48, 0.06), 0 34px 70px -26px rgba(28, 18, 48, 0.4), 0 60px 120px -50px rgba(109, 40, 217, 0.35);
  --edge-top: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --edge-bottom: inset 0 -1px 0 rgba(28, 18, 48, 0.06);
  --tile-a: #ffffff; --tile-b: #ece6fb;
  --stage-pool: rgba(139, 92, 246, 0.3); --stage-line: rgba(139, 92, 246, 0.42);
  --podium-face-a: #ffffff; --podium-face-b: #efe7ff; --podium-wall-a: #e6dcfb; --podium-wall-b: #c4b1f0; --podium-rim: rgba(255, 255, 255, 0.95);
  --spot: rgba(124, 58, 237, 0.1); --glare: rgba(255, 255, 255, 0.55);
}
[data-theme="dark"] {
  --lift-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 28px -14px rgba(0, 0, 0, 0.8);
  --lift-2: 0 2px 4px rgba(0, 0, 0, 0.5), 0 26px 50px -22px rgba(0, 0, 0, 0.9), 0 0 44px -6px rgba(124, 58, 237, 0.3);
  --lift-3: 0 4px 10px rgba(0, 0, 0, 0.55), 0 40px 80px -26px rgba(0, 0, 0, 0.95), 0 0 70px -6px rgba(124, 58, 237, 0.42);
  --edge-top: inset 0 1px 0 rgba(255, 255, 255, 0.13);
  --edge-bottom: inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  --tile-a: #2a2140; --tile-b: #130e20;
  --stage-pool: rgba(150, 105, 255, 0.62); --stage-line: rgba(206, 192, 255, 0.66);
  --podium-face-a: #a48cf0; --podium-face-b: #4a3496; --podium-wall-a: #4b3a8c; --podium-wall-b: #1c1340; --podium-rim: rgba(236, 228, 255, 0.95);
  --spot: rgba(167, 139, 250, 0.14); --glare: rgba(255, 255, 255, 0.1);
}

/* ---------- 2. Layout safety: nothing decorative can widen the page ---------- */
main { overflow-x: clip; }

/* ---------- 3. The hero stage: Classic Ervo in 3D on a lit podium ---------- */
.owl-stage { --k: 0.94; position: relative; width: min(100%, 1000px); height: 410px; margin: 20px auto 0; -webkit-user-select: none; user-select: none; }
/* The pool of light the podium stands in */
.owl-stage::before { content: ""; position: absolute; left: 50%; bottom: -96px; width: 1240px; max-width: 100vw; height: 480px; transform: translateX(-50%); pointer-events: none; z-index: -1;
  background: radial-gradient(42% 44% at 50% 80%, var(--stage-pool) 0%, rgba(139, 92, 246, 0.1) 46%, rgba(139, 92, 246, 0) 72%); }

/* Two orbit rings lie flat on the floor around the podium; a point of light travels each one */
.os-ring { position: absolute; left: 50%; bottom: calc(55px * var(--k)); width: calc(var(--d) * var(--k)); height: calc(var(--d) * var(--k)); margin: 0 0 calc(var(--d) * var(--k) * -0.5) calc(var(--d) * var(--k) * -0.5); transform: scaleY(0.2); pointer-events: none; }
.os-ring::before, .os-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); }
.os-ring::before { background: var(--stage-line); opacity: 0.4; }
.os-ring::after { background: conic-gradient(from 0deg, rgba(196, 181, 253, 0) 0deg, rgba(196, 181, 253, 0) 250deg, rgba(221, 210, 255, 0.95) 340deg, #ffffff 357deg, rgba(196, 181, 253, 0) 360deg); }
:root:not([data-theme="dark"]) .os-ring::after { background: conic-gradient(from 0deg, rgba(109, 40, 217, 0) 0deg, rgba(109, 40, 217, 0) 250deg, rgba(124, 58, 237, 0.7) 340deg, #6d28d9 357deg, rgba(109, 40, 217, 0) 360deg); }
.os-ring.r1 { --d: 500px; }
.os-ring.r2 { --d: 780px; opacity: 0.6; }
html.motion .os-ring::after { animation: os-orbit 9s linear infinite; }
html.motion .os-ring.r2::after { animation-duration: 15s; animation-direction: reverse; }
@keyframes os-orbit { to { transform: rotate(360deg); } }

/* The podium: a low cylinder. The wall is drawn first, the lit top face over it. */
.os-podium { position: absolute; left: 50%; bottom: calc(34px * var(--k)); width: calc(344px * var(--k)); height: calc(82px * var(--k)); transform: translateX(-50%); pointer-events: none; }
.os-podium::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: calc(62px * var(--k)); border-radius: 0 0 50% 50% / 0 0 calc(41px * var(--k)) calc(41px * var(--k));
  background: linear-gradient(90deg, var(--podium-wall-b) 0%, var(--podium-wall-a) 22%, var(--podium-wall-a) 50%, var(--podium-wall-b) 100%);
  box-shadow: 0 26px 46px -8px var(--stage-pool), 0 12px 18px -8px rgba(0, 0, 0, 0.35); }
.os-podium::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(70% 90% at 42% 30%, var(--podium-face-a) 0%, var(--podium-face-b) 78%);
  box-shadow: inset 0 0 0 1.5px var(--podium-rim), inset 0 -10px 22px rgba(139, 92, 246, 0.35); }

/* The owl: a still picture first, the 3D canvas over it once it has loaded */
.os-owl { position: absolute; left: 50%; bottom: calc(46px * var(--k)); width: calc(420px * var(--k)); height: calc(420px * var(--k)); margin-left: calc(-210px * var(--k)); z-index: 2; }
.os-owl::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 4.6%; height: 6%; border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(10, 4, 24, 0.55), rgba(10, 4, 24, 0) 70%); z-index: -1; transition: opacity 0.3s ease; }
.os-poster { position: absolute; left: 4.5%; bottom: 3.6%; width: 91%; height: auto; transform-origin: 50% 100%; filter: drop-shadow(0 14px 18px rgba(12, 4, 30, 0.35)); transition: opacity 0.28s ease, filter 0.28s ease, transform 0.28s var(--ease-out); }
html.motion .os-poster { animation: os-rise 0.9s var(--ease-out) both; }
@keyframes os-rise { from { transform: translateY(22px) scale(0.93); } }
/* The canvas is larger than this square (js/owl3d.js sizes it), so wings and hops are not cut off; the square takes the pointer. */
.os-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; display: block; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; outline: none; }
.is-3d .os-canvas { opacity: 1; }
.os-owl { touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.is-3d .os-owl { cursor: grab; }
.is-3d .os-poster { opacity: 0; filter: blur(6px); transform: scale(0.96); }
.is-3d .os-owl::after { opacity: 0; }
.is-3d .os-owl.grabbing { cursor: grabbing; }

/* How to play with it: shown once the 3D owl is on stage, gone after the first spin or hop */
.os-hint { position: absolute; left: 50%; bottom: calc(-13px * var(--k)); z-index: 3; padding: 5px 11px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em; color: var(--text-2); background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.97); transition: opacity 0.3s ease, transform 0.3s var(--ease-out); }
.hint-on .os-hint { opacity: 1; transform: translateX(-50%); }

/* The example conversation floats around the owl as glass cards turned toward it */
.os-cards { position: absolute; inset: 0; perspective: 1500px; pointer-events: none; }
.os-card { position: absolute; width: 276px; text-align: left; font-family: var(--font); font-size: 13px; line-height: 1.42; color: var(--text); will-change: transform; }
.os-card.c1 { right: calc(50% + 206px); top: 22px; rotate: y 16deg; }
.os-card.c3 { right: calc(50% + 232px); top: 206px; width: 250px; rotate: y 20deg; }
.os-card.c2 { left: calc(50% + 208px); top: 70px; width: 280px; rotate: y -16deg; }
html.motion .os-card { animation: os-float 7s ease-in-out infinite; }
html.motion .os-card.c2 { animation-delay: -2.6s; }
html.motion .os-card.c3 { animation-delay: -4.4s; animation-duration: 8s; }
@keyframes os-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.os-in { padding: 13px 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: var(--edge-top), var(--lift-2); }
[data-theme="dark"] .os-in { border-color: var(--glass-edge); background: rgba(22, 16, 36, 0.62); }
.os-in p { margin: 0; }
.os-in p.me { width: fit-content; margin: 0 0 8px auto; padding: 8px 12px; border-radius: 16px 16px 5px 16px; color: #ffffff; background: linear-gradient(135deg, #7c4dff, #b44dff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.os-who { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.os-who img { width: 28px; height: 28px; border-radius: 50%; background: #ffffff; box-shadow: 0 0 0 1px var(--glass-line); }
.os-who b { font-size: 13.5px; }
.os-who small { margin-left: auto; font-size: 11px; color: var(--text-3); }
.os-h { display: block; margin-bottom: 6px; font-size: 13px; }
.os-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.os-row i { flex: none; width: 18px; height: 18px; border-radius: 50%; background: rgba(139, 92, 246, 0.2); color: var(--brand); font-style: normal; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
[data-theme="dark"] .os-row i { color: #d9ccff; background: rgba(139, 92, 246, 0.3); }
.os-row span { flex: 1; display: flex; justify-content: space-between; gap: 8px; }
.os-row em { font-style: normal; color: var(--text-3); white-space: nowrap; }
.os-acts { display: flex; gap: 6px; margin-top: 9px; }
.os-acts span { flex: 1; text-align: center; padding: 7px 0; border-radius: 999px; font-weight: 700; font-size: 12px; color: #ffffff; background: #7c4dff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.os-acts span.g { color: var(--text); background: transparent; box-shadow: inset 0 0 0 1px var(--glass-line); }
/* Until the motion script has started the cards wait off stage; if it never starts they show anyway */
html.motion:not(.motion-on) .os-in { animation: os-late 0.5s ease 3s both; }
@keyframes os-late { from { opacity: 0; } }

/* The sign-up plaque now sits under the podium instead of over the phone */
.show .auth { margin-top: 20px; }

@media (max-width: 1039px) {
  .os-cards { display: none; }
  .show .stage-note { display: none; }
}
@media (max-width: 760px) {
  .owl-stage { --k: 0.74; height: 324px; margin-top: 12px; }
  .os-ring.r2 { display: none; }
  .show .auth { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .os-poster, .os-canvas, .os-hint { transition: none; }
}

/* ---------- 4. Motion support (js/motion.js) ---------- */
/* Smooth scrolling (Lenis). These are its own few rules, kept here so no extra stylesheet has to load. */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
/* Headings that rise line by line: room for letters that hang below the line (g, y, p) */
.split-line-mask { padding-bottom: 0.14em; margin-bottom: -0.14em; }
/* Plan cards lean toward the pointer; the glare follows it */
.tilt-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s ease;
  background: radial-gradient(460px circle at var(--gx, 50%) var(--gy, 0%), var(--glare), transparent 62%); }
.plan-card.tilting .tilt-glare { opacity: 1; }
.plan-card.tilting { will-change: transform; }
/* Glass cards catch the light where the pointer is */
.has-spot { position: relative; }
.spot-glow { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s ease;
  background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), var(--spot), transparent 66%); }
.has-spot:hover > .spot-glow { opacity: 1; }

/* ---------- 5. Depth across the page ---------- */
/* 5a. More tokens: ambient light, film grain, deeper glass, raised keys */
:root {
  --orb-a: rgba(139, 92, 246, 0.16); --orb-b: rgba(255, 160, 120, 0.15);
  --grain-o: 0.07;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .16 0 0 0 0 .08 0 0 0 0 .31 0 0 0 .9 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --glass-shadow: 0 1px 1px rgba(42, 22, 80, 0.04), 0 8px 16px -8px rgba(42, 22, 80, 0.12), 0 28px 56px -24px rgba(42, 22, 80, 0.24);
  --glass-shadow-up: 0 2px 2px rgba(42, 22, 80, 0.04), 0 14px 24px -10px rgba(42, 22, 80, 0.16), 0 44px 80px -28px rgba(109, 40, 217, 0.34);
  --key-top: rgba(255, 255, 255, 0.55); --key-lip: rgba(30, 14, 60, 0.26); --key-drop: rgba(42, 22, 80, 0.34);
  --btn-lip: rgba(60, 20, 150, 0.55); --btn-drop: rgba(109, 40, 217, 0.5);
  --device-a: #6a6a72; --device-b: #1b1b1f; --floor: rgba(109, 40, 217, 0.3);
}
[data-theme="dark"] {
  --orb-a: rgba(124, 58, 237, 0.24); --orb-b: rgba(99, 102, 241, 0.2);
  --grain-o: 0.09;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --glass-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.45), 0 14px 28px -12px rgba(0, 0, 0, 0.85), 0 36px 70px -30px rgba(0, 0, 0, 0.95);
  --glass-shadow-up: inset 0 -1px 0 rgba(0, 0, 0, 0.45), 0 20px 36px -12px rgba(0, 0, 0, 0.9), 0 0 60px -4px rgba(139, 92, 246, 0.5);
  --key-top: rgba(255, 255, 255, 0.4); --key-lip: rgba(0, 0, 0, 0.36); --key-drop: rgba(0, 0, 0, 0.8);
  --btn-lip: rgba(40, 10, 110, 0.75); --btn-drop: rgba(124, 58, 237, 0.6);
  --device-a: #5c5c66; --device-b: #0c0c10; --floor: rgba(139, 92, 246, 0.5);
}

/* 5b. Ambient light: each section has a soft orb behind its picture, so the page is never plain ground */
section.block::after { content: ""; position: absolute; z-index: -1; pointer-events: none; top: 50%; left: 72%; width: 780px; height: 780px; margin: -390px 0 0 -390px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--orb-a), transparent); }
section.block.alt::after { left: 28%; background: radial-gradient(closest-side, var(--orb-b), transparent); }
#learn::after, section.closing::after { left: 50%; width: 1100px; height: 520px; margin: -260px 0 0 -550px; background: radial-gradient(closest-side, var(--orb-a), transparent); }
/* Film grain over the whole ground, under every section */
main { position: relative; }
main::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: var(--grain-o); background-image: var(--grain); background-size: 240px 240px; }

/* 5c. Glass cards rise when the pointer is on them */
@media (hover: hover) and (pointer: fine) {
  :root .feature, :root .only, :root .ask-card { transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out); }
  .feature:hover, .only:hover, .ask-card:hover { transform: translateY(-5px); }
  :root[data-theme] .feature:hover, :root[data-theme] .only:hover, :root[data-theme] .ask-card:hover { box-shadow: var(--edge-top), var(--glass-shadow-up); }
}
/* While a reveal or a tilt is moving a card, CSS must not ease the same property a second time */
/* It also gets its own layer for as long as it moves, so the browser slides one picture instead of repainting the card and its shadows every frame */
.gs-anim { transition: none !important; will-change: transform, opacity; }
.plan-card.tilt { transition: box-shadow 0.2s var(--ease-out); }

/* 5d. The three words: a raised, lit tile above each one */
.feature { display: block; padding: 26px 26px 28px; }
.feature .ico, :root[data-theme] .feature .ico { width: 58px; height: 58px; margin: 0 0 20px; border-radius: 18px; color: #fff;
  background: linear-gradient(160deg, var(--t1, #b197fc), var(--t2, #6d28d9));
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.5), inset 0 -4px 0 rgba(30, 8, 80, 0.35), 0 3px 0 rgba(30, 8, 80, 0.3), 0 16px 24px -8px color-mix(in srgb, var(--t2, #6d28d9) 70%, transparent);
  transform: perspective(420px) rotateX(10deg) rotateY(-14deg); transition: transform 0.45s var(--ease-out); }
.feature .ico svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 2px rgba(30, 8, 80, 0.45)); }
.feature:nth-child(2) .ico { --t1: #d8a4ff; --t2: #9333ea; }
.feature:nth-child(3) .ico { --t1: #a5b4fc; --t2: #4f46e5; }
.feature:hover .ico { transform: perspective(420px) translateY(-4px); }
.feature h3 { margin: 0 0 6px; }

/* 5e. App tiles are raised keys on a board that leans back */
.app, .app.light { box-shadow: inset 0 1.5px 0 var(--key-top), inset 0 -4px 0 var(--key-lip), 0 2px 0 var(--key-lip), 0 14px 20px -8px var(--key-drop); }
.app.blur, .app.fade { box-shadow: none; }
@media (min-width: 861px) {
  :root .apps { transform: perspective(1300px) rotateX(24deg) rotateY(16deg) rotateZ(-5deg); transform-style: preserve-3d; }
  .app:not(.blur) { translate: 0 0 22px; transition: translate 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out); }
  .app:not(.blur):hover { transform: none; translate: 0 0 46px; }
}

/* 5f. The phone, the permissions screen and the idea cards stand in the room at an angle, and turn to face you */
.phone-stand { position: relative; justify-self: center; display: grid; justify-items: center; width: 100%; }
.phone-stand::after { content: ""; position: absolute; z-index: -1; left: 50%; bottom: 14px; width: 330px; max-width: 90%; height: 60px; margin-left: -165px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--floor), transparent); filter: blur(6px); }
@media (min-width: 861px) {
  :root .phone-stand .phone { transform: perspective(1500px) rotateY(-18deg) rotateX(7deg) rotateZ(1.5deg); transition: transform 0.7s var(--ease-out), border-radius 0.3s ease; }
  :root[data-theme] .phone-stand .phone { box-shadow: 0 0 0 1px var(--device-b), inset 0 0 0 3px #111113,
    1px 0 0 var(--device-a), 2px 1px 0 var(--device-a), 4px 1px 0 #3a3a42, 6px 2px 0 #2a2a30, 8px 3px 0 var(--device-b),
    34px 46px 70px -24px rgba(0, 0, 0, 0.55), 0 0 90px -10px var(--floor); }
  :root .phone-stand:hover .phone { transform: perspective(1500px) rotateY(-5deg) rotateX(2deg); }

  :root .split .perm-mock { transform: perspective(1500px) rotateY(-13deg) rotateX(5deg); transition: transform 0.6s var(--ease-out); }
  :root .split .perm-mock:hover, :root .split .perm-mock:focus-within { transform: perspective(1500px); }

  .ideas { perspective: 1500px; }
  :root .ideas .ideas-card { transform: rotateY(14deg) rotateX(4deg) translateZ(34px); transition: transform 0.6s var(--ease-out); }
  :root .ideas .ideas-card.goals { transform: rotateY(14deg) rotateX(4deg) translateZ(-30px); }
  :root .ideas:hover .ideas-card, :root .ideas:focus-within .ideas-card { transform: translateZ(0); }
}

/* 5g. The main button is a real key: a lit top, a lip underneath, and it goes down when pressed */
:root[data-theme] .btn-primary, :root[data-theme] .ct-send {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), inset 0 -2px 0 rgba(40, 10, 110, 0.3), 0 2px 0 var(--btn-lip), 0 12px 24px -8px var(--btn-drop); }
:root[data-theme] .btn-primary:hover, :root[data-theme] .ct-send:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), inset 0 -2px 0 rgba(40, 10, 110, 0.3), 0 3px 0 var(--btn-lip), 0 18px 30px -8px var(--btn-drop); }
:root[data-theme] .btn-primary:active, :root[data-theme] .ct-send:active {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(40, 10, 110, 0.3), 0 0 0 var(--btn-lip), 0 6px 14px -8px var(--btn-drop); }

/* 5h. The demo screen and the closing line float above the ground */
:root:not([data-theme="dark"]) .stage { box-shadow: 0 0 0 1px rgba(42, 22, 80, 0.1), var(--lift-3); }
[data-theme="dark"] .stage { box-shadow: 0 0 0 1px rgba(160, 120, 255, 0.2), var(--lift-3); }
:root:not([data-theme="dark"]) .statement.closing-line { box-shadow: var(--edge-top), 0 0 0 1px rgba(109, 40, 217, 0.1), var(--lift-2); }
[data-theme="dark"] .statement.closing-line { box-shadow: var(--edge-top), 0 0 0 1px var(--glass-edge), var(--lift-2); }
.statement .inline-chip, .statement .badge-icon { filter: drop-shadow(0 8px 10px rgba(20, 8, 50, 0.3)); }
html.motion .statement .inline-chip, html.motion .statement .badge-icon { animation: chip-bob 5.2s ease-in-out infinite; }
html.motion .statement .badge-icon { animation-delay: -1.7s; }
html.motion .statement .badge-icon ~ .badge-icon { animation-delay: -3.4s; }
@keyframes chip-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }

/* 5i. Phones and tablets: lighter effects, nothing leans */
@media (max-width: 860px) {
  section.block::after, #learn::after, section.closing::after { width: 440px; height: 440px; margin: -220px 0 0 -220px; left: 50%; }
  main::before { display: none; }
  .feature .ico, :root[data-theme] .feature .ico { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html .statement .inline-chip, html .statement .badge-icon { animation: none; }
}

/* ---------- 6. Contact, Privacy and Terms: the same room, quieter ---------- */
/* A soft light in the corner and the film grain stay put while the page scrolls */
main.doc { overflow-x: visible; }
main.doc::before { position: fixed; z-index: -1; }
main.doc::after { content: ""; position: fixed; z-index: -1; pointer-events: none; top: -280px; right: -240px; width: 920px; height: 920px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--orb-a), transparent); }
/* Contact cards: a plain line icon in a flat tile; the card lifts a little under the pointer */
:root .cc-ico { width: 44px; height: 44px; border-radius: 12px; color: var(--doc-link); transform: none;
  background: color-mix(in srgb, #8b5cf6 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, #8b5cf6 28%, transparent); }
.cc-ico svg { width: 22px; height: 22px; }
:root .contact-doc h1 { margin-bottom: 12px; }
:root .contact-doc .updated { max-width: 56ch; margin-bottom: 32px; font-size: 17px; font-weight: 500; line-height: 1.6; color: color-mix(in srgb, var(--doc-text) 76%, transparent); }
:root .contact-doc .contact-card h3 { margin-top: 16px; }
:root .contact-doc .direct { margin-top: 22px; opacity: 1; color: color-mix(in srgb, var(--doc-text) 76%, transparent); }
@media (hover: hover) and (pointer: fine) {
  :root .contact-doc .contact-card { transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out); }
  :root .contact-doc .contact-card:hover { transform: translateY(-3px); }
  :root[data-theme] .contact-doc .contact-card:hover { box-shadow: var(--edge-top), var(--glass-shadow-up); }
}
/* The founder: a straight portrait, a quiet title line, and facts as a short table */
:root .contact-doc .founder { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; margin-top: 64px; padding: 36px; }
:root .contact-doc .founder .photo { width: 200px; height: 200px; border-radius: 20px; border: 0; transform: none;
  box-shadow: 0 0 0 1px var(--cg-line), 0 22px 40px -20px rgba(20, 8, 50, 0.55); }
:root .contact-doc .role { display: block; margin: 0 0 10px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  font-size: 13px; line-height: 1.3; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--doc-link); }
:root .contact-doc .role::before { content: none; }
:root .contact-doc .founder .lede { font-size: 18px; font-weight: 500; line-height: 1.55; margin-bottom: 16px; }
:root .contact-doc .facts { gap: 0 28px; margin: 24px 0 0; border-top: 1px solid var(--cg-line); }
.contact-doc .facts div { padding: 12px 0; border-bottom: 1px solid var(--cg-line); }
.contact-doc .facts dt { font-size: 12.5px; line-height: 1.3; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: color-mix(in srgb, var(--doc-text) 62%, transparent); }
.contact-doc .facts dd { margin: 3px 0 0; font-size: 15.5px; line-height: 1.4; font-weight: 600; }
:root .contact-doc .motto { margin: 26px 0 24px; padding: 2px 0 2px 18px; border-left: 2px solid #8b5cf6; border-radius: 0; background: none;
  font-size: 17px; font-weight: 500; font-style: italic; line-height: 1.55; }
@media (max-width: 760px) {
  :root .contact-doc .founder { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 48px; padding: 24px; }
  :root .contact-doc .founder .photo { width: 132px; height: 132px; border-radius: 18px; }
}

/* Privacy and Terms: a document. Numbered sections, hairlines, and a contents list that stays beside the text on wide screens */
.doc .eyebrow { margin: 0 0 12px; font-size: 13px; line-height: 1.2; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--doc-link); }
main.doc:has(> .jump) { counter-reset: sec; --rule: color-mix(in srgb, var(--doc-text) 15%, transparent); }
main.doc:has(> .jump) > h1 { margin-bottom: 12px; }
main.doc:has(> .jump) > .updated { margin: 0 0 30px; font-size: 15px; font-weight: 500; color: color-mix(in srgb, var(--doc-text) 70%, transparent); }
main.doc:has(> .jump) > h2 { counter-increment: sec; margin: 46px 0 12px; padding-top: 30px; border-top: 1px solid var(--rule); font-size: 24px; scroll-margin-top: 72px; }
main.doc:has(> .jump) > h2::before { content: counter(sec, decimal-leading-zero); display: block; margin-bottom: 8px;
  font-size: 13px; line-height: 1.2; font-weight: 700; letter-spacing: 0.09em; color: var(--doc-link); font-variant-numeric: tabular-nums; }
main.doc:has(> .jump) > h3 { margin-top: 26px; }
:root[data-theme] main.doc:has(> .jump) p.note { margin: 18px 0; padding: 14px 18px; border: 0; border-left: 3px solid #8b5cf6; border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, #8b5cf6 12%, transparent); color: var(--doc-text); font-size: 15.5px; font-weight: 500; line-height: 1.65; }
main.doc:has(> .jump) .toc { counter-reset: t; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding: 18px 20px 14px; border: 1px solid var(--rule); border-radius: 16px; }
main.doc:has(> .jump) .toc::before { content: "On this page"; grid-column: 1 / -1; margin-bottom: 6px;
  font-size: 12.5px; line-height: 1.3; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: color-mix(in srgb, var(--doc-text) 62%, transparent); }
main.doc:has(> .jump) .toc li { counter-increment: t; margin: 0; }
main.doc:has(> .jump) .toc a { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border: 0; border-radius: 0; background: none;
  font-size: 14.5px; line-height: 1.35; font-weight: 500; color: color-mix(in srgb, var(--doc-text) 80%, transparent); transition: color 0.15s ease, border-color 0.15s ease; }
main.doc:has(> .jump) .toc a::before { content: counter(t, decimal-leading-zero); flex: none; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--doc-link); font-variant-numeric: tabular-nums; }
main.doc:has(> .jump) .toc a:hover { background: none; color: var(--doc-text); }
@media (max-width: 560px) { main.doc:has(> .jump) .toc { gap: 0 16px; padding: 16px 16px 10px; } }
@media (max-width: 860px) { main.doc:has(> .jump) .toc a { align-items: center; padding: 0; } }
@media (min-width: 1100px) {
  main.doc:has(> .jump) { max-width: 1080px; padding-left: 304px; }
  main.doc:has(> .jump) > .jump { position: absolute; left: 24px; top: 62px; bottom: 96px; width: 224px; margin: 0; }
  main.doc:has(> .jump) .toc { position: sticky; top: 100px; display: block; padding: 0; border: 0; border-radius: 0; max-height: calc(100vh - 132px); overflow-y: auto; }
  main.doc:has(> .jump) .toc::before { display: block; margin-bottom: 12px; }
  main.doc:has(> .jump) .toc a { padding: 7px 0 7px 14px; border-left: 1px solid var(--rule); }
  main.doc:has(> .jump) .toc a:hover { border-left-color: var(--doc-link); }
}
@media (max-width: 860px) {
  main.doc::after { width: 460px; height: 460px; top: -160px; right: -160px; }
}

/* ---------- 7. Phones: nothing you can press is smaller than 44px ---------- */
@media (max-width: 860px) {
  .site-header .brand { min-width: 44px; min-height: 44px; }
  .site-header .btn-ghost { min-width: 44px; }
  .seg span { height: 44px; }
  .site-footer nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  .doc .toc a { display: inline-flex; align-items: center; min-height: 44px; }
}
/* The permission switches keep their size; the pressable area around each one grows to 54 by 44 */
.toggle input { inset: auto; top: -8px; left: -4px; width: calc(100% + 8px); height: calc(100% + 16px); }
/* The hero keeps the page gutter on narrow screens (its padding shorthand had dropped it), so the words and the
   sign-up card no longer touch the glass. The owl's stage still runs edge to edge. */
.hero.show { --gut: 24px; }
@media (max-width: 480px) { .hero.show { --gut: 16px; } }
@media (max-width: 1247px) { .hero.show { padding-left: var(--gut); padding-right: var(--gut); } }
@media (max-width: 760px) {
  .hero.show .owl-stage { width: calc(100% + 2 * var(--gut)); margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); }
}

/* ---------- The headline stays on one line: the changing word never drops under "Ervo, your AI" ---------- */
.show .hero-title { white-space: nowrap; text-wrap: nowrap; font-size: clamp(30px, 3.8vw, 46px); }
.show .hero-title .line { display: inline; white-space: nowrap; }
/* On a phone the longest job cannot fit beside "Ervo, your AI" at a readable size, so the word always has the second line. */
@media (max-width: 640px) {
  .show .hero-title .line { display: block; }
}
/* The word change takes its time: the old word lifts away, the new one settles in. */
.hero .rot { transition: width 1.1s cubic-bezier(0.65, 0, 0.35, 1); }
.hero .rot-item { transition: transform 0.95s cubic-bezier(0.65, 0, 0.35, 1) 0.15s, opacity 0.7s ease 0.22s, filter 0.7s ease 0.22s; }
.hero .rot-item.leave { transition: transform 0.95s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.65s ease, filter 0.65s ease; }
