/* ============================================================
   Rheonox Technologies — Design System v2 ("Maquette C")
   Dark-first "Midnight Graphite", cyan accent, JetBrains Mono
   for technical bits, product-glow cards, console motif.
   Light theme via [data-theme="light"]. Font: Inter.
   ============================================================ */

/* ---------- Tokens: DARK (default, dark-first) ---------- */
:root {
  --bg:        #0B1220;
  --bg2:       #0E1A30;
  --surface:   #111F38;
  --surface-2: #0E1729;
  --text:      #E9F1FC;
  --muted:     #93A6C2;
  --border:    #1D2C48;
  --border2:   #2B3E60;

  --primary:   #3B82F6;
  --primary-h: #60A5FA;
  --accent:    #22D3EE;   /* cyan */
  --accent-tint: rgba(34,211,238,.12);
  --glow:      rgba(34,211,238,.20);
  --on-primary:#06122A;

  --qa:   #22D3EE;  --comp: #FBBF24;  --erp: #34D399;  --cbl: #A78BFA;
  --ok:   #34D399;  --warn: #FBBF24;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 12px 34px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  --ring: rgba(34,211,238,.4);

  --radius: 14px; --radius-sm: 10px; --radius-pill: 999px;
  --maxw: 1180px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Tokens: LIGHT (opt-in) ---------- */
:root[data-theme="light"] {
  --bg:        #F8FAFC;
  --bg2:       #F1F5F9;
  --surface:   #FFFFFF;
  --surface-2: #F1F5F9;
  --text:      #0F172A;
  --muted:     #52607A;
  --border:    #E2E8F0;
  --border2:   #CBD5E1;

  --primary:   #1E40AF;
  --primary-h: #0284C7;
  --accent:    #0EA5E9;
  --accent-tint: rgba(14,165,233,.12);
  --glow:      rgba(14,165,233,.16);
  --on-primary:#FFFFFF;

  --qa:   #0EA5E9;  --comp: #F59E0B;  --erp: #22C55E;  --cbl: #8B5CF6;
  --ok:   #16A34A;  --warn: #D97706;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.07);
  --shadow-md: 0 6px 22px rgba(15,23,42,.09);
  --shadow-lg: 0 18px 44px rgba(15,23,42,.14);
  --ring: rgba(14,165,233,.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary-h); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.13; color: var(--text); font-weight: 800; letter-spacing: -0.022em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1rem; }
.mono { font-family: var(--mono); }

/* ---------- a11y ---------- */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 1000; background: var(--primary); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.6rem; }
.section { padding: 6rem 0; }
.section--alt { background: var(--bg2); }
.section__head { max-width: 760px; margin: 0 auto 3rem; text-align: center; }
.section__head p { color: var(--muted); font-size: 1.12rem; margin: .6rem 0 0; }
.eyebrow { display:inline-block; font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 600; color: var(--accent); margin-bottom: .7rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1rem; line-height: 1; padding: .85rem 1.4rem; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: all .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-h); color: #fff; }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--border2); }
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost-light { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.34); }
.btn--ghost-light:hover { background: rgba(255,255,255,.18); color:#fff; }
.btn--light { background: #fff; color: #0d1a34; }
.btn--light:hover { background: #eaf1ff; color:#0d1a34; }
.btn--lg { padding: 1rem 1.7rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 72px; }
.brand { font-weight: 900; font-size: 1.34rem; letter-spacing: .02em; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .dot { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav__links > li > a { color: var(--text); font-weight: 500; font-size: .95rem; }
.nav__links > li > a:hover, .nav__links a.is-active { color: var(--accent); }
.nav__cta { display: flex; align-items: center; gap: .8rem; }
.nav__cta .login { color: var(--text); font-weight: 500; font-size: .95rem; }

/* dropdown */
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: "▾"; font-size: .7em; margin-left: .35rem; color: var(--muted); }
.dropdown { position: absolute; top: 130%; left: 50%; transform: translateX(-50%) translateY(8px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 300px; padding: .5rem; opacity: 0; visibility: hidden; transition: all .18s ease; list-style: none; margin: 0; }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 8px; font-size: .92rem; color: var(--text); }
.dropdown a:hover { background: var(--surface-2); }
.dropdown a small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.dot-prod { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.dot-prod--qa { background: var(--qa); } .dot-prod--comp { background: var(--comp); } .dot-prod--erp { background: var(--erp); } .dot-prod--cbl { background: var(--cbl); }

/* lang + theme */
.util { display: flex; align-items: center; gap: .5rem; }
.lang { position: relative; }
.lang__btn, .theme-toggle { display: inline-flex; align-items: center; gap: .35rem; height: 38px; padding: 0 .7rem; background: transparent; border: 1px solid var(--border2); border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: .15s; }
.lang__btn:hover, .theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle { width: 38px; justify-content: center; padding: 0; }
.theme-toggle .ico-sun { display: block; } .theme-toggle .ico-moon { display: none; }
:root[data-theme="light"] .theme-toggle .ico-sun { display:none; } :root[data-theme="light"] .theme-toggle .ico-moon { display:block; }
.lang__menu { position: absolute; right: 0; top: 120%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .35rem; min-width: 150px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s; list-style: none; margin: 0; z-index: 120; }
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang__menu a { display: block; padding: .5rem .6rem; border-radius: 7px; font-size: .9rem; color: var(--text); }
.lang__menu a:hover { background: var(--surface-2); }
.lang__menu a.is-active { color: var(--accent); font-weight: 700; }

.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 5.5rem 0 5rem; }
.hero::before { content:""; position:absolute; inset:0; pointer-events:none; background: radial-gradient(920px 420px at 80% -12%, var(--glow), transparent 60%); }
.hero::after { content:""; position:absolute; inset:0; pointer-events:none; opacity:.32;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(720px 420px at 28% 18%, #000, transparent 76%); }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero__badge { display:inline-flex; align-items:center; gap:.5rem; font-family: var(--mono); font-size:.78rem; padding:.4rem .8rem; border:1px solid var(--border2); border-radius: var(--radius-pill); color: var(--accent); background: var(--accent-tint); margin-bottom:1.3rem; }
.hero__badge .pulse { width:8px; height:8px; border-radius:50%; background: var(--erp); box-shadow: 0 0 10px var(--erp); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,.6);} 70%{box-shadow:0 0 0 8px rgba(52,211,153,0);} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0);} }
.hero h1 { max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__sub { font-size: 1.22rem; color: var(--muted); max-width: 56ch; margin: 1.2rem 0 1.8rem; }
.hero__ctas { display: flex; gap: .9rem; flex-wrap: wrap; }
.hero__trust { display:flex; flex-wrap:wrap; gap:1.3rem; margin-top:2.1rem; color: var(--muted); font-size:.86rem; }
.hero__trust span { display:inline-flex; align-items:center; gap:.45rem; }
.hero--sub { padding: 4rem 0 3rem; }
.hero--sub .hero-grid { grid-template-columns: 1fr; }

/* ---------- Console ---------- */
.console { background: #0A1426; border: 1px solid #24365a; border-radius: 14px; box-shadow: 0 28px 66px rgba(0,0,0,.5); overflow: hidden; }
.con-bar { display:flex; align-items:center; gap:.5rem; padding:.7rem .9rem; background:#0d1a30; border-bottom:1px solid #1b2b47; }
.con-bar i { width:11px; height:11px; border-radius:50%; display:block; }
.c1{background:#ff5f56;} .c2{background:#ffbd2e;} .c3{background:#27c93f;}
.con-bar span { margin-left:.5rem; font-family: var(--mono); font-size:.76rem; color:#8aa0c0; }
.con-body { padding:1rem 1.1rem; font-family: var(--mono); font-size:.82rem; line-height:1.95; color:#c9d6ea; overflow-x:auto; }
.con-body .ok{color:#34D399;} .con-body .warn{color:#FBBF24;} .con-body .mut{color:#6c82a4;} .con-body .cy{color:#22D3EE;}

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; height: 100%; overflow: hidden; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border2); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); margin-bottom: 1rem; }
.card p:last-child { margin-bottom: 0; }
.card__link { font-weight: 600; }
.card--highlight { border: 1.5px solid var(--accent); }

/* product card — glow accent */
.pcard::before { content:""; position:absolute; top:0; left:0; right:0; height:3px; background: var(--pc, var(--primary)); }
.pcard--qa { --pc: var(--qa); } .pcard--comp { --pc: var(--comp); } .pcard--erp { --pc: var(--erp); } .pcard--cbl { --pc: var(--cbl); }
.pcard__ic { width:44px; height:44px; border-radius:11px; display:grid; place-items:center; margin-bottom:1rem; font-family: var(--mono); font-weight:700; font-size:.82rem; color:#08111f; background: var(--pc, var(--primary)); box-shadow: 0 0 24px color-mix(in srgb, var(--pc, var(--primary)) 42%, transparent); }
.st { font-family: var(--mono); font-size:.7rem; color: var(--muted); letter-spacing:.06em; }

.icon-badge { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); margin-bottom: 1rem; font-size: 1.4rem; }

/* ---------- Status pills ---------- */
.status { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: .72rem; font-weight: 600; padding: .28rem .65rem; border-radius: var(--radius-pill); margin-bottom: .85rem; letter-spacing:.04em; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--live { background: rgba(52,211,153,.14); color: var(--erp); }
.status--beta { background: rgba(251,191,36,.14); color: var(--warn); }
.status--roadmap { background: var(--surface-2); color: var(--muted); border:1px solid var(--border); }

/* ---------- Mission / feature rows ---------- */
.mission-col h3 { font-size: 1.16rem; }
.mission-col .num { font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--accent); letter-spacing: .08em; }
.feature-row { display: grid; grid-template-columns: 58px 1fr; gap: 1.2rem; align-items: start; padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.feature-row:last-child { border-bottom: 0; }
.feature-row h3 { margin-bottom: .3rem; }
.feature-row p { color: var(--muted); margin: 0; }

/* ---------- Steps / table / pricing / timeline ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.step__num { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 1rem; }
.step h3 { font-size: 1.05rem; } .step p { color: var(--muted); font-size: .95rem; margin: 0; }
.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: .9rem 1.2rem; border-bottom: 1px solid var(--border); }
.spec-table th { background: var(--surface-2); font-weight: 700; width: 34%; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 1.7rem; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.price-card--featured { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.price-card .price { font-size: 1.9rem; font-weight: 800; margin: .3rem 0 .2rem; }
.price-card .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; flex: 1; }
.price-card li { padding: .4rem 0 .4rem 1.6rem; position: relative; font-size: .95rem; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border2); }
.tl-item { position: relative; padding: 0 0 2.5rem 1.5rem; }
.tl-item::before { content: ""; position: absolute; left: -2rem; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
.tl-item--done::before { background: var(--ok); border-color: var(--ok); }
.tl-item--progress::before { background: var(--warn); border-color: var(--warn); }
.tl-item .phase { font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.tl-list { list-style: none; padding: 0; margin: .8rem 0 0; }
.tl-list li { padding: .25rem 0; color: var(--muted); font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(135deg, #0d1a34, #14295c); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: #fff; text-align: center; padding: 5rem 0; }
.cta-band::after { content:""; position:absolute; inset:0; background: radial-gradient(700px 300px at 50% -30%, var(--glow), transparent 60%); }
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); font-size: 1.15rem; max-width: 54ch; margin: 0 auto 2rem; }
.cta-band .hero__ctas { justify-content: center; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea { font-family: inherit; font-size: 1rem; padding: .7rem .85rem; border: 1px solid var(--border2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--ring); }
.field textarea { min-height: 130px; resize: vertical; }
.checkbox-row { display: flex; align-items: flex-start; gap: .6rem; grid-column: 1 / -1; font-size: .9rem; color: var(--muted); }
.contact-aside { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; }

/* ---------- Legal / prose ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { margin-top: 2.4rem; } .prose h3 { margin-top: 1.6rem; }
.prose p, .prose li { color: var(--muted); }
.prose a { text-decoration: underline; }
.legal-meta { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; font-family: var(--mono); }

/* ---------- Positioning cards ---------- */
.pos { display: flex; flex-direction: column; }
.pos__vs { font-family: var(--mono); font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: inline-flex; align-items: center; gap: .45rem; margin-bottom: .7rem; }
.pos__vs::before { content: "×"; color: var(--warn); font-weight: 700; }
.pos h3 { display: flex; align-items: center; gap: .5rem; }
.pos h3::before { content: "→"; color: var(--accent); font-weight: 700; }
.pos p { margin-top: .3rem; }

/* ---------- Footer ---------- */
.site-footer { background: #070C18; color: rgba(255,255,255,.82); padding: 3.6rem 0 1.6rem; border-top: 1px solid var(--border); }
.site-footer .brand { color: #fff; display: inline-block; margin-bottom: .5rem; }
.site-footer .brand .dot { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-grid h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .55rem; }
.footer-grid a { color: rgba(255,255,255,.72); font-size: .92rem; }
.footer-grid a:hover { color: #fff; }
.footer-intro p { color: rgba(255,255,255,.62); font-size: .92rem; max-width: 32ch; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.5rem; font-size: .85rem; color: rgba(255,255,255,.55); flex-wrap: wrap; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } .hero__badge .pulse { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } .footer-intro { grid-column: 1 / -1; } }
@media (max-width: 880px) {
  .nav__toggle { display: block; }
  .nav__links, .nav__cta .login, .nav__cta .btn { display: none; }
  .nav.is-open .nav__links { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; position: absolute; top: 72px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; box-shadow: var(--shadow-md); }
  .has-dropdown .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: .2rem 0 .2rem 1rem; min-width: auto; }
  .has-dropdown > a::after { content: ""; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .grid--2, .grid--3, .grid--4, .steps, .pricing, .form-grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
}
@media (max-width: 620px) { .feature-row { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr 1fr; } }
