:root {
  --bg: #0A0A0B;
  --fg: #F2F0EA;
  --fg-dim: rgba(242, 240, 234, 0.55);
  --fg-faint: rgba(242, 240, 234, 0.35);
  --accent: #FF6B35;
  --accent-text: #FF6B35;
  --on-accent: #0A0A0B;
  --prose: rgba(242, 240, 234, 0.82);
  --hair: rgba(242, 240, 234, 0.12);
  --portrait-bg: #1C130D;
  --field-dot: 255, 107, 53;
  --field-signal: 242, 240, 234;
  --font: "Outfit", system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.65, 0.25, 1);
  --ease-sweep: cubic-bezier(0.65, 0, 0.35, 1);
}

html.light {
  --bg: #F2EEE4;
  --fg: #16120B;
  --fg-dim: rgba(22, 18, 11, 0.62);
  --fg-faint: rgba(22, 18, 11, 0.42);
  --accent: #FF6B35;
  --accent-text: #BC481B;
  --on-accent: #1A1206;
  --prose: rgba(22, 18, 11, 0.82);
  --hair: rgba(22, 18, 11, 0.14);
  --portrait-bg: #E9E2D2;
  --field-dot: 150, 66, 33;
  --field-signal: 22, 18, 11;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition:
    background-color 0.4s var(--ease-out),
    color 0.4s var(--ease-out);
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

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

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem clamp(1.5rem, 6vw, 8rem);
  z-index: 2;
}

.head-id {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.wordmark {
  position: relative;
  display: block;
  height: 20px;
  width: 190px;
  overflow: hidden;
  text-decoration: none;
  transition: width 0.45s var(--ease-out);
}

.wordmark .logo {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: auto;
  transition: opacity 0.45s var(--ease-out);
}

/* Black PNGs: invert to off-white on the dark theme, leave black on light. */
html:not(.light) .wordmark .logo {
  filter: invert(1);
}

.wordmark .logo-short {
  opacity: 0;
}

.site-head.condensed .wordmark {
  width: 110px;
}

.site-head.condensed .logo-full {
  opacity: 0;
}

.site-head.condensed .logo-short {
  opacity: 1;
}

@media (max-width: 400px) {
  .wordmark {
    height: 17px;
    width: 162px;
  }

  .site-head.condensed .wordmark {
    width: 93px;
  }
}

/* --- Theme toggle --- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  color: var(--fg);
  cursor: pointer;
  line-height: 0;
  transition: color 0.25s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--accent-text);
  outline: none;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.theme-toggle .icon-moon {
  display: none;
}

html.light .theme-toggle .icon-sun {
  display: none;
}

html.light .theme-toggle .icon-moon {
  display: block;
}

.no-js .theme-toggle {
  display: none;
}

/* --- Menu trigger + overlay --- */

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: 0;
  padding: 0;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease;
}

.menu-trigger:hover,
.menu-trigger:focus-visible {
  color: var(--accent-text);
  outline: none;
}

.menu-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.menu-bars i {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
}

.menu-x {
  font-size: 1.1rem;
  line-height: 1;
}

/* Hide the (non-functional) trigger when JS is unavailable. */
.no-js .menu-trigger {
  display: none;
}

.menu-item.is-current .menu-link::before,
.menu-item.is-current .menu-legal-link::before {
  content: "";
  display: inline-block;
  width: 0.28em;
  height: 0.28em;
  margin-right: 0.4em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.noscript-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

.noscript-nav a {
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s var(--ease-out),
    visibility 0.4s;
}

.menu.open {
  opacity: 1;
  visibility: visible;
}

.menu-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem clamp(1.5rem, 6vw, 8rem);
  overflow-y: auto;
}

