/* ==========================================================================
   PARAGON — Design System
   Matte black · white · graphite · subtle silver. Minimal, intentional.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg:        #0a0a0b;
  --bg-1:      #0e0e10;
  --bg-2:      #141417;
  --bg-3:      #1a1a1e;

  /* Hairlines */
  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text:    #f4f4f5;
  --text-2:  #b1b2b8;
  --text-3:  #82838b;
  --text-4:  #5c5d64;

  /* Accent — restrained silver, no color */
  --silver:  #d4d6db;
  --white:   #ffffff;

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Layout */
  --maxw: 1180px;
  --maxw-narrow: 760px;
  --radius: 14px;
  --radius-sm: 10px;
  --pad-x: 28px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --section-y: clamp(84px, 12vw, 156px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

::selection { background: rgba(255, 255, 255, 0.16); color: #fff; }

:focus-visible {
  outline: 2px solid var(--silver);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.section { padding: var(--section-y) 0; }
.section--tight { padding: clamp(56px, 8vw, 96px) 0; }
.section-line { border-top: 1px solid var(--line); }

.narrow { max-width: var(--maxw-narrow); }
.measure { max-width: 64ch; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; color: var(--text); }

.display {
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
}

h2.title, .title {
  font-size: clamp(30px, 4.2vw, 50px);
  letter-spacing: -0.03em;
}

h3.subtitle, .subtitle {
  font-size: clamp(21px, 2.4vw, 26px);
  letter-spacing: -0.02em;
  font-weight: 600;
}

.lede {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.6;
  color: var(--text-2);
  font-weight: 400;
  letter-spacing: -0.01em;
}

p { color: var(--text-2); }
strong { color: var(--text); font-weight: 600; }

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

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .eyebrow { margin-bottom: 22px; }
.section-head .lede { margin-top: 20px; }

.text-center { text-align: center; }
.center-x { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background .25s var(--ease), border-color .25s var(--ease),
              color .25s var(--ease), transform .25s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary { background: var(--white); color: #0a0a0b; }
.btn-primary:hover { background: #e7e7ea; transform: translateY(-1px); }

.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: rgba(255,255,255,0.34); background: rgba(255,255,255,0.045); }

.btn-lg { padding: 15px 28px; font-size: 16px; }

.btn-group { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-group.center-x { justify-content: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}
.link-arrow .arrow { transition: transform .25s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(3px); }
.link-arrow:hover { color: var(--white); }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(10, 10, 11, 0.86);
}

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

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 24px; height: 24px; }
.brand-name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--text);
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a {
  padding: 9px 14px;
  font-size: 14.5px;
  font-weight: 450;
  color: var(--text-2);
  border-radius: 8px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links > a:hover { color: var(--text); }
.nav-links > a.active { color: var(--text); }

.nav-links > a.nav-cta {
  margin-left: 4px;
  color: var(--text-2);
  font-weight: 450;
}
.nav-links > a.nav-cta:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(96px, 16vh, 168px) 0 clamp(72px, 11vh, 128px);
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -10%;
  width: min(900px, 92vw);
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }
.hero .eyebrow { margin-bottom: 28px; justify-content: center; }
.hero .display { max-width: 16ch; margin: 0 auto; }
.hero .lede { max-width: 60ch; margin: 26px auto 0; }
.hero .btn-group { margin-top: 40px; }

/* page hero (interior pages) */
.page-hero { padding: clamp(72px, 12vh, 132px) 0 clamp(40px, 6vw, 64px); }
.page-hero .display { font-size: clamp(38px, 6vw, 68px); max-width: 18ch; }
.page-hero .lede { max-width: 58ch; margin-top: 24px; }
.page-hero--center { text-align: center; }
.page-hero--center .display, .page-hero--center .lede { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Grids & Cards
   ========================================================================== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.card:hover { border-color: var(--line-strong); background: var(--bg-2); }

.card .card-index {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-4);
  margin-bottom: 22px;
}
.card h3 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 12px; }
.card p { font-size: 15.5px; line-height: 1.6; color: var(--text-2); }
.card .link-arrow { margin-top: 22px; font-size: 14.5px; }

/* Icon chip atop a card */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  margin-bottom: 24px;
  color: var(--text);
}
.chip svg { width: 21px; height: 21px; }

/* ---------- Feature list (capabilities) ---------- */
.feature-list { display: grid; gap: 0; }
.feature-row {
  display: grid;
  grid-template-columns: 56px 1fr 1.3fr;
  gap: 32px;
  align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}
.feature-row:last-child { border-bottom: 1px solid var(--line); }
.feature-row .fr-index {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-4);
  letter-spacing: 0.1em;
  padding-top: 4px;
}
.feature-row h3 { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -0.02em; }
.feature-row p { font-size: 16px; line-height: 1.65; color: var(--text-2); }

/* ---------- Mission / statement block ---------- */
.statement {
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.26;
  letter-spacing: -0.028em;
  font-weight: 500;
  color: var(--text);
  max-width: 900px;
}
.statement .muted { color: var(--text-3); }

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 8vw, 110px);
  align-items: start;
}

/* ---------- Definition rows (research / about facts) ---------- */
.deflist { display: grid; gap: 0; }
.defrow {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 40px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.defrow:last-child { border-bottom: 1px solid var(--line); }
.defrow dt { color: var(--text); font-weight: 500; font-size: 17px; }
.defrow dd { color: var(--text-2); font-size: 16px; line-height: 1.6; }

/* ---------- Projects ---------- */
.project {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.project:hover { border-color: var(--line-strong); background: var(--bg-2); }
.project-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-2);
}
.project h3 { font-size: 22px; margin-bottom: 12px; letter-spacing: -0.02em; }
.project p { font-size: 15.5px; color: var(--text-2); line-height: 1.6; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta {
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255,255,255,0.04), transparent 60%),
    var(--bg-1);
  padding: clamp(48px, 8vw, 88px) clamp(28px, 6vw, 72px);
  text-align: center;
}
.cta .title { max-width: 18ch; margin: 0 auto 18px; }
.cta .lede { max-width: 52ch; margin: 0 auto 34px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 9px; }
.field label { font-size: 14px; color: var(--text-2); font-weight: 450; }
.field .req { color: var(--text-4); }
.input, .textarea, .select {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 15.5px;
  padding: 13px 15px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.4);
  background: var(--bg-2);
}
.field.invalid .input, .field.invalid .textarea { border-color: #c45b5b; }
.field-error { font-size: 13px; color: #d98c8c; display: none; }
.field.invalid .field-error { display: block; }

.form-note { font-size: 13.5px; color: var(--text-3); }
.form-status {
  display: none;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text);
}
.form-status.show { display: block; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(56px, 8vw, 88px) 0 36px;
  margin-top: clamp(40px, 6vw, 80px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand p { font-size: 14.5px; color: var(--text-3); max-width: 38ch; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14.5px;
  color: var(--text-2);
  padding: 6px 0;
  transition: color .2s var(--ease);
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-4);
}

/* ==========================================================================
   Reveal animation
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 18px var(--pad-x) 28px;
    background: rgba(10,10,11,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links > a { padding: 13px 6px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links > a:last-child { border-bottom: none; }
  .nav-links > a.nav-cta { margin: 0; padding: 13px 6px; border-radius: 0; text-align: left; }
  .nav-toggle { display: flex; }

  .feature-row { grid-template-columns: 40px 1fr; }
  .feature-row p { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .defrow { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 860px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  :root { --pad-x: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .feature-row .fr-index { padding-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .btn { width: 100%; }
  .btn-group { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn, .link-arrow .arrow, .card { transition: none !important; }
}
