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

html {
  background: #000;
  /* iOS Safari inflates text in landscape without this. */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  padding: 1.5rem 2.25rem;
}

/* The mark inherits `color`, so recolouring the logo is a one-line change
   here — no second asset for light backgrounds. */
.logo {
  display: block;
  line-height: 0;
  color: #fff;
}

.logo__mark {
  display: block;
  width: 120px;
  height: auto;
}

/* Centred on the viewport rather than in the flex flow, so the pill stays
   put regardless of how wide the logo gets. */
.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  /* Frosted glass over the canvas behind it. */
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.nav__link {
  display: block;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 200ms ease, color 200ms ease;
}

.nav__link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nav__link.is-active {
  background: #fff;
  color: #0b0b0f;
}

.nav__link.is-active:hover {
  background: #fff;
}

@media (max-width: 720px) {
  .site-header {
    padding: 1rem 1.25rem;
  }

  .logo__mark {
    width: 96px;
  }

  /* Kept tall enough to remain a comfortable touch target. */
  .nav__link {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
  }
}

/* iOS re-renders a backdrop blur on every canvas frame beneath it. The pill
   and the CTA are the two blurred elements sitting over the canvas at the
   start of the scroll — exactly where the first-frames stutter shows up on
   iPhone — so touch devices trade their blur for a slightly more opaque
   fill. The work/contact panels keep theirs. */
@media (pointer: coarse) {
  .nav__list {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(22, 25, 32, 0.7);
  }

  .hero__cta {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.26);
  }
}

/* Below this the centred pill would run into the logo, so stack them. */
@media (max-width: 560px) {
  .site-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav {
    position: static;
    transform: none;
  }
}

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

.hero {
  position: relative;
  height: 300vh;
}

.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* Fixed backdrop for the entire page — every section scrolls over it.
   Sized with an explicit large-viewport height instead of inset: 0: on iOS
   the toolbar collapse resizes the layout viewport at the first scroll, and
   an inset-anchored box would resize with it, forcing a backing-store
   reallocation (which wipes the canvas) exactly when scrolling starts. */
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100vh;
}

@supports (height: 100lvh) {
  .backdrop {
    height: 100lvh;
  }
}

main {
  position: relative;
  z-index: 1;
}

/* Overlays the canvas. .hero__sticky is positioned, so it is the containing
   block for this. */
.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  text-align: center;
  /* The hero copy is gone by frame 33, and every frame up to there is cabin
     interior: measured contrast in this region stays between 9.6:1 and
     11.7:1, so no scrim is needed. This light shadow only catches isolated
     specular highlights (a window edge, a lit cloud rim). */
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}

.hero__title {
  max-width: 52rem;
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

/* Pins the headline to the intended two-line break on wide viewports instead
   of leaving it to whatever the font metrics happen to produce. Below this
   the line is too long to hold, so it wraps naturally. */
.hero__break {
  display: none;
}

@media (min-width: 900px) {
  .hero__break {
    display: inline;
  }
}

.hero__lead {
  max-width: 27rem;
  margin: 1.5rem 0 0;
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

.hero__cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.875rem 1.625rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 200ms ease;
}

.hero__cta:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* --- Sections ---------------------------------------------------------- */

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 7rem 1.5rem;
  text-align: center;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.45);
}

.section__head {
  max-width: 34rem;
  margin-bottom: 4rem;
}

