/* Kortex Trading — institutional dark theme (blue gradient, invite-only) */

:root {
  /* Base palette — deeper, near-black for a "closed" feel */
  --bg: #05070C;
  --bg-soft: #090C13;
  --bg-muted: #0E1320;
  --panel: #0B0F18;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);

  /* Type colors */
  --ink: #F5F7FA;
  --ink-2: #D5DAE3;
  --muted: #94A0B4;
  --muted-2: #647084;

  /* Brand accent — blue → cyan gradient */
  --accent: #3B82F6;
  --accent-2: #38BDF8;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --accent-line: rgba(56, 189, 248, 0.34);
  --grad: linear-gradient(120deg, #3B82F6 0%, #38BDF8 100%);
  --cool: #38BDF8;

  /* Type */
  --font-serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  /* Rhythm */
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1200px;
  --section-y: clamp(72px, 11vw, 160px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(44px, 6.4vw, 88px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4vw, 52px); line-height: 1.08; }
h3 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.25; }
p { margin: 0; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-narrow { max-width: 820px; }

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 22px;
}
.lede {
  font-family: var(--font-sans);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.7;
  color: var(--muted);
  max-width: 62ch;
}

/* ========= Buttons ========= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  border-radius: var(--r-sm);
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-accent {
  background: var(--grad);
  color: #04070D;
}
.btn-accent:hover { filter: brightness(1.08); }
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent-2); }
.btn-lg { padding: 16px 34px; font-size: 15px; }

/* ========= Header ========= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand img { height: 42px; width: auto; }
.nav {
  display: flex;
  gap: 34px;
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.nav a { color: var(--muted); transition: color 0.2s ease; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav, .header-actions { display: none; }
  .nav-toggle { display: inline-flex; color: var(--ink); }
}

/* ========= Hero (fullscreen, closed feel) ========= */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  padding: clamp(90px, 14vw, 180px) 0 clamp(72px, 12vw, 150px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 600px at 50% 0%, rgba(59, 130, 246, 0.16), transparent 60%),
    radial-gradient(800px 500px at 80% 30%, rgba(56, 189, 248, 0.08), transparent 55%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero h1 { max-width: 18ch; }
.hero h1 .gold, .hero h1 .cool { color: var(--accent-2); }
.hero .lede { margin-top: 28px; }
.hero .actions { margin-top: 44px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero .note { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); letter-spacing: 0.04em; }

/* ========= Section ========= */
.section { padding: var(--section-y) 0; }
.section-line { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head p { margin-top: 18px; }

/* ========= Pillars ========= */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.pillars.cols-3 { grid-template-columns: repeat(3, 1fr); }
.pillar {
  background: var(--panel);
  padding: clamp(28px, 3.5vw, 44px) clamp(22px, 2.5vw, 32px);
}
.pillar .icon { width: 30px; height: 30px; color: var(--accent-2); margin-bottom: 22px; }
.pillar h3 { font-family: var(--font-sans); font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.pillar p { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.6; }

@media (max-width: 900px) {
  .pillars, .pillars.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .pillars, .pillars.cols-3 { grid-template-columns: 1fr; }
}

/* ========= Statement ========= */
.statement { text-align: left; }
.statement p {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.3;
  color: var(--ink);
  max-width: 24ch;
  font-weight: 500;
}
.statement p .accent { color: var(--accent-2); }

/* ========= Feature rows ========= */
.feature-list { display: grid; gap: 0; }
.feature-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(28px, 3.4vw, 44px) 0;
  border-top: 1px solid var(--line-soft);
}
.feature-row:last-child { border-bottom: 1px solid var(--line-soft); }
.feature-row h3 { font-family: var(--font-serif); }
.feature-row .ix { font-family: var(--font-mono); font-size: 13px; color: var(--accent-2); letter-spacing: 0.08em; }
.feature-row p { color: var(--muted); }
@media (max-width: 760px) {
  .feature-row { grid-template-columns: 1fr; gap: 12px; }
}

/* ========= Access (locked) ========= */
.access-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(59, 130, 246, 0.10), transparent 70%),
    var(--panel);
  padding: clamp(36px, 5vw, 64px);
  text-align: center;
}
.access-card .lock { width: 34px; height: 34px; color: var(--accent-2); margin: 0 auto 20px; }
.access-card h2 { margin-bottom: 14px; }
.access-card .lede { margin: 0 auto; }
.access-card .actions { margin-top: 32px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ========= Contact / Request access ========= */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 6vw, 80px);
}
.contact-form { display: grid; gap: 16px; }
.contact-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  transition: border-color 0.2s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted-2); }
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus { outline: none; border-color: var(--accent-line); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-meta dt { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted-2); margin-top: 22px; }
.contact-meta dd { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }

#form-messages { min-height: 0; }
.alert { padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; margin-bottom: 4px; }
.alert-success { background: rgba(56, 189, 248, 0.14); color: #BfE6FA; border: 1px solid rgba(56, 189, 248, 0.34); }
.alert-error { background: rgba(201, 75, 75, 0.12); color: #E9B5B5; border: 1px solid rgba(201, 75, 75, 0.3); }

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form .row2 { grid-template-columns: 1fr; }
}

/* ========= Footer ========= */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: clamp(48px, 7vw, 80px) 0 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-brand { max-width: 460px; }
.footer-brand::after { content: ""; display: block; clear: both; }
.footer-brand img { height: 100px; width: auto; float: left; margin: 0 20px 0 0; }
.footer-brand p { font-size: 13px; color: var(--muted-2); overflow: hidden; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted-2);
}
.footer-disclaimer { margin-top: 20px; font-size: 11px; line-height: 1.6; color: var(--muted-2); max-width: 92ch; }

/* ========= Page (generic) ========= */
.page-section { padding: clamp(60px, 9vw, 120px) 0; }
.page-section h2 { margin: 40px 0 16px; }
.page-section h3 { margin: 28px 0 12px; color: var(--ink); }
.page-section p { margin-bottom: 18px; color: var(--ink-2); }
.page-section ul { color: var(--ink-2); padding-left: 20px; margin-bottom: 18px; }
.page-section li { margin-bottom: 8px; }
.page-section a { color: var(--accent-2); }
