/* PCSX2 — landing page polish (top-tier craft) */
.landing-page {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* —— Premium hero (mesh + grid) —— */
.lp-hero {
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f4 50%, #fafafa 100%);
}
.lp-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 15% -10%, rgba(30, 58, 95, 0.09), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(196, 92, 62, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(59, 130, 246, 0.05), transparent 45%);
  pointer-events: none;
}
.lp-hero__grid {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 92%);
}
.lp-text-gradient {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #1e40af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-mockup {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: no-preference) {
  .lp-mockup:hover {
    transform: translateY(-4px);
  }
}
.lp-stat-card {
  border-color: rgba(228, 228, 231, 0.95);
  background: #fff;
}
.lp-stat-tile {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.lp-stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.1);
  border-color: rgba(212, 212, 216, 0.95);
}
.lp-btn-cta:focus-visible {
  outline: 2px solid #1e3a5f;
  outline-offset: 3px;
}

/* Reading progress (subtle, editorial) */
.read-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 3px;
  pointer-events: none;
  background: rgba(28, 25, 23, 0.06);
}
.read-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c45c3e 0%, #1e3a5f 55%, #1e3a5f 100%);
  transform-origin: left;
  transition: width 0.12s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .read-progress-track {
    display: none;
  }
}

/* Landing header: nav in fixed grid columns (no shifting) */
.lp-nav-fixed {
  align-items: stretch;
}
.lp-nav-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Desktop nav: calm hover affordance */
.lp-nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.lp-nav-link::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.35rem;
  height: 2px;
  background: #c45c3e;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.lp-nav-link:hover,
.lp-nav-link:focus-visible {
  color: #1c1917;
}
.lp-nav-link:hover::after,
.lp-nav-link:focus-visible::after {
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .lp-nav-link::after {
    display: none;
  }
}

.lp-surface {
  background-color: #fafaf9;
}
.lp-stat {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.lp-stat:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #c4bbb0 !important;
}
.lp-cta .cta-glow {
  background: radial-gradient(circle, rgba(196, 92, 62, 0.25) 0%, transparent 65%);
}

/* Sticky header: depth on scroll */
.landing-header {
  transition:
    background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s ease;
}
.landing-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.92);
  border-color: rgba(228, 228, 231, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 4px 24px -8px rgba(15, 23, 42, 0.08);
}
@supports (backdrop-filter: blur(12px)) {
  .landing-header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
  }
}

/* Hero atmosphere */
.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-mesh {
  background:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(59, 130, 246, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(99, 102, 241, 0.1), transparent 45%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(14, 165, 233, 0.06), transparent 50%);
}
.hero-grid {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
}
.hero-grain {
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Hero visual frame */
.hero-visual {
  position: relative;
  border-radius: 1.25rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.2) 40%, rgba(59, 130, 246, 0.15));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 24px 48px -12px rgba(15, 23, 42, 0.12),
    0 0 80px -20px rgba(59, 130, 246, 0.25);
}
.hero-visual-inner {
  border-radius: calc(1.25rem - 1px);
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.hero-visual-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.45) 50%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.group:hover .hero-visual-shine {
  opacity: 1;
}

/* Badge */
.badge-live {
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2), 0 2px 8px rgba(16, 185, 129, 0.08);
}

/* Headline gradient */
.hero-gradient-text {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 45%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Primary CTA shimmer (subtle) */
@media (prefers-reduced-motion: no-preference) {
  .btn-cta-primary {
    position: relative;
    overflow: hidden;
  }
  .btn-cta-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
  }
  .btn-cta-primary:hover::after {
    transform: translateX(100%);
  }
}

/* Feature cards */
.feature-card {
  position: relative;
  border-radius: 0.75rem;
  background: #fff;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.feature-card--stack {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(28, 25, 23, 0.1) !important;
  box-shadow:
    0 4px 6px -1px rgba(28, 25, 23, 0.06),
    0 12px 20px -8px rgba(28, 25, 23, 0.08);
}
.feature-icon {
  transition: transform 0.3s ease;
}
.feature-card:hover .feature-icon {
  transform: scale(1.04);
}
.feature-card__cta {
  width: 100%;
  border-top: 1px solid rgba(28, 25, 23, 0.06);
}
.feature-card__cta:focus-visible {
  outline: 2px solid #1e3a5f;
  outline-offset: 2px;
  border-radius: 0.25rem;
}
.feature-card:hover .feature-card__cta {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(30, 58, 95, 0.35);
}

/* Stat tiles */
.stat-tile {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.1);
}

