/* ==========================================================================
   XP Questra — landing page
   Ported from Figma: XP-Questra-landing-page, node 1:2
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colour */
  --gold-100: #ffe77b;   /* headings */
  --gold-200: #efc81d;
  --gold-300: #deb810;   /* button ink + border */
  --gold-400: #c8a300;
  --ink-900:  #111729;
  --ink-800:  #000000;
  --indigo-700: #2b277a;
  --indigo-600: #242366;  /* button fill */
  --violet-700: #4e1880;
  --white: #ffffff;
  --glow: rgba(234, 179, 8, 0.3);

  /* Type */
  --font-display: "Germania One", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: Helvetica, "Helvetica Neue", Arial, sans-serif;
  --track: 0.1em;             /* every text style in the design is +10% */

  /* Layout */
  --shell: 1496px;            /* content frame width in Figma */
  --shell-narrow: 1192px;     /* centred pitch blocks */
  --gutter: clamp(20px, 5vw, 96px);
  --radius-card: 16px;
  --radius-device: 32px;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-800);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: var(--track);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

figure { margin: 0; }

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   3. Shared components
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 2px solid var(--gold-300);
  border-radius: 4px;
  background: var(--indigo-600);
  color: var(--gold-300);
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);   /* 18 → 24px */
  line-height: 32px;
  letter-spacing: var(--track);
  text-decoration: none;
  white-space: nowrap;
  filter: drop-shadow(0 0 20px var(--glow));
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--gold-300);
  color: var(--indigo-600);
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 3px solid var(--gold-100);
  outline-offset: 3px;
}

/* Centred "Create your guild…" block, used twice */
.pitch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: var(--shell-narrow);
  margin-inline: auto;
  text-align: center;
}

.pitch__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.5rem);        /* 32 → 56px */
  line-height: 1.05;
  letter-spacing: var(--track);
  color: var(--gold-100);
  text-wrap: balance;
}

.pitch__sub {
  font-size: clamp(1.0625rem, 1.6vw, 1.5rem);   /* 17 → 24px */
  line-height: 1.35;
  color: var(--white);
}

.pitch .btn { margin-top: 16px; }

/* --------------------------------------------------------------------------
   4. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    134.58deg,
    var(--ink-900) 0%,
    var(--indigo-700) 53.85%,
    var(--violet-700) 100%
  );
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 584fr) minmax(0, 626fr);
  align-items: center;
  gap: clamp(40px, 6vw, 90px);
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(64px, 8vw, 184px) var(--gutter) 0;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: clamp(64px, 8vw, 184px);
}

.wordmark {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.375rem, 2vw, 2rem);        /* 22 → 32px */
  line-height: 1.25;
  letter-spacing: var(--track);
  color: var(--white);
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4rem);          /* 40 → 64px */
  line-height: 1.0;
  letter-spacing: var(--track);
  color: var(--gold-100);
  text-wrap: balance;
}

.hero__lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.5rem);   /* 17 → 24px */
  line-height: 1.35;
  color: var(--white);
}

.hero__copy .btn { margin-top: 8px; }

/* Gold device frame — sits flush with the bottom of the hero.
   The wrapper is capped at the frame width so the percentage padding below
   always resolves against 626px-equivalent, not the grid column. */
.hero__device {
  align-self: end;
  width: 100%;
  max-width: 626px;
  margin-inline: auto;
}

.device-frame {
  width: 100%;
  /* 93px top pad / 24px sides, expressed against the 626px frame width */
  padding: 14.86% 3.83% 0;
  border: 1px solid var(--white);
  border-bottom: 0;
  border-radius: var(--radius-device) var(--radius-device) 0 0;
  background: linear-gradient(
    142.58deg,
    var(--gold-400) 1.6%,
    var(--gold-100) 50.8%,
    var(--gold-200) 100%
  );
  box-shadow: 0 0 40px var(--glow);
}

.device-frame__screen {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-bottom: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.device-frame__screen img { width: 100%; }

/* Inset vignette has to sit *above* the artwork, so it needs its own layer */
.device-frame__screen::after,
.step__media::after,
.closing__card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   5. Stages (dark middle section)
   -------------------------------------------------------------------------- */
.stages {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink-800);
  padding-block: clamp(64px, 7vw, 112px);
}

