*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #0b0f17;
  --ink-raised: #ffffff;
  --steel: #1e293b;
  --steel-bright: #0b0f17;
  --snow: #f8fafc;
  --ember: #10b981;
  --ember-deep: #047857;
  --ember-glow: rgba(16, 185, 129, 0.24);
  --aurora: rgba(6, 182, 212, 0.2);
  --line: rgba(11, 15, 23, 0.12);
  --line-strong: rgba(11, 15, 23, 0.28);
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 72rem;
}

html {
  scroll-behavior: smooth;
  background: var(--snow);
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(6, 182, 212, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 70% 40% at 50% 110%, rgba(16, 185, 129, 0.12) 0%, transparent 50%),
    var(--snow);
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* —— Atmosphere —— */
.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.atmosphere__aurora {
  position: absolute;
  inset: -20% -10% auto;
  height: 75vh;
  background:
    radial-gradient(ellipse 60% 50% at 12% 28%, rgba(6, 182, 212, 0.16), transparent 68%),
    radial-gradient(ellipse 45% 40% at 82% 18%, rgba(16, 185, 129, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.8) 0%, transparent 55%);
  animation: aurora-drift 22s ease-in-out infinite alternate;
}

.atmosphere__ember {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -25%;
  height: 60vh;
  background:
    radial-gradient(ellipse 55% 45% at 48% 78%, rgba(16, 185, 129, 0.13), transparent 68%),
    radial-gradient(ellipse 35% 30% at 22% 92%, rgba(6, 182, 212, 0.1), transparent 70%),
    radial-gradient(ellipse 25% 20% at 72% 88%, rgba(16, 185, 129, 0.08), transparent 70%);
  animation: ember-pulse 14s ease-in-out infinite alternate;
}

.atmosphere__grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

@keyframes aurora-drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.04); }
}

@keyframes ember-pulse {
  from { opacity: 0.75; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-12px); }
}

/* —— Intro —— */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  gap: 1rem;
  text-align: center;
  background: var(--snow);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.intro.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro__mark {
  width: clamp(5.5rem, 18vw, 7.5rem);
  height: auto;
  border-radius: 1.15rem;
  justify-self: center;
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(16, 185, 129, 0.18);
  animation: intro-rise 0.7s ease both;
}

.intro__line {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  animation: intro-rise 0.7s ease 0.15s both;
}

@keyframes intro-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Site shell —— */
.site {
  position: relative;
  z-index: 1;
  animation: site-in 0.7s ease both;
}

.site[hidden] {
  display: none;
}

@keyframes site-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* —— Top bar —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
  background: color-mix(in srgb, var(--snow) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.topbar__brand-mark {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.42rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--line);
}

.topbar__nav {
  display: flex;
  gap: 1.35rem;
}

