/* The page's fixed furniture: the glyph fields, the header, the hero, the foot. */

/* Glyph fields ------------------------------------------------------------ */

/*
 * Two fields, not one. The back field is dense, small and dim; the front field
 * is sparse, large and dimmer, and sits above the content. Between them the page
 * reads as text suspended inside the field rather than pasted on top of it.
 */
.field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100lvh;
  pointer-events: none;
  display: block;
}

.field--back { z-index: var(--z-field-back); }

.field--front {
  z-index: var(--z-field-front);
  opacity: 0.55;
}

/* Without WebGL the page keeps its texture from a static wash instead. */
.no-glyph-field .field { display: none; }

.field-fallback {
  position: fixed;
  inset: 0;
  z-index: var(--z-field-back);
  pointer-events: none;
  display: none;
  background:
    radial-gradient(circle at 22% 18%, rgba(245, 244, 239, 0.055), transparent 45%),
    radial-gradient(circle at 78% 72%, rgba(245, 244, 239, 0.04), transparent 45%);
}

.no-glyph-field .field-fallback { display: block; }

/* A vignette that keeps the field off the type where it matters most. */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 125% 85% at 50% 42%, transparent 34%, rgba(5, 5, 5, 0.46) 100%);
}

/* Header ------------------------------------------------------------------ */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: transform var(--duration) var(--ease-out),
              background-color var(--duration) var(--ease-out),
              border-color var(--duration) var(--ease-out),
              backdrop-filter var(--duration) var(--ease-out);
}

.header.is-stuck {
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--line);
}

/* Hidden by moving it out, not by fading: a translucent header mid-fade is mud. */
.header.is-hidden { transform: translate3d(0, -100%, 0); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  width: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

/* Width follows from the intrinsic aspect ratio, so only height is set. */
.logo__mark {
  height: var(--logo-height, 15px);
  width: auto;
}

.header .logo { --logo-height: 15px; }
.logo--preloader { --logo-height: clamp(20px, 4.4vw, 30px); }

.nav { display: none; align-items: center; gap: var(--space-l); }

.nav__link {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-soft);
  transition: color var(--duration-fast) var(--ease-out);
}

.nav__link:hover, .nav__link.is-active { color: var(--text); }

.header__actions { display: flex; align-items: center; gap: var(--space-s); }

.header__phone {
  display: none;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-soft);
}

/* Narrow enough to sit beside the mark on a phone without wrapping. */
@media (max-width: 26rem) {
  .header__actions > .button {
    padding: 0.7rem 1rem;
    font-size: var(--step--2);
  }
}

@media (min-width: 62rem) {
  .nav { display: flex; }
  .header__phone { display: inline-block; }
}

/* Hero -------------------------------------------------------------------- */

.hero {
  position: relative;
  z-index: var(--z-content);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: calc(var(--header-height) + var(--space-xl)) var(--space-l);
}

.hero__lockup { display: grid; gap: var(--space-m); }

.hero__title {
  font-size: var(--step-6);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.94;
  max-width: 16ch;
}

/* The half of the headline the eye should land on last. */
.hero__title em {
  font-style: normal;
  font-weight: 300;
  color: var(--text-soft);
}

.hero__lede {
  font-size: var(--step-1);
  color: var(--text-soft);
  max-width: 46ch;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin-top: var(--space-s);
}

@media (max-width: 30rem) {
  .hero__actions { display: grid; }
  .hero__actions .button { justify-content: center; }
}

.hero__foot {
  margin-top: auto;
  padding-top: var(--space-l);
  display: grid;
  gap: var(--space-s);
}

/*
 * On a short viewport the scroll cue and the capability strip are the first
 * things worth losing: the headline and the call to action are not negotiable.
 */
@media (max-height: 44rem) {
  .hero__foot { display: none; }
  .hero { min-height: auto; padding-block: calc(var(--header-height) + var(--space-l)) var(--space-2xl); }
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__scroll span:last-child { animation: nudge 2.4s var(--ease-in-out) infinite; }

@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* Contact ----------------------------------------------------------------- */

.contact-grid { display: grid; gap: var(--space-xl); }

@media (min-width: 56rem) {
  .contact-grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-2xl); }
}

.contact-list { display: grid; gap: 0; border-top: 1px solid var(--line); }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-m) 0;
  border-bottom: 1px solid var(--line);
}

.contact-row__label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.contact-row__value { font-size: var(--step-1); font-weight: 500; }

/* Footer ------------------------------------------------------------------ */

.footer {
  position: relative;
  z-index: var(--z-content);
  border-top: 1px solid var(--line);
  padding-block: var(--space-2xl) var(--space-l);
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer__top { display: grid; gap: var(--space-xl); margin-bottom: var(--space-2xl); }

@media (min-width: 56rem) {
  .footer__top { grid-template-columns: 1.4fr repeat(2, 1fr); gap: var(--space-2xl); }
}

.footer__brand { display: grid; gap: var(--space-s); align-content: start; }
.footer .logo { --logo-height: 21px; }

.footer__tagline {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer__col { display: grid; gap: var(--space-xs); align-content: start; }

.footer__heading {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  margin-bottom: var(--space-2xs);
}

.footer__link { color: var(--text-soft); font-size: var(--step--1); transition: color var(--duration-fast) var(--ease-out); }
.footer__link:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-s);
  padding-top: var(--space-l);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--text-faint);
  letter-spacing: 0.08em;
}
