/* ==========================================================================
   Solanity — design tokens
   Light, paper-toned palette is the default (the mark is drawn for it);
   a dark override kicks in via prefers-color-scheme so the site still
   respects system preference.
   ========================================================================== */

:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #131313;
  --border: #222222;
  --border-strong: #333333;
  --ink: #ffffff;
  --ink-muted: #a1a1a1;
  --ink-faint: #757575;

  --accent: #ffffff;
  --accent-strong: #e4e4e4;
  --accent-soft: #1a1a1a;
  --accent-ink: #000000;
  --royal-blue: #4169e1;

  --glass-tint: 20 20 20;
  --glass-alpha: .55;
  --glass-border: 255 255 255;
  --shadow-color: 0, 0, 0;
  --aura: 255 255 255;

  --font-display: 'Sora', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --radius-full: 999px;

  --container-w: 1160px;
  --header-h: 76px;

  --ease: cubic-bezier(.16, .8, .24, 1);
  --dur-fast: .18s;
  --dur-med: .32s;
  --dur-slow: .7s;

  color-scheme: dark;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #fafafa;
    --surface-2: #f2f2f2;
    --border: #e2e2e2;
    --border-strong: #cccccc;
    --ink: #000000;
    --ink-muted: #666666;
    --ink-faint: #8a8a8a;

    --accent: #000000;
    --accent-strong: #1a1a1a;
    --accent-soft: #ececec;
    --accent-ink: #ffffff;

    --glass-tint: 255 255 255;
    --glass-alpha: .6;
    --glass-border: 0 0 0;
    --shadow-color: 0, 0, 0;
    --aura: 0 0 0;

    color-scheme: light;
  }
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Page entrance — blurs in on load instead of popping in instantly.
   Deliberately blur-only (no opacity dip): if the .page-in class is ever
   delayed — a backgrounded tab throttles requestAnimationFrame — the page
   stays softly blurred rather than invisible. */
@media (prefers-reduced-motion: no-preference) {
  body { transition: filter .5s var(--ease); }
  html.js body { filter: blur(14px); }
  html.js body.page-in { filter: blur(0); }
}

img, picture, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.015em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ==========================================================================
   Glass utility — restrained: a soft tint, a blur, a hairline border.
   No neon glow, no color-shifting gradient border.
   ========================================================================== */

.glass {
  background: rgb(var(--glass-tint) / var(--glass-alpha));
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgb(var(--glass-border) / .1);
}

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

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 640px) { .container { padding-inline: 2rem; } }
@media (min-width: 1000px) { .container { padding-inline: 2.5rem; } }

section { position: relative; }

.section { padding-block: clamp(3.5rem, 3rem + 3vw, 7rem); }
.section-tight { padding-block: clamp(2.5rem, 2.2rem + 1.6vw, 4rem); }
#hero.section { padding-block: clamp(2.25rem, 1.8rem + 2vw, 4rem); }
.section-header { max-width: 40rem; margin-bottom: clamp(2rem, 1.6rem + 2vw, 3.25rem); }

.stack { display: flex; flex-direction: column; }
.gap-sm { gap: .75rem; }
.gap-md { gap: 1.5rem; }
.gap-lg { gap: 2.5rem; }

