:root {
  --ink: #121210;
  --paper: #f6f4ef;
  --soft: #dedbd1;
  --muted: #747066;
  --line: rgba(18, 18, 16, 0.16);
  --green: #5d6f5b;
  --amber: #d9a850;
  --blue: #9fb8c7;
  --rose: #c7a0a0;
  --shadow: 0 24px 80px rgba(18, 18, 16, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.is-pointer .cursor {
  opacity: 1;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.cursor {
  position: fixed;
  z-index: 40;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(217, 168, 80, 0.74);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(var(--cursor-scale, 1));
  transition: width 160ms ease, height 160ms ease, opacity 180ms ease, transform 90ms linear;
  mix-blend-mode: multiply;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.26) 0 1px, transparent 1px);
  background-size: 4px 4px, 5px 5px;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: 3px;
  background: rgba(18, 18, 16, 0.08);
}

.progress span {
  display: block;
  width: var(--scroll, 0%);
  height: 100%;
  background: var(--amber);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.hero__image,
.hero__wash,
.hero__scan {
  position: absolute;
  inset: 0;
}

.hero__image {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  transform: scale(1.035);
  animation: breathe 9s ease-in-out infinite alternate;
}

.hero__wash {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(246, 244, 239, 0.88) 0%, rgba(246, 244, 239, 0.66) 42%, rgba(246, 244, 239, 0.1) 78%),
    linear-gradient(0deg, rgba(18, 18, 16, 0.08), rgba(246, 244, 239, 0.04));
}

.hero__scan {
  z-index: -1;
  opacity: 0.16;
  background: repeating-linear-gradient(0deg, transparent 0 9px, rgba(18, 18, 16, 0.22) 10px);
  animation: scan 6s linear infinite;
}

.nav {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 22px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0;
  font-size: 14px;
  font-weight: 650;
}

.brand {
  justify-self: start;
}

.brand span {
  display: inline-block;
  margin-left: 4px;
  animation: spinMark 5s linear infinite;
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.nav__links a {
  padding: 7px 3px;
  border-bottom: 1px solid transparent;
}

.nav__links a + a::before {
  content: ".";
  margin: 0 2px;
}

.nav__links a.is-current {
  border-color: currentColor;
}

.nav__contact {
  justify-self: end;
  border-bottom: 1px solid currentColor;
}

.translate-chip {
  position: absolute;
  top: 86px;
  right: clamp(20px, 12vw, 270px);
  width: min(280px, calc(100vw - 40px));
  padding: 10px 12px 12px;
  border: 1px solid rgba(18, 18, 16, 0.16);
  border-radius: 7px;
  background: rgba(248, 247, 242, 0.86);
  box-shadow: 0 16px 38px rgba(18, 18, 16, 0.16);
  backdrop-filter: blur(16px);
  font-size: 11px;
  animation: chipFloat 4.5s ease-in-out infinite;
}

.translate-chip__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}

.translate-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.lang-choice {
  padding: 0 0 3px;
  border-bottom: 2px solid transparent !important;
}

.lang-choice.is-active {
  color: var(--ink);
  border-color: var(--blue) !important;
  font-weight: 850;
}

.translate-chip__close {
  margin-left: auto;
  line-height: 1;
}

.translate-chip label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3d3a34;
}

.translate-chip small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.translate-chip.is-compact {
  width: auto;
  padding-bottom: 10px;
}

.translate-chip.is-compact label,
.translate-chip.is-compact small {
  display: none;
}

.hero__copy {
  align-self: end;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto clamp(64px, 13vh, 140px);
  max-width: 520px;
  justify-self: stretch;
}

.eyebrow {
  margin: 0 0 8px;
  color: #3d3a34;
  font-size: 15px;
  font-weight: 800;
}

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

h1 {
  max-width: 460px;
  margin-bottom: 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 7vw, 94px);
  line-height: 0.88;
  font-weight: 500;
  letter-spacing: 0;
  text-wrap: balance;
}

.lede {
  max-width: 520px;
  margin-bottom: 16px;
  color: #25231f;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.35;
}

#typed-line {
  display: inline-block;
  min-width: 18ch;
}

#typed-line::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 3px;
  border-right: 2px solid var(--ink);
  transform: translateY(2px);
  animation: caret 850ms steps(1) infinite;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 480px;
}

