/* ==========================================================================
   Tia Cooper — 2-step prelander (mobile-first, iOS-hardened)
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../assets/fonts/plus-jakarta-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../assets/fonts/plus-jakarta-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050505;
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.88);
  --online: #3ddc84;
  --btn-fg: #0a0a0a;
  --btn-ghost-border: rgba(255, 255, 255, 0.4);
  --side: 20px;
  --radius: 16px;
  --btn-h: 56px;
  --gap: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 700;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow: hidden;
  touch-action: manipulation;
}

button,
a {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* --------------------------------------------------------------------------
   Stage
   -------------------------------------------------------------------------- */

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}

@media (min-width: 480px) {
  body {
    display: grid;
    place-items: center;
    background: #000;
  }

  .stage {
    width: min(100vw, 430px);
    height: min(100dvh, 932px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
}

/* --------------------------------------------------------------------------
   Visual
   -------------------------------------------------------------------------- */

.visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0a0a0a;
}

.visual__frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 280ms var(--ease);
}

.visual__frame.is-active {
  opacity: 1;
}

.visual__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  user-select: none;
  pointer-events: none;
}

.visual__img--step2 {
  object-position: center 10%;
}

.visual__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.16) 0%,
      rgba(0, 0, 0, 0) 14%,
      rgba(0, 0, 0, 0) 36%,
      rgba(0, 0, 0, 0.35) 48%,
      rgba(0, 0, 0, 0.78) 60%,
      rgba(0, 0, 0, 0.94) 74%,
      rgba(0, 0, 0, 0.98) 100%
    );
}

.stage[data-step="2"] .visual__wash {
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.12) 0%,
      rgba(0, 0, 0, 0) 18%,
      rgba(0, 0, 0, 0) 42%,
      rgba(0, 0, 0, 0.25) 58%,
      rgba(0, 0, 0, 0.55) 72%,
      rgba(0, 0, 0, 0.72) 100%
    );
}

/* --------------------------------------------------------------------------
   UI stack
   -------------------------------------------------------------------------- */

.ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding:
    calc(12px + var(--safe-top))
    var(--side)
    calc(28px + var(--safe-bottom));
  pointer-events: none;
}

.stage[data-step="2"] .ui {
  padding-left: 14px;
  padding-right: 14px;
  padding-bottom: calc(14px + var(--safe-bottom));
}

.ui__stack {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  pointer-events: auto;
  text-align: center;
}

.presence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 12px;
  min-height: 20px;
}

.presence__dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--online);
  flex-shrink: 0;
  animation: presence-pulse 2.2s var(--ease) infinite;
}

.presence__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(61, 220, 132, 0.35);
  animation: presence-ring 2.2s var(--ease) infinite;
}

.presence__label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

@keyframes presence-pulse {
  0%,
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(61, 220, 132, 0); }
}

@keyframes presence-ring {
  0% { transform: scale(0.85); opacity: 0.55; }
  70% { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
  animation: panel-in 280ms var(--ease) both;
}

.panel[hidden] {
  display: none !important;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.support {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-soft);
  margin: 0 auto 10px;
  max-width: 320px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}

.question {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0 auto 22px;
  max-width: 320px;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 6px 20px rgba(0, 0, 0, 0.65);
}

.stage[data-step="2"] .presence--float {
  display: none;
}

/* --------------------------------------------------------------------------
   Step 2 sheet
   -------------------------------------------------------------------------- */

.panel--step2 {
  width: 100%;
}

.cta-sheet {
  width: 100%;
  padding: 16px 16px 14px;
  border-radius: 22px;
  background: rgba(10, 10, 12, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.presence--sheet {
  margin: 0 auto 12px;
}

.sheet__lead {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 auto 10px;
  max-width: 300px;
}

.sheet__title {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #ffffff;
  margin: 0 auto 16px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: rgba(255, 255, 255, 0.92);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.actions {
  display: flex;
  gap: var(--gap);
}

.actions--split .btn {
  flex: 1 1 0;
  min-width: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-h);
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease), background-color 160ms var(--ease);
  user-select: none;
}

.btn--primary {
  background: #ffffff;
  color: var(--btn-fg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: var(--btn-ghost-border);
}

.btn--block {
  width: 100%;
}

.btn--cta {
  min-height: 56px;
  font-size: 18px;
}

.btn:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: #f3f3f3; }
  .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.55);
  }
}

/* --------------------------------------------------------------------------
   Small phones
   -------------------------------------------------------------------------- */

@media (max-height: 700px) {
  .ui {
    padding-bottom: calc(18px + var(--safe-bottom));
  }

  .support { font-size: 16px; margin-bottom: 8px; }
  .question { font-size: 23px; margin-bottom: 16px; }
  .btn { min-height: 52px; font-size: 16px; }

  .cta-sheet { padding: 14px 14px 12px; border-radius: 18px; }
  .sheet__lead { font-size: 20px; }
  .sheet__title { font-size: 17px; margin-bottom: 14px; }
  .btn--cta { min-height: 52px; font-size: 17px; }
}

@media (max-width: 360px) {
  :root { --side: 16px; }
  .question { font-size: 22px; }
  .sheet__lead { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .presence__dot,
  .presence__dot::after,
  .panel.is-active,
  .visual__frame,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}
