/* Progressive landing-page polish. Everything is scoped so calculators remain unchanged. */
:root {
  --landing-blue: #5b8cff;
  --landing-cyan: #41d9ff;
  --landing-mint: #66e3b4;
}

body.landing-active {
  background: radial-gradient(circle at 12% 18%, rgba(91, 140, 255, 0.07), transparent 30rem), #f6f5f0;
}

body.landing-active nav {
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom-color: rgba(22, 42, 82, 0.1) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 30px rgba(26, 38, 73, 0.04);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.landing-page {
  overflow: hidden;
  background: radial-gradient(circle at 92% 30%, rgba(91, 140, 255, 0.055), transparent 28rem), #f6f5f0;
}

.landing-hero {
  --spot-x: 78%;
  --spot-y: 35%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 450px;
  padding: 88px 0 80px !important;
  background:
    radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(65, 217, 255, 0.17), transparent 22rem),
    radial-gradient(circle at 15% 10%, rgba(91, 140, 255, 0.22), transparent 30rem),
    linear-gradient(125deg, #0d1128 0%, #121a3a 50%, #102c43 100%) !important;
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: -45%;
  z-index: -2;
  background:
    conic-gradient(from 120deg at 67% 48%, transparent 0 68%, rgba(102, 227, 180, 0.11) 76%, transparent 84%),
    conic-gradient(from 280deg at 28% 62%, transparent 0 72%, rgba(91, 140, 255, 0.14) 80%, transparent 88%);
  animation: landing-aurora 18s ease-in-out infinite alternate;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, transparent, #000 44%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 44%, #000);
}

.landing-hero-shell { position: relative; z-index: 1; }
.landing-hero-copy { position: relative; z-index: 2; max-width: 660px !important; }

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(137, 185, 255, 0.24);
  border-radius: 999px;
  color: rgba(225, 237, 255, 0.76) !important;
  background: rgba(105, 156, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: landing-rise 0.65s 0.05s both cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--landing-mint);
  box-shadow: 0 0 0 5px rgba(102, 227, 180, 0.1), 0 0 18px rgba(102, 227, 180, 0.65);
  animation: landing-pulse 2.2s ease-out infinite;
}

