/* CoreStone Studio — shared styles */
:root {
  --bg: #05070d; --bg-2: #0a0e1a;
  --surface: rgba(255,255,255,0.04); --surface-2: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.09);
  --text: #e8ecf5; --muted: #9aa4bd;
  --indigo: #6366f1; --violet: #a855f7; --cyan: #22d3ee;
  --grad: linear-gradient(120deg, var(--cyan) 0%, var(--indigo) 50%, var(--violet) 100%);
  --radius: 18px; --max: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--indigo); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Background layers */
#neural-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: 0.55; }
.bg-grid {
  position: fixed; inset: 0; z-index: -3;
  background-image: linear-gradient(rgba(99,102,241,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
.orb { position: fixed; border-radius: 50%; filter: blur(110px); z-index: -4; opacity: 0.45; pointer-events: none; }
.orb-1 { width: 520px; height: 520px; background: var(--indigo); top: -160px; left: -120px; }
.orb-2 { width: 460px; height: 460px; background: var(--violet); top: 30%; right: -180px; opacity: 0.3; }
.orb-3 { width: 380px; height: 380px; background: var(--cyan); bottom: -160px; left: 30%; opacity: 0.2; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(5,7,13,0.65); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.2px; }
.brand svg { width: 30px; height: 30px; }
.brand small { font-weight: 500; color: var(--muted); margin-left: 2px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; font-size: 0.94rem; color: var(--muted); }
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; transition: transform .2s, box-shadow .2s, background .2s; cursor: pointer; border: 0; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px -8px rgba(99,102,241,0.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px -8px rgba(168,85,247,0.8); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

/* Hero */
.hero { padding: 120px 0 90px; text-align: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(99,102,241,0.4); background: rgba(99,102,241,0.1); font-family: var(--mono); font-size: 0.78rem; color: #c7d2fe; letter-spacing: 0.4px; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); line-height: 1.05; letter-spacing: -0.03em; margin: 26px auto 22px; max-width: 920px; font-weight: 800; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 680px; margin: 0 auto 38px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Terminal */
.terminal { margin: 70px auto 0; max-width: 720px; text-align: left; border-radius: 14px; border: 1px solid var(--border); background: rgba(10,14,26,0.8); box-shadow: 0 30px 80px -30px rgba(99,102,241,0.5); overflow: hidden; }
.terminal-bar { display: flex; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; }
.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal pre { margin: 0; padding: 20px 22px; font-family: var(--mono); font-size: 0.86rem; line-height: 1.85; color: #b9c2da; white-space: pre-wrap; min-height: 230px; }
.terminal .k { color: var(--violet); }
.terminal .s { color: var(--cyan); }
.terminal .ok { color: #4ade80; }
.cursor { display: inline-block; width: 8px; height: 1.05em; background: var(--cyan); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Sections */
section { padding: 100px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 60px; }
.eyebrow { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan); }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; line-height: 1.15; margin: 12px 0 16px; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.08rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-2); padding: 30px 24px; text-align: center; }
.stat b { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.9rem; }

/* Products */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.product { position: relative; border-radius: 24px; padding: 38px; background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)); border: 1px solid var(--border); overflow: hidden; transition: transform .3s; display: flex; flex-direction: column; }
.product::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; pointer-events: none; }
.product:hover { transform: translateY(-6px); }
.product:hover::before { opacity: 1; }
.product-glow { position: absolute; width: 300px; height: 300px; border-radius: 50%; filter: blur(90px); top: -120px; right: -100px; opacity: .35; pointer-events: none; }
.cleaner .product-glow { background: var(--cyan); }
.pdf .product-glow { background: var(--violet); }
.product-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.app-icon { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex-shrink: 0; box-shadow: 0 10px 30px -10px rgba(99,102,241,0.8), 0 0 0 1px rgba(255,255,255,0.08); }
.product h3 { margin: 0; font-size: 1.6rem; letter-spacing: -0.01em; }
.platform { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.product > p { color: var(--muted); margin: 0 0 24px; }
.feature-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; font-size: 0.93rem; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; }
.feature-list li::before { content: ""; flex-shrink: 0; margin-top: 8px; width: 6px; height: 6px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 8px rgba(34,211,238,0.7); }
.product-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; }

/* Capabilities */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cap { padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: background .3s, border-color .3s; }
.cap:hover { background: var(--surface-2); border-color: rgba(99,102,241,0.4); }
.cap-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(99,102,241,0.14); border: 1px solid rgba(99,102,241,0.35); margin-bottom: 18px; }
.cap-icon svg { width: 22px; height: 22px; stroke: #a5b4fc; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cap h3 { margin: 0 0 8px; font-size: 1.12rem; }
.cap p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Contact */
.contact-card { position: relative; border-radius: 28px; padding: 70px 40px; text-align: center; border: 1px solid var(--border); overflow: hidden;
  background: radial-gradient(circle at 20% 0%, rgba(34,211,238,0.18), transparent 50%), radial-gradient(circle at 80% 100%, rgba(168,85,247,0.22), transparent 50%), var(--bg-2); }
.contact-card h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 12px 0 14px; letter-spacing: -0.02em; }
.contact-card p { color: var(--muted); max-width: 560px; margin: 0 auto 32px; }
.email-link { font-family: var(--mono); font-size: clamp(0.95rem, 2.4vw, 1.3rem); padding: 16px 28px; word-break: break-all; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-links a:hover { color: var(--text); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Legal pages */
.legal { padding: 80px 0 100px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.02em; margin: 10px 0 6px; }
.legal .updated { color: var(--muted); font-family: var(--mono); font-size: 0.85rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.3rem; margin: 40px 0 12px; }
.legal p, .legal li { color: #c3cbe0; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.legal .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; }

/* Responsive */
@media (max-width: 960px) {
  .products, .caps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { padding: 80px 0 60px; }
  section { padding: 70px 0; }
  .product { padding: 28px; }
  .feature-list { grid-template-columns: 1fr; }
  .contact-card { padding: 50px 22px; }
  .terminal pre { font-size: 0.74rem; padding: 16px; }
  .stat b { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