/* Approximates the mirrored prism gradient from the Figma fill */
.stages__glow {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(1500px, 130vw);
  aspect-ratio: 3 / 2;
  translate: -50% -50%;
  rotate: -14deg;
  opacity: 0.5;
  filter: blur(24px);
  background: radial-gradient(
    ellipse at 50% 50%,
    #ffe77b 4%,
    #ffcd4d 11%,
    #ffc135 15%,
    #ffb41e 18%,
    #ff8d1e 21%,
    #ff661d 24%,
    #ff401d 26%,
    #ff191d 29%,
    rgba(196, 21, 59, 0.94) 34%,
    rgba(136, 18, 90, 0.88) 40%,
    rgba(77, 14, 120, 0.81) 45%,
    rgba(48, 13, 135, 0.78) 47%,
    rgba(18, 11, 150, 0) 55%
  );
}

.stages__content {
  display: flex;
  flex-direction: column;
  gap: 40px;                 /* Figma: 40px between step rows */
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.stages .pitch { margin-bottom: 20px; }   /* 60px to the first step */

/* --- individual step rows --- */
.step {
  display: grid;
  grid-template-columns: minmax(0, 548fr) minmax(0, 584fr);
  align-items: center;
  gap: clamp(32px, 4vw, 56px);
}

.step--reverse .step__copy { order: 2; }
.step--reverse .step__media { order: 1; }

.step__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step__eyebrow {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: var(--track);
  color: var(--white);
}

.step__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 3rem);       /* 28 → 48px */
  line-height: 1.15;
  letter-spacing: var(--track);
  color: var(--white);
  text-wrap: balance;
}

.step__body {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--white);
}

.step__media {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-card);
}

.step__media img {
  width: 100%;
  aspect-ratio: 584 / 600;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   6. Closing CTA
   -------------------------------------------------------------------------- */
.closing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--ink-800);
  /* Second layer is the hosted export, shown only while assets/ is empty.
     Drop it once ./download-assets.sh has been run. */
  background-image:
    url("assets/cta-bg.png"),
    url("https://www.figma.com/api/mcp/asset/de8b38a6-997c-413c-9923-d1844c33ca37.png");
  background-size: cover, cover;
  background-position: center, center;
  padding-block: clamp(72px, 8vw, 130px) clamp(88px, 10vw, 164px);
}

/* Radial black veil from the Figma overlay (rect 9:314) */
.closing__veil {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(
    95% 130% at 50% 14%,
    rgba(0, 0, 0, 0.9) 27%,
    rgba(0, 0, 0, 0) 100%
  );
}

.closing__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(48px, 6vw, 64px);
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.closing__card {
  position: relative;
  width: 100%;
  max-width: 449px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 24px;
}

.closing__card img {
  width: 100%;
  aspect-ratio: 449 / 297;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--ink-800);
  color: var(--gold-100);
  padding-block: 48px 64px;   /* Figma footer band: 144px tall */
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: 1800px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 32px;
  letter-spacing: var(--track);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 1rem;
  line-height: 24px;
}

.footer__meta a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer__meta a:hover,
.footer__meta a:focus-visible { border-bottom-color: currentColor; }

/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */

/* Tablet — steps stay side by side but tighten up */
@media (max-width: 1100px) {
  .hero__inner { gap: clamp(32px, 4vw, 56px); }
  .stages__glow { filter: blur(18px); }
}

/* Stack everything */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    padding-top: clamp(48px, 9vw, 72px);
    gap: clamp(40px, 7vw, 56px);
  }

  .hero__copy {
    align-items: center;
    text-align: center;
    padding-bottom: 0;
  }

  .hero__title,
  .hero__lede { text-align: center; }

  .hero__device { max-width: 460px; }

  .stages__content { gap: 56px; }

  .step {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Image always follows its copy once stacked */
  .step--reverse .step__copy { order: 1; }
  .step--reverse .step__media { order: 2; }

  .step__media { max-width: 584px; margin-inline: auto; width: 100%; }

  .closing { background-position: center top; }
}

/* Phone */
@media (max-width: 560px) {
  body { font-size: 15px; }

  .hero__inner { padding-top: 40px; }

  .hero__copy { gap: 20px; }

  .btn { width: 100%; max-width: 320px; white-space: normal; text-align: center; }

  .step__media img { aspect-ratio: 584 / 520; }

  .stages__glow { width: 170vw; filter: blur(14px); }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}