.pill {
  min-height: 31px;
  border: 1px solid rgba(18, 18, 16, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  padding: 8px 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(18, 18, 16, 0.08);
  backdrop-filter: blur(16px);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.pill:hover,
.pill:focus-visible,
.pill.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.pill--muted {
  background: rgba(18, 18, 16, 0.24);
  color: white;
}

.pill--muted span {
  opacity: 0.8;
}

.status-panel {
  position: absolute;
  right: clamp(22px, 7vw, 86px);
  bottom: clamp(28px, 6vh, 70px);
  width: 260px;
  border: 1px solid rgba(246, 244, 239, 0.34);
  border-radius: 7px;
  background: rgba(18, 18, 16, 0.54);
  color: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.status-panel__screen {
  min-height: 118px;
  padding: 18px;
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(255, 255, 255, 0.04) 8px),
    radial-gradient(circle at 20% 0%, rgba(217, 168, 80, 0.24), transparent 45%),
    #20221f;
}

.status-light {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  background: #d7f0b1;
  box-shadow: 0 0 18px #d7f0b1;
  animation: pulse 1.4s ease-in-out infinite;
}

.status-panel strong {
  font-size: 13px;
}

.status-panel p {
  margin: 14px 0 0;
  color: rgba(246, 244, 239, 0.78);
  font-size: 13px;
  line-height: 1.45;
}

.status-panel__rows {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  font-size: 12px;
}

.status-panel__rows span,
.status-panel__rows b {
  padding: 10px 12px;
  border-top: 1px solid rgba(246, 244, 239, 0.16);
}

.status-panel__rows b {
  text-align: right;
  color: #d7f0b1;
}

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: #fcfbf7;
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 22s linear infinite;
}

.ticker span {
  padding: 22px 36px;
  color: #2c2a26;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 5vw, 64px);
  line-height: 1;
  white-space: nowrap;
}

.routing,
.workbench,
.studio,
.opening,
.shop {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.routing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.74fr);
  gap: 34px;
  align-items: stretch;
  padding: 92px 0 40px;
}

.routing__copy {
  min-height: 360px;
  display: grid;
  align-content: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.routing__copy p:first-child {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.routing__copy h2 {
  max-width: 760px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.93;
  font-weight: 500;
  letter-spacing: 0;
}

.routing__copy p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.formula {
  position: relative;
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(18, 18, 16, 0.24);
  border-radius: 7px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0 12px, rgba(18, 18, 16, 0.035) 13px),
    linear-gradient(135deg, #fffefa, #e8e2d6);
  box-shadow: var(--shadow);
}

.formula::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(18, 18, 16, 0.12);
  border-radius: 5px;
  pointer-events: none;
}

.formula span,
.formula p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.formula code {
  position: relative;
  display: block;
  width: 100%;
  padding: 24px 18px;
  border: 1px solid rgba(18, 18, 16, 0.16);
  border-radius: 6px;
  background: #151613;
  color: #e9f0dc;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(25px, 3.8vw, 44px);
  line-height: 1.1;
  text-align: center;
  box-shadow: inset 0 0 34px rgba(217, 168, 80, 0.16);
}

.formula code::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.9em;
  margin-left: 0.18em;
  border-right: 2px solid #d7f0b1;
  transform: translateY(0.08em);
  animation: caret 850ms steps(1) infinite;
}

.workbench {
  padding: 58px 0 78px;
}

.section-head {
  max-width: 620px;
  margin-bottom: 36px;
}