/* Testimonial cards */
.quote-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.quote-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 6px -1px rgba(28, 25, 23, 0.06),
    0 12px 20px -8px rgba(28, 25, 23, 0.08);
}

/* CTA band */
.cta-band {
  position: relative;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(255, 255, 255, 0.15), transparent 50%);
  pointer-events: none;
}
.cta-glow {
  position: absolute;
  width: 140%;
  height: 60%;
  left: -20%;
  bottom: -30%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 65%);
  pointer-events: none;
  filter: blur(40px);
}

/* Scroll reveal */
.reveal-landing {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-landing.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-landing {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .feature-card:hover,
  .stat-tile:hover,
  .quote-card:hover,
  .lp-stat-tile:hover,
  .lp-mockup:hover {
    transform: none;
  }
}

/* Stagger children */
.reveal-stagger > .reveal-landing:nth-child(1) {
  transition-delay: 0ms;
}
.reveal-stagger > .reveal-landing:nth-child(2) {
  transition-delay: 70ms;
}
.reveal-stagger > .reveal-landing:nth-child(3) {
  transition-delay: 140ms;
}
.reveal-stagger > .reveal-landing:nth-child(4) {
  transition-delay: 210ms;
}
.reveal-stagger > .reveal-landing:nth-child(5) {
  transition-delay: 280ms;
}
.reveal-stagger > .reveal-landing:nth-child(6) {
  transition-delay: 350ms;
}
.reveal-stagger > .reveal-landing:nth-child(7) {
  transition-delay: 420ms;
}
.reveal-stagger > .reveal-landing:nth-child(8) {
  transition-delay: 490ms;
}
.reveal-stagger > .reveal-landing:nth-child(9) {
  transition-delay: 560ms;
}

/* Focus rings (accessibility) */
.landing-page a:focus-visible,
.landing-page button:focus-visible {
  outline: 2px solid #1e3a5f;
  outline-offset: 3px;
}
.landing-page .btn-cta-primary:focus-visible {
  outline-offset: 4px;
}

/* —— Unconventional hero (editorial / neo-brutalist) —— */
.hero-uncon {
  background-color: #f5f0e8;
  background-image: linear-gradient(180deg, #faf8f5 0%, #f0ebe3 100%);
}
.hero-uncon__grain {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.hero-uncon__slash {
  transform: skewX(-12deg);
  will-change: transform;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-uncon__slash {
    animation: none;
  }
}
@keyframes hero-uncon-slash-drift {
  from {
    transform: translateX(0) skewX(-12deg);
  }
  to {
    transform: translateX(-3%) skewX(-12deg);
  }
}
.hero-uncon__pop {
  transform: rotate(-0.5deg);
}
.hero-uncon__frame {
  filter: drop-shadow(0 12px 28px rgba(28, 25, 23, 0.12));
}
.hero-uncon__frame-inner {
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 6px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  background: #1c1917;
}
.hero-uncon__frame-inner img {
  display: block;
}
.hero-browser-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  border-radius: 0.75rem 0.75rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.94) 0%, rgba(28, 25, 23, 0.55) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
@supports (backdrop-filter: blur(4px)) {
  .hero-browser-chrome {
    backdrop-filter: blur(8px) saturate(1.1);
    -webkit-backdrop-filter: blur(8px) saturate(1.1);
  }
}
.hero-browser-chrome__dots {
  display: flex;
  flex-shrink: 0;
  gap: 0.35rem;
}
.hero-browser-chrome__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #57534e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.hero-browser-chrome__dots span:nth-child(1) {
  background: #dc2626;
}
.hero-browser-chrome__dots span:nth-child(2) {
  background: #ca8a04;
}
.hero-browser-chrome__dots span:nth-child(3) {
  background: #16a34a;
}
.hero-browser-chrome__title {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-uncon__caption {
  letter-spacing: 0.18em;
}
.hero-stat {
  border: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: 0.5rem;
  background: #fafaf9;
  padding: 0.875rem 1rem;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-stat:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(28, 25, 23, 0.08);
}
.hero-stat__label {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c45c3e;
}
.hero-stat__val {
  margin-top: 0.35rem;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1c1917;
  line-height: 1.35;
}
.landing-page .hero-uncon__btn-pri:focus-visible,
.landing-page .hero-uncon__btn-sec:focus-visible {
  outline: 2px solid #c45c3e;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .hero-uncon__slash {
    animation: none;
  }
  .hero-stat:hover,
  .hero-uncon__btn-pri:hover,
  .hero-uncon__btn-sec:hover {
    transform: none;
  }
  .btn-cta-primary.hero-uncon__btn-pri::after {
    display: none;
  }
}
