/* SPDX-License-Identifier: Apache-2.0 */
/* Gradara website. Self-hosted fonts, no third-party requests. */
@font-face { font-family: 'Inter'; src: url('fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --bg: #0a0e13;
  --bg-2: #0e141b;
  --panel: #121a23;
  --panel-2: #16202b;
  --line: #22303d;
  --line-soft: #1a2530;
  --ink: #e8eef4;
  --muted: #93a2b1;
  --faint: #5f6f7f;
  /* Port-domain colors from the workbench, brightened for a dark canvas. */
  --signal: #5ea2dc;
  --electrical: #e6a54f;
  --mechanical: #3fc5b8;
  --thermal: #f08d88;
  --accent: #5ea2dc;
  --radius: 14px;
  --max: 1180px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.03em; line-height: 1.08; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; line-height: 1.3; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(calc(100% - 2.5rem), var(--max)); margin-inline: auto; }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--panel); padding: 0.5rem 0.8rem; border-radius: 8px; }

/* Blueprint grid behind the page top */
.grid-bg {
  position: absolute; inset: 0 0 auto 0; height: 980px; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.nav { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 650; font-size: 1.08rem; text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; font-size: 0.92rem; color: var(--muted); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 0.4rem 0.7rem; font: inherit; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.72rem 1.15rem; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 560; font-size: 0.95rem; text-decoration: none; transition: background 0.15s, border-color 0.15s, transform 0.15s; }
.button:hover { background: var(--panel-2); border-color: #2e3f50; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--ink); color: #0a0e13; border-color: var(--ink); }
.button.primary:hover { background: #fff; }
.button.small { padding: 0.45rem 0.8rem; font-size: 0.86rem; border-radius: 8px; }
.button svg { width: 16px; height: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* Hero */
.hero { position: relative; padding: 5.5rem 0 3rem; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; font: 500 0.78rem/1 var(--mono); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; padding: 0.45rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); margin-bottom: 1.6rem; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: var(--signal); }
.dots i:nth-child(2) { background: var(--electrical); border-radius: 1px; }
.dots i:nth-child(3) { background: var(--mechanical); border-radius: 1px; }
.dots i:nth-child(4) { background: var(--thermal); border-radius: 1px; }
.hero h1 span { background: linear-gradient(90deg, var(--signal), var(--mechanical) 45%, var(--electrical) 75%, var(--thermal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { max-width: 640px; margin: 1.4rem auto 0; font-size: 1.14rem; color: var(--muted); }
.hero .actions { justify-content: center; margin-top: 2.2rem; }
.hero-note { margin-top: 1rem; font: 0.8rem var(--mono); color: var(--faint); }

/* Animated traces */
.traces { margin: 3.2rem auto 0; width: 100%; max-width: 980px; height: auto; overflow: visible; }
.traces path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 3.2s ease-out forwards; }
.traces path:nth-child(2) { animation-delay: 0.25s; }
.traces path:nth-child(3) { animation-delay: 0.5s; }
.traces path:nth-child(4) { animation-delay: 0.75s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .traces path { animation: none; stroke-dashoffset: 0; } html { scroll-behavior: auto; } }

/* Product shot */
.shot { margin: 0 auto; max-width: 1180px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 40px 120px -40px #000, 0 0 0 1px #0006; }
.shot-bar { display: flex; gap: 6px; padding: 10px 12px; background: #e9eef2; border-bottom: 1px solid #d3dbe2; }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #c7d0d8; }
.shot figcaption { padding: 0.8rem 1rem; background: var(--panel); color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }
.shot-wrap { padding: 1rem 0 4rem; }

/* Sections */
.section { padding: 5.5rem 0; border-top: 1px solid var(--line-soft); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: end; margin-bottom: 3rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.kicker { font: 500 0.78rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }

/* Domains */
.domains { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.domain { background: var(--bg-2); padding: 1.5rem; }
.domain .port { width: 12px; height: 12px; margin-bottom: 1rem; }
.domain p { color: var(--muted); font-size: 0.92rem; margin-top: 0.4rem; }
.domain small { display: block; margin-top: 0.9rem; font: 0.75rem var(--mono); color: var(--faint); }
.port.signal { background: var(--signal); border-radius: 50%; }
.port.electrical { background: var(--electrical); border-radius: 2px; }
.port.mechanical { background: var(--mechanical); border-radius: 2px; }
.port.thermal { background: var(--thermal); border-radius: 2px; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.feature .icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 1.1rem; color: var(--accent); }
.feature .icon svg { width: 18px; height: 18px; }
.feature p { color: var(--muted); font-size: 0.93rem; margin-top: 0.5rem; }

/* AI flow */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.flow li { padding: 1.5rem; background: var(--bg-2); border-right: 1px solid var(--line); position: relative; }
.flow li:last-child { border-right: 0; }
.flow li::before { counter-increment: step; content: '0' counter(step); display: block; font: 0.78rem var(--mono); color: var(--faint); margin-bottom: 1.2rem; }
.flow li p { color: var(--muted); font-size: 0.92rem; margin-top: 0.4rem; }
.prompt { margin-top: 2rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; font: 0.92rem/1.6 var(--mono); color: var(--muted); }
.prompt b { color: var(--ink); font-weight: 400; }
.prompt .ok { color: var(--mechanical); }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; display: flex; flex-direction: column; }
.plan.featured { border-color: #35516b; background: linear-gradient(180deg, #152231, var(--panel) 60%); }
.plan .price { font-size: 2.4rem; font-weight: 650; letter-spacing: -0.04em; margin: 0.8rem 0 0.2rem; }
.plan .price small { font-size: 0.95rem; color: var(--muted); font-weight: 450; letter-spacing: 0; }
.plan > p { color: var(--muted); font-size: 0.93rem; }
.plan ul { margin: 1.3rem 0 1.6rem; display: grid; gap: 0.55rem; font-size: 0.92rem; }
.plan li { display: flex; gap: 0.6rem; }
.plan li::before { content: ''; width: 6px; height: 6px; margin-top: 0.6rem; border-radius: 50%; background: var(--mechanical); flex: none; }
.plan .button { margin-top: auto; }
.costs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 1rem; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.costs div { background: var(--bg-2); padding: 1.1rem 1.3rem; }
.costs b { display: block; font: 500 1.4rem var(--mono); }
.costs span { color: var(--muted); font-size: 0.88rem; }

/* Privacy points */
.points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.point { padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.point p { color: var(--muted); font-size: 0.93rem; margin-top: 0.4rem; }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.platform { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; gap: 0.9rem; }
.platform.is-current { border-color: #35516b; box-shadow: 0 0 0 1px #35516b; }
.platform p { color: var(--muted); font-size: 0.92rem; }
.platform .actions { margin-top: auto; }
.platform small { font: 0.75rem var(--mono); color: var(--faint); }
.note { margin-top: 1.4rem; color: var(--faint); font-size: 0.88rem; }

/* FAQ */
.faq { display: grid; gap: 0.6rem; max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 0 1.2rem; }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 560; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--muted); padding-bottom: 1.1rem; font-size: 0.95rem; }

/* CTA + footer */
.cta { text-align: center; padding: 6rem 0; border-top: 1px solid var(--line-soft); }
.cta p { color: var(--muted); margin: 1rem auto 2rem; max-width: 520px; }
.cta .actions { justify-content: center; }
.site-footer { border-top: 1px solid var(--line-soft); padding: 2.2rem 0 3rem; color: var(--faint); font-size: 0.86rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-links a { text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

/* Document pages (privacy, terms) */
.doc { max-width: 760px; padding: 4.5rem 0 5rem; }
.doc h1 { font-size: clamp(2.1rem, 4.5vw, 3rem); }
.doc .meta { margin-top: 1rem; font: 0.8rem var(--mono); color: var(--faint); }
.doc h2 { font-size: 1.35rem; margin: 2.6rem 0 0.8rem; letter-spacing: -0.02em; }
.doc p, .doc li { color: #c3cdd7; }
.doc p + p { margin-top: 0.9rem; }
.doc ul { list-style: disc; padding-left: 1.3rem; display: grid; gap: 0.4rem; margin-top: 0.6rem; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.92rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 560; }
.doc .callout { margin-top: 1.5rem; padding: 1rem 1.2rem; border: 1px solid #3a4a2a; background: #151d10; border-radius: 10px; color: #c9d8b3; font-size: 0.92rem; }
.not-found { text-align: center; padding: 8rem 0; }
.not-found p { color: var(--muted); margin: 1rem 0 2rem; }
.not-found .actions { justify-content: center; }

/* Responsive */
@media (max-width: 960px) {
  .section-head { grid-template-columns: 1fr; gap: 1rem; }
  .features, .pricing, .downloads { grid-template-columns: 1fr 1fr; }
  .domains, .flow { grid-template-columns: 1fr 1fr; }
  .flow li:nth-child(2) { border-right: 0; }
  .flow li:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 0.6rem 1.25rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 0.7rem 0; }
  .features, .pricing, .downloads, .points, .domains, .flow, .costs { grid-template-columns: 1fr; }
  .flow li { border-right: 0; border-bottom: 1px solid var(--line); }
  .flow li:last-child { border-bottom: 0; }
  .hero { padding-top: 3.5rem; }
  .section { padding: 4rem 0; }
}
.doc .lead-in { margin-top: 1.5rem; }
.doc .after-table { margin-top: 1rem; }