.section-head p,
.studio__copy p:first-child {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.section-head h2,
.studio h2,
.shop h2 {
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.94;
  font-weight: 500;
  letter-spacing: 0;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.lab-card {
  min-height: 270px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffefa;
  box-shadow: 0 10px 42px rgba(18, 18, 16, 0.07);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.lab-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(18, 18, 16, 0.12);
}

.lab-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 54px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lab-card h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

.lab-card p {
  color: var(--muted);
  line-height: 1.55;
}

.meter {
  height: 8px;
  margin-top: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: #e6e3da;
}

.meter span {
  display: block;
  width: var(--level);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transform-origin: left;
  transform: scaleX(0);
}

.reveal.is-visible .meter span {
  animation: fillMeter 950ms ease forwards;
}

.studio {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 38px;
  align-items: center;
  padding: 70px 0 100px;
}

.studio__copy p:last-child {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.terminal {
  border: 1px solid rgba(18, 18, 16, 0.28);
  border-radius: 7px;
  overflow: hidden;
  background: #151613;
  color: #e9f0dc;
  box-shadow: var(--shadow);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(246, 244, 239, 0.16);
  background: #24241f;
}

.terminal__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal__bar span:nth-child(1) {
  background: var(--rose);
}

.terminal__bar span:nth-child(2) {
  background: var(--amber);
}

.terminal__bar span:nth-child(3) {
  background: #9ebb8f;
}

.terminal__bar b {
  margin-left: auto;
  color: rgba(246, 244, 239, 0.58);
  font-size: 12px;
}

.terminal ol {
  min-height: 260px;
  margin: 0;
  padding: 18px 22px 22px 42px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.8;
}

.terminal li {
  color: rgba(233, 240, 220, 0.82);
}

.terminal li::marker {
  color: rgba(217, 168, 80, 0.72);
}

.opening {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 560px;
  padding: 80px 0;
}

.orbital {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(217, 168, 80, 0.18) 0 18%, transparent 19%),
    conic-gradient(from 90deg, rgba(93, 111, 91, 0.24), rgba(159, 184, 199, 0.28), rgba(199, 160, 160, 0.3), rgba(93, 111, 91, 0.24));
  animation: orbital 18s linear infinite;
}

.orbital::before,
.orbital::after {
  content: "";
  position: absolute;
  inset: 17%;
  border: 1px solid rgba(18, 18, 16, 0.16);
  border-radius: 50%;
}

.orbital::after {
  inset: 34%;
  background: #fffefa;
}

.orbital span {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 92px;
  margin: -15px 0 0 -46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffefa;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  transform: rotate(calc(var(--i) * 72deg)) translateX(44%) rotate(calc(var(--i) * -72deg));
}

.shop {
  padding: 64px 0 110px;
}

.shop__item {
  min-height: 340px;
  display: grid;
  align-content: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.shop__item span {
  color: var(--green);
  font-weight: 850;
  text-transform: uppercase;
}

.shop__item p {
  max-width: 620px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.shop__link {
  width: fit-content;
  margin-top: 20px;
  border-bottom: 1px solid currentColor;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes breathe {
  from { transform: scale(1.035) translate3d(0, 0, 0); }
  to { transform: scale(1.075) translate3d(1.4%, -0.8%, 0); }
}

@keyframes scan {
  from { transform: translateY(-24px); }
  to { transform: translateY(24px); }
}

@keyframes spinMark {
  to { transform: rotate(360deg); }
}

@keyframes chipFloat {
  50% { transform: translateY(8px); }
}

@keyframes caret {
  50% { opacity: 0; }
}

@keyframes pulse {
  50% { opacity: 0.36; transform: scale(0.82); }
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

@keyframes fillMeter {
  to { transform: scaleX(1); }
}

@keyframes orbital {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .nav {
    grid-template-columns: 1fr auto;
  }

  .nav__links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }

  .hero {
    min-height: 860px;
  }

  .hero__image {
    object-position: 68% center;
  }

  .hero__wash {
    background:
      linear-gradient(180deg, rgba(246, 244, 239, 0.88) 0%, rgba(246, 244, 239, 0.54) 50%, rgba(246, 244, 239, 0.14) 100%),
      linear-gradient(90deg, rgba(246, 244, 239, 0.9), rgba(246, 244, 239, 0.04));
  }

  .translate-chip {
    top: 126px;
    right: 20px;
  }

  .hero__copy {
    align-self: center;
    margin-bottom: 210px;
  }

  .status-panel {
    left: 24px;
    right: auto;
    width: min(300px, calc(100% - 48px));
  }

  .lab-grid,
  .routing,
  .studio,
  .opening {
    grid-template-columns: 1fr;
  }

  .opening {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .nav,
  .hero__copy,
  .routing,
  .workbench,
  .studio,
  .opening,
  .shop {
    width: min(100% - 32px, 1120px);
  }

  .nav {
    padding-top: 20px;
    gap: 12px;
    font-size: 13px;
  }

  .nav__contact {
    font-size: 0;
  }

  .nav__contact::after {
    content: "Contact";
    font-size: 13px;
  }

  .translate-chip {
    top: 118px;
    right: 16px;
    width: min(260px, calc(100vw - 32px));
  }

  .hero {
    min-height: 820px;
  }

  .hero__copy {
    margin-bottom: 180px;
  }

  .hero__actions {
    gap: 7px;
  }

  .pill {
    font-size: 11px;
    padding-inline: 10px;
  }

  .status-panel {
    bottom: 22px;
    left: 16px;
    width: calc(100% - 32px);
  }

  .ticker span {
    padding-inline: 22px;
  }

  .workbench {
    padding-top: 68px;
  }

  .terminal ol {
    min-height: 300px;
    padding-left: 34px;
    font-size: 12px;
  }

  .orbital span {
    width: 78px;
    margin-left: -39px;
  }
}

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