/* ============================================================
   SDPC — design tokens
   ============================================================ */
:root {
  --ink-900: #0b1220;
  --ink-800: #101a2d;
  --ink-700: #1a2740;
  --ink-600: #2c3b58;
  --paper: #f7f7f4;
  --paper-2: #efefe9;
  --text: #1c2433;
  --text-muted: #55627a;
  --text-inverse: #e8ecf4;
  --text-inverse-muted: #9aa7c0;
  --accent: #d0452f;          /* trace red */
  --accent-soft: #e2603f;
  --blue: #3d6fb4;            /* negative-lobe blue */
  --line: #d8d8cf;
  --line-dark: #263450;

  --font-display: "IBM Plex Serif", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --container: 1140px;
  --radius: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--font-mono); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; }

a { color: inherit; }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-inverse);
}

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

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  align-self: center;
  color: var(--accent-soft);
}

.brand-name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.08em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-inverse-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-inverse-muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: #fff; }

.nav-cta {
  padding: 7px 16px;
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  color: #fff !important;
}

.nav-cta:hover { background: var(--accent); border-color: var(--accent); }

.nav-toggle { display: none; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ink-900);
  color: var(--text-inverse);
  overflow: hidden;
  padding-top: 64px;
}

#wiggle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 48px;
  padding-bottom: 48px;
}

.kicker {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.hero-lede {
  max-width: 620px;
  font-size: 19px;
  line-height: 1.65;
  color: var(--text-inverse-muted);
  margin-bottom: 40px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-soft); }

.btn-ghost {
  border: 1px solid var(--line-dark);
  color: var(--text-inverse);
}

.btn-ghost:hover { border-color: var(--text-inverse-muted); }

.hero-caption {
  position: relative;
  z-index: 2;
  font-size: 12px;
  color: var(--text-inverse-muted);
  padding-bottom: 22px;
  opacity: 0.8;
}

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 104px 0; }

.section-dark {
  background: var(--ink-900);
  color: var(--text-inverse);
}

.section-head { margin-bottom: 56px; max-width: 720px; }

.section-no {
  display: block;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-dark .section-no { color: var(--accent-soft); }

.section-head h2 {
  font-size: clamp(32px, 4.5vw, 46px);
  margin-bottom: 18px;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--accent);
  margin-top: 18px;
}

.section-lede {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.65;
}

.section-dark .section-lede { color: var(--text-inverse-muted); }

/* ============================================================
   Service cards
   ============================================================ */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.card h3 { font-size: 23px; margin-bottom: 14px; }

.card > p {
  font-size: 15.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.feature-list {
  list-style: none;
  font-size: 13px;
  line-height: 1.5;
}

.feature-list li {
  padding: 8px 0 8px 20px;
  border-top: 1px dashed var(--line);
  position: relative;
}

.feature-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============================================================
   Platform stats + capability grid
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 72px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 36px 0;
}

.stat { text-align: left; }

.stat-value {
  display: block;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 500;
  color: #fff;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-inverse-muted);
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.cap {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 26px 24px;
  background: var(--ink-800);
}

.cap h4 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 16px;
}

.cap ul { list-style: none; }

.cap li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-inverse-muted);
  padding: 7px 0 7px 18px;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cap li::before {
  content: "·";
  position: absolute;
  left: 2px;
  color: var(--accent-soft);
  font-weight: 700;
}

/* ============================================================
   Approach / principles
   ============================================================ */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 72px;
}

.principle {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}

.principle-no {
  display: block;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 10px;
}

.principle h3 { font-size: 21px; margin-bottom: 10px; }

.principle p { font-size: 15.5px; color: var(--text-muted); }

.wavelet-fig {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.wavelet-fig svg { width: 100%; height: auto; display: block; }

.wavelet-fig figcaption {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-grid .section-head { margin-bottom: 24px; }

.contact-card {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--ink-800);
  padding: 36px 32px;
}

.contact-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-inverse-muted);
  margin-bottom: 8px;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 19px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 2px;
  margin-bottom: 32px;
}

.contact-email:hover { color: var(--accent-soft); }

.contact-tags {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-inverse-muted);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--ink-900);
  color: var(--text-inverse-muted);
  border-top: 1px solid var(--line-dark);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .cards-3, .cap-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .brand-sub { display: none; }
}

@media (max-width: 640px) {
  .cards-3, .cap-grid, .principles { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
  }

  .nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-inverse);
    transition: transform 0.2s, opacity 0.2s;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink-900);
    border-bottom: 1px solid var(--line-dark);
    display: none;
    padding: 8px 0 16px;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    display: block;
    padding: 12px 24px;
    font-size: 16px;
  }

  .nav-cta { border: 0; margin: 8px 24px 0; text-align: center; background: var(--accent); }
}