.section__title {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section__lead {
  margin: 1.25rem 0 0;
  font-size: clamp(0.9375rem, 1.3vw, 1.0625rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
}

/* Shared frosted surface for cards and the contact form. */
.panel {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

/* --- Work cards -------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  width: 100%;
  max-width: 66rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.75rem 2rem;
  border-radius: 2rem;
}

.card__icon-link {
  display: block;
  line-height: 0;
  margin-bottom: 2rem;
  border-radius: 1.75rem;
  transition: transform 250ms ease;
}

.card__icon-link:hover {
  transform: scale(1.04);
}

.card__icon {
  display: block;
  width: 11rem;
  height: auto;
  max-width: 100%;
  border-radius: 1.75rem;
}

.card__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.card__text {
  margin: 0.875rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.card__link {
  margin-top: auto;
  padding-top: 1.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 200ms ease;
}

.card__link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

/* --- About ------------------------------------------------------------- */

.eyebrow {
  margin: 0 0 2.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.statement {
  max-width: 54rem;
  margin: 0;
  font-size: clamp(1.75rem, 3.9vw, 3.25rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.statement__sub {
  max-width: 30rem;
  margin: 3rem 0 0;
  font-size: clamp(0.875rem, 1.15vw, 0.9375rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.84);
}

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

.contact__email {
  margin-top: 1.25rem;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}

.contact__email:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* Contact and the footer share one viewport: the section takes the slack and
   the footer sits flush at the bottom, with no filler space between them. */
.closing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.section--contact {
  flex: 1;
  min-height: 0;
  padding: 3.5rem 1.5rem 1.5rem;
}

.contact__form {
  width: 100%;
  max-width: 38rem;
  margin-top: 1.75rem;
  padding: 1.75rem;
  border-radius: 1.5rem;
  text-align: left;
}

.field {
  display: block;
}

.field + .field {
  margin-top: 1rem;
}

.field__label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.field__input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.field__input--area {
  resize: vertical;
  min-height: 4.5rem;
}

.field__input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.16);
}

.contact__submit {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.8125rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.contact__submit:hover {
  background: rgba(255, 255, 255, 0.3);
}

.contact__submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-status {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.92);
}

/* Honeypot field: invisible to people, present for bots. */
.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.footer {
  padding: 0 1.5rem 1.5rem;
  text-align: center;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.45);
}

.footer__copy {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
}

.footer__links {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin: 0.75rem 0 0;
}

/* Padding grows the touch target; the negative margin cancels it visually. */
.footer__links a {
  display: inline-block;
  padding: 0.625rem 0.5rem;
  margin: -0.625rem -0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
}

.footer__links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

@media (max-width: 860px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
    max-width: 26rem;
    gap: 2rem;
  }

  .section {
    padding: 5rem 1.25rem;
  }

  /* Must re-assert itself here: the .section rule above is later in source
     order than .section--contact and would otherwise override its padding,
     pushing contact + footer past one viewport again. */
  .section--contact {
    padding: 3.5rem 1.25rem 1.25rem;
  }

  .contact__form {
    padding: 1.5rem 1.25rem;
  }

  .footer__links {
    gap: 1.75rem;
  }
}

/* Dynamic-viewport units: on iOS/Android the URL bar shrinks the visible
   area, so 100vh overflows it. dvh tracks the real visible height — this is
   what keeps contact + footer genuinely on one screen on phones. */
@supports (height: 100dvh) {
  .hero__sticky {
    height: 100dvh;
  }

  .section {
    min-height: 100dvh;
  }

  .closing {
    min-height: 100dvh;
  }

  /* Keep the flex-fit behaviour: without this the .section rule above would
     hand contact a 100dvh minimum of its own. */
  .section--contact {
    min-height: 0;
  }
}

/* Keyboard navigation must be visible. */
.logo:focus-visible,
.nav__link:focus-visible,
.hero__cta:focus-visible,
.card__icon-link:focus-visible,
.card__link:focus-visible,
.contact__email:focus-visible,
.contact__submit:focus-visible,
.footer__links a:focus-visible,
.legal__back:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.field__input:focus-visible {
  outline: none;
}

/* --- Legal pages ------------------------------------------------------- */

/* Flat blue field instead of the frame sequence — these pages are for
   reading, so the background stays quiet and fixed. */
.legal-page {
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 50% -10%, #1d3a6b 0%, rgba(29, 58, 107, 0) 60%),
    linear-gradient(180deg, #0b1830 0%, #0d1f3d 45%, #0a1526 100%);
}

/* background-attachment: fixed is broken on iOS Safari (paints incorrectly
   and kills scroll performance), so it is reserved for mouse machines. */
@media (hover: hover) and (pointer: fine) {
  .legal-page {
    background-attachment: fixed;
  }
}

.legal-header {
  padding: 2rem 2.25rem;
}

.legal {
  padding: 0 1.5rem 4rem;
}

.legal__panel {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  border-radius: 1.75rem;
}

.legal__title {
  margin: 0.75rem 0 0;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.legal__updated {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.62);
}

.legal__body > section {
  margin-top: 2.5rem;
}

.legal__body h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.legal__body p,
.legal__body li {
  margin: 0 0 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.legal__body ul {
  margin: 0;
  padding-left: 1.25rem;
}

.legal__body a {
  color: #fff;
}

.legal__copy {
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.62);
}

.legal__back {
  display: inline-block;
  margin-top: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
}

.legal__back:hover {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

/* --- 404 --------------------------------------------------------------- */

.notfound-page {
  display: flex;
  flex-direction: column;
}

.notfound {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 6rem;
  text-align: center;
}

.notfound__code {
  margin: 0;
  font-size: clamp(5rem, 16vw, 8.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.notfound__title {
  margin: 1.5rem 0 0;
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  font-weight: 600;
}

.notfound__text {
  max-width: 24rem;
  margin: 0.875rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.notfound__home {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  background: #fff;
  color: #0b0b0f;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.notfound__home:hover {
  opacity: 0.88;
}

.notfound__home:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* --- Loader ------------------------------------------------------------ */

.loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  transition: opacity 600ms ease;
}

.loader__pct {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.55);
}

.loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}
