/* ============================================================
   Cordon AI — Stylesheet
   Aesthetic: Research-lab editorial × enterprise AI infrastructure
   ============================================================ */

:root {
  /* Color system */
  --ink-0: #07090D;        /* deepest background */
  --ink-1: #0B0F16;        /* page background */
  --ink-2: #11161F;        /* elevated surface */
  --ink-3: #181E28;        /* hover surface */
  --line:  #1F2632;        /* hairline border */
  --line-2:#2A3240;        /* stronger border */

  --text:  #ECEEF3;        /* primary text */
  --muted: #8892A6;        /* secondary text */
  --dim:   #5F6675;        /* tertiary / annotations */

  --accent:        #FF6B4A;  /* signature warm coral */
  --accent-soft:   #FF6B4A1A;
  --accent-hover:  #FF8568;
  --validated:     #7CD992;  /* sage — for validated/consensus states */
  --warning:       #FFC857;

  /* Typography */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", Consolas, monospace;

  /* Layout */
  --max-w: 1200px;
  --max-text: 720px;
  --pad-x: clamp(20px, 4vw, 48px);
  --section-y: clamp(72px, 10vw, 140px);

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

/* ----------------------------- Reset / base ----------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink-1);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02";
}

/* Atmospheric grain overlay — pure CSS, no image */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 3px 3px;
}

/* Soft top-page glow — coral hint, subtle */
.atmosphere {
  position: fixed;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(255,107,74,0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

main, header, footer, section { position: relative; z-index: 2; }

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--accent); }

img, svg { max-width: 100%; display: block; }

/* ----------------------------- Typography ----------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

h1 {
  font-size: clamp(40px, 6.5vw, 76px);
  line-height: 1.02;
  font-variation-settings: "opsz" 96, "SOFT" 30;
}

h2 {
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.1;
  font-variation-settings: "opsz" 60, "SOFT" 40;
}

h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  font-variation-settings: "opsz" 30, "SOFT" 50;
}

h4 {
  font-size: 18px;
  line-height: 1.4;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1em; color: var(--muted); }
p.lead { font-size: 19px; color: var(--text); line-height: 1.55; max-width: var(--max-text); }
p strong, .text-strong { color: var(--text); font-weight: 500; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
}

.mono { font-family: var(--font-mono); }
.dim { color: var(--dim); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.validated { color: var(--validated); }

/* ----------------------------- Layout ----------------------------- */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section {
  padding: var(--section-y) 0;
  position: relative;
}

.section--bordered { border-top: 1px solid var(--line); }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 56px;
  max-width: 880px;
}

@media (min-width: 900px) {
  .section-head { grid-template-columns: 120px 1fr; gap: 48px; }
}

.section-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.12em;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ----------------------------- Header / Nav ----------------------------- */

.site-header {
  position: sticky;
  top: 0;
  background: rgba(11, 15, 22, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variation-settings: "opsz" 30, "SOFT" 30;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 22px; height: 22px;
  color: var(--accent);
}

.nav-links {
  display: none;
  gap: 36px;
  list-style: none;
  margin: 0; padding: 0;
}
@media (min-width: 900px) { .nav-links { display: flex; } }

.nav-links a {
  font-size: 14px;
  color: var(--muted);
  position: relative;
}
.nav-links a.is-active { color: var(--text); }
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  bottom: -26px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
}

.nav-cta {
  display: none;
}
@media (min-width: 900px) { .nav-cta { display: inline-flex; } }

.nav-burger {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
}
@media (min-width: 900px) { .nav-burger { display: none; } }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--ink-1);
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul {
  list-style: none;
  margin: 0; padding: 16px var(--pad-x) 24px;
}
.mobile-menu li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.mobile-menu li:last-child { border: 0; }
.mobile-menu a { display: block; font-size: 16px; }

/* ----------------------------- Buttons ----------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #0B0F16;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); color: #0B0F16; transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--sm { padding: 10px 16px; font-size: 13px; }

.btn .arrow {
  display: inline-block;
  transition: transform 0.2s var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

/* ----------------------------- Hero ----------------------------- */

.hero {
  padding: clamp(80px, 12vw, 140px) 0 clamp(60px, 8vw, 100px);
  position: relative;
}

