:root {
  --orange: #ff542d;
  --navy: #140945;
  --bg: #ffffff;
  --side-pad: clamp(28px, 5vw, 88px);
  --top-pad: clamp(28px, 4vw, 56px);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--navy);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: var(--top-pad) var(--side-pad);
  isolation: isolate;
}

/* ---------- Visual layer ---------- */
.visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  opacity: 0;
  animation: fade-in 1.6s ease-out 0.1s forwards;
}

.globe-wrap {
  position: absolute;
  top: 50%;
  right: 0;
  width: clamp(640px, 110vh, 1280px);
  aspect-ratio: 1;
  /* push partly off-screen so the globe reads as cropped at the right edge */
  transform: translate(32%, -50%);
  /* interactive: re-enable pointer events (parent .visual disables them) */
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.globe-wrap.is-dragging {
  cursor: grabbing;
}

#globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Brand ---------- */
.brand {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(-8px);
  animation: fade-up 0.9s var(--ease-out) 0.2s forwards;
}

.brand-link {
  display: inline-block;
  text-decoration: none;
  outline: none;
}

.brand-link:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 6px;
  border-radius: 2px;
}

.logo {
  width: clamp(140px, 13vw, 175px);
  height: auto;
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: min(660px, 60%);
  padding-bottom: clamp(40px, 8vh, 96px);
}

.eyebrow {
  margin: 0 0 clamp(20px, 3vh, 32px);
  font-size: clamp(11px, 0.85vw, 13px);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(12px);
  animation: fade-up 0.9s var(--ease-out) 0.35s forwards;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--orange);
  display: inline-block;
  transform-origin: left center;
  animation: line-grow 0.9s var(--ease-out) 0.45s both;
}

.headline {
  margin: 0;
  font-weight: 600;
  font-size: clamp(26px, 5.2vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.line {
  display: block;
  overflow: hidden;
}

.line > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  animation: word-rise 1.05s var(--ease-out) forwards;
}

.line:nth-child(1) > span { animation-delay: 0.55s; }
.line:nth-child(2) > span { animation-delay: 0.72s; }

/* ---------- Stay in touch ---------- */
.cta {
  margin-top: clamp(28px, 4vh, 44px);
  opacity: 0;
  transform: translateY(12px);
  animation: fade-up 0.9s var(--ease-out) 0.95s forwards;
}

/* Keep the form + thank-you fully hidden until toggled.
   (Needed because .stay-form sets display:flex, which would
   otherwise override the plain [hidden] attribute.) */
.stay-form[hidden],
.stay-thanks[hidden] { display: none; }

.cta-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 10px;
  padding: 13px 26px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(20, 9, 69, 0.12);
  transition: background-color 0.2s var(--ease-out),
              box-shadow 0.2s var(--ease-out),
              transform 0.15s var(--ease-out);
}

.cta-btn:hover {
  background: #241466;
  box-shadow: 0 6px 16px rgba(20, 9, 69, 0.18);
}

.cta-btn:active { transform: translateY(1px); }

.cta-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.cta-btn[disabled] {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

/* Revealed form: clean, stacked, left-aligned under the headline */
.stay-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 360px;
}

.stay-form .field { margin: 0; }

.stay-form input {
  width: 100%;
  font-family: inherit;
  /* 16px keeps iOS Safari from auto-zooming when the field is focused */
  font-size: 16px;
  color: var(--navy);
  background: #fff;
  border: 1px solid rgba(20, 9, 69, 0.16);
  border-radius: 10px;
  padding: 13px 15px;
  transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.stay-form input::placeholder { color: rgba(20, 9, 69, 0.4); }

.stay-form input:hover { border-color: rgba(20, 9, 69, 0.3); }

.stay-form input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 84, 45, 0.12);
}

.stay-actions {
  display: flex;
  gap: 10px;
}

.stay-form .cta-submit { flex: 1; }

/* secondary "Back" button that collapses the form */
.cta-back {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  border: 1px solid rgba(20, 9, 69, 0.18);
  border-radius: 10px;
  padding: 13px 18px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.cta-back::before { content: "\2190"; margin-right: 7px; }

.cta-back:hover {
  background: rgba(20, 9, 69, 0.04);
  border-color: rgba(20, 9, 69, 0.32);
}

.cta-back:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stay-thanks {
  margin: clamp(18px, 2.5vh, 28px) 0 0;
  font-size: clamp(15px, 1.1vw, 17px);
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Keyframes ---------- */
@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes word-rise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes line-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ---------- Responsive ---------- */

/* Tablets & phones: stack vertically — text pinned to the top, globe as a
   soft accent anchored to the bottom, so the two never overlap.
   overflow-y stays scrollable so the form is reachable with the keyboard up. */
@media (max-width: 900px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .hero {
    max-width: 100%;
    align-self: start;
    margin-top: clamp(16px, 4vh, 44px);
    padding-bottom: clamp(40px, 10vh, 96px);
  }

  .globe-wrap {
    width: min(640px, 118vw);
    top: auto;
    bottom: 0;
    right: 50%;
    /* center it and push most of the sphere below the fold */
    transform: translate(50%, 34%);
    opacity: 0.5;
  }
}

@media (max-width: 520px) {
  .globe-wrap {
    width: min(560px, 134vw);
    transform: translate(50%, 36%);
    opacity: 0.45;
  }
}

/* Short / landscape screens: keep the globe off to the side instead of the
   bottom (there's no vertical room) and tighten spacing. */
@media (max-height: 600px) {
  .hero {
    margin-top: clamp(6px, 2vh, 16px);
    padding-bottom: clamp(12px, 3vh, 28px);
  }
  .eyebrow { margin-bottom: clamp(10px, 2vh, 20px); }
  .globe-wrap {
    width: clamp(420px, 80vh, 820px);
    top: 50%;
    bottom: auto;
    right: 0;
    transform: translate(34%, -50%);
    opacity: 0.55;
  }
}

/* ---------- Reduced motion ----------
   Suppress entrance pop-ins and parallax, but keep the slow ambient
   pulses + 90s rotation — they're below the threshold of motion that
   tends to bother vestibular-sensitive users. */
@media (prefers-reduced-motion: reduce) {
  .visual,
  .brand,
  .eyebrow,
  .eyebrow::before,
  .line > span,
  .cta {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

}
