/* ZD Terminal website. System fonts only: no external requests. */
:root {
  --bg: #05080f;
  --bg2: #0a1020;
  --panel: rgba(16, 24, 40, 0.62);
  --line: rgba(120, 150, 210, 0.16);
  --line2: rgba(120, 150, 210, 0.28);
  --text: #e8eef8;
  --text2: #a9b6cb;
  --muted: #74839a;
  --blue: #3d8bfd;
  --blue2: #7cb4ff;
  --green: #18c08a;
  --violet: #a99bff;
  --red: #ff6b6b;
  --radius: 18px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--blue2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: 0.88em; background: rgba(120, 150, 210, 0.12); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--blue2); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.muted { color: var(--muted); }
.up { color: var(--green); }
.down { color: var(--red); }

/* ---------- header ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: calc(14px + env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 14px; transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s; border-bottom: 1px solid transparent; }
.top.scrolled, .doc-page .top { background: rgba(5, 8, 15, 0.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .logo { width: 34px; height: 34px; filter: drop-shadow(0 4px 18px rgba(61, 139, 253, 0.35)); }
.brand b { display: block; font-size: 14px; letter-spacing: 0.22em; font-weight: 800; }
.brand b i { font-style: normal; color: var(--blue2); }
.brand b em { font-style: normal; color: var(--green); }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.logo-line { stroke-dasharray: 12; stroke-dashoffset: 12; animation: draw 1.6s 0.4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { color: var(--text2); font-size: 14px; }
.links a:hover, .links a[aria-current] { color: var(--text); text-decoration: none; }
.links a[aria-current] { box-shadow: 0 2px 0 var(--blue); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 650; font-size: 15px; color: var(--text); border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.03); transition: transform 0.2s, box-shadow 0.2s, background 0.2s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); background: rgba(255, 255, 255, 0.07); }
.btn.primary { border: 0; color: #fff; background: linear-gradient(120deg, #3d8bfd, #6a7dff 55%, #18c08a); background-size: 180% 100%; box-shadow: 0 10px 34px -10px rgba(61, 139, 253, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25); animation: sheen 6s ease-in-out infinite; }
.btn.primary:hover { box-shadow: 0 14px 44px -10px rgba(61, 139, 253, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
@keyframes sheen { 50% { background-position: 100% 0; } }
.btn.small { padding: 9px 16px; font-size: 13.5px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(110px + env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 90px; overflow: hidden; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); opacity: 0.55; }
#tape { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.9; mask-image: linear-gradient(90deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.25) 38%, #000 62%); -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.25) 38%, #000 62%); }
.aurora { position: absolute; inset: -20% -10% auto; height: 120%; z-index: -3; filter: blur(70px); opacity: 0.75; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 18s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 46vw; height: 46vw; left: 2%; top: 4%; background: radial-gradient(circle, rgba(61, 139, 253, 0.55), transparent 65%); }
.aurora span:nth-child(2) { width: 38vw; height: 38vw; right: 4%; top: 16%; background: radial-gradient(circle, rgba(24, 192, 138, 0.38), transparent 65%); animation-duration: 22s; animation-delay: -6s; }
.aurora span:nth-child(3) { width: 34vw; height: 34vw; left: 38%; top: 40%; background: radial-gradient(circle, rgba(169, 155, 255, 0.35), transparent 65%); animation-duration: 26s; animation-delay: -12s; }
@keyframes drift { to { transform: translate3d(6vw, -4vw, 0) scale(1.12); } }
.hero-inner { width: 100%; max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(16, 24, 40, 0.6); font-size: 13px; color: var(--text2); letter-spacing: 0.04em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(24, 192, 138, 0.7); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(24, 192, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(24, 192, 138, 0); } }
h1 { margin: 0; font-size: clamp(44px, 6.4vw, 88px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 820; }
.grad { background: linear-gradient(100deg, #7cb4ff 0%, #18c08a 45%, #a99bff 80%, #7cb4ff 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 9s linear infinite; }
@keyframes flow { to { background-position: 220% 0; } }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--text2); max-width: 600px; margin: 22px 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 28px 0 0; color: var(--muted); font-size: 13.5px; }
.pills li::before { content: '✓'; color: var(--green); margin-right: 7px; font-weight: 700; }

/* device stage */
.stage { position: relative; height: clamp(360px, 42vw, 560px); perspective: 1600px; }
.device { position: absolute; border-radius: 16px; overflow: hidden; border: 1px solid var(--line2); background: #070b12; box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.03), 0 0 80px -20px rgba(61, 139, 253, 0.45); transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); will-change: transform; }
.laptop { width: 100%; left: 0; top: 4%; transform: rotateY(-16deg) rotateX(7deg) rotateZ(1deg); }
.laptop .bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #0c1322; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.laptop .bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3550; }
.laptop .bar i:nth-child(1) { background: #ff5f57; } .laptop .bar i:nth-child(2) { background: #febc2e; } .laptop .bar i:nth-child(3) { background: #28c840; }
.laptop .bar span { margin-left: 8px; }
.phone { width: 30%; right: -2%; bottom: -6%; border-radius: 34px; border: 6px solid #1a2233; transform: rotateY(-10deg) rotateX(4deg) translateZ(80px); box-shadow: 0 60px 120px -30px rgba(0, 0, 0, 0.9), 0 0 60px -10px rgba(24, 192, 138, 0.35); }
.phone img { border-radius: 26px; }
.chip { position: absolute; z-index: 3; display: flex; flex-direction: column; padding: 10px 14px; border-radius: 14px; background: rgba(13, 20, 34, 0.78); border: 1px solid var(--line2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8); font-size: 13px; }
.chip b { font-size: 13.5px; }
.chip span { color: var(--muted); font-size: 12px; }
.c1 { left: -4%; top: 2%; }
.c2 { left: 6%; bottom: 4%; animation-delay: -2s !important; }
.c3 { right: 26%; top: -4%; animation-delay: -4s !important; }
.float { animation: bob 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid var(--line2); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--text2); animation: wheel 1.8s infinite; }
@keyframes wheel { to { transform: translateY(14px); opacity: 0; } }

/* marquee */
.marquee { border-block: 1px solid var(--line); background: rgba(10, 16, 32, 0.7); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee span { padding: 16px 28px; color: var(--text2); font-size: 14px; letter-spacing: 0.04em; white-space: nowrap; }
.marquee span::after { content: '◆'; margin-left: 56px; color: var(--blue); font-size: 9px; vertical-align: 2px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: clamp(80px, 11vw, 140px) clamp(16px, 4vw, 48px) 0; }
.kicker { margin: 0 0 12px; color: var(--blue2); font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
h2 { margin: 0 0 40px; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; max-width: 900px; }
h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.card { position: relative; padding: 26px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; }
.card p { margin: 0; color: var(--text2); font-size: 15.5px; }
.spot::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 180, 255, 0.14), transparent 45%); }
.spot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 180, 255, 0.7), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.spot:hover::before, .spot:hover::after { opacity: 1; }
.ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 18px; font-size: 22px; color: var(--blue2); background: linear-gradient(135deg, rgba(61, 139, 253, 0.25), rgba(24, 192, 138, 0.12)); border: 1px solid var(--line2); }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.bento .big { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; }
.bento .wide { grid-column: span 2; }
.mini-plan { margin-top: auto; padding: 16px; border-radius: 14px; background: rgba(5, 8, 15, 0.7); border: 1px solid var(--line); font-size: 14px; display: grid; gap: 10px; }
.mini-plan .row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; color: var(--muted); }
.mini-plan .row b { color: var(--text); font-family: var(--mono); }
.mini-plan .row b.down { color: var(--red); } .mini-plan .row b.up { color: var(--green); }
.tag { margin-left: 8px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: rgba(169, 155, 255, 0.14); color: var(--violet); }
.tag.n { background: rgba(255, 255, 255, 0.06); color: var(--text2); }
.mini-plan .bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.mini-plan .bar i { display: block; height: 100%; width: 45%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 3px; transform-origin: left; animation: grow 1.6s ease-out both; }
@keyframes grow { from { transform: scaleX(0); } }
.mini-plan small { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stats div { padding: 26px; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: clamp(34px, 4vw, 52px); font-weight: 800; letter-spacing: -0.03em; background: linear-gradient(180deg, #fff, #9bb6dd); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 14px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.steps .n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; margin-bottom: 16px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--blue), var(--green)); box-shadow: 0 8px 24px -8px rgba(61, 139, 253, 0.8); }
.devices { margin-top: 48px; perspective: 1800px; }
.devices img { border-radius: 22px; border: 1px solid var(--line2); box-shadow: 0 60px 140px -40px rgba(0, 0, 0, 0.9), 0 0 100px -30px rgba(61, 139, 253, 0.5); transform: rotateX(12deg) scale(0.94); transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.devices.in img { transform: rotateX(0) scale(1); }
.company .glow { padding: clamp(28px, 5vw, 56px); text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(61, 139, 253, 0.22), transparent 60%), var(--panel); border-color: var(--line2); }
.company h2 { margin: 0 auto 18px; }
.company p { max-width: 820px; margin: 0 auto 26px; font-size: 17px; }
.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.res { color: var(--text); transition: transform 0.25s; }
.res:hover { text-decoration: none; transform: translateY(-3px); }
.res span { display: inline-block; margin-top: 18px; color: var(--blue2); font-weight: 650; font-size: 14px; }

/* ---------- footer ---------- */
.foot { margin-top: clamp(90px, 12vw, 150px); border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(10, 16, 32, 0.8)); padding: 56px clamp(16px, 4vw, 48px) calc(32px + env(safe-area-inset-bottom)); }
.foot-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid p { color: var(--muted); font-size: 14px; margin: 14px 0 0; max-width: 360px; }
.foot h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text2); }
.foot-grid > div > a:not(.brand) { display: block; color: var(--muted); font-size: 14px; padding: 3px 0; }
.foot-grid > div > a:not(.brand):hover { color: var(--text); }
.fine { max-width: 1200px; margin: 44px auto 0; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }

