/* KORVEX public site — design tokens
   Layout: single long-scroll page, 1180px content column, grid backdrop, glass cards. */
:root {
  --bg: #050A0F;
  --bg-raised: #0A121A;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(0, 198, 167, 0.35);
  --fg: #FFFFFF;
  --fg-muted: #9AA8B4;
  --fg-dim: #66737F;
  --accent: #00C6A7;
  --accent-deep: #009980;
  --accent-glow: rgba(0, 198, 167, 0.18);
  --danger: #FF7A7A;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(80px, 11vw, 140px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* Backdrop grid + glow */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}
.glow {
  position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: -1;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
}

/* Drifting color fields, matched to the investor portal */
.blobs { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.bg-blob { position: absolute; border-radius: 50%; filter: blur(90px); animation: drift 16s ease-in-out infinite; }
.blob-1 { width: 620px; height: 620px; background: #00C6A7; opacity: .09; top: -240px; left: -220px; }
.blob-2 { width: 520px; height: 520px; background: #004D3A; opacity: .12; bottom: -200px; right: -200px; animation-delay: -6s; }
@keyframes drift { 0%,100% { transform: translate(0,0) } 50% { transform: translate(40px,30px) } }

/* Type */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.9rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 650; line-height: 1.1; }
h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--fg-muted); max-width: 58ch; }
.accent-text {
  background: linear-gradient(100deg, var(--accent) 10%, #5FF2D9 50%, var(--accent-deep) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--font-sans); cursor: pointer; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .25s ease, background-color .2s ease, border-color .2s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.btn-primary {
  background: var(--accent); color: #031410;
  box-shadow: 0 0 0 1px rgba(0,198,167,.4), 0 10px 30px -10px rgba(0,198,167,.6);
}
.btn-primary:hover { background: #12D8B8; transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(0,198,167,.6), 0 14px 40px -10px rgba(0,198,167,.75); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost { background: var(--surface); color: var(--fg); border-color: var(--border); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-hover); }

/* Nav */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.nav.is-scrolled { background: rgba(5,10,15,.78); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
/* Logo files include 25-unit clear space on each side; heights account for it */
.brand-logo { display: block; height: 38px; width: auto; }
.brand-logo-lg { height: 46px; margin-left: -5px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--fg-muted); transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--fg); background: var(--surface); }
.nav-cta { min-height: 40px; padding: 0 18px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--fg); width: 42px; height: 42px; border-radius: 12px; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 100%;
    background: rgba(5,10,15,.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px var(--gutter) 24px; display: none; flex-direction: column; gap: 12px;
  }
  .nav.is-open .nav-menu { display: flex; }
  .nav.is-open { background: rgba(5,10,15,.97); }
  .nav-links { flex-direction: column; align-items: stretch; }
  .nav-links a { padding: 14px 12px; font-size: 16px; }
}
@media (min-width: 881px) { .nav-menu { display: flex; align-items: center; gap: 20px; } }

/* Hero */
.hero { position: relative; padding-block: clamp(56px, 9vw, 110px) clamp(72px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 28px; min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-dim); }
.hero-tags span { display: inline-flex; align-items: center; gap: 8px; }
.hero-tags span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-deep); }
.hero-visual { position: relative; min-width: 0; }
.hero-visual .glow { width: 420px; height: 420px; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.flow-svg { display: block; width: 100%; height: auto; }
.flow-node rect { fill: rgba(10,18,26,.85); stroke: var(--border); }
.flow-node text { fill: var(--fg-muted); font: 500 12px var(--font-sans); }
.flow-node .node-label { fill: var(--fg); font-weight: 600; font-size: 13px; }
.flow-node .node-dot { fill: var(--accent); }
.flow-path { fill: none; stroke: rgba(0,198,167,.22); stroke-width: 1.4; }
.flow-path-out { stroke-dasharray: 4 5; }
.flow-pulse { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.flow-hub-ring { fill: none; stroke: var(--border-strong); }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
}

/* Sections */
section { position: relative; }
.section { padding-block: var(--section-y); }
.section-head { display: grid; gap: 18px; max-width: 720px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head.split { max-width: none; grid-template-columns: 1fr 1fr; align-items: end; gap: 24px 64px; }
.section-head.split .lede { justify-self: end; }
@media (max-width: 880px) { .section-head.split { grid-template-columns: 1fr; } .section-head.split .lede { justify-self: start; } }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }

/* Glass card */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .3s ease, background-color .3s ease, transform .3s ease;
  overflow: hidden; min-width: 0;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(0,198,167,.11), transparent 45%);
  transition: opacity .3s ease;
}
.card:hover { border-color: rgba(0,198,167,.28); background: var(--surface-hover); }
.card:hover::after { opacity: 1; }

