:root {
  --void: #10151c;
  --field: #1a2433;
  --surface: #222c3a;
  --bone: #e4d9c8;
  --dust: #8a8478;
  --copper: #e07a3d;
  --copper-ink: #1a120c;
  --hair: rgba(228, 217, 200, 0.14);
  --scrim: linear-gradient(180deg, rgba(16, 21, 28, 0.12) 0%, rgba(16, 21, 28, 0.72) 100%);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --radius: 1.75rem;
  --radius-in: 1.375rem;
  --nav: 30;
  --grain: 40;
  --overlay: 50;
  --max: 1400px;
}

html[data-theme="day"] {
  --void: #e4d9c8;
  --field: #d8ccb8;
  --surface: #eee6d6;
  --bone: #161a22;
  --dust: #5c564c;
  --copper: #c45a22;
  --copper-ink: #f6efe4;
  --hair: rgba(22, 26, 34, 0.12);
  --scrim: linear-gradient(180deg, rgba(16, 21, 28, 0.2) 0%, rgba(16, 21, 28, 0.78) 100%);
}

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

html {
  scroll-behavior: smooth;
}

html[data-theme="night"] {
  color-scheme: dark;
}

html[data-theme="day"] {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--void);
  color: var(--bone);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: -0.011em;
}

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

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  font-family: Syne, Manrope, sans-serif;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0;
}

p {
  margin: 0;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 60;
  padding: 0.7rem 1rem;
  background: var(--copper);
  color: var(--copper-ink);
  border-radius: 999px;
}

.skip:focus {
  top: 1rem;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: var(--grain);
  pointer-events: none;
  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");
}

.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

html[data-theme="day"] .starfield {
  display: none;
}

.icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  display: block;
}

/* Buttons */
.btn {
  --mx: 0px;
  --my: 0px;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.85rem 0.4rem 0.85rem 1.35rem;
  font-family: Syne, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transform: translate(var(--mx), var(--my));
  transition: transform 0.55s var(--ease), background 0.55s var(--ease), color 0.55s var(--ease);
}

.btn-primary {
  background: var(--copper);
  color: var(--copper-ink);
}

.btn-primary:hover .btn-ico {
  transform: translate(2px, -1px) scale(1.05);
}

.btn:active {
  transform: translate(var(--mx), var(--my)) scale(0.98);
}

.btn-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(26, 18, 12, 0.14);
  transition: transform 0.55s var(--ease);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.chip:focus-visible,
.burger:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

/* Island nav */
.nav-wrap {
  position: fixed;
  top: 1.1rem;
  left: 0;
  right: 0;
  z-index: var(--nav);
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}

body.menu-open .nav-wrap {
  z-index: 60;
}

