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

@font-face {
  font-family: "Suisse Intl";
  src: url("src/SuisseIntl-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  /* Contact was 9.339px; now 1rem (16px). Wordmark scales by the same ratio. */
  --type-scale: 1.713224327;
}

body {
  margin: 0;
  color: #0d0221;
  background-color: #e7eeef;
  overflow: hidden;
}

.holding-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

/* ── Depth planes ─────────────────────────────────────────────── */

.plane {
  pointer-events: none;
}

.plane__layout {
  width: 100%;
  height: 100%;
}

.plane__layout--fill {
  position: absolute;
  inset: 0;
}

.plane__motion {
  width: 100%;
  height: 100%;
  will-change: transform;
  transform: translate3d(
    var(--tx, 0px),
    var(--ty, 0px),
    var(--tz, 0px)
  )
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
}

.plane__motion--gradient,
.plane__motion--orbital {
  filter: blur(var(--blur, 0px));
}

/* ── Gradient (plane 1) ───────────────────────────────────────── */

.plane--gradient {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.plane__motion--gradient {
  position: absolute;
  inset: -28%;
  width: 156%;
  height: 156%;
  /* Stops remapped for the oversized plane so the original bands
     still land in the viewport; #d23f31 fills the bottom bleed. */
  background: linear-gradient(
    180deg,
    #e7eeef 0%,
    #e7eeef 18%,
    #e7eeef 53.5%,
    #ff833e 76.5%,
    #d23f31 82%,
    #d23f31 100%
  );
}

/* ── Scene (planes 2 & 3) ─────────────────────────────────────── */

.scene {
  --orbital-size: clamp(270px, min(62vw, 88svh), 620px);

  position: absolute;
  left: 50%;
  top: 54%;
  z-index: 1;
  width: var(--orbital-size);
  height: var(--orbital-size);
  transform: translate(-50%, -50%);
}

.scene__perspective {
  width: 100%;
  height: 100%;
  perspective: 900px;
  perspective-origin: 50% 50%;
}

.scene__tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  transform: rotateX(var(--scene-rx, 0deg)) rotateY(var(--scene-ry, 0deg));
}

.plane--orbital {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.plane__layout--orbital {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.plane__motion--orbital {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.scene__orbital {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orbit-pattern {
  transform-origin: 195px 195px;
}

.orbit-path {
  stroke-dasharray: 2 2;
}

.orbit-path.is-flowing {
  animation-name: orbit-dash-flow;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.orbit-path--1.is-flowing { animation-duration: 138s; }
.orbit-path--2.is-flowing { animation-duration: 125s; animation-direction: reverse; }
.orbit-path--3.is-flowing { animation-duration: 163s; }
.orbit-path--4.is-flowing { animation-duration: 113s; animation-direction: reverse; }
.orbit-path--5.is-flowing { animation-duration: 150s; }
.orbit-path--6.is-flowing { animation-duration: 100s; animation-direction: reverse; }
.orbit-path--7.is-flowing { animation-duration: 130s; animation-direction: reverse; }
.orbit-path--8.is-flowing { animation-duration: 120s; }
.orbit-path--9.is-flowing { animation-duration: 105s; animation-direction: reverse; }

@keyframes orbit-dash-flow {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -1220;
  }
}

body.is-static .orbit-path.is-flowing {
  animation-play-state: paused;
}

.orbit-mask-path {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.orbit-mask-path.is-drawing {
  animation: orbit-mask-draw var(--draw-duration, 0.6s)
    cubic-bezier(0.45, 0, 0.2, 1) forwards;
  animation-delay: var(--draw-delay, 0ms);
}

@keyframes orbit-mask-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ── Entrance sequence ────────────────────────────────────────── */
/* Entrance lives on layout wrappers so parallax transforms on
   .plane__motion / .scene__tilt can run at the same time. */

body.has-js.is-entering .plane__layout--fill {
  transform: translate3d(0, 108%, 0);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

body.has-js.is-entering.is-gradient-in .plane__layout--fill {
  transform: translate3d(0, 0, 0);
}

/* Masked rings stay dashed + flowing; the mask does the draw-on. */
body.has-js:not(.is-pattern-ready) .orbit-pattern {
  opacity: 0;
}

body.has-js.is-pattern-ready .orbit-pattern {
  opacity: 1;
}

/* ── Header (plane 4) ─────────────────────────────────────────── */

.site-header {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.plane--header {
  position: absolute;
  inset: 0;
}

.plane__layout--header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  height: 100%;
  padding:
    calc(1.25rem + env(safe-area-inset-top, 0px))
    calc(clamp(1rem, 2.95vw, 1.15625rem) + env(safe-area-inset-right, 0px))
    0
    calc(clamp(1rem, 2.95vw, 1.15625rem) + env(safe-area-inset-left, 0px));
}

.plane__motion--header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  will-change: auto;
  transform: none;
}

.brand,
.contact {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  display: block;
  width: calc(7.5625rem * var(--type-scale));
  height: calc(0.6875rem * var(--type-scale));
}

.contact {
  position: relative;
  flex-shrink: 0;
  color: #0d0221;
  font-family: "Suisse Intl", Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-decoration: none;
  white-space: nowrap;
}

.contact.link-underlined::before {
  content: "";
  position: absolute;
  bottom: -0.2em;
  left: 0;
  width: 100%;
  height: 2px;
  background-image: linear-gradient(
    to right,
    #0d0221 45%,
    transparent 55%
  );
  background-repeat: no-repeat;
  background-size: 220% 100%;
  background-position: 100% 50%;
  transition: background-position 0.3s ease-out;
}

.contact.link-underlined:hover::before,
.contact.link-underlined:focus-visible::before {
  background-position: 0% 50%;
}

.contact:focus-visible {
  outline: 0.125rem solid #0d0221;
  outline-offset: 0.1875rem;
}

/* ── Footer ───────────────────────────────────────────────────── */

.site-footer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.site-footer__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  height: 100%;
  padding:
    0
    calc(clamp(1rem, 2.95vw, 1.15625rem) + env(safe-area-inset-right, 0px))
    calc(1.25rem + env(safe-area-inset-bottom, 0px))
    calc(clamp(1rem, 2.95vw, 1.15625rem) + env(safe-area-inset-left, 0px));
}

.site-footer__address,
.site-footer__copyright {
  margin: 0;
  color: #0d0221;
  font-family: "Suisse Intl", Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.site-footer__address {
  flex-shrink: 1;
}

.site-footer__copyright {
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .site-footer__address,
  .site-footer__copyright {
    font-size: 0.9rem;
  }
}

/* ── Static / reduced-motion fallbacks ────────────────────────── */

body.is-static .plane__motion,
body.is-static .scene__tilt {
  will-change: auto;
}

body.is-static .plane__motion--gradient,
body.is-static .plane__motion--orbital {
  filter: none;
}

/* ── Responsive tuning ────────────────────────────────────────── */

@media (max-width: 480px) {
  .scene {
    --orbital-size: clamp(220px, min(78vw, 58svh), 390px);
    top: 53%;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .scene {
    --orbital-size: clamp(180px, min(42vw, 72svh), 360px);
    top: 56%;
  }

  .plane__layout--header {
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  }

  .site-footer__inner {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 1256px) {
  .scene {
    top: 53.5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plane__motion,
  .scene__tilt {
    transition: none !important;
  }

  body.has-js.is-entering .plane__layout--fill {
    transform: none;
    transition: none;
  }

  body.has-js.is-entering .orbit-mask-path.is-drawing {
    animation: none;
  }

  .orbit-path.is-flowing {
    animation: none !important;
  }
}
