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

html {
  background: var(--black);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

h1, h2, h3, p, figure, blockquote { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
body.dialog-open { overflow: hidden; }

::selection { background: var(--white); color: var(--black); }

:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  background: var(--white);
  color: var(--black);
  transform: translateY(-180%);
  transition: transform 220ms var(--ease-out);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  --header-progress: 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid rgba(255, 255, 255, calc(0.08 * var(--header-progress)));
  background: rgba(5, 5, 5, calc(0.76 * var(--header-progress)));
  backdrop-filter: blur(calc(18px * var(--header-progress)));
  transition: background-color 620ms var(--ease-out), border-color 620ms var(--ease-out), backdrop-filter 620ms var(--ease-out);
}

.brand { justify-self: start; width: 132px; }
.brand img { width: 100%; height: auto; }

.site-nav {
  display: flex;
  gap: clamp(0.9rem, 1.7vw, 1.75rem);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--white-76);
}

.site-nav a,
.text-link {
  position: relative;
  width: fit-content;
}

.site-nav a::after,
.text-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 420ms var(--ease-out);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.is-active::after,
.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-nav a.is-active { color: var(--white); }

.header-contact { justify-self: end; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 48px;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--white-14);
  border-radius: var(--radius-control);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 300ms var(--ease-out), background-color 300ms var(--ease-out),
    color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

.button:hover { transform: translateY(-2px); }
.button--solid { background: var(--white); color: var(--black); border-color: var(--white); }
.button--solid:hover { background: #fff; }
.button--compact { min-height: 40px; padding: 0.5rem 1.05rem; gap: 0.5rem; font-size: 0.8125rem; }

.button--hero:hover,
.header-contact:hover,
.contact-form [data-submit]:hover { background: var(--signal); color: var(--white); border-color: var(--signal); }

/* A disabled submit is mid-send, not clickable. */
.button:disabled:hover { background: var(--white); color: var(--black); border-color: var(--white); transform: none; }

@media (max-width: 760px) {
  .site-header { min-height: 66px; grid-template-columns: 1fr auto; }
  .site-nav { display: none; }
  .brand { width: 116px; }
  .header-contact { min-height: 36px; padding-inline: 0.9rem; font-size: 0.78125rem; }
}

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

/* The tritone filter lives in an inline SVG. Without this it renders as a
   300x150 replaced element above the header. It is kept in the render tree
   rather than display:none, which can drop the filter reference. */
.filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

#main { position: relative; z-index: 2; }

/* ==========================================================================
   SECTION HEADING
   One device, used by every section without exception: a mono index, a rule
   that runs to the frame, then the statement at display scale. The rule is
   the horizontal counterpart to the frame's verticals.
   ========================================================================== */

.section-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
}

.section-label-text {
  flex: none;
  margin-right: 0.35rem;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-76);
}

.section-label::after {
  flex: 1;
  height: 1px;
  background: var(--white-14);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1s var(--ease-out) 120ms;
  content: "";
}

.section-label.is-in::after { transform: scaleX(1); }

.section-title {
  max-width: 16ch;
  font-size: clamp(2.6rem, 6.2vw, 6.4rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.section-title--wide { max-width: 24ch; }

.section-lede {
  max-width: 44ch;
  margin-top: clamp(1.2rem, 2.4vw, 2rem);
  color: var(--white-52);
  font-size: var(--fs-body);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

@media (prefers-reduced-motion: reduce) {
  .section-label::after { transform: scaleX(1); }
}

/* The signal dot. One definition, used by the hero's proof line and by every
   section kicker, which is what ties the sections back to the opening frame. */
.live-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px rgba(255, 61, 23, 0.14);
}
