/* ==========================================================================
   Qnite Labs — 2027 Light Laboratory Minimalism
   Porcelain Canvas · Editorial Typography · Chromatic Scientific Accents
   ========================================================================== */

:root {
  --bg: #fafaf8;
  --bg-soft: #f2f4f1;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.78);
  --line: #e5e8e4;
  --line-strong: #d4dad4;

  --ink: #0d1216;
  --ink-2: #4c5760;
  --ink-3: #808d96;

  /* Chromatic Multi-Color Scientific Palette */
  --emerald: #0f9d7e;
  --emerald-soft: #e7f8f3;
  --cobalt: #2563eb;
  --cobalt-soft: #ebf2ff;
  --violet: #7c3aed;
  --violet-soft: #f3ecff;
  --amber: #d97706;
  --amber-soft: #fef5e7;
  --coral: #e11d48;
  --coral-soft: #ffeef2;

  --radius-sm: 12px;
  --radius: 22px;
  --radius-lg: 30px;
  --max-w: 1180px;
  --gutter: clamp(20px, 4.5vw, 56px);

  --shadow-sm: 0 1px 2px rgba(13, 18, 22, 0.04), 0 6px 20px rgba(13, 18, 22, 0.03);
  --shadow-md: 0 4px 12px rgba(13, 18, 22, 0.04), 0 24px 60px rgba(13, 18, 22, 0.06);

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Chromatic 2027 ambient atmospheric washes (subtle sunlit watercolor) */
.ambient-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(620px 460px at 88% 8%, rgba(15, 157, 126, 0.09), transparent 70%),
    radial-gradient(560px 420px at 70% 24%, rgba(37, 99, 235, 0.07), transparent 70%),
    radial-gradient(520px 400px at 12% 18%, rgba(124, 58, 237, 0.055), transparent 70%);
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--emerald), var(--cobalt), var(--violet));
  z-index: 200;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--emerald); }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 10px;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 999px; font-weight: 600; z-index: 300;
}
.skip-link:focus { left: 16px; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 var(--gutter); }

/* ==========================================================================
   Floating Pill Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 16px; left: 0; right: 0;
  z-index: 100;
  padding: 0 var(--gutter);
  pointer-events: none;
}

.header-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 60px;
  padding: 0 10px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(13, 18, 22, 0.07);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 8px 32px rgba(13, 18, 22, 0.05);
  pointer-events: auto;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.header-bar.scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 36px rgba(13, 18, 22, 0.08);
}

.brand-link { display: inline-flex; align-items: center; }
.brand-logo { height: 28px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav a:hover, .nav a.active {
  color: var(--ink);
  background: rgba(13, 18, 22, 0.05);
}
.nav .nav-cta {
  margin-left: 8px;
  padding: 9px 18px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
}
.nav .nav-cta:hover {
  background: var(--emerald);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  cursor: pointer;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--cobalt));
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink);
}
h1 { font-size: clamp(3rem, 6.8vw, 5.6rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); line-height: 1.08; }
h3 { font-size: 1.3rem; letter-spacing: -0.025em; line-height: 1.25; }

.serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: 1.08em;
  background: linear-gradient(120deg, var(--emerald), var(--cobalt) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: clamp(1.08rem, 1.55vw, 1.28rem);
  color: var(--ink-2);
  line-height: 1.62;
  max-width: 560px;
}
.muted { color: var(--ink-2); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(13, 18, 22, 0.14);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--emerald), var(--cobalt));
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 157, 126, 0.24);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-2px);
}
.btn svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.btn:hover svg.arrow { transform: translateX(4px); }

/* ==========================================================================
   Hero — Expansive Sunlit Canvas + Light 3D Molecular Sculpture
   ========================================================================== */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: center;
  padding: 136px 0 88px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

#hero-webgl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(250, 250, 248, 0.92) 0%, rgba(250, 250, 248, 0.65) 45%, rgba(250, 250, 248, 0.04) 100%),
    linear-gradient(180deg, transparent 78%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

/* Frontier top announcement notification pill */
.announce-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 7px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line-strong);
  box-shadow: 0 2px 12px rgba(13, 18, 22, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px;
  color: var(--ink-2);
  transition: border-color 0.25s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.announce-pill:hover {
  border-color: var(--emerald);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(15, 157, 126, 0.12);
}
.announce-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.announce-badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald);
}
.announce-pill strong { color: var(--ink); font-weight: 600; }
.announce-pill svg { width: 14px; height: 14px; color: var(--emerald); transition: transform 0.2s var(--ease); }
.announce-pill:hover svg { transform: translateX(3px); }

.hero-title-line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-title-line > span { display: inline-block; }

.hero-sub { margin-top: 26px; }

/* ==========================================================================
   Sections & Cards
   ========================================================================== */
section.band {
  padding: clamp(88px, 11vw, 148px) 0;
  border-bottom: 1px solid var(--line);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Section 01: Qortex Interactive Architecture Studio (4 Real Modes)
   ========================================================================== */
.qortex-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 44px;
  align-items: end;
  margin-bottom: 52px;
}

