/* ═══════════════════════════════════════════════════════
   CodeIntelligence & AI — design system
   Palette drawn from the brand mark:
   charcoal #0a0e12 · surfaces #12161c · gold #c7a86c
   highlight #f4e2a8 · bronze #8f7440 · warm ivory #eae5d8
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #0a0e12;
  --bg-2: #0e1218;
  --surface: #12161d;
  --surface-2: #171c24;
  --ink: #eae5d8;
  --ink-dim: #a8aaa4;
  --gold: #c7a86c;
  --gold-hi: #f4e2a8;
  --gold-deep: #8f7440;
  --hairline: rgba(199, 168, 108, 0.16);
  --hairline-soft: rgba(199, 168, 108, 0.09);
  --gold-grad: linear-gradient(135deg, #f4e2a8 0%, #c7a86c 45%, #9c7f4a 100%);
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Sora', 'Avenir Next', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --max: 76rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

section[id], footer[id] { scroll-margin-top: 4.5rem; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(199, 168, 108, 0.35); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ── film grain ─────────────────────────────────────── */
.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── type ───────────────────────────────────────────── */
h1, h2 {
  font-family: var(--serif);
  font-weight: 380;
  letter-spacing: -0.015em;
  line-height: 1.06;
  text-wrap: balance;
}
h1 { font-size: clamp(2.7rem, 7.2vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h1 em, h2 em {
  font-style: italic;
  font-weight: 340;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em; /* keep the italic terminal from clipping */
}

h3 {
  font-family: var(--serif);
  font-weight: 480;
  font-size: 1.45rem;
  letter-spacing: 0.005em;
  line-height: 1.2;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2rem; height: 1px;
  background: var(--gold-grad);
  vertical-align: middle;
  margin-right: 0.9rem;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-dim);
  max-width: 34rem;
  margin-top: 1.6rem;
}

.section-sub { color: var(--ink-dim); max-width: 38rem; margin-top: 1.2rem; }

/* ── buttons ────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05rem 1.9rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.btn-sm { padding: 0.7rem 1.25rem; font-size: 0.72rem; }
.btn-gold {
  background: var(--gold-grad);
  color: #14100a;
  box-shadow: 0 0 0 0 rgba(199, 168, 108, 0);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(199, 168, 108, 0.45);
}
.btn-ghost {
  border-color: var(--hairline);
  color: var(--gold-hi);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--gold);
  background: rgba(199, 168, 108, 0.06);
  transform: translateY(-2px);
}

/* ── nav ────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background-color 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 14, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline-soft);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--pad);
  display: flex; align-items: center; gap: 2.5rem;
}
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.brand-mark { filter: drop-shadow(0 0 10px rgba(199, 168, 108, 0.35)); }
.brand-name {
  font-family: var(--serif);
  font-weight: 480;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-name .amp {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}
.nav-links { display: flex; gap: 2rem; margin-left: auto; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
  transition: color 0.2s ease;
  padding: 0.4rem 0;
}
.nav-links a:hover { color: var(--gold-hi); }
.nav-burger { display: none; }

/* ── hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 5rem;
  background:
    radial-gradient(52rem 34rem at 78% 30%, rgba(199, 168, 108, 0.09), transparent 65%),
    radial-gradient(40rem 30rem at 12% 85%, rgba(143, 116, 64, 0.06), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  width: 100%;
}
.hero-copy { max-width: 46rem; }
.hero-copy .lede { max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.6rem; }

/* the brand brain, floating free in the background */
.hero-brain {
  position: absolute;
  top: 50%;
  right: clamp(-14rem, -6vw, -3rem);
  transform: translateY(-56%);
  width: clamp(30rem, 56vw, 56rem);
  z-index: 1;
  pointer-events: none;
  animation: floaty 9s ease-in-out infinite;
}
.hero-brain img {
  width: 100%;
  filter: drop-shadow(0 0 70px rgba(199, 168, 108, 0.18));
  mask-image: radial-gradient(140% 140% at 62% 40%, #000 55%, transparent 92%);
  -webkit-mask-image: radial-gradient(140% 140% at 62% 40%, #000 55%, transparent 92%);
}
@keyframes floaty {
  0%, 100% { transform: translateY(-56%); }
  50% { transform: translateY(-58.5%); }
}
.hero-glow {
  position: absolute; inset: -6%;
  background: radial-gradient(closest-side, rgba(199, 168, 108, 0.15), transparent 70%);
  filter: blur(18px);
  animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ── ticker ─────────────────────────────────────────── */
.ticker {
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  overflow: hidden;
  margin-top: clamp(2rem, 6vh, 5rem);
  padding: 1.05rem 0;
  background: rgba(18, 22, 29, 0.5);
}
.ticker-track {
  display: flex; align-items: center; gap: 2.6rem;
  width: max-content;
  animation: ticker 34s linear infinite;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}
.ticker-track i { color: var(--gold-deep); font-style: normal; font-size: 0.6rem; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ── sections ───────────────────────────────────────── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(5rem, 11vh, 8.5rem) var(--pad);
}
.section-alt {
  max-width: none;
  background:
    radial-gradient(46rem 30rem at 85% 10%, rgba(199, 168, 108, 0.05), transparent 60%),
    var(--bg-2);
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}
.section-alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: clamp(2.6rem, 6vh, 4.4rem); }

/* ── service cards ──────────────────────────────────── */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.card {
  position: relative;
  background: linear-gradient(170deg, var(--surface-2), var(--surface) 55%);
  border: 1px solid var(--hairline-soft);
  border-radius: 4px;
  padding: 2.4rem 2rem 2.2rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--hairline);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.65);
}
.card::after {
  content: "";
  position: absolute; top: 0; left: 1.6rem; right: 1.6rem; height: 1px;
  background: var(--gold-grad);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover::after { opacity: 1; }
.card-num {
  position: absolute; top: 1.5rem; right: 1.7rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: rgba(199, 168, 108, 0.32);
}
.card-icon {
  width: 44px; height: 44px;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 1.6rem;
}
.card h3 { margin-bottom: 0.85rem; }
.card p { color: var(--ink-dim); font-size: 0.97rem; }
.card ul { list-style: none; margin-top: 1.4rem; }
.card li {
  font-size: 0.9rem;
  color: var(--ink-dim);
  padding: 0.5rem 0 0.5rem 1.4rem;
  border-top: 1px solid var(--hairline-soft);
  position: relative;
}
.card li::before {
  content: "◆";
  position: absolute; left: 0; top: 0.62rem;
  font-size: 0.5rem;
  color: var(--gold);
}

/* ── products ───────────────────────────────────────── */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  align-items: stretch;
}
.product {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: 4px;
  padding: 2.3rem 2rem 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.product:hover { transform: translateY(-6px); border-color: var(--hairline); }
.product-featured {
  background: linear-gradient(175deg, rgba(199, 168, 108, 0.10), var(--surface) 42%);
  border-color: var(--hairline);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.product-badge {
  position: absolute; top: -0.75rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #14100a;
  background: var(--gold-grad);
  padding: 0.35rem 0.9rem;
  border-radius: 2px;
  white-space: nowrap;
}
.product-kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.product h3 { margin-bottom: 1rem; }
.product > p { color: var(--ink-dim); font-size: 0.96rem; }
.product ul { list-style: none; margin: 1.3rem 0 1.8rem; }
.product li {
  font-size: 0.9rem;
  color: var(--ink-dim);
  padding: 0.45rem 0 0.45rem 1.4rem;
  position: relative;
}
.product li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--gold-deep);
}
.product footer {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline-soft);
}
.price { font-size: 0.85rem; color: var(--ink-dim); }
.price strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 480;
  color: var(--ink);
  margin-left: 0.3rem;
}

