:root {
  /* Ocean depth surfaces */
  --ink: #050d1c;
  --surface: #0a1426;
  --surface-2: #0d1830;
  --surface-3: #122139;
  --surface-4: #1a2c47;

  /* Brand colors: warm bone mark + cool aqua energy on navy */
  --bone: #f1e8d4;
  --bone-dim: #d8cfb9;
  --aqua: #3ed2dc;
  --aqua-bright: #7df4fb;
  --aqua-deep: #0c5b63;

  /* Text */
  --text: #e9eef9;
  --text-soft: #aab6cf;
  --text-muted: #76829c;

  /* Lines & glass */
  --line: rgba(225, 232, 247, 0.10);
  --line-soft: rgba(225, 232, 247, 0.07);
  --line-strong: rgba(62, 210, 220, 0.34);
  --glass: rgba(225, 232, 247, 0.035);
  --glass-strong: rgba(225, 232, 247, 0.07);

  --max: 1200px;
  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(5, 13, 28, 0.72), rgba(5, 13, 28, 0.88) 44%, rgba(5, 13, 28, 0.97)),
    radial-gradient(120% 80% at 82% -8%, rgba(62, 210, 220, 0.2), transparent 46%),
    radial-gradient(90% 70% at 6% 6%, rgba(241, 232, 212, 0.08), transparent 42%),
    url("trr_deep_bg.png") center top / cover no-repeat,
    var(--ink);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Faint bathymetric grid wash */
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(225, 232, 247, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 232, 247, 0.022) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(120% 90% at 50% 0%, rgba(0, 0, 0, 0.6), transparent 78%);
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--aqua);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 16px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h1 {
  max-width: 15ch;
  font-size: clamp(2.7rem, 6vw, 5rem);
  font-weight: 600;
}

h2 {
  max-width: 20ch;
  font-size: clamp(1.9rem, 4vw, 3.3rem);
  font-weight: 600;
}

h3 {
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  color: var(--text-soft);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px clamp(18px, 4vw, 56px) 0;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  min-height: 60px;
  margin: 0 auto;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 16, 32, 0.66);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 56px;
  height: 19px;
  flex: 0 0 auto;
  color: var(--bone);
  transition: color 200ms ease, transform 300ms ease;
}

.brand:hover .brand-mark {
  color: var(--aqua-bright);
  transform: translateY(-1px);
}

.brand-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.brand-name-top {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.brand-name-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--aqua);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.nav-links a {
  padding: 9px 13px;
  border-radius: 7px;
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover {
  background: rgba(225, 232, 247, 0.06);
  color: var(--text);
}

.nav-cta {
  color: var(--aqua) !important;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.nav-cta:hover {
  background: rgba(62, 210, 220, 0.1) !important;
  color: var(--aqua-bright) !important;
}

/* ---------- Layout primitives ---------- */
.section-pad {
  padding: clamp(60px, 8vw, 120px) clamp(18px, 4vw, 56px);
}

.hero-grid,
.section-heading,
.card-grid,
.domain-grid,
.approach-section,
.contact-panel,
.site-footer {
  max-width: var(--max);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--aqua);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--aqua), transparent);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding-top: clamp(36px, 6vw, 80px);
}

.hero-grid {
  display: grid;
  gap: clamp(34px, 6vw, 72px);
  align-items: start;
  max-width: 980px;
}

.hero-copy {
  display: grid;
  justify-items: center;
  margin-inline: auto;
  text-align: center;
  gap: 26px;
  max-width: 760px;
}

.hero-lede {
  max-width: 56ch;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 200ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--bone);
  color: #122139;
  box-shadow: 0 10px 30px -12px rgba(241, 232, 212, 0.5);
}

.button.primary:hover {
  background: #fbf5e7;
  box-shadow: 0 16px 40px -12px rgba(241, 232, 212, 0.6);
}

.button.secondary {
  border-color: var(--line-strong);
  background: rgba(62, 210, 220, 0.04);
  color: var(--aqua-bright);
}