/* ---------- document pages ---------- */
.doc { max-width: 820px; margin: 0 auto; padding: calc(130px + env(safe-area-inset-top)) clamp(18px, 4vw, 32px) 0; }
.doc.wide { max-width: 1000px; }
.doc.center { text-align: center; min-height: 60vh; }
.doc h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 12px; }
.doc .meta { color: var(--muted); margin: 0 0 32px; }
.doc h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 44px 0 12px; letter-spacing: -0.015em; }
.doc p, .doc li { color: var(--text2); }
.doc li { margin: 6px 0; }
.doc b { color: var(--text); }
.doc .summary { margin: 8px 0 12px; border-color: var(--line2); background: radial-gradient(ellipse at 0% 0%, rgba(61, 139, 253, 0.16), transparent 60%), var(--panel); }
.doc .summary h2 { margin: 0 0 8px; font-size: 18px; }
.doc .summary ul { margin: 0; padding-left: 20px; }
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); margin: 18px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 650; }
tr:last-child td { border-bottom: 0; }
td { color: var(--text2); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.timeline { list-style: none; padding: 0; margin: 20px 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 92px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--blue), var(--green), var(--violet)); opacity: 0.6; }
.timeline li { display: grid; grid-template-columns: 80px 1fr; gap: 40px; margin: 0 0 26px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 87px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--blue2); box-shadow: 0 0 14px rgba(124, 180, 255, 0.6); }
.timeline time { color: var(--blue2); font-weight: 700; font-size: 14px; text-align: right; padding-top: 2px; }
.timeline h3 { margin: 0 0 4px; }
.timeline p { margin: 0; }
.numbered li { margin: 12px 0; }
details.card { padding: 16px 20px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 650; color: var(--text); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; float: right; color: var(--blue2); font-size: 20px; line-height: 1; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 10px !important; }

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding-bottom: 110px; }
  .scroll-hint { display: none; }
  .stage { height: 64vw; max-height: 520px; margin-top: 10px; }
  .links { display: none; }
  .top .btn { margin-left: auto; }
  .why-grid, .steps, .res-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento .big, .bento .wide { grid-column: auto; grid-row: auto; }
  .grid2 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .chip { font-size: 11px; padding: 7px 10px; }
  .chip b { font-size: 11.5px; } .chip span { font-size: 10.5px; }
  .c3 { display: none; }
  .timeline::before { left: 72px; }
  .timeline li { grid-template-columns: 60px 1fr; gap: 26px; }
  .timeline li::before { left: 67px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .logo-line { stroke-dashoffset: 0; }
}