/* ── process steps ──────────────────────────────────── */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 2rem 1.6rem 0;
  border-top: 1px solid var(--hairline);
}
.steps li::before {
  content: "";
  position: absolute; top: -3.5px; left: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-grad);
  box-shadow: 0 0 10px rgba(199, 168, 108, 0.6);
}
.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.1rem;
  font-weight: 340;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin-bottom: 0.9rem;
}
.steps h3 { font-size: 1.2rem; margin-bottom: 0.7rem; }
.steps p { font-size: 0.92rem; color: var(--ink-dim); }

/* ── manifesto ──────────────────────────────────────── */
.manifesto {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(50rem 26rem at 50% 0%, rgba(199, 168, 108, 0.07), transparent 65%),
    var(--bg-2);
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  padding: clamp(5rem, 12vh, 8.5rem) var(--pad);
  text-align: center;
}
.manifesto::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: min(52rem, 110vw); aspect-ratio: 610 / 483;
  transform: translate(-50%, -50%);
  background: url('/assets/img/brain-glow.webp') center / contain no-repeat;
  opacity: 0.055;
  pointer-events: none;
}
.manifesto-inner { position: relative; max-width: 62rem; margin: 0 auto; }
.manifesto-quote {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.manifesto-quote em {
  font-style: italic;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}
.manifesto-stats {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: clamp(2rem, 6vw, 5.5rem);
  margin-top: clamp(3rem, 7vh, 4.5rem);
}
.manifesto-stats div { max-width: 13rem; }
.manifesto-stats strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.3rem;
  display: block;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.4rem;
}
.manifesto-stats span {
  font-size: 0.82rem;
  color: var(--ink-dim);
  line-height: 1.5;
  display: block;
}

