:root {
  --stars: #132149;      /* Among the Stars */
  --basque: #1C3B6B;     /* Basque Blue */
  --jboat: #005B95;      /* J Boat */
  --sky: #51A4D6;        /* Blue Dot */
  --teal: #52A598;       /* Cake is Eternal */
  --gold: #FFBB4D;       /* Hummingbird */
  --white: #FFFFFF;
  --paper: #F6F9FB;

  --ink: var(--stars);
  --ink-soft: rgba(19, 33, 73, .72);
  --line: rgba(19, 33, 73, .14);

  --nav-h: 100px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Watermark ---------- */
.watermark {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
main, .footer { position: relative; z-index: 1; }

/* ---------- Intro ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--stars);
  display: grid;
  place-items: center;
  transition: transform 1s var(--ease);
}
.intro__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro__tardi {
  position: relative;
  width: min(200px, 44vw);
  filter: brightness(0) invert(1);
  opacity: 0;
  transform: scale(.15) rotate(-260deg);
  transition: opacity .9s ease, transform 2.2s cubic-bezier(.16, 1, .3, 1);
}
.intro.show .intro__tardi { opacity: 1; transform: none; animation: gaze 3.2s ease-in-out 1.6s infinite; }
@keyframes gaze {
  0%, 100% { translate: 0 0; rotate: -2deg; }
  50% { translate: 4px -10px; rotate: 2deg; }
}
.intro.done { transform: translateY(-100%); }
.intro.gone { display: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(246, 249, 251, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(246, 249, 251, .86); }
.nav__inner {
  height: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav__links { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(20px, 3vw, 44px); }
.nav__links--right { justify-content: flex-end; }
.nav__links a, .nav__mobile a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--sky);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav__logo img { height: 52px; width: auto; transition: transform .5s var(--ease); }
.nav__logo:hover img { transform: scale(1.04); }

.nav__toggle {
  display: none;
  justify-self: end;
  width: 44px; height: 44px;
  border: 0; background: none; padding: 0; cursor: pointer;
  position: relative;
}
.nav__toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 25px; }
.nav.open .nav__toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav.open .nav__toggle span:last-child { top: 21px; transform: rotate(-45deg); }
.nav__mobile { display: none; }

/* ---------- Type & shared ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--jboat);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 10px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  transform: rotate(-30deg);
}
.eyebrow--light { color: var(--sky); }
.eyebrow--light::before { background: var(--gold); }

.section { position: relative; overflow-x: clip; padding: clamp(96px, 14vw, 180px) 0; scroll-margin-top: calc(var(--nav-h) - 1px); }
.section__title {
  font-size: clamp(38px, 5.6vw, 76px);
  line-height: 1.04;
  letter-spacing: -.025em;
  font-weight: 450;
  max-width: 16ch;
  margin-bottom: 32px;
  text-wrap: balance;
}
.section__sub {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  font-weight: 350;
  color: var(--ink-soft);
  max-width: 34ch;
  text-wrap: pretty;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--stars);
  color: var(--white);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .4s var(--ease), background .3s;
}
.btn span { transition: transform .4s var(--ease); }
.btn:hover { background: var(--jboat); transform: translateY(-2px); }
.btn:hover span { transform: translateY(3px); }
.btn--gold { background: var(--gold); color: var(--stars); margin-top: 40px; }
.btn--gold:hover { background: var(--white); }
.btn--gold:hover span { transform: translateX(4px); }

/* Scroll reveals */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + clamp(48px, 9vh, 110px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero__grid { display: grid; grid-template-columns: 1fr; width: 100%; }
.hero__title {
  font-size: clamp(40px, 6vw, 88px);
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 450;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.hero__title em { font-style: italic; font-weight: 350; color: var(--jboat); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.2s var(--ease); }
.hero.in .hero__title .line > span { transform: none; }
.hero.in .hero__title .line:nth-child(2) > span { transition-delay: .1s; }
.hero.in .hero__title .line:nth-child(3) > span { transition-delay: .2s; }
.hero__aside { justify-self: end; max-width: 520px; }
.hero__sub {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.38;
  font-weight: 400;
  margin-bottom: 32px;
}

.ticker {
  margin-top: clamp(56px, 8vh, 96px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: rgba(255, 255, 255, .55);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 48s linear infinite;
}
.ticker span {
  padding: 20px 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.ticker span::after {
  content: "";
  width: 9px; height: 6px;
  margin: 0 34px;
  border-radius: 50%;
  transform: rotate(35deg);
  background: var(--sky);
}
.ticker span:nth-child(4n+2)::after { background: var(--teal); }
.ticker span:nth-child(4n+3)::after { background: var(--jboat); }
.ticker span:nth-child(4n+4)::after { background: var(--gold); }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Advisory ---------- */
.advisory { background: rgba(255, 255, 255, .62); }
.cards {
  margin-top: clamp(64px, 8vw, 110px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px 36px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .4s, opacity 1s var(--ease);
}
.card:nth-child(2) { transition-delay: .08s; }
.card:nth-child(3) { transition-delay: .16s; }
.card:nth-child(4) { transition-delay: .24s; }
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px -24px rgba(19, 33, 73, .28); border-color: rgba(81, 164, 214, .5); }
.card { align-items: center; text-align: center; }
.card__icon {
  width: 96px; height: 96px;
  margin: 4px auto 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(81, 164, 214, .14);
  transition: background .4s, transform .6s var(--ease);
}
.card:hover .card__icon { background: rgba(255, 187, 77, .3); transform: scale(1.06); }
.ico {
  width: 64px; height: 64px; overflow: visible;
  fill: none; stroke: var(--stars); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.ico .fill { fill: var(--stars); stroke: none; }
.ico * { transform-box: fill-box; transform-origin: center; }
.ico__spark, .ico__bubble { opacity: .45; transition: opacity .3s; }
.card:hover .ico__spark { opacity: 1; animation: twinkle .9s ease-in-out infinite; }
.card:hover .ico__bubble { opacity: 1; animation: rise 1.4s ease-in-out infinite; }
/* compass: needle hunts for north */
.card:hover .ico__needle { animation: hunt 1.6s var(--ease) both; }
/* chat: the bubble wiggles and the dots type */
.card:hover .ico__bubblebody { animation: wiggle .7s ease-in-out; }
.card:hover .ico__d1, .card:hover .ico__d2, .card:hover .ico__d3 { animation: typing .9s ease-in-out infinite; }
.card:hover .ico__d2 { animation-delay: .15s; }
.card:hover .ico__d3 { animation-delay: .3s; }
/* growth: bars climb and the arrow redraws */
.ico__bar { transform-origin: bottom; }
.card:hover .ico__bar { animation: grow .7s var(--ease) both; }
.card:hover .ico__b2 { animation-delay: .1s; }
.card:hover .ico__b3 { animation-delay: .2s; }
.ico__arrow { stroke-dasharray: 80; stroke-dashoffset: 0; }
.card:hover .ico__arrow { animation: draw 1s var(--ease) both .15s; }
/* people: a little heart pops up */
.card:hover .ico__heart { animation: pop 1s var(--ease) both; fill: var(--jboat); }
@keyframes hunt { 0% { rotate: 0deg; } 35% { rotate: 200deg; } 60% { rotate: 150deg; } 80% { rotate: 190deg; } 100% { rotate: 180deg; } }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -6deg; } 60% { rotate: 5deg; } }
@keyframes typing { 0%, 60%, 100% { translate: 0 0; } 30% { translate: 0 -4px; } }
@keyframes grow { from { scale: 1 .1; } to { scale: 1 1; } }
@keyframes draw { from { stroke-dashoffset: 80; } to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { scale: .4; translate: 0 6px; } 55% { scale: 1.35; translate: 0 -4px; } 100% { scale: 1; translate: 0 -2px; } }
@keyframes twinkle { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: 1.4; rotate: 45deg; } }
@keyframes rise { 0% { translate: 0 0; } 50% { translate: 0 -6px; } 100% { translate: 0 0; } }
.card h3 { font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -.01em; margin-bottom: 14px; }
.card p { font-size: 16px; color: var(--ink-soft); margin: 0; }

/* ---------- Philosophy ---------- */
.philosophy { background: rgba(19, 33, 73, .94); color: var(--white); }
.philosophy .section__sub { color: rgba(255, 255, 255, .74); }
.philosophy__grid, .about__grid, .contact__grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.principles {
  margin-top: clamp(72px, 9vw, 120px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.principle { border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 28px; }
.principle:nth-child(2) { transition-delay: .1s; }
.principle:nth-child(3) { transition-delay: .2s; }
.principle h3 { font-size: 24px; font-weight: 500; margin: 20px 0 12px; }
.principle p { color: rgba(255, 255, 255, .7); font-size: 16px; margin: 0; }
.mark-ico {
  display: block;
  width: 52px; height: 52px;
  -webkit-mask: url(assets/waterbear-mark.svg) center / contain no-repeat;
  mask: url(assets/waterbear-mark.svg) center / contain no-repeat;
  animation: spin 40s linear infinite;
}
.principle:hover .mark-ico { animation-duration: 6s; }
.mark-ico--teal { background: var(--teal); }
.mark-ico--sky { background: var(--sky); }
.mark-ico--gold { background: var(--gold); }
@keyframes spin { to { rotate: 360deg; } }

/* Tardigrades */
.tardi { margin: 0; width: 100%; max-width: 240px; justify-self: center; }
.tardi img { width: 100%; height: auto; }
.tardi--waving img { filter: brightness(0) invert(1); animation: bob 5s ease-in-out infinite; transform-origin: 50% 90%; }
.tardi--space img { animation: drift 14s ease-in-out infinite; }
.tardi:hover img { animation-duration: 1.2s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(-3deg); }
  33% { transform: translate(10px, -18px) rotate(2deg); }
  66% { transform: translate(-8px, -6px) rotate(-1deg); }
}
@keyframes waddle {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-6px) rotate(-1.6deg); }
  50% { transform: translateY(0) rotate(0); }
  75% { transform: translateY(-6px) rotate(1.6deg); }
}

/* ---------- About ---------- */
.about { background: rgba(255, 255, 255, .5); }
.about .section__sub { max-width: 40ch; }
.about__body { margin-top: 36px; max-width: 58ch; color: var(--ink-soft); }
.founder {
  margin-top: clamp(96px, 12vw, 160px);
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.founder__photo { margin: 0; position: relative; }
.founder__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
}
.founder__photo::after {
  content: "";
  position: absolute;
  width: 34%; aspect-ratio: 1.5;
  right: -6%; bottom: -5%;
  border-radius: 50%;
  background: var(--gold);
  transform: rotate(-28deg);
  z-index: -1;
}
.founder__name { font-size: clamp(36px, 4.4vw, 58px); letter-spacing: -.025em; font-weight: 450; margin-bottom: 28px; }
.founder__lede { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.42; margin-bottom: 24px; }
.founder__note {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 12px;
  border-radius: 999px;
  background: rgba(255, 187, 77, .22);
  font-weight: 600; font-size: 16px;
}
.founder__note .mark-ico { width: 26px; height: 26px; background: var(--stars); }
.founder__text p:last-child { color: var(--ink-soft); max-width: 56ch; }

/* ---------- Contact ---------- */
.contact { background: rgba(28, 59, 107, .95); color: var(--white); }
.contact .section__sub { color: rgba(255, 255, 255, .76); }
.contact__grid { grid-template-columns: 1fr; }
.contact .section__sub { max-width: 40ch; }

/* ---------- Footer ---------- */
.footer { background: var(--stars); color: rgba(255, 255, 255, .7); padding: 48px 0 32px; font-size: 15px; }
.footer__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.footer__brand p { margin-top: 18px; max-width: 34ch; }
.footer__tardi { margin: 0; width: 130px; flex-shrink: 0; }
.footer__tardi img { width: 100%; height: auto; filter: brightness(0) invert(1); animation: waddle 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
.footer__bottom {
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.footer__social { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 500; transition: color .3s; }
.footer__social svg { width: 18px; height: 18px; fill: currentColor; }
.footer__social:hover { color: var(--gold); }
.footer__logo img { height: 30px; width: auto; }
.footer p { margin: 0; }
.footer__legal { color: rgba(255, 255, 255, .5); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card { min-height: 260px; }
}
@media (max-width: 860px) {
  :root { --nav-h: 76px; }
  body { font-size: 17px; }
  .nav__inner { grid-template-columns: 44px 1fr 44px; }
  .nav__links { display: none; }
  .nav__logo { grid-column: 2; justify-self: center; }
  .nav__logo img { height: 38px; }
  .nav__toggle { display: block; grid-column: 3; }
  .nav__mobile {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, transform .4s var(--ease), visibility .3s;
  }
  .nav__mobile a { font-size: 26px; font-weight: 450; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav.open .nav__mobile { opacity: 1; transform: none; visibility: visible; }
  .hero__aside { justify-self: start; }
  .philosophy__grid, .about__grid, .contact__grid, .founder { grid-template-columns: 1fr; }
  .tardi { max-width: 180px; }
  .principles { grid-template-columns: 1fr; }
  .founder__photo { max-width: 440px; }
  .footer__tardi { width: 96px; }
}
@media (max-width: 560px) {
  .hero__title { font-size: 8vw; }
  .founder__photo { max-width: 300px; }
  .eyebrow { font-size: 11.5px; letter-spacing: .12em; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero__title .line > span { opacity: 1; transform: none; transition: none; }
  .ticker__track, .tardi img, .footer__tardi img, .mark-ico, .intro__tardi { animation: none; }
}