.landing-title {
  max-width: 650px;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  animation: landing-rise 0.72s 0.13s both cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-title span {
  position: relative;
  display: inline-block;
  filter: saturate(1.08) brightness(1.08);
}

.landing-subtitle {
  max-width: 610px;
  animation: landing-rise 0.72s 0.21s both cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-actions { animation: landing-rise 0.72s 0.29s both cubic-bezier(0.22, 1, 0.36, 1); }

.landing-actions button,
.landing-cta a {
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease !important;
}

.landing-actions button::after,
.landing-cta a::after {
  content: "";
  position: absolute;
  inset: -50% auto -50% -55%;
  width: 35%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transition: left 520ms ease;
}

.landing-actions button:hover,
.landing-cta a:hover { transform: translateY(-2px) !important; }

.landing-actions button:first-child {
  box-shadow: 0 12px 28px rgba(4, 14, 38, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.landing-actions button:first-child:hover {
  box-shadow: 0 17px 34px rgba(4, 14, 38, 0.4), 0 0 0 4px rgba(125, 180, 255, 0.12);
}

.landing-actions button:last-child:hover {
  border-color: rgba(255, 255, 255, 0.62) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.landing-actions button:hover::after,
.landing-cta a:hover::after { left: 125%; }

.landing-data-visual {
  position: absolute;
  top: 50%;
  right: 24px;
  width: 410px;
  padding: 20px;
  transform: translateY(-50%) perspective(1000px) rotateY(-4deg) rotateX(1deg);
  transform-origin: right center;
  border: 1px solid rgba(157, 200, 255, 0.21);
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(145deg, rgba(31, 45, 84, 0.78), rgba(17, 27, 57, 0.62));
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.33), inset 0 1px 0 rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  animation: landing-dashboard-in 0.9s 0.26s both cubic-bezier(0.22, 1, 0.36, 1), landing-float 7s 1.2s ease-in-out infinite;
  pointer-events: none;
}

.landing-data-head,
.landing-data-main,
.landing-data-stats { display: flex; align-items: center; justify-content: space-between; }

.landing-data-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(225, 237, 255, 0.62);
  font: 600 10px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.12em;
}

.landing-live { display: inline-flex; align-items: center; gap: 6px; color: #83ecc3; }
.landing-live i { width: 6px; height: 6px; border-radius: 50%; background: #66e3b4; box-shadow: 0 0 12px rgba(102, 227, 180, 0.8); }

.landing-data-main { align-items: flex-end; padding: 18px 0 4px; }
.landing-data-main strong { display: block; font: 600 32px/1 "Newsreader", serif; letter-spacing: -0.025em; }
.landing-data-main span { display: block; margin-top: 6px; color: rgba(225, 237, 255, 0.52); font-size: 11px; }
.landing-data-change { padding: 5px 8px; border-radius: 7px; color: #83ecc3 !important; background: rgba(102, 227, 180, 0.1); font: 600 10px/1 "JetBrains Mono", monospace !important; }

.landing-chart { width: 100%; height: 96px; overflow: visible; }
.landing-chart-grid line { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.landing-chart-area { opacity: 0; animation: landing-fade 0.8s 1s forwards; }
.landing-chart-line {
  fill: none;
  stroke: url(#landingLineGradient);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 470;
  stroke-dashoffset: 470;
  filter: drop-shadow(0 0 6px rgba(65, 217, 255, 0.4));
  animation: landing-draw 1.6s 0.72s forwards cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-data-stats { gap: 8px; margin-top: 6px; }
.landing-data-stat { flex: 1; padding: 10px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 10px; background: rgba(255, 255, 255, 0.035); }
.landing-data-stat span { display: block; color: rgba(225, 237, 255, 0.48); font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; }
.landing-data-stat strong { display: block; margin-top: 5px; font: 600 14px/1 "JetBrains Mono", monospace; }

.landing-trust {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 12px 34px rgba(21, 34, 70, 0.045);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.landing-trust span span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(13, 124, 95, 0.09);
}

.landing-section { position: relative; }
.landing-calculators::before,
.landing-comparison::before {
  content: "";
  position: absolute;
  top: 15%;
  left: -11rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: rgba(91, 140, 255, 0.08);
  filter: blur(70px);
  pointer-events: none;
}

.landing-section h2 { letter-spacing: -0.02em; text-wrap: balance; }

.landing-card,
.landing-guide-card,
.landing-model-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(27, 43, 78, 0.045);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), border-color 240ms ease, box-shadow 240ms ease !important;
}

.landing-card::before,
.landing-guide-card::before,
.landing-model-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  top: -120px;
  right: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 140, 255, 0.14), transparent 68%);
  transition: transform 360ms ease, opacity 360ms ease;
  opacity: 0.65;
}

.landing-card:hover,
.landing-guide-card:hover,
.landing-model-card:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(60, 102, 185, 0.32) !important;
  box-shadow: 0 20px 44px rgba(27, 43, 78, 0.105) !important;
}

.landing-card:hover::before,
.landing-guide-card:hover::before,
.landing-model-card:hover::before { transform: scale(1.25) translate(-8px, 8px); opacity: 1; }

.landing-card-icon {
  box-shadow: inset 0 0 0 1px rgba(23, 70, 162, 0.06);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease;
}

.landing-card:hover .landing-card-icon {
  transform: translateY(-3px) rotate(-3deg) scale(1.06);
  box-shadow: 0 10px 22px rgba(23, 70, 162, 0.14), inset 0 0 0 1px rgba(23, 70, 162, 0.08);
}

.landing-process { background: linear-gradient(180deg, rgba(246, 248, 252, 0.72), rgba(255, 255, 255, 0.98)) !important; }
.landing-process-step {
  position: relative;
  padding: 24px 22px;
  border: 1px solid rgba(25, 51, 100, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(27, 43, 78, 0.035);
}

.landing-process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 32px;
  right: -21px;
  z-index: 2;
  width: 16px;
  height: 9px;
  background: #9aabc9;
  clip-path: polygon(0 42%, 68% 42%, 68% 0, 100% 50%, 68% 100%, 68% 58%, 0 58%);
}

.landing-process-step > div:first-child {
  background: linear-gradient(135deg, #1746a2, #47a6d9);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent !important;
}

.landing-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(147, 191, 255, 0.16);
  box-shadow: 0 22px 60px rgba(25, 35, 73, 0.16);
  background: radial-gradient(circle at 86% 20%, rgba(65, 217, 255, 0.18), transparent 18rem), linear-gradient(125deg, #10142c, #172b4f) !important;
}

.landing-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.3) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: linear-gradient(90deg, transparent 25%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000);
}

.landing-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 720ms cubic-bezier(0.22, 1, 0.36, 1), transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.landing-reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes landing-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes landing-dashboard-in { from { opacity: 0; transform: translateY(-46%) perspective(1000px) rotateY(-9deg) scale(0.96); } to { opacity: 1; transform: translateY(-50%) perspective(1000px) rotateY(-4deg) rotateX(1deg) scale(1); } }
@keyframes landing-float { 0%, 100% { transform: translateY(-50%) perspective(1000px) rotateY(-4deg) rotateX(1deg); } 50% { transform: translateY(calc(-50% - 7px)) perspective(1000px) rotateY(-2deg) rotateX(0deg); } }
@keyframes landing-aurora { from { transform: rotate(-4deg) scale(1); } to { transform: rotate(7deg) scale(1.08); } }
@keyframes landing-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(102, 227, 180, 0.34), 0 0 16px rgba(102, 227, 180, 0.5); } 50% { box-shadow: 0 0 0 7px rgba(102, 227, 180, 0), 0 0 22px rgba(102, 227, 180, 0.7); } }
@keyframes landing-draw { to { stroke-dashoffset: 0; } }
@keyframes landing-fade { to { opacity: 1; } }

@media (max-width: 1100px) {
  .landing-data-visual { width: 360px; opacity: 0.82; }
  .landing-hero-copy { max-width: 590px !important; }
}

@media (max-width: 920px) {
  .landing-hero { min-height: 0; }
  .landing-hero-copy { max-width: 720px !important; }
  .landing-data-visual { display: none; }
  .landing-hero::after { mask-image: none; -webkit-mask-image: none; opacity: 0.1; }
  .landing-process-step:not(:last-child)::after { display: none; }
}

@media (max-width: 760px) {
  .landing-hero { padding: 62px 0 58px !important; }
  .landing-title { font-size: clamp(38px, 11vw, 48px) !important; line-height: 1.04 !important; }
  .landing-subtitle { font-size: 16px !important; }
  .landing-actions { gap: 10px !important; }
  .landing-actions button { width: 100%; min-height: 48px; }
  .landing-trust > div { gap: 12px 20px !important; justify-content: flex-start !important; }
  .landing-trust > div > span { font-size: 12px !important; }
  .landing-process-step { padding: 20px; }
  .landing-cta { padding: 32px 24px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-page *,
  .landing-page *::before,
  .landing-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .landing-reveal,
  .landing-reveal.is-visible { opacity: 1; transform: none; }
  .landing-data-visual { transform: translateY(-50%) !important; }
}
