/* ============================================================
 * v2 redesign — landing-only bespoke styles.
 *
 * Loaded by src/components/redesign-v2/landing/LandingV2.tsx and
 * nothing else. Onboarding pages (/connect, /authorize, /welcome,
 * /app) do not need this stylesheet. Naming uses the .v2- prefix
 * convention; classnames here are NOT meant to be consumed outside
 * the landing surface.
 *
 * Typography clamp values and spacing rhythm live inline below
 * rather than as :root tokens — these are page-local expression,
 * not a reusable scale. If a future page reaches for the same
 * hero/section sizing we promote them to tokens then. (#131.)
 * ============================================================ */

/* ---- page wrapper -----------------------------------------
 * Body background gradient lives on a wrapper so it doesn't fight
 * the root layout (which sets its own body background). The hero
 * has its own pool wallpaper that overlays this; sections below
 * the hero sit over the gradient.
 */
.v2-landing-bg {
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%,
      var(--v2-pool-blue-deep) 0%,
      var(--v2-pool-blue-dark) 60%,
      var(--v2-pool-blue-night) 100%);
  background-attachment: fixed;
  color: var(--v2-ink);
  font-family: var(--v2-font-body);
  font-weight: 500;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
.v2-landing-bg img { display: block; max-width: 100%; }
.v2-landing-bg a { color: inherit; text-decoration: none; }
.v2-landing-bg button { font-family: inherit; cursor: pointer; }

/* ===== Top nav ============================================= */
.v2-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--v2-z-topnav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--v2-chrome-top) clamp(18px, 4vw, 40px);
  gap: 24px;
  pointer-events: none;
}
.v2-topnav > * { pointer-events: auto; }
.v2-topnav__brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display), Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.09em;
  font-size: clamp(22px, 2vw, 28px);
  color: var(--v2-ink);
  text-shadow: 0 1px 2px rgba(0, 30, 60, 0.22);
  user-select: none;
}
.v2-topnav__nav {
  display: flex;
  gap: clamp(14px, 2.2vw, 28px);
  align-items: center;
}
.v2-topnav__nav a {
  color: var(--v2-ink-mute);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color var(--v2-motion-fast) ease;
}
.v2-topnav__nav a:hover { color: var(--v2-ink); }
.v2-topnav__cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--v2-radius-pill);
  background: var(--v2-glass-bg-strong);
  border: 1px solid var(--v2-glass-bd-strong);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: var(--v2-ink);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: transform var(--v2-motion-fast) ease,
              background var(--v2-motion-fast) ease;
}
.v2-topnav__cta:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.v2-topnav__cta:focus-visible {
  outline: none;
  box-shadow: var(--v2-focus-ring);
}
@media (max-width: 720px) {
  .v2-topnav__nav { display: none; }
}

/* ===== Hero =============================================== */
.v2-hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
}
.v2-hero__content {
  position: relative;
  z-index: var(--v2-z-hero-content);
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: clamp(22px, 3.4vh, 36px);
}
.v2-hero__h {
  font-family: var(--font-display), Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.08em;
  font-size: clamp(48px, 7.8vw, 96px);
  line-height: 0.86;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 30, 60, 0.22);
}
.v2-hero__sub {
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.45;
  color: var(--v2-ink-mute);
  max-width: 560px;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 30, 60, 0.18);
}
.v2-hero__note {
  margin: 0;
  font-size: 13.5px;
  color: var(--v2-ink-faint);
  text-shadow: 0 1px 2px rgba(0, 30, 60, 0.16);
}
.v2-hero__scroll-hint {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(18px, 3vh, 36px);
  text-align: center;
  color: var(--v2-ink-faint);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: var(--v2-z-hero-content);
  pointer-events: none;
  animation: v2FloatDown 3s ease-in-out infinite;
}
@keyframes v2FloatDown {
  0%, 100% { transform: translateY(0);   opacity: 0.55; }
  50%      { transform: translateY(6px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-hero__scroll-hint { animation: none; }
}

/* ---- hero form (glass pill — used in hero AND final CTA) ---- */
.v2-hero-form {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 460px;
  padding: 6px;
  border-radius: var(--v2-radius-pill);
  background: var(--v2-glass-bg-strong);
  border: 1px solid var(--v2-glass-bd-strong);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--v2-shadow-pop-soft);
}
.v2-hero-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: var(--v2-ink);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  outline: none;
}
.v2-hero-form input::placeholder { color: var(--v2-ink-faint); }
.v2-hero-form input.v2-hero-form__input--error {
  /* Brief warning outline when the client-side regex rejects the
   * value before submit. Auto-clears via setTimeout in HeroForm. */
  outline: 2px solid #ffcc66;
  outline-offset: 2px;
}
.v2-hero-form button {
  flex: 0 0 auto;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--v2-radius-pill);
  background: #ffffff;
  color: var(--v2-pool-blue-dark);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: transform var(--v2-motion-fast) ease,
              background var(--v2-motion-fast) ease;
}
.v2-hero-form button:hover {
  transform: translateY(-1px);
  background: #f5fbff;
}
.v2-hero-form button:focus-visible {
  outline: none;
  box-shadow: var(--v2-focus-ring);
}

