/*
 * Homepage introduction: "Governing the outcome" statement above the
 * KiwiTile seal, whose certification text slowly orbits the mark.
 * intro.js pauses the orbit while the tab is hidden or the section is
 * off-screen (.orbit.is-paused).
 */

.intro {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: clamp(56px, 6vh, 84px) 20px;
}

.intro__inner {
  width: min(96vw, 1280px);
  margin-inline: auto;
}

.intro__lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(34px, 4.8vh, 58px);
  text-align: center;
}

/* ── Statement ── */

.intro__statement {
  position: relative;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(96vw, 1180px);
  margin-inline: auto;
  margin-bottom: clamp(4px, 0.8vh, 12px);
  text-align: center;
  text-wrap: balance;
  transform: translateY(clamp(56px, 7vh, 80px));
}

.intro__eyebrow {
  margin: 0;
  font-size: clamp(12px, 0.95vw, 16px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgb(var(--rgb-gold-highlight) / 0.86);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.62), 0 6px 18px rgb(0 0 0 / 0.42);
}

.intro__rule {
  width: min(210px, 42vw);
  height: 1px;
  margin: clamp(14px, 1.8vh, 22px) auto clamp(24px, 3vh, 38px);
  background: linear-gradient(90deg, transparent 0%, rgb(var(--rgb-gold-ui) / 0.28) 18%, rgb(var(--rgb-gold-highlight) / 0.84) 50%, rgb(var(--rgb-gold-ui) / 0.28) 82%, transparent 100%);
  box-shadow: 0 0 18px rgb(var(--rgb-gold-highlight) / 0.16);
}