.button.secondary:hover {
  border-color: var(--aqua);
  background: rgba(62, 210, 220, 0.1);
  box-shadow: 0 0 24px -6px rgba(62, 210, 220, 0.4);
}

/* ---------- Hero lockup ---------- */
.hero-lockup {
  display: grid;
  justify-items: center;
  gap: 20px;
  width: min(100%, 760px);
  margin-inline: auto;
  color: var(--bone);
  text-align: center;
}

.hero-lockup-mark {
  width: clamp(180px, 32vw, 360px);
  height: auto;
  filter: drop-shadow(0 12px 34px rgba(5, 13, 28, 0.6));
}

.hero-wordmark {
  display: grid;
  justify-items: center;
  gap: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.hero-wordmark-main {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(2rem, 6.2vw, 5.2rem);
  font-weight: 500;
  letter-spacing: 0.28em;
}

.hero-wordmark-sub {
  color: var(--aqua);
  font-family: var(--font-mono);
  font-size: clamp(0.86rem, 2vw, 1.42rem);
  font-weight: 500;
  letter-spacing: 0.58em;
}

/* ---------- Banded sections ---------- */
.domains-band {
  border-block: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(62, 210, 220, 0.045), transparent 46%),
    rgba(225, 232, 247, 0.018);
}

.section-heading,
.approach-copy {
  display: grid;
  gap: 16px;
}

.approach-copy p {
  font-size: 1.08rem;
}

.section-heading {
  margin-bottom: 40px;
}

/* ---------- Capability cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.glass-card {
  display: grid;
  grid-column: span 2;
  align-content: start;
  gap: 16px;
  min-height: 260px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 220ms ease, background 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.card-mark {
  width: 46px;
  height: auto;
  margin-bottom: 4px;
  color: var(--aqua);
  opacity: 0.8;
}

.glass-card:nth-child(4),
.glass-card:nth-child(5) {
  grid-column: span 3;
}

.glass-card:hover {
  border-color: var(--line-strong);
  background: var(--glass-strong);
  transform: translateY(-3px);
  box-shadow: 0 22px 50px -30px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(62, 210, 220, 0.06);
}

.glass-card p,
.domain-grid p,
.process-list p {
  color: var(--text-soft);
}

/* ---------- Domains ---------- */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.domain-grid article {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 210px;
  padding: 26px 24px 26px 0;
}

.domain-grid article + article {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.domain-grid article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 2px;
  background: var(--aqua);
}

.domain-grid article + article::before {
  left: 26px;
}

.domain-grid h3 {
  font-size: 1.3rem;
}

/* ---------- Approach ---------- */
.approach-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.process-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(225, 232, 247, 0.025);
  transition: border-color 200ms ease, background 200ms ease;
}

.process-list li:hover {
  border-color: var(--line-strong);
  background: rgba(62, 210, 220, 0.04);
}

.process-list div {
  display: grid;
  gap: 8px;
}

/* ---------- Contact ---------- */
.contact-band {
  padding-top: 0;
}

.contact-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  padding: clamp(30px, 5vw, 56px);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(62, 210, 220, 0.16), transparent 55%),
    linear-gradient(135deg, rgba(62, 210, 220, 0.05), rgba(225, 232, 247, 0.02)),
    var(--surface-2);
  box-shadow: inset 0 0 40px rgba(62, 210, 220, 0.06);
}

.contact-mark {
  position: absolute;
  right: -40px;
  top: 50%;
  width: 360px;
  height: auto;
  transform: translateY(-50%);
  color: rgba(125, 244, 251, 0.12);
  pointer-events: none;
}

.contact-copy {
  position: relative;
  display: grid;
  gap: 14px;
}

.contact-panel h2 {
  max-width: 24ch;
  font-size: clamp(1.7rem, 3.4vw, 3rem);
}

.contact-panel .button {
  position: relative;
  flex: 0 0 auto;
}

