/* ===== Tokens ===== */
:root {
  --bg-deep: #020403;
  --bg-mid: #050706;
  --bg-panel: #07100A;
  --green-deep: #123B1B;
  --green: #28B73E;
  --green-bright: #40D44F;
  --green-gradient: linear-gradient(180deg, #32C847 0%, #53E35F 100%);
  --green-btn: linear-gradient(180deg, #249E37 0%, #39C94A 100%);
  --blue-btn: linear-gradient(180deg, #006DC7 0%, #098FE5 100%);
  --text-light: #F1F1F1;
  --text-muted: #A6A6A6;
  --text-sub: #D0D0D0;
  --max: 520px;
  --btn-max: 450px;
  --side-gutter: max(20px, 5vw);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text-light);
  background: var(--bg-deep);
  line-height: 1.2;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Page ===== */
.page {
  position: relative;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
}

.page__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--bg-deep);
  background-image: url("assets/hero-green-portal.webp");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
}

.page__overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(2, 4, 3, 0.98) 0%,
      rgba(2, 4, 3, 0.96) 32%,
      rgba(2, 4, 3, 0.88) 48%,
      rgba(2, 4, 3, 0.55) 62%,
      rgba(2, 4, 3, 0.18) 78%,
      rgba(2, 4, 3, 0) 100%
    );
}

.page__vein {
  position: fixed;
  top: 0;
  bottom: 0;
  width: clamp(56px, 16vw, 96px);
  z-index: 2;
  pointer-events: none;
}

.page__vein--left {
  left: 0;
}

.page__vein--right {
  right: 0;
}

/* ===== Shell ===== */
.shell {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--max);
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    max(32px, calc(22px + var(--safe-top)))
    max(20px, var(--safe-right))
    max(16px, calc(8px + var(--safe-bottom)))
    max(20px, var(--safe-left));
}

/* ===== Brand logo ===== */
.brand {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  margin-bottom: clamp(32px, 6vw, 40px);
}

.brand__logo {
  width: clamp(42px, 12vw, 55px);
  height: auto;
  filter: drop-shadow(0 0 16px rgba(83, 227, 95, 0.45));
}

/* ===== Intro ===== */
.intro {
  width: 100%;
  max-width: 100%;
  text-align: center;
  flex-shrink: 0;
  padding-inline: 0;
}

.intro__eyebrow {
  font-size: clamp(14px, 3.8vw, 22px);
  font-weight: 300;
  letter-spacing: clamp(3px, 1.2vw, 7px);
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: clamp(8px, 2vw, 14px);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.intro__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1vw, 8px);
  width: 100%;
  max-width: 100%;
}

.intro__line {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: clamp(
    30px,
    calc((100vw - (max(20px, var(--safe-left)) + max(20px, var(--safe-right)) + 12px)) / 10.8),
    78px
  );
  font-weight: 600;
  letter-spacing: clamp(0.02em, 0.35vw, 0.07em);
  text-transform: uppercase;
  color: rgba(241, 241, 241, 0.98);
  line-height: 0.95;
  white-space: nowrap;
}

.intro__line--green {
  font-size: clamp(
    34px,
    calc((100vw - (max(20px, var(--safe-left)) + max(20px, var(--safe-right)) + 12px)) / 5.2),
    82px
  );
  font-weight: 700;
  background: var(--green-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro__accent {
  display: block;
  width: clamp(38px, 12vw, 52px);
  height: 2px;
  margin-top: clamp(6px, 1.5vw, 10px);
  background: linear-gradient(90deg, #28B73E 0%, #53E35F 100%);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(64, 212, 79, 0.4);
}

.intro__subtitle {
  margin-top: clamp(38px, 8.5vw, 45px);
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.8vw, 6px);
}

.intro__subtitle-line {
  font-size: clamp(16px, 4.2vw, 22px);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-sub);
  max-width: 100%;
  padding-inline: 2px;
}

.intro__subtitle-line--light {
  color: rgba(241, 241, 241, 0.92);
}

/* ===== Actions / CTA ===== */
.actions {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  margin-top: clamp(44px, 10vw, 55px);
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 3.8vw, 18px);
  width: 100%;
  max-width: var(--btn-max);
  align-items: center;
}

