/* =========================================================
   Ontolect — global styles
   ========================================================= */

:root {
  --navy: #0b1220;
  --navy-2: #0e1726;
  --navy-3: #131c2e;
  --line: rgba(244, 239, 228, 0.10);
  --line-strong: rgba(244, 239, 228, 0.22);
  --ivory: #f4efe4;
  --ivory-dim: #cfc8b7;
  --ivory-mute: rgba(244, 239, 228, 0.55);
  --ivory-ghost: rgba(244, 239, 228, 0.32);
  --gold: #c9a96a;
  --gold-dim: #a88a4f;

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans: "Geist", "Söhne", "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  --page-max: 1280px;
  --gutter: clamp(28px, 5vw, 96px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* selection */
::selection { background: var(--gold); color: var(--navy); }

/* === Layout helpers === */

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.rule {
  height: 1px;
  background: var(--line);
  width: 100%;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
}

.eyebrow.muted { color: var(--ivory-mute); }

/* === Type === */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.01em;
  line-height: 1.02;
}

.serif-italic {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ivory);
  margin: 0;
  text-wrap: balance;
}

.section-lede {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.6;
  color: var(--ivory-dim);
  max-width: 56ch;
  margin: 0;
  text-wrap: pretty;
}

.body-lg {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ivory-dim);
}

.body { color: var(--ivory-dim); }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-mute);
}

/* === Buttons === */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 14px 22px;
  border-radius: 2px;
  border: 1px solid var(--ivory);
  background: var(--ivory);
  color: var(--navy);
  cursor: pointer;
  transition: background 240ms var(--ease), color 240ms var(--ease), border-color 240ms var(--ease);
  text-decoration: none;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: transparent; border-color: var(--gold); color: var(--gold); }

.btn .arrow {
  width: 14px; height: 1px; background: currentColor; position: relative;
}
.btn .arrow::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 6px; height: 6px;
  border-right: 1px solid currentColor;
  border-top: 1px solid currentColor;
  transform: translate(1px, -50%) rotate(45deg);
}

/* === Section scaffolding === */

section {
  padding-block: clamp(80px, 9vw, 140px);
  position: relative;
}

section + section .rule-top {
  position: absolute;
  top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px;
  background: var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 900px;
  margin-bottom: clamp(56px, 6vw, 88px);
}

.section-head .eyebrow-row {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gold);
}

.section-head .eyebrow-row .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}

@media (max-width: 880px) {
  .two-col { grid-template-columns: 1fr; }
}

/* === Reveal === */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 120ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 360ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 480ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 600ms; }

/* === Cards / panels === */

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(244,239,228,0.02), rgba(244,239,228,0));
  padding: 32px;
  position: relative;
}

.panel-tight { padding: 24px; }

.panel-gold-corner::before,
.panel-gold-corner::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--gold);
}
.panel-gold-corner::before {
  top: -1px; left: -1px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
}
.panel-gold-corner::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
}

/* === Numbers / specs === */

.spec {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-mute);
}

.kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ivory-dim);
}

/* === Form bits (used in Request Access) === */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-mute);
}
.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ivory);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 0;
  outline: none;
  transition: border-color 200ms var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ivory-ghost); }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ivory-mute) 50%),
                    linear-gradient(135deg, var(--ivory-mute) 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 8px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 24px;
}
.field select option { background: var(--navy-2); color: var(--ivory); }

/* === Sigil / mark === */

.sigil {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* density toggle — applied via data-density on <body> */
body[data-density="sparse"] section { padding-block: clamp(110px, 12vw, 180px); }
body[data-density="dense"] section  { padding-block: clamp(60px, 7vw, 100px); }