.topbar__nav a {
  font-size: 0.92rem;
  color: var(--steel-bright);
  text-decoration: none;
  transition: color 0.15s ease;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  color: var(--snow);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 70svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(5rem, 14vh, 8rem) var(--pad) clamp(3.5rem, 10vh, 6rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__mark {
  position: absolute;
  right: -18%;
  bottom: -30%;
  z-index: -1;
  width: clamp(16rem, 48vw, 34rem);
  height: auto;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
  animation: mark-settle 1.4s ease both;
}

@keyframes mark-settle {
  from { opacity: 0; transform: translateY(4%) scale(1.02); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 9vw, 5.75rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  max-width: 12ch;
  margin-bottom: 1.35rem;
  animation: intro-rise 0.8s ease 0.05s both;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--steel-bright);
  max-width: 22ch;
  margin-bottom: 1rem;
  animation: intro-rise 0.8s ease 0.12s both;
}

.hero__lede {
  max-width: 36ch;
  color: var(--steel);
  margin-bottom: 2rem;
  animation: intro-rise 0.8s ease 0.18s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  animation: intro-rise 0.8s ease 0.24s both;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.2rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn--primary {
  background: var(--ember);
  color: var(--ink);
  border: 1px solid var(--ember);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #34d399;
  border-color: #34d399;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--steel-bright);
}

/* —— Sections —— */
.section {
  padding: clamp(4rem, 10vh, 7rem) var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}

.section__head {
  margin-bottom: clamp(2rem, 5vh, 3rem);
  max-width: 36rem;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 0.65rem;
}

.section__lede {
  color: var(--steel);
  max-width: 42ch;
}

/* —— Story —— */
.story {
  max-width: 46rem;
}

.story__lead {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.55;
  color: var(--steel-bright);
  margin-bottom: clamp(2rem, 5vh, 2.75rem);
}

.story-beats {
  list-style: none;
  display: grid;
  gap: 1.5rem;
  margin-bottom: clamp(1.75rem, 4vh, 2.5rem);
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
}

.story-beats li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.story-beats li:first-child {
  border-top: none;
  padding-top: 1.35rem;
}

.story-beats__step {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ember);
  letter-spacing: 0.02em;
  padding-top: 0.15rem;
}

.story-beats__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.story-beats__text {
  color: var(--steel);
  max-width: 42ch;
  font-size: 0.98rem;
}

.story__aside {
  color: var(--steel);
  font-size: 0.98rem;
  max-width: 44ch;
  padding-left: 0.95rem;
  border-left: 2px solid rgba(16, 185, 129, 0.42);
}

/* —— Work list —— */
.work-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.work-item {
  border-bottom: 1px solid var(--line);
}

.work-link {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 1rem 1.25rem;
  align-items: baseline;
  padding: 1.35rem 0.15rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.work-link:hover,
.work-link:focus-visible {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), transparent 55%);
  outline: none;
}

.work-index {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ember);
  letter-spacing: 0.02em;
}

.work-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.work-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  letter-spacing: -0.02em;
}

.work-desc {
  color: var(--steel);
  font-size: 0.98rem;
  max-width: 52ch;
}

.work-go {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.work-link:hover .work-go,
.work-link:focus-visible .work-go {
  opacity: 1;
  transform: translateX(0);
  color: var(--ember);
}

.work-note {
  margin: 0 0 1.1rem 4.25rem;
  max-width: 36rem;
  font-size: 0.9rem;
  color: var(--steel);
}

.work-note summary {
  cursor: pointer;
  color: var(--steel-bright);
  list-style: none;
  width: fit-content;
}

.work-note summary::-webkit-details-marker {
  display: none;
}

.work-note summary::before {
  content: '+ ';
  color: var(--ember);
  font-weight: 700;
}

.work-note[open] summary::before {
  content: '− ';
}

.work-note p {
  margin-top: 0.55rem;
  padding-left: 0.85rem;
  border-left: 2px solid rgba(16, 185, 129, 0.38);
}

.work-note .label {
  color: var(--ember);
  font-weight: 600;
  margin-right: 0.4rem;
}

/* —— Crew —— */
.crew {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
}

.crew-role {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.55rem;
}

.crew-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.crew-bio {
  color: var(--steel);
  font-size: 0.98rem;
  max-width: 32ch;
}

.crew-member--model .crew-role {
  color: var(--steel-bright);
}

/* —— Services —— */
.services {
  list-style: none;
  border-top: 1px solid var(--line);
}

.services li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0.75rem 2rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.services__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.services__note {
  color: var(--steel);
  font-size: 0.98rem;
}

/* —— Collective Watch —— */
.section--collective {
  max-width: var(--max);
}

.collective__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0 0 clamp(1.75rem, 4vh, 2.5rem);
  font-size: 0.88rem;
  color: var(--steel);
}

.collective__pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
  animation: collective-pulse 2.4s ease-out infinite;
}

.collective__sep {
  opacity: 0.45;
}

.collective-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 clamp(2rem, 5vh, 3rem);
  border-top: 1px solid var(--line);
}

.collective-metrics > div {
  padding: 1.15rem 1rem 1.15rem 0;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.collective-metrics > div:nth-child(4n) {
  border-right: none;
  padding-right: 0;
}

.collective-metrics dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.45rem;
}