/* ── contact ────────────────────────────────────────── */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact-mail {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: var(--gold-hi);
  text-decoration: none;
  margin-top: 2rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--hairline);
  transition: border-color 0.25s ease;
}
.contact-mail:hover { border-color: var(--gold); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: 4px;
  padding: 2.4rem 2.2rem;
  display: grid;
  gap: 1.4rem;
}
.contact-form label {
  display: grid;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.contact-form input,
.contact-form textarea {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--hairline-soft);
  border-radius: 3px;
  padding: 0.85rem 1rem;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(199, 168, 108, 0.12);
}
.contact-form ::placeholder { color: #5c6168; }
.form-note { font-size: 0.85rem; color: var(--gold-hi); min-height: 1.2em; }

/* ── footer ─────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--hairline-soft);
  padding: 3rem var(--pad) 3.4rem;
  background: var(--bg-2);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1.6rem 3rem;
}
.footer nav { display: flex; flex-wrap: wrap; gap: 1.8rem; margin-left: auto; }
.footer nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
  transition: color 0.2s ease;
}
.footer nav a:hover { color: var(--gold-hi); }
.footer-fine {
  width: 100%;
  font-size: 0.78rem;
  color: #5c6168;
  margin-top: 0.4rem;
}

/* ── scroll reveals (only when JS is available) ─────── */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.12s; }
.js .reveal.d2 { transition-delay: 0.24s; }
.js .reveal.d3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ── responsive ─────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-brain {
    right: 50%;
    transform: translate(50%, -56%);
    width: min(34rem, 105vw);
    opacity: 0.22;
  }
  @keyframes floaty {
    0%, 100% { transform: translate(50%, -56%); }
    50% { transform: translate(50%, -58.5%); }
  }
  .cards-3, .products { grid-template-columns: 1fr; max-width: 30rem; margin-inline: auto; }
  .product-featured { order: -1; }
  .steps { grid-template-columns: 1fr 1fr; gap: 2.2rem 1.4rem; }
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger {
    display: grid; gap: 6px;
    margin-left: auto;
    background: none; border: none; cursor: pointer;
    padding: 0.6rem 0.2rem;
  }
  .nav-burger span {
    display: block; width: 26px; height: 1.5px;
    background: var(--gold);
    transition: transform 0.3s ease;
  }
  .nav.open .nav-burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.open .nav-burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav.open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10, 14, 18, 0.97);
    backdrop-filter: blur(14px);
    padding: 1.6rem var(--pad) 2rem;
    border-bottom: 1px solid var(--hairline-soft);
    gap: 1.3rem;
  }
  .steps { grid-template-columns: 1fr; }
  .footer nav { margin-left: 0; }

  /* tighter rhythm on small screens */
  .section { padding-top: 4.2rem; padding-bottom: 4.2rem; }
  .section-head { margin-bottom: 2.2rem; }
  h1 { font-size: clamp(2.5rem, 11.5vw, 3.4rem); }
  h2 { font-size: clamp(1.8rem, 7.5vw, 2.4rem); }
  .lede { font-size: 1.02rem; margin-top: 1.2rem; }
  .hero-brain { opacity: 0.16; width: min(30rem, 120vw); }
  .hero-actions { margin-top: 2rem; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .ticker-track { font-size: 0.66rem; gap: 1.8rem; }
  .card, .product { padding: 1.9rem 1.4rem 1.7rem; }
  .product footer { flex-wrap: wrap; }
  .product footer .btn { flex: 1 1 100%; text-align: center; }
  .steps li { padding: 1.6rem 0 0; }
  .manifesto { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .manifesto-stats { gap: 2rem; margin-top: 2.6rem; }
  .manifesto-stats strong { font-size: 1.9rem; }
  .contact-form { padding: 1.7rem 1.3rem; }
  .footer { padding: 2.4rem var(--pad) 2.6rem; }
}