.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: clamp(72px, 19vw, 80px);
  padding: 12px clamp(16px, 4vw, 24px);
  border-radius: 8px;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cta:active {
  transform: scale(0.985);
}

.cta--green {
  background: var(--green-btn);
  box-shadow:
    0 4px 28px rgba(36, 158, 55, 0.4),
    0 0 20px rgba(57, 201, 74, 0.2);
}

.cta--green:hover {
  filter: brightness(1.06);
}

.cta--blue {
  background: var(--blue-btn);
  box-shadow:
    0 4px 28px rgba(0, 109, 199, 0.4),
    0 0 20px rgba(9, 143, 229, 0.2);
  padding-left: clamp(50px, 14vw, 58px);
}

.cta--blue:hover {
  filter: brightness(1.06);
}

.cta__icon-wrap {
  position: absolute;
  left: clamp(18px, 5vw, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.cta__icon {
  width: 22px;
  height: 22px;
}

.cta__text {
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 500;
  letter-spacing: clamp(0.04em, 0.35vw, 0.07em);
  text-transform: uppercase;
  color: #FFFFFF;
  text-align: center;
  line-height: 1.15;
  pointer-events: none;
}

/* ===== Scene spacer ===== */
.scene {
  flex: 1 1 auto;
  width: 100%;
  min-height: clamp(160px, 32svh, 320px);
  margin-top: clamp(40px, 8vw, 60px);
  pointer-events: none;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .cta {
    transition: none;
  }
}

/* ===== Small width ===== */
@media (max-width: 374px) {
  .intro__line {
    font-size: clamp(
      28px,
      calc((100vw - (max(20px, var(--safe-left)) + max(20px, var(--safe-right)) + 8px)) / 11.2),
      46px
    );
    letter-spacing: 0.02em;
  }

  .intro__line--green {
    font-size: clamp(
      32px,
      calc((100vw - (max(20px, var(--safe-left)) + max(20px, var(--safe-right)) + 8px)) / 5.5),
      50px
    );
  }

  .intro__eyebrow {
    letter-spacing: 3px;
    font-size: 13px;
  }

  .cta__text {
    font-size: clamp(12px, 3.4vw, 14px);
  }

  .cta--blue {
    padding-left: 44px;
  }
}

@media (max-width: 359px) {
  .intro__line {
    font-size: clamp(
      26px,
      calc((100vw - (max(20px, var(--safe-left)) + max(20px, var(--safe-right)) + 6px)) / 11.5),
      42px
    );
  }

  .intro__line--green {
    font-size: clamp(
      30px,
      calc((100vw - (max(20px, var(--safe-left)) + max(20px, var(--safe-right)) + 6px)) / 5.8),
      46px
    );
  }

  .cta__text {
    font-size: 11px;
    letter-spacing: 0.02em;
  }
}

/* ===== Short screens ===== */
@media (max-height: 740px) {
  .brand {
    margin-bottom: clamp(24px, 4.5vw, 32px);
  }

  .intro__subtitle {
    margin-top: clamp(28px, 5.5vw, 38px);
  }

  .actions {
    margin-top: clamp(32px, 7vw, 44px);
  }

  .scene {
    min-height: clamp(120px, 26svh, 220px);
    margin-top: clamp(28px, 5.5vw, 44px);
  }
}

@media (max-height: 640px) {
  .brand__logo {
    width: 40px;
  }

  .intro__line {
    font-size: clamp(
      28px,
      calc((100vw - (max(20px, var(--safe-left)) + max(20px, var(--safe-right)) + 8px)) / 11.5),
      48px
    );
  }

  .intro__line--green {
    font-size: clamp(
      32px,
      calc((100vw - (max(20px, var(--safe-left)) + max(20px, var(--safe-right)) + 8px)) / 5.8),
      50px
    );
  }

  .intro__subtitle-line {
    font-size: clamp(16px, 4.2vw, 19px);
  }

  .cta {
    min-height: 66px;
  }

  .scene {
    min-height: clamp(90px, 20svh, 160px);
  }
}

/* ===== Desktop ===== */
@media (min-width: 768px) {
  .page {
    display: flex;
    justify-content: center;
  }

  .shell {
    min-height: 100svh;
  }
}