.island {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  height: 64px;
  padding: 0.4rem 0.4rem 0.4rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(16, 21, 28, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

html[data-theme="day"] .island {
  background: rgba(238, 230, 214, 0.72);
}

.wordmark {
  font-family: Syne, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.04em;
}

.nav-links {
  display: flex;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--dust);
  transition: color 0.45s var(--ease);
}

.nav-links a:hover {
  color: var(--bone);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

html[data-theme="night"] .icon-sun {
  display: none;
}

html[data-theme="day"] .icon-moon {
  display: none;
}

.btn-nav {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.burger {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  background: transparent;
  position: relative;
  cursor: pointer;
}

.burger span {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  height: 1.5px;
  background: var(--bone);
  transition: transform 0.55s var(--ease), opacity 0.4s var(--ease);
}

.burger span:first-child {
  top: 1.1rem;
}

.burger span:last-child {
  top: 1.5rem;
}

.burger.is-open span:first-child {
  transform: translateY(0.2rem) rotate(45deg);
}

.burger.is-open span:last-child {
  transform: translateY(-0.2rem) rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: var(--overlay);
  background: rgba(16, 21, 28, 0.84);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: grid;
  place-items: center;
}

html[data-theme="day"] .menu {
  background: rgba(228, 217, 200, 0.9);
}

.menu[hidden] {
  display: none;
}

.menu-inner {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  text-align: center;
}

.menu-inner a {
  font-family: Syne, sans-serif;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  opacity: 0;
  transform: translateY(2.4rem);
}

.menu.is-open .menu-inner a {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.menu.is-open .menu-inner a:nth-child(1) {
  transition-delay: 0.08s;
}
.menu.is-open .menu-inner a:nth-child(2) {
  transition-delay: 0.14s;
}
.menu.is-open .menu-inner a:nth-child(3) {
  transition-delay: 0.2s;
}
.menu.is-open .menu-inner a:nth-child(4) {
  transition-delay: 0.26s;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100dvh;
  isolation: isolate;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-scrim {
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: 5.5rem 6vw 5rem;
  background: var(--scrim);
}

.hero-copy {
  max-width: 38rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  color: #efe7d8;
  padding-bottom: 0.15rem;
}

.lede {
  margin: 1.1rem 0 1.6rem;
  max-width: 34ch;
  color: #d5cbb8;
  font-size: 1.05rem;
}

/* Who */
.who {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 8.5rem 6vw;
}

.who-frame {
  margin: 0;
  padding: 0.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.03);
}

.who-frame img {
  width: 100%;
  height: min(70vh, 640px);
  object-fit: cover;
  border-radius: var(--radius-in);
}

.who-copy h2 {
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  margin-bottom: 1.25rem;
}

.who-copy p {
  color: var(--dust);
  max-width: 38ch;
}

.who-copy p + p {
  margin-top: 1rem;
}

/* Work bento */
.work {
  max-width: var(--max);
  margin: 0 auto;
  padding: 7.5rem 6vw 8rem;
}

.work h2,
.method-head h2,
.limits h2,
.transmit-intro h2,
.close-copy h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.work h2 {
  margin-bottom: 2.4rem;
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.tile {
  border-radius: var(--radius);
  border: 1px solid var(--hair);
  background: var(--field);
  overflow: hidden;
  min-height: 16rem;
  position: relative;
}

.tile-lg {
  grid-column: span 7;
  min-height: 28rem;
}

.tile-lg + .tile-plain {
  grid-column: span 5;
}

.tile-photo,
.bento .tile-plain:nth-of-type(n + 3) {
  grid-column: span 4;
  min-height: 20rem;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.tile-copy {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 1.6rem 1.6rem;
  background: linear-gradient(180deg, transparent, rgba(16, 21, 28, 0.88));
  color: #efe7d8;
}

.tile-plain {
  padding: 1.7rem 1.7rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.tile h3 {
  font-size: 1.45rem;
  margin-bottom: 0.45rem;
}

.tile-plain p,
.tile-copy p {
  color: #c9c0b0;
  max-width: 32ch;
}

.tile-plain p {
  color: var(--dust);
}

/* Method */
.method {
  padding-top: 2rem;
}

.method-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 6vw 2rem;
}

.method-pin {
  overflow: visible;
}

.method-track {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.station {
  width: 100%;
  min-height: auto;
  padding: 6.5rem 4vw 3.2rem;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 1.4rem;
}

/* Pinning is an enhancement; static and reduced-motion views keep every station. */
.method-pin.is-horizontal { overflow: hidden; }
.method-pin.is-horizontal .method-track { flex-direction: row; width: max-content; max-width: none; margin: 0; }
.method-pin.is-horizontal .station { width: min(86vw, 920px); min-height: 100dvh; }

.station img {
  width: 100%;
  height: 56vh;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--hair);
}

.station-verb {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--copper);
  margin-bottom: 0.4rem;
}

.station h3 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.station-copy p:last-child {
  color: var(--dust);
  max-width: 40ch;
}

/* Transmit */
section[id] {
  scroll-margin-top: 6.5rem;
}

.transmit {
  padding: 9.5rem 6vw 8rem;
}

.transmit-shell {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  align-items: start;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.9rem;
}

.transmit-intro p:last-of-type {
  margin-top: 1rem;
  color: var(--dust);
  max-width: 38ch;
}

.dish {
  --aim: -18deg;
  margin-top: 2.6rem;
  width: 180px;
  height: 180px;
  position: relative;
}

.dish-bowl {
  width: 150px;
  height: 150px;
  border-radius: 50% 50% 46% 46%;
  border: 1px solid color-mix(in srgb, var(--copper) 45%, var(--hair));
  background:
    radial-gradient(circle at 35% 30%, rgba(224, 122, 61, 0.18), transparent 42%),
    var(--field);
  transform: rotate(var(--aim));
  transform-origin: 50% 80%;
  transition: transform 0.7s var(--ease);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.dish-stem {
  position: absolute;
  left: 86px;
  top: 132px;
  width: 2px;
  height: 42px;
  background: var(--dust);
}

.dish-beam {
  position: absolute;
  left: 92px;
  top: 18px;
  width: 70px;
  height: 2px;
  background: linear-gradient(90deg, var(--copper), transparent);
  transform: rotate(var(--aim));
  transform-origin: left center;
  opacity: 0.7;
  transition: transform 0.7s var(--ease);
}

.console {
  padding: 0.45rem;
  border-radius: var(--radius);
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.03);
}

.console > * {
  margin-left: 1.2rem;
  margin-right: 1.2rem;
}

.freq-label,
.field-help,
.field-error {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
}

.freq-label {
  display: flex;
  justify-content: space-between;
  color: var(--dust);
  padding-top: 1.2rem;
}

#freq {
  width: calc(100% - 2.4rem);
  accent-color: var(--copper);
  margin: 0.7rem 1.2rem 1.1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.chip {
  border: 1px solid var(--hair);
  background: var(--field);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.45s var(--ease), background 0.45s var(--ease);
}

.chip.is-on,
.chip:hover {
  border-color: var(--copper);
}

textarea {
  width: calc(100% - 2.4rem);
  resize: vertical;
  min-height: 7rem;
  border-radius: 1.1rem;
  border: 1px solid var(--hair);
  background: var(--void);
  padding: 0.95rem 1rem;
}

.field-help {
  color: var(--dust);
  margin: 0.45rem 1.2rem 0.9rem;
}

.field-error {
  color: #d36a4a;
  margin: 0 1.2rem 0.8rem;
}

.console .btn {
  margin: 0 1.2rem 1.2rem;
}

.readout {
  margin: 0;
  padding: 1.2rem 1.3rem 1.4rem;
  border-radius: var(--radius-in);
  background: var(--field);
  min-height: 10rem;
}

.readout-idle {
  color: var(--dust);
}

.readout-skel span {
  display: block;
  height: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--surface), var(--hair), var(--surface));
  background-size: 200% 100%;
  margin-bottom: 0.7rem;
  animation: sheen 1.2s var(--ease) infinite;
}

@keyframes sheen {
  to {
    background-position: -200% 0;
  }
}

.readout-body {
  margin: 0;
}

.readout-body div {
  padding: 0.7rem 0;
}

.readout-body div + div {
  border-top: 1px solid var(--hair);
}

.readout-body dt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--copper);
  margin-bottom: 0.25rem;
}

.readout-body dd {
  margin: 0;
  max-width: 52ch;
}

/* Limits */
.limits {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6rem 6vw 8rem;
}

.limits h2 {
  margin-bottom: 2.4rem;
}

.limit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.limit-list li {
  font-family: Syne, sans-serif;
  font-size: clamp(1.5rem, 3.4vw, 2.7rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
  padding: 1.3rem 0;
  color: var(--bone);
}

.limit-list li + li {
  border-top: 1px solid var(--hair);
}

/* Close */
.close {
  position: relative;
  min-height: 88dvh;
  isolation: isolate;
}

.close img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.close-scrim {
  min-height: 88dvh;
  display: flex;
  align-items: flex-end;
  padding: 5rem 6vw;
  background: var(--scrim);
}

.close-copy {
  max-width: 28rem;
}

.close-copy h2 {
  color: #efe7d8;
  margin-bottom: 1.3rem;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 6vw 2.4rem;
  color: var(--dust);
  font-size: 0.9rem;
}

.foot p:first-child {
  font-family: Syne, sans-serif;
  color: var(--bone);
}

/* Reveals */
.reveal {
  opacity: 0;
  transform: translateY(2.4rem);
  filter: blur(8px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (prefers-reduced-transparency: reduce) {
  .island,
  .menu {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--field);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .btn,
  .btn-ico,
  .dish-bowl,
  .dish-beam,
  .menu-inner a,
  .chip {
    transition: none;
  }

  .readout-skel span {
    animation: none;
  }
}

@media (max-width: 980px) {
  .who,
  .transmit-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .who-frame img {
    height: 52vw;
    min-height: 220px;
  }

  .tile-lg,
  .tile-lg + .tile-plain,
  .tile-photo,
  .bento .tile-plain:nth-of-type(n + 3) {
    grid-column: span 12;
    min-height: 16rem;
  }

  .tile-lg {
    min-height: 22rem;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .btn-nav {
    display: none;
  }

  .burger {
    display: block;
  }

  .island {
    width: 100%;
    justify-content: space-between;
  }

  .hero-scrim,
  .who,
  .work,
  .method-head,
  .transmit,
  .limits,
  .close-scrim,
  .foot {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .hero-scrim {
    padding-top: 6rem;
    padding-bottom: 3.4rem;
  }

  .who,
  .transmit {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .method-track {
    flex-direction: column;
    width: 100%;
  }

  .station {
    width: 100%;
    min-height: auto;
    padding: 1.5rem 1.15rem 2.4rem;
  }

  .transmit {
    padding-top: 7.2rem;
  }

  .station img {
    height: 42vh;
  }

  .foot {
    flex-direction: column;
  }
}