/* ==========================================================================
   Typography
   ========================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.eyebrow::before {
  content: '';
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--royal-blue);
}

h1, .h1 { font-size: clamp(2.25rem, 1.5rem + 3.3vw, 3.9rem); }
h2, .h2 { font-size: clamp(1.75rem, 1.45rem + 1.6vw, 2.5rem); }
h3, .h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.375rem); }

.lead {
  font-size: clamp(1.0625rem, 1rem + .5vw, 1.25rem);
  color: var(--ink-muted);
  line-height: 1.6;
}

.text-muted { color: var(--ink-muted); }
.text-faint { color: var(--ink-faint); font-size: .875rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: .9375rem;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgb(var(--shadow-color) / .4); }
.btn-accent:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--ink-muted); padding-inline: 0; }
.btn-ghost:hover { color: var(--ink); }

.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: 1rem;
}

.header-inner {
  height: 58px;
  max-width: 900px;
  margin-inline: auto;
  padding-inline: 1.25rem .5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: box-shadow var(--dur-med) var(--ease);
}
.site-header.is-scrolled .header-inner {
  box-shadow: 0 16px 34px -18px rgb(var(--shadow-color) / .7);
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 32px; width: auto; filter: invert(1) brightness(1.08); transition: filter var(--dur-med) var(--ease); }
@media (prefers-color-scheme: light) {
  .brand img { filter: none; }
}

.site-nav { display: none; }
.site-nav ul { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink-muted);
  position: relative;
  padding-block: .35rem;
  transition: color var(--dur-fast) var(--ease);
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right var(--dur-med) var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { right: 0; }

.header-cta { display: none; }
.header-actions { display: flex; align-items: center; gap: .75rem; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding-inline: .7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.lang-switch:hover { color: var(--ink); border-color: var(--accent); }

.nav-toggle {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--surface-2); }
.nav-toggle-bars { position: relative; width: 20px; height: 14px; }
.nav-toggle-bars span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--dur-med) var(--ease), opacity var(--dur-fast) var(--ease), top var(--dur-med) var(--ease);
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6px; }
.nav-toggle-bars span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

.mobile-nav { border-bottom: 1px solid var(--border); background: var(--bg); }
.mobile-nav ul { padding-block: .5rem 1.25rem; }
.mobile-nav a {
  display: block;
  padding: .85rem .25rem;
  font-size: 1.0625rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-nav .btn { margin-top: 1rem; }

@media (min-width: 900px) {
  .site-nav { display: block; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { border-top: 1px solid var(--border); padding-block: clamp(3rem, 2.6rem + 2vw, 4.5rem) 2.5rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand img { height: 26px; width: auto; filter: invert(1) brightness(1.08); }
@media (prefers-color-scheme: light) { .footer-brand img { filter: none; } }
.footer-brand p { margin-top: .9rem; max-width: 30ch; color: var(--ink-muted); font-size: .9375rem; }
.footer-col h4 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .65rem; }
.footer-col a, .footer-col p { color: var(--ink-muted); font-size: .9375rem; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: clamp(2rem, 1.7rem + 1.6vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: .8125rem;
  color: var(--ink-faint);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero-inner {
  max-width: 56rem;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon {
  height: clamp(64px, 7vw, 92px);
  width: auto;
  filter: invert(1);
  margin-bottom: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
  will-change: transform;
}
@media (prefers-color-scheme: light) { .hero-icon { filter: none; } }

.hero-inner .lead {
  font-size: 1rem;
  max-width: 40rem;
}

.accent-word { color: var(--royal-blue); }

/* ==========================================================================
   Hero portals — two bright glowing light columns at the east/west edges
   of the hero. Each is its own fountain: particles rise out of it,
   drift a little toward the hero on a wobbly, non-linear path (each
   waypoint randomized in JS, assets/js/main.js), then fall back down
   and fade out into the same portal they came from.
   ========================================================================== */

.hero-portal {
  position: absolute;
  top: 4%;
  bottom: 4%;
  width: 160px;
  pointer-events: none;
  z-index: 0;
}
.hero-portal--west { left: clamp(-20px, 1vw, 20px); }
.hero-portal--east { right: clamp(-20px, 1vw, 20px); }

@media (max-width: 700px) {
  .hero-portal { width: 22px; top: 10%; bottom: 10%; }
  .hero-portal--west { left: 0; }
  .hero-portal--east { right: 0; }
  .hero-portal-glow { width: 14px; }
  .hero-portal-glow::before {
    width: 3px;
    box-shadow: 0 0 8px 2px rgb(255 255 255 / .85), 0 0 16px 4px rgb(255 255 255 / .3);
  }
}

.hero-portal-glow {
  position: absolute;
  inset: 0;
  margin-inline: auto;
  width: 40px;
  background: radial-gradient(ellipse 50% 50% at center, rgb(255 255 255 / .9), transparent 72%);
  filter: blur(4px);
  z-index: 0;
}
.hero-portal-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  margin-inline: auto;
  width: 6px;
  background: linear-gradient(to bottom, transparent, #fff 20%, #fff 80%, transparent);
  filter: blur(1px);
  box-shadow: 0 0 24px 6px rgb(255 255 255 / .85), 0 0 60px 18px rgb(255 255 255 / .4);
}

.hero-portal-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-drop {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 2px rgb(255 255 255 / .95), 0 0 14px 4px rgb(255 255 255 / .55);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-drop {
    animation: hero-drop-fountain var(--dur, 5s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
  }
}

/* Motion is horizontal-first (dx spans most of the portal's width) with
   only a small vertical wobble (dy), and every waypoint is randomized
   per particle in JS so the path never runs straight. */
@keyframes hero-drop-fountain {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 1; }
  32%  { transform: translate(var(--dx1, 40px), var(--dy1, -10px)); }
  58%  { transform: translate(var(--dx2, 20px), var(--dy2, 12px)); }
  82%  { transform: translate(var(--dx3, 55px), var(--dy3, -6px)); opacity: .9; }
  100% { transform: translate(0, 0); opacity: 0; }
}