.hero-inner { max-width: 980px; }

.hero h1 .accent-fragment {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 96, "SOFT" 80;
}

.hero-lead {
  margin-top: 32px;
  max-width: 640px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
}

.hero-cta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 40px;
}

.hero-meta {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  max-width: 800px;
}
.hero-meta-item .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}
.hero-meta-item .value {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  font-variation-settings: "opsz" 30, "SOFT" 50;
}

/* ----------------------------- Grids ----------------------------- */

.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }

@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ----------------------------- Cards ----------------------------- */

.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}
.card h3 { margin-bottom: 12px; }
.card p { margin: 0; font-size: 15px; }

.card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}

/* Feature row: large items with side metadata */
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) {
  .feature { grid-template-columns: 200px 1fr; gap: 56px; }
}
.feature-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.feature h3 { margin-bottom: 14px; }
.feature p { font-size: 16px; }

/* ----------------------------- Pull quote / callout ----------------------------- */

.pullquote {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.3;
  font-style: italic;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 28px;
  max-width: 820px;
  font-variation-settings: "opsz" 60, "SOFT" 60;
}

.callout {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  padding: 28px 32px;
  border-radius: 6px;
}
.callout h4 { margin: 0 0 10px; color: var(--accent); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500; }
.callout p { margin: 0; color: var(--text); }

/* ----------------------------- Lists ----------------------------- */

.list-clean {
  list-style: none;
  margin: 0; padding: 0;
}
.list-clean li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 15px;
}
.list-clean li::before {
  content: "→";
  color: var(--accent);
  flex-shrink: 0;
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Numbered steps */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  counter-reset: stepcount;
}
.steps li {
  counter-increment: stepcount;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 60px 1fr;
  column-gap: 24px;
  row-gap: 8px;
}
.steps li::before {
  content: counter(stepcount, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-top: 4px;
  grid-column: 1;
  grid-row: 1;
}
.steps li > * {
  grid-column: 2;
  min-width: 0;
}
.steps h4 { margin: 0; font-size: 18px; }
.steps p { margin: 0; font-size: 15px; }

/* ----------------------------- Diagram (Tech page) ----------------------------- */

.diagram {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px;
  margin: 32px 0;
  overflow: hidden;
}

/* ----------------------------- Stat strip ----------------------------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink-2);
}
.stat {
  padding: 32px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat .stat-num {
  font-family: var(--font-display);
  font-size: 42px;
  color: var(--accent);
  font-variation-settings: "opsz" 96, "SOFT" 40;
  margin-bottom: 8px;
  line-height: 1;
}
.stat .stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.stat .stat-note {
  font-size: 13px;
  color: var(--dim);
  margin-top: 10px;
  line-height: 1.5;
}

/* ----------------------------- Forms ----------------------------- */

.form {
  display: grid;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 700px) {
  .form-row.two-col { grid-template-columns: 1fr 1fr; }
}

.field { display: flex; flex-direction: column; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.field input, .field select, .field textarea {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  width: 100%;
  transition: border-color 0.2s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 140px; }

/* honeypot — visually hidden */
.hp-field {
  position: absolute;
  left: -10000px;
  top: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.consent input { margin-top: 4px; }
.consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.form-status {
  padding: 16px 20px;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success { background: rgba(124, 217, 146, 0.08); color: var(--validated); border: 1px solid rgba(124, 217, 146, 0.2); }
.form-status.is-error   { background: rgba(255, 107, 74, 0.08); color: var(--accent); border: 1px solid rgba(255, 107, 74, 0.2); }

/* ----------------------------- Footer ----------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 6px 0; }
.footer-col li a { font-size: 14px; color: var(--muted); }
.footer-col li a:hover { color: var(--accent); }

.footer-tagline {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
  max-width: 340px;
  font-variation-settings: "opsz" 30, "SOFT" 40;
  margin-top: 16px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--dim);
  font-family: var(--font-mono);
}

/* ----------------------------- Utility ----------------------------- */

.row { display: flex; flex-wrap: wrap; gap: 12px; }
.center { text-align: center; }
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 24px; }
.mt-3 { margin-top: 40px; }
.mt-4 { margin-top: 60px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------- Selection ----------------------------- */
::selection { background: var(--accent); color: var(--ink-1); }