/* ===== Section frame ====================================== */
.v2-section {
  position: relative;
  padding: clamp(80px, 12vh, 140px) clamp(20px, 5vw, 56px);
}
.v2-section__inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}
.v2-section__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--v2-ink-faint);
  margin: 0 0 12px;
}
.v2-section__h {
  font-family: var(--font-display), Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.045em;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.02;
  margin: 0 0 18px;
}
.v2-section__lede {
  max-width: 640px;
  margin: 0 0 56px;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.5;
  color: var(--v2-ink-mute);
}

/* ---- glass-card hover (landing-only modifier) ----
 * Onboarding pages use the same glass-card primitive without hover.
 * The lift is an affordance for the steps / versus / features grids.
 */
.v2-card-hover {
  transition: transform var(--v2-motion-card) ease,
              background var(--v2-motion-card) ease,
              border-color var(--v2-motion-card) ease;
}
.v2-card-hover:hover {
  transform: translateY(-3px);
  background: var(--v2-glass-bg-strong);
  border-color: var(--v2-glass-bd-strong);
}

/* ---- Steps section ---- */
.v2-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.v2-step-num {
  font-family: var(--font-display), Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.22);
  margin: 0 0 10px;
}
.v2-card-h {
  font-family: var(--font-display), Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.1;
  margin: 0 0 8px;
}
.v2-card-body {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--v2-ink-mute);
  margin: 0;
}
.v2-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--v2-ink);
}
@media (max-width: 820px) {
  .v2-steps-grid { grid-template-columns: 1fr; }
}

/* ---- Versus section ---- */
.v2-versus {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.v2-versus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.v2-versus-row {
  padding: 24px;
  border-radius: var(--v2-radius-card-tight);
  background: var(--v2-glass-bg);
  border: 1px solid var(--v2-glass-bd);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  text-align: center;
}
.v2-versus-them {
  font-size: 14px;
  color: var(--v2-ink-faint);
  margin: 0 0 6px;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}
.v2-versus-us {
  font-family: var(--font-display), Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.045em;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.0;
  color: var(--v2-ink);
  margin: 0;
}
.v2-versus-us small {
  display: block;
  font-family: var(--v2-font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--v2-ink-mute);
  margin-top: 6px;
}
@media (max-width: 820px) {
  .v2-versus-grid { grid-template-columns: 1fr; }
}

/* ---- Features grid ---- */
.v2-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 980px) { .v2-features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .v2-features-grid { grid-template-columns: 1fr; } }

/* ---- Security section ---- */
.v2-security-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.v2-security-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.v2-security-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--v2-glass-bg);
  border: 1px solid var(--v2-glass-bd);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.v2-security-item__check {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--v2-ink);
}
.v2-security-item strong {
  display: block;
  font-family: var(--v2-font-body);
  font-weight: 600;
  font-size: 15.5px;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.v2-security-item span {
  font-size: 14.5px;
  color: var(--v2-ink-mute);
  line-height: 1.5;
}
@media (max-width: 820px) {
  .v2-security-grid { grid-template-columns: 1fr; }
}

/* ---- Final CTA ---- */
.v2-cta-final {
  text-align: center;
  padding-top: clamp(100px, 14vh, 160px);
  padding-bottom: clamp(100px, 14vh, 160px);
}
.v2-cta-final .v2-section__h { margin-bottom: 14px; }
.v2-cta-final .v2-section__lede { margin: 0 auto 36px; }
.v2-cta-final .v2-hero-form { margin: 0 auto; }
.v2-cta-final .v2-hero__note { color: var(--v2-ink-mute); }

/* ---- Footer ---- */
.v2-landing-footer {
  position: relative;
  padding: 36px clamp(20px, 5vw, 56px) 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  justify-content: space-between;
  color: var(--v2-ink-faint);
  font-size: 14px;
}
.v2-landing-footer__brand {
  font-family: var(--font-display), Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.09em;
  font-size: 22px;
  color: var(--v2-ink);
}
.v2-landing-footer__links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.v2-landing-footer a {
  color: var(--v2-ink-faint);
  transition: color var(--v2-motion-fast) ease;
}
.v2-landing-footer a:hover { color: var(--v2-ink); }
.v2-landing-footer__meta {
  color: var(--v2-ink-faint);
  font-size: 13px;
}