.q-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--emerald-soft);
  border: 1px solid rgba(15, 157, 126, 0.26);
  color: var(--emerald);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.92em;
}

/* Segmented 2027 mode selector */
.mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.mode-tab .swatch {
  width: 8px; height: 8px; border-radius: 50%;
}
.mode-tab:hover { color: var(--ink); }
.mode-tab.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(13, 18, 22, 0.08);
}

.qortex-studio {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.studio-top {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  min-height: 460px;
}

.studio-stage {
  position: relative;
  background: #fbfcfa;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
}

.schematic-panel {
  display: none;
  width: 100%;
  max-width: 640px;
  animation: fadeSchematic 0.35s var(--ease) both;
}
.schematic-panel.active {
  display: block;
}
@keyframes fadeSchematic {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.schematic-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.schematic-svg .sch-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  fill: var(--ink);
  letter-spacing: -0.015em;
}
.schematic-svg .sch-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  fill: var(--ink-3);
}
.schematic-svg .sch-kicker {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  fill: var(--ink-3);
  text-transform: uppercase;
}
.schematic-svg .sch-card {
  fill: #ffffff;
  stroke: var(--line);
  stroke-width: 1.1;
}
.schematic-svg .sch-wire {
  fill: none;
  stroke: #d7ddd9;
  stroke-width: 1.25;
}
.schematic-svg .sch-flow {
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 5 11;
  stroke-linecap: round;
  animation: schFlow 2.6s linear infinite;
}
.schematic-svg .sch-flow-rev {
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 5 11;
  stroke-linecap: round;
  animation: schFlowRev 2.6s linear infinite;
}
@keyframes schFlow {
  to { stroke-dashoffset: -32; }
}
@keyframes schFlowRev {
  to { stroke-dashoffset: 32; }
}
@media (prefers-reduced-motion: reduce) {
  .schematic-svg .sch-flow, .schematic-svg .sch-flow-rev { animation: none; }
}

.studio-caption {
  padding: 36px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.mode-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 16px;
}

.studio-steps {
  display: grid;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.studio-step {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.studio-step b {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  flex: 0 0 auto;
}
.studio-step strong { color: var(--ink); font-weight: 600; }

/* Subtle 4-word capability ribbon */
.cap-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: #fafbf9;
}
.cap-item {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.cap-item:last-child { border-right: none; }
.cap-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.cap-icon svg { width: 16px; height: 16px; }

/* ==========================================================================
   Section 02: Minimalist Proof & Odds
   ========================================================================== */
.odds-proof-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.metric-card {
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.metric-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.metric-val {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.1vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink);
}
.metric-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
}
.metric-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
}

/* ==========================================================================
   Section 03: Airy Contact & Sources
   ========================================================================== */
.contact-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 20px;
  margin-top: 36px;
}
.contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.025em;
}
.contact-email:hover { color: var(--emerald); }
.copy-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--ink); color: var(--ink); }

details.sources {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
details.sources summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
details.sources summary::-webkit-details-marker { display: none; }
details.sources ol {
  margin: 16px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}
details.sources a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Subpages (About & Blog)
   ========================================================================== */
.page-hero {
  padding: 156px 0 68px;
  border-bottom: 1px solid var(--line);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.founder-avatar {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--emerald-soft), var(--cobalt-soft));
  border: 1px solid rgba(15, 157, 126, 0.25);
  font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--emerald);
  margin-bottom: 16px;
}

.prose h2 { margin-top: 52px; margin-bottom: 16px; font-size: clamp(1.5rem, 2.5vw, 2rem); }
.prose p { color: var(--ink-2); font-size: 17px; line-height: 1.76; margin: 0 0 18px; }
.prose strong { color: var(--ink); }

.data-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.data-table td { color: var(--ink-2); }
.data-table td:first-child { color: var(--ink); font-weight: 500; }

.bar-stack { display: grid; gap: 14px; }
.bar-item-head { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.bar-track { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }

/* Footer */
.site-footer { padding: 44px 0 56px; font-size: 13.5px; color: var(--ink-3); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-links { display: flex; gap: 22px; font-family: var(--font-mono); font-size: 12px; }

/* Responsive */
@media (max-width: 1020px) {
  .qortex-head, .studio-top, .contact-strip, .grid-2 { grid-template-columns: 1fr; }
  .studio-stage { border-right: none; border-bottom: 1px solid var(--line); }
  .metrics-row, .cap-ribbon { grid-template-columns: repeat(2, 1fr); }
  .cap-item { border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; top: 84px; left: var(--gutter); right: var(--gutter);
    padding: 14px; border-radius: var(--radius);
    background: #ffffff; border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav .nav-cta { margin-left: 0; text-align: center; }
  .nav-toggle { display: inline-flex; }
  .metrics-row, .cap-ribbon { grid-template-columns: 1fr; }
  .mode-tabs { border-radius: 18px; width: 100%; }
  .mode-tab { flex: 1 1 45%; justify-content: center; }
  .hero { min-height: auto; padding: 124px 0 72px; }
}