.menu-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.menu-list {
  list-style: none;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.menu-link {
  display: inline-block;
  font-weight: 900;
  font-size: clamp(2.4rem, 9vw, 6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 84%;
  background-position: 0 64%;
  transition:
    background-size 0.55s var(--ease-sweep),
    color 0.3s ease;
}

.menu-link:hover,
.menu-link:focus-visible {
  background-size: 100% 84%;
  color: var(--on-accent);
  outline: none;
}

.menu-foot {
  color: var(--fg-dim);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.25s ease;
}

.menu-foot:hover,
.menu-foot:focus-visible {
  color: var(--accent-text);
  outline: none;
}

.menu-item {
  opacity: 0;
  transform: translateY(0.55em);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.menu.open .menu-item {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--mi, 0) * 75ms + 120ms);
}

body.menu-open {
  overflow: hidden;
}

/* --- Menu base: email, legal links, acknowledgement --- */

.menu-base {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.menu-legal {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
}

.menu-legal-link {
  color: var(--fg-dim);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.25s ease;
}

.menu-legal-link:hover,
.menu-legal-link:focus-visible {
  color: var(--accent-text);
  outline: none;
}

.acknowledgement {
  max-width: 64ch;
}

.ack-kicker {
  color: var(--accent-text);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.ack-body {
  color: var(--fg-dim);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* --- Field label (constellation reveal) --- */

.field-label {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  max-width: 230px;
  opacity: 0;
  transform: translateY(0.4em);
  transition:
    opacity 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
}

.field-label.flip {
  text-align: right;
}

.field-label.on {
  opacity: 1;
  transform: none;
}

.field-label .fl-place {
  display: block;
  color: var(--accent-text);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.field-label .fl-line {
  display: block;
  margin-top: 0.25rem;
  color: var(--fg-dim);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

main,
.site-foot {
  position: relative;
  z-index: 1;
}

.beat {
  padding: 24vh clamp(1.5rem, 6vw, 8rem);
}

.beat-hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.display {
  font-weight: 900;
  font-size: clamp(2.6rem, 8vw, 11rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.display .line {
  display: block;
}

@media (max-width: 640px) {
  .break-sm {
    display: block;
  }
}

.display-2 {
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 7.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.label {
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.statement {
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 34ch;
}

.statement + .statement {
  margin-top: 2.5rem;
}

.statement-quiet {
  color: var(--fg-dim);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  margin-top: 3.5rem;
  max-width: 52ch;
}

.site-foot {
  padding-bottom: 14vh;
}

.contact {
  display: inline-block;
  color: var(--fg);
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color 0.25s ease;
}

.contact:hover,
.contact:focus-visible {
  color: var(--accent-text);
}

.claim {
  margin-top: 2.5rem;
  color: var(--fg-dim);
  font-size: 1rem;
}

.clocks {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin-top: 4rem;
  color: var(--fg-dim);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.clocks time {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  margin-left: 0.4em;
}

.fine {
  margin-top: 3rem;
  font-size: 0.75rem;
  color: var(--fg-faint);
}

/* --- What we build --- */

.engine-head {
  font-weight: 900;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 1.6rem;
}

/* --- Partner services (cards) --- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 2rem;
  max-width: 60ch;
  margin-top: 2.5rem;
}

.service-card {
  border-top: 1px solid var(--hair);
  padding-top: 1.1rem;
}

.service-name {
  font-weight: 900;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  letter-spacing: -0.01em;
  color: var(--fg);
}

.service-line {
  margin-top: 0.5rem;
  color: var(--fg-dim);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 34ch;
}

@media (max-width: 560px) {
  .service-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .service-card {
    padding-top: 1.4rem;
  }
}

.build-tier {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem 1.5rem;
  padding: 1.8rem 0;
  border-top: 1px solid var(--hair);
  max-width: 54ch;
}

.build-orbit {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding-top: 0.35rem;
}

.build-item + .build-item {
  margin-top: 1.1rem;
}

.build-name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 900;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  letter-spacing: -0.01em;
  color: var(--fg);
}

.build-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.build-tier--live .build-dot {
  opacity: 1;
}

.build-tier--dev .build-dot {
  opacity: 0.55;
}

.build-tier--explore .build-dot {
  opacity: 0.28;
}

.build-line {
  margin-top: 0.3rem;
  color: var(--fg-dim);
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 42ch;
}

@media (max-width: 560px) {
  .build-tier {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .build-orbit {
    padding-top: 0;
  }
}

/* --- Reveals --- */

.line {
  opacity: 0;
  transform: translateY(1.1em);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 110ms);
}

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

/* --- Word sweep --- */

.sweep {
  font-style: normal;
  padding: 0 0.06em;
  margin: 0 -0.06em;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 88%;
  background-position: 0 60%;
  transition:
    background-size 0.8s var(--ease-sweep),
    color 0.3s ease;
  transition-delay:
    calc(var(--i, 0) * 110ms + 350ms),
    calc(var(--i, 0) * 110ms + 700ms);
}

.in .sweep {
  background-size: 100% 88%;
  color: var(--on-accent);
}

/* --- Reduced motion: final state, instantly --- */

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

  .line {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sweep {
    background-size: 100% 88%;
    color: var(--on-accent);
    transition: none;
  }

  .menu,
  .menu-item,
  .menu-link {
    transition: none;
  }

  .field-label {
    transition: none;
  }

  .wordmark,
  .wordmark .logo {
    transition: none;
  }
}