.icon-badge {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(145deg, rgba(0,198,167,.16), rgba(0,153,128,.05));
  border: 1px solid rgba(0,198,167,.28); color: var(--accent);
}
.icon-badge svg { width: 22px; height: 22px; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.service-card { padding: clamp(28px, 3.4vw, 40px); display: grid; gap: 20px; align-content: start; }
.service-card header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.service-card .code { font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); letter-spacing: .08em; }
.service-card p { color: var(--fg-muted); max-width: 52ch; }
.feature-list { list-style: none; margin: 4px 0 0; padding: 18px 0 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.feature-list li { position: relative; padding-left: 18px; font-size: 14.5px; color: #C9D3DB; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border: 1.5px solid var(--accent); border-radius: 2px; transform: rotate(45deg); }
@media (max-width: 880px) { .services-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .feature-list { grid-template-columns: 1fr; } }

/* Process */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; counter-reset: step; }
.process::before { content: ""; position: absolute; left: 0; right: 0; top: 27px; height: 1px; background: linear-gradient(90deg, var(--accent), rgba(0,198,167,.15)); }
.step { position: relative; padding-right: 28px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.step-marker {
  position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border-strong);
  font-family: var(--font-mono); font-size: 14px; color: var(--accent); font-weight: 500;
  box-shadow: 0 0 0 6px var(--bg), 0 0 24px -6px var(--accent);
  transition: background-color .3s, color .3s;
}
.step:hover .step-marker { background: var(--accent); color: #031410; }
.step h3 { font-size: 1.35rem; margin-top: 10px; }
.step p { color: var(--fg-muted); font-size: 15px; }
.step .step-detail { font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); letter-spacing: .02em; }
@media (max-width: 960px) {
  .process { grid-template-columns: 1fr 1fr; gap: 48px 0; }
  .process::before { display: none; }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; gap: 0; }
  .step { grid-template-columns: 56px 1fr; column-gap: 20px; padding: 0 0 36px; }
  .step > :not(.step-marker) { grid-column: 2; }
  .step .step-marker { grid-row: 1 / span 3; }
  .step h3 { margin-top: 12px; }
  .step::before { content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 1px; background: rgba(0,198,167,.25); }
  .step:last-child::before { display: none; }
}

/* Solutions */
.solutions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.solution-card { padding: 28px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 14px; }
.solution-card .icon-badge { width: 42px; height: 42px; border-radius: 12px; }
.solution-card .icon-badge svg { width: 19px; height: 19px; }
.solution-card p { color: var(--fg-muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-muted); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.02); }
@media (max-width: 960px) { .solutions-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .solutions-grid { grid-template-columns: 1fr; } }

/* Why */
.why-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.why-intro { position: sticky; top: 120px; display: grid; gap: 22px; }
.why-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.why-item { display: grid; grid-template-columns: 28px 1fr; gap: 6px 20px; padding: 26px 0; border-bottom: 1px solid var(--border); transition: padding-left .3s ease; }
.why-item:hover { padding-left: 8px; }
.why-item svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.why-item h3 { font-size: 1.1rem; }
.why-item p { grid-column: 2; color: var(--fg-muted); font-size: 15px; max-width: 56ch; }
@media (max-width: 880px) { .why-wrap { grid-template-columns: 1fr; } .why-intro { position: static; } }

/* Contact */
.contact-panel {
  position: relative; border-radius: 32px; border: 1px solid var(--border);
  background:
    radial-gradient(600px circle at 0% 0%, rgba(0,198,167,.12), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  padding: clamp(28px, 5vw, 64px); overflow: hidden;
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(36px, 5vw, 72px);
}
.contact-panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(135deg, #000, transparent 60%); -webkit-mask-image: linear-gradient(135deg, #000, transparent 60%);
}
.contact-copy { position: relative; display: grid; gap: 22px; align-content: start; min-width: 0; }
.contact-points { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; }
.contact-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--fg-muted); font-size: 15px; }
.contact-points svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 3px; }

.form { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; min-width: 0; }
.field { display: grid; gap: 8px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 500; color: #C9D3DB; }
.field label .opt { color: var(--fg-dim); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font: 400 15.5px/1.5 var(--font-sans); color: var(--fg);
  background: rgba(5,10,15,.6); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 15px; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,198,167,.14); background: rgba(5,10,15,.85); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { font-size: 13px; color: var(--danger); min-height: 0; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-footer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; }
.form-note { font-size: 13px; color: var(--fg-dim); max-width: 40ch; }
.form-status { grid-column: 1 / -1; border-radius: 12px; padding: 14px 16px; font-size: 14.5px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.form-status svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.form-status.is-success { border-color: rgba(0,198,167,.4); background: rgba(0,198,167,.08); color: #BFF5EA; }
.form-status.is-error { border-color: rgba(255,122,122,.4); background: rgba(255,122,122,.07); color: #FFD0D0; }
.form-status.is-info { border-color: rgba(255,200,90,.35); background: rgba(255,200,90,.06); color: #FFE6B0; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
@media (max-width: 960px) { .contact-panel { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* Footer */
.footer { padding-block: 56px 40px; border-top: 1px solid var(--border); margin-top: var(--section-y); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand { display: grid; gap: 14px; max-width: 34ch; }
.footer-brand p { color: var(--fg-dim); font-size: 14px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 56px; }
.footer-col h4 { margin: 0 0 14px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--fg-muted); font-size: 14.5px; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--fg-dim); font-size: 13px; }

/* Reveal: visible at rest; JS adds a gentle rise only when motion is allowed */
.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js-motion .reveal.pre { opacity: 0; transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .flow-pulse { display: none; }
}