.collective-metrics dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.collective__hint {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--steel);
  text-transform: none;
}

.collective-log {
  max-width: 46rem;
  margin-bottom: clamp(1.5rem, 4vh, 2.25rem);
}

.collective-log__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.collective-log__list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.collective-log__list li {
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--steel);
  font-size: 0.98rem;
  line-height: 1.55;
}

.collective-log__tag {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ember);
}

.collective__aside {
  color: var(--steel);
  font-size: 0.98rem;
  max-width: 44ch;
  padding-left: 0.95rem;
  border-left: 2px solid rgba(6, 182, 212, 0.45);
}

@keyframes collective-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* —— Contact —— */
.section--contact {
  padding-bottom: clamp(5rem, 12vh, 8rem);
}

.contact-email {
  display: inline-block;
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
  text-decoration: none;
  border-bottom: 2px solid rgba(16, 185, 129, 0.45);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-email:hover,
.contact-email:focus-visible {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

/* —— Footer —— */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.5rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
  color: var(--steel);
  font-size: 0.88rem;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.footer__brand img {
  width: 1.05rem;
  height: auto;
  flex-shrink: 0;
}

.footer__links {
  display: flex;
  gap: 1.25rem;
}

.footer__links a {
  color: var(--steel-bright);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer__links a:hover,
.footer__links a:focus-visible {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

.footer__aside {
  opacity: 0.85;
}

/* —— Legal pages —— */
.legal {
  max-width: 42rem;
  padding: clamp(4.5rem, 10vh, 6.5rem) var(--pad) clamp(3rem, 8vh, 5rem);
}

.legal__kicker {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.75rem;
}

.legal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.legal__updated {
  color: var(--steel);
  font-size: 0.95rem;
  margin-bottom: 2.25rem;
}

.legal h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.7rem;
}

.legal p,
.legal li {
  color: var(--steel-bright);
}

.legal p + p {
  margin-top: 0.85rem;
}

.legal ul {
  margin: 0.7rem 0 0 1.15rem;
}

.legal li + li {
  margin-top: 0.4rem;
}

.legal a {
  color: var(--ember-deep);
}

.legal a:hover,
.legal a:focus-visible {
  color: var(--ember);
}

/* —— Toast —— */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 40;
  transform: translateX(-50%) translateY(12px);
  padding: 0.7rem 1.1rem;
  background: var(--ink-raised);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--ember);
  color: var(--steel-bright);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast[hidden] {
  display: none;
}

.toast:not([hidden]) {
  display: block;
}

/* —— Responsive —— */
@media (max-width: 800px) {
  .crew {
    grid-template-columns: 1fr;
  }

  .services li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .collective-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collective-metrics > div:nth-child(4n) {
    border-right: 1px solid var(--line);
    padding-right: 1rem;
  }

  .collective-metrics > div:nth-child(2n) {
    border-right: none;
    padding-right: 0;
  }

  .work-link {
    grid-template-columns: 2.25rem 1fr;
  }

  .work-go {
    display: none;
  }

  .work-note {
    margin-left: 2.4rem;
  }
}

@media (max-width: 560px) {
  .topbar__nav {
    gap: 0.7rem;
    font-size: 0.88rem;
  }

  .hero {
    min-height: 76svh;
    justify-content: flex-end;
  }

  .collective-metrics {
    grid-template-columns: 1fr;
  }

  .collective-metrics > div,
  .collective-metrics > div:nth-child(2n),
  .collective-metrics > div:nth-child(4n) {
    border-right: none;
    padding-right: 0;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .atmosphere__aurora,
  .atmosphere__ember,
  .intro__mark,
  .intro__line,
  .hero__mark,
  .hero__brand,
  .hero__headline,
  .hero__lede,
  .hero__actions,
  .site,
  .intro,
  .collective__pulse {
    animation: none;
  }

  .intro {
    transition: none;
  }
}