/* ==========================================================================
   Scroll reveal (progressive enhancement)
   ========================================================================== */

.js .reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(30px);
  transition: opacity var(--dur-slow) var(--ease), filter var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.js .reveal.is-visible { opacity: 1; filter: blur(0); transform: none; }

.js .reveal-left {
  opacity: 0;
  filter: blur(10px);
  transform: translateX(-48px);
  transition: opacity var(--dur-slow) var(--ease), filter var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.js .reveal-left.is-visible { opacity: 1; filter: blur(0); transform: none; }

.js .reveal-right {
  opacity: 0;
  filter: blur(10px);
  transform: translateX(48px);
  transition: opacity var(--dur-slow) var(--ease), filter var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.js .reveal-right.is-visible { opacity: 1; filter: blur(0); transform: none; }

.js .reveal-scale {
  opacity: 0;
  filter: blur(10px);
  transform: scale(.9);
  transition: opacity var(--dur-slow) var(--ease), filter var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.js .reveal-scale.is-visible { opacity: 1; filter: blur(0); transform: none; }

.js .reveal-group > * { transition-delay: calc(var(--i, 0) * 80ms); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal-left, .js .reveal-right, .js .reveal-scale { filter: none; }
}

/* ==========================================================================
   Principles list — a manifesto-style stacked list, deliberately not a
   grid of icon cards.
   ========================================================================== */

.principle-list { border-top: 1px solid var(--border); }
.principle {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.25rem 1.5rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 700px) {
  .principle { grid-template-columns: 4.5rem 16rem 1fr; }
}
.principle-index {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--border-strong);
}
.principle h3 { margin: 0; }
.principle p:not(.principle-index) { grid-column: 2; color: var(--ink-muted); margin: 0; max-width: 46ch; }
@media (min-width: 700px) {
  .principle p:not(.principle-index) { grid-column: 3; }
}

/* ==========================================================================
   Work panel — one featured project, presented large rather than as a
   grid item.
   ========================================================================== */

.work-panel {
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 1.4rem + 1.8vw, 3rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 1.4rem + 1.8vw, 3rem);
}
@media (min-width: 900px) {
  .work-panel { grid-template-columns: 1.2fr .8fr; align-items: center; }
}

.tag-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.tag::before { content: ''; width: .4rem; height: .4rem; border-radius: 50%; background: var(--accent); }

.work-panel-visual {
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.signal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .6rem;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}
.signal-row:last-child { border-bottom: none; }
.signal-row strong { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; }
.signal-row span { color: var(--ink-faint); }

/* ==========================================================================
   Capabilities grid — a 2-up grid of what we build, set apart from the
   Approach list's numerals with a small monospace index instead.
   ========================================================================== */

.capability-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
@media (min-width: 700px) {
  .capability-grid { grid-template-columns: 1fr 1fr; }
}
.capability {
  padding: clamp(1.5rem, 1.3rem + 1vw, 2.25rem);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.capability-index {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8125rem;
  color: var(--ink-faint);
  margin-bottom: .9rem;
}
.capability h3 { margin-bottom: .625rem; }
.capability p { color: var(--ink-muted); font-size: .9375rem; max-width: 40ch; }

/* ==========================================================================
   About / founder page
   ========================================================================== */

.founder-mark {
  width: 34px; height: 34px;
  filter: invert(1);
  margin-bottom: 1.5rem;
}
@media (prefers-color-scheme: light) { .founder-mark { filter: none; } }

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  align-items: start;
}
@media (min-width: 800px) {
  .about-layout { grid-template-columns: 300px minmax(0, 1fr); }
}

.founder-photo {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.about-layout .stack { max-width: 44rem; }

.pull-quote {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + .8vw, 1.625rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.01em;
}

/* ==========================================================================
   Contact CTA band
   ========================================================================== */

.cta-band {
  border-radius: var(--radius-lg);
  padding: clamp(2.25rem, 1.9rem + 1.8vw, 3.75rem);
  text-align: center;
}
.cta-band .btn-row { margin-top: 1.75rem; justify-content: center; }

/* ==========================================================================
   Utilities
   ========================================================================== */

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: .75rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2.5rem; }
.text-center { text-align: center; }