.intro__headline {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.intro__headline-ivory,
.intro__headline-gold {
  display: block;
}

.intro__headline-ivory {
  font-size: clamp(58px, 7.4vw, 132px);
  color: rgb(var(--rgb-cream-strong) / 0.96);
  text-shadow: 0 2px 4px rgb(0 0 0 / 0.52), 0 10px 34px rgb(0 0 0 / 0.46);
}

.intro__headline-gold {
  margin-top: clamp(4px, 0.6vh, 8px);
  font-size: clamp(44px, 5.4vw, 96px);
  color: transparent;
  background: var(--gradient-gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 8px 24px rgb(0 0 0 / 0.42));
}

.intro__microline {
  margin: clamp(20px, 2.4vh, 32px) 0 0;
  font-family: var(--font-serif);
  font-size: clamp(21px, 2vw, 34px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: rgb(var(--rgb-cream-strong) / 0.84);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.58), 0 7px 22px rgb(0 0 0 / 0.42);
}

.intro__microline em {
  font-style: italic;
  color: rgb(var(--rgb-gold-highlight) / 0.92);
}

/* ── Orbiting seal ── */

.orbit {
  --orbit-gold: #c98c48;
  position: relative;
  display: grid;
  place-items: center;
  width: min(78vw, 430px);
  aspect-ratio: 1;
  isolation: isolate;
}

.orbit__mark {
  position: relative;
  z-index: 2;
  width: 83%;
  height: auto;
  filter: drop-shadow(0 15px 22px rgb(0 0 0 / 0.52));
  user-select: none;
  -webkit-user-drag: none;
}

.orbit__ring {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 50% 50%;
  will-change: transform;
  animation: orbitRotate 44s linear infinite;
}

.orbit.is-paused .orbit__ring {
  animation-play-state: paused;
}

.orbit__type {
  font-family: var(--font-sans);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 5.2px;
  fill: var(--orbit-gold);
  text-rendering: geometricPrecision;
}

.orbit__type--lower {
  letter-spacing: 5.8px;
}

.orbit__dot {
  fill: var(--orbit-gold);
}

.orbit__ring-desktop .orbit__type,
.orbit__ring-desktop .orbit__dot {
  fill: #d6a45f;
}

.orbit__ring-mobile {
  display: none;
}

/* ── Responsive ── */

/* Phones: wider ring path, larger seal, more air above it. */
@media (max-width: 767px) {
  .intro__lock {
    gap: clamp(56px, 8vh, 84px);
  }

  .intro__statement {
    margin-bottom: clamp(10px, 1.6vh, 20px);
    transform: translateY(clamp(36px, 4.5vh, 52px));
  }

  .intro__eyebrow {
    font-size: clamp(14px, 4vw, 16px);
  }

  .intro__microline {
    font-size: clamp(24px, 6.8vw, 28px);
  }

  .orbit {
    width: min(86vw, 480px);
    transform: translateY(-14px);
  }

  .orbit__mark {
    width: 72%;
  }

  .orbit__ring {
    inset: auto;
    top: -7%;
    left: -7%;
    width: 114%;
    height: 114%;
  }

  .orbit__ring-desktop {
    display: none;
  }

  .orbit__ring-mobile {
    display: inline;
  }

  .orbit__type {
    font-size: 29px;
    letter-spacing: 5.5px;
  }

  .orbit__type--lower {
    letter-spacing: 6.1px;
  }
}

@media (max-width: 767px) and (orientation: portrait) {
  .orbit__mark {
    width: 102%;
    max-width: none;
  }
}

/* Phone landscape and compact touch landscape: larger supporting lines. */
@media (max-width: 900px) and (orientation: landscape),
       (pointer: coarse) and (orientation: landscape) and (min-width: 1100px) and (max-width: 1180px) and (max-height: 780px) {
  .intro__eyebrow {
    font-size: clamp(16px, 2.4vw, 22px);
    letter-spacing: 0.34em;
  }

  .intro__microline {
    font-size: clamp(26px, 3.4vw, 36px);
  }
}

@media (min-width: 768px) {
  .orbit {
    transform: translateY(20px) scale(1.1);
    transform-origin: top center;
  }

  .orbit__mark {
    transform: translate(2px, 2px);
  }
}

@media (min-width: 1200px) {
  .intro {
    margin-bottom: clamp(32px, 3vh, 48px);
  }

  .intro__eyebrow {
    font-size: clamp(14px, 0.75vw, 18px);
    transform: translateY(12px);
  }

  .intro__rule {
    transform: translateY(12px);
  }
}

@media (min-width: 1200px) and (pointer: fine) {
  .intro__microline {
    font-size: calc(clamp(21px, 2vw, 34px) + 2px);
  }
}

/* Above 1920×1080: headline grows with the smaller viewport ratio (capped). */
@media (min-width: 1921px) and (min-height: 1081px) {
  .intro__headline-ivory {
    font-size: clamp(132px, min(6.875vw, 12.222222vh), 184.8px);
  }

  .intro__headline-gold {
    font-size: clamp(96px, min(5vw, 8.888889vh), 139.2px);
  }
}

/* 1080p / 2160p bands: the whole 1280×720 lockup, scaled. */
@media (min-width: 1600px) and (max-width: 2200px) and (min-height: 900px) and (max-height: 1250px),
       (min-width: 3200px) and (max-width: 4400px) and (min-height: 1800px) and (max-height: 2500px) {
  .intro {
    min-height: calc(720 * var(--home-scale-720));
    padding: calc(56 * var(--home-scale-720)) calc(20 * var(--home-scale-720));
  }

  .intro__inner {
    width: min(96vw, calc(1280 * var(--home-scale-720)));
  }

  .intro__lock {
    gap: calc(34.56 * var(--home-scale-720));
  }

  .intro__statement {
    width: min(96vw, calc(1180 * var(--home-scale-720)));
    margin-bottom: calc(5.76 * var(--home-scale-720));
    transform: translateY(calc(56 * var(--home-scale-720)));
  }

  .intro__eyebrow {
    font-size: calc(12.16 * var(--home-scale-720));
  }

  .intro__rule {
    width: calc(210 * var(--home-scale-720));
    height: calc(1 * var(--home-scale-720));
    margin: calc(14 * var(--home-scale-720)) auto calc(24 * var(--home-scale-720));
  }

  .intro__headline {
    letter-spacing: calc(-1.08 * var(--home-scale-720));
  }

  .intro__headline-ivory {
    font-size: calc(94.72 * var(--home-scale-720));
  }

  .intro__headline-gold {
    margin-top: calc(4.32 * var(--home-scale-720));
    font-size: calc(69.12 * var(--home-scale-720));
  }

  .intro__microline {
    margin-top: calc(20 * var(--home-scale-720));
    font-size: calc(27 * var(--home-scale-720));
  }

  .orbit {
    width: calc(430 * var(--home-scale-720));
    transform: translateY(calc(20 * var(--home-scale-720))) scale(1.1);
  }

  .orbit__mark {
    transform: translate(calc(2 * var(--home-scale-720)), calc(2 * var(--home-scale-720)));
    filter: drop-shadow(0 calc(15 * var(--home-scale-720)) calc(22 * var(--home-scale-720)) rgb(0 0 0 / 0.52));
  }
}

/* Phones and touch tablets: no pre-promoted layers. */
@media (max-width: 1180px), (pointer: coarse) and (min-width: 768px) {
  .orbit__ring {
    will-change: auto;
  }
}

/* Tablet typography: retain the existing fonts and keep phones/desktops
   outside these adjustments, including tablets with a zoomed viewport. */
@media (pointer: coarse) and (min-device-width: 600px) and (min-device-height: 600px) and (max-width: 1400px) and (orientation: landscape) {
  .intro__eyebrow {
    font-size: clamp(23px, 2.4vw, 30px);
  }

  .intro__headline-ivory {
    font-size: clamp(90px, 9.2vw, 126px);
  }

  .intro__headline-gold {
    font-size: clamp(64px, 6.6vw, 90px);
  }

  .intro__microline {
    font-size: clamp(34px, 4vw, 46px);
  }
}

@media (pointer: coarse) and (min-device-width: 600px) and (min-device-height: 600px) and (max-width: 1100px) and (orientation: portrait) {
  .intro__headline-ivory {
    font-size: clamp(70px, 9.2vw, 100px);
  }

  .intro__headline-gold {
    font-size: clamp(48px, 6.6vw, 72px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orbit__ring {
    animation: none;
  }
}

@keyframes orbitRotate {
  to {
    transform: rotate(-1turn);
  }
}