.contact-form {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.contact-form label {
  margin-top: 8px;
  font-weight: 600;
}

.contact-form label span,
.contact-direct {
  color: var(--text-soft);
  font-weight: 400;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink);
  color: var(--text);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
}

.contact-form .button {
  margin-top: 12px;
  cursor: pointer;
}

.contact-form .button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.contact-status:empty {
  display: none;
}

.contact-status[data-error="true"] {
  color: #ffb8b8;
}

.contact-direct {
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.contact-direct a {
  text-decoration: underline;
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding: 30px clamp(18px, 4vw, 56px) 48px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand .brand-mark {
  width: 48px;
  height: 16px;
}

.footer-brand p {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.footer-tag {
  max-width: 52ch;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ---------- About ---------- */
.about-page {
  max-width: var(--max);
  margin-inline: auto;
}

.about-mission {
  max-width: 800px;
  margin-bottom: clamp(64px, 9vw, 120px);
}

.about-mission h1 {
  max-width: 19ch;
  margin: 0 0 32px;
}

.about-prose {
  display: grid;
  justify-items: start;
  gap: 24px;
  max-width: 65ch;
}

.about-lede {
  color: var(--text);
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
}

.about-founder {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.founder-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-self: start;
  gap: 20px;
}

.founder-heading > .eyebrow {
  grid-column: 1 / -1;
}

.founder-photo {
  display: block;
  width: clamp(112px, 12vw, 160px);
  height: auto;
  border-radius: 16px;
}

.founder-details {
  min-width: 0;
}

.founder-heading h2 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3.5vw, 3rem);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  text-decoration: none;
}

.profile-links svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}

.profile-links a:hover {
  border-color: var(--aqua-bright);
}

.about-prose p a,
.founder-experience h3 a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
}

.profile-links a:hover,
.about-prose a:hover,
.nav-links a[aria-current="page"] {
  color: var(--aqua-bright);
}

.founder-experience {
  display: grid;
  gap: 28px;
  margin: 8px 0;
}

.founder-experience h3 {
  margin-bottom: 12px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.card-grid .reveal:nth-child(2) { transition-delay: 60ms; }
.card-grid .reveal:nth-child(3) { transition-delay: 120ms; }
.card-grid .reveal:nth-child(4) { transition-delay: 60ms; }
.card-grid .reveal:nth-child(5) { transition-delay: 120ms; }
.domain-grid .reveal:nth-child(2) { transition-delay: 70ms; }
.domain-grid .reveal:nth-child(3) { transition-delay: 140ms; }
.domain-grid .reveal:nth-child(4) { transition-delay: 210ms; }
.process-list .reveal:nth-child(2) { transition-delay: 80ms; }
.process-list .reveal:nth-child(3) { transition-delay: 160ms; }

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

/* ---------- Responsive ---------- */
@media (min-width: 941px) {
  .about-page {
    max-width: 912px;
  }

  .about-prose {
    max-width: none;
  }
}

@media (max-width: 940px) {
  .nav-shell {
    gap: 10px;
    flex-wrap: wrap;
  }

  .brand-name-top {
    font-size: 0.86rem;
  }

  .hero-grid,
  .approach-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .glass-card,
  .glass-card:nth-child(4),
  .glass-card:nth-child(5) {
    grid-column: span 1;
  }

  .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .domain-grid article {
    padding: 24px 20px;
  }

  .domain-grid article,
  .domain-grid article + article {
    padding-left: 20px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .domain-grid article::before,
  .domain-grid article + article::before {
    left: 20px;
    top: -1px;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding-top: 10px;
  }

  .nav-shell {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    gap: 4px 6px;
    font-size: 0.68rem;
  }

  .nav-links a {
    padding: 8px 9px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .card-grid,
  .domain-grid {
    grid-template-columns: 1fr;
  }

  .glass-card,
  .domain-grid article {
    min-height: auto;
  }

  .contact-panel .button {
    width: 100%;
    overflow-wrap: anywhere;
  }
}
