/* ============================================
   CSS Reset & Base Styles
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Color System - HSL Values */
  --background: hsl(280, 60%, 12%);
  --foreground: hsl(0, 0%, 98%);
  --card: hsl(280, 50%, 16%);
  --card-foreground: hsl(0, 0%, 98%);
  --primary: hsl(325, 90%, 55%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(280, 45%, 25%);
  --muted: hsl(280, 35%, 22%);
  --muted-foreground: hsl(280, 25%, 70%);
  --border: hsl(280, 35%, 30%);
  --input: hsl(280, 35%, 22%);
  --accent-1: hsl(325, 90%, 60%);
  --accent-2: hsl(280, 50%, 70%);
  --accent-3: hsl(260, 60%, 65%);
  --border-accent-1: hsl(325, 90%, 55%);
  --border-accent-2: hsl(280, 50%, 65%);
  --border-accent-3: hsl(260, 60%, 60%);
  --radius: 0.75rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'PT Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   Background Texture & Geometric Shapes
   ============================================ */
.page-wrapper {
  min-height: 100vh;
  position: relative;
  background-image: url('/public/static/assets/bg-texture.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

@media (max-width: 768px), (pointer: coarse) {
  .page-wrapper {
    background-attachment: scroll;
  }
}

@media (prefers-reduced-data: reduce) {
  .page-wrapper {
    background-image: none;
  }
}

.geometric-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.geo-overlay {
  position: absolute;
  inset: 0;
  background-color: hsla(280, 60%, 12%, 0.4);
}

.geo-shape {
  position: absolute;
  border-radius: 2rem;
  will-change: transform;
}

/* Optimized: Reduced from 11 to 6 shapes */
.shape-1 { width: 60%; height: 80%; top: -10%; left: -10%; background-color: hsla(280, 60%, 20%, 0.18); animation: floatA 12s ease-in-out infinite; }
.shape-2 { width: 50%; height: 60%; top: -5%; right: -10%; background-color: hsla(325, 50%, 25%, 0.22); animation: floatB 15s ease-in-out infinite; }
.shape-3 { width: 40%; height: 70%; top: 15%; left: -5%; background-color: hsla(280, 50%, 35%, 0.14); animation: floatC 10s ease-in-out infinite; }
.shape-4 { width: 55%; height: 65%; bottom: -10%; right: -5%; background-color: hsla(260, 60%, 25%, 0.24); animation: floatA 14s ease-in-out infinite; }
.shape-5 { width: 45%; height: 50%; top: 25%; left: 30%; background-color: hsla(280, 60%, 20%, 0.16); animation: floatB 11s ease-in-out infinite; }
.shape-6 { width: 35%; height: 55%; bottom: -15%; left: -10%; background-color: hsla(325, 50%, 25%, 0.20); animation: floatC 13s ease-in-out infinite; }

/* ============================================
   Geometric Shape Animations (Optimized: Consolidated to 3 reusable animations)
   ============================================ */
@keyframes floatA {
  0%, 100% { transform: rotate(-15deg) translate(0, 0); }
  50% { transform: rotate(-15deg) translate(15px, 20px); }
}
@keyframes floatB {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(-20px, 15px); }
}
@keyframes floatC {
  0%, 100% { transform: rotate(30deg) translate(0, 0); }
  50% { transform: rotate(30deg) translate(18px, -12px); }
}

/* ============================================
   Accessibility: Reduced Motion Support
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .geo-shape {
    animation: none;
  }
}

/* ============================================
   Content Layout
   ============================================ */
.content-wrapper {
  position: relative;
  z-index: 10;
}

.container {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

/* ============================================
   Header
   ============================================ */
.header {
  width: 100%;
  padding: 1.5rem 1rem;
}

.header-inner {
  max-width: 68rem;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.logo {
  height: 4.5rem;
  width: auto;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.9;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: calc(100vh - 6rem);
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 5vw, 2rem);
  overflow: hidden;
}

.hero-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-inner {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 9vw, 5rem);
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.1;
  animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  animation-delay: 0.1s;
}

.hero-title.glow-text {
  text-shadow:
    0 0 40px hsla(325, 90%, 55%, 0.3),
    0 0 80px hsla(325, 90%, 55%, 0.15);
}

.hero-title .accent {
  color: var(--accent-1);
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3.5vw, 1.625rem);
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto 3rem;
  animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  animation-delay: 0.2s;
}

.hero-cta {
  animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  animation-delay: 0.3s;
}

.hero-trust {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 1.5rem;
  animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  animation-delay: 0.4s;
}

/* ============================================
   Form Elements
   ============================================ */
.input {
  flex: 1;
  height: 3rem;
  padding: 0 1rem;
  background-color: hsla(280, 45%, 25%, 0.5);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 2rem;
  background-color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  color: var(--primary-foreground);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.button:hover {
  background-color: hsla(325, 90%, 50%, 1);
  border-color: hsla(325, 90%, 50%, 1);
  transform: translateY(-2px);
}

.button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   Problem Section (Dark Break with Split Layout)
   ============================================ */
.problem-section {
  background-color: hsla(280, 60%, 8%, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: hsl(0, 0%, 98%);
  padding: 7rem clamp(1rem, 5vw, 2rem);
  position: relative;
  z-index: 20;
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 68rem;
  margin: 0 auto;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .problem-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.problem-image-wrapper {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow:
    0 25px 50px -12px hsla(280, 60%, 5%, 0.6),
    0 0 40px hsla(325, 90%, 55%, 0.1);
  order: 2;
  min-height: 20rem;
}

@media (min-width: 1024px) {
  .problem-image-wrapper {
    order: 1;
    min-height: 0;
    height: 100%;
  }
}

.problem-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.problem-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    hsla(280, 60%, 20%, 0.2) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.problem-content {
  text-align: center;
  order: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 1024px) {
  .problem-content {
    text-align: left;
    order: 2;
  }
}

.problem-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 2rem;
  color: hsl(0, 0%, 98%);
}

.problem-text {
  font-size: 1.25rem;
  color: hsl(0, 0%, 75%);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.problem-emphasis {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-1);
  margin-top: 2rem;
  font-style: italic;
}

/* ============================================
   Solution Section (Stacked Layout)
   ============================================ */
.solution-section {
  padding: 7rem clamp(1rem, 5vw, 2rem);
}

.solution-container {
  max-width: 68rem;
  margin: 0 auto;
}

.solution-header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 3.5rem;
}

.solution-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.solution-intro {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.solution-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .solution-features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: hsla(0, 0%, 100%, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid hsla(0, 0%, 100%, 0.1);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}

.feature-card:hover {
  border-color: hsla(325, 90%, 55%, 0.3);
  transform: translateY(-2px);
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.75rem;
  color: var(--accent-1);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-1);
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 1rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

/* Brand Image */
.brand-image-wrapper {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow:
    0 25px 50px -12px hsla(280, 60%, 8%, 0.5),
    0 0 60px hsla(325, 90%, 55%, 0.15);
  aspect-ratio: 21 / 9;
}

.brand-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.brand-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    hsla(325, 90%, 55%, 0.1) 0%,
    transparent 50%,
    hsla(280, 50%, 70%, 0.1) 100%
  );
  pointer-events: none;
}

/* ============================================
   Outcome Section (3-Column Grid)
   ============================================ */
.outcome-section {
  padding: 8rem 1rem;
}

.outcome-header {
  text-align: center;
  margin-bottom: 4rem;
}

.outcome-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

.outcome-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 68rem;
  margin: 0 auto 3rem;
}

@media (min-width: 768px) {
  .outcome-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .outcome-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Glassmorphism Cards */
.glass-card {
  background: hsla(0, 0%, 100%, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsla(0, 0%, 100%, 0.12);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: hsla(325, 90%, 55%, 0.3);
}

.glass-card-text {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--foreground);
}

/* Bold Tagline */
.tagline-bold {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  text-align: center;
  color: var(--accent-2);
  max-width: 600px;
  margin: 0 auto;
  font-style: italic;
}

/* Honeypot field - hidden from humans */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
  padding: 8rem clamp(1rem, 5vw, 2rem);
  background: linear-gradient(180deg, transparent 0%, hsla(280, 60%, 8%, 0.3) 100%);
  border-top: 1px solid hsla(325, 90%, 55%, 0.1);
}

.cta-inner {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 32rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .cta-form {
    flex-direction: row;
  }
}

.cta-trust {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 4rem clamp(1rem, 5vw, 2rem);
  border-top: 1px solid hsla(0, 0%, 100%, 0.05);
}

.footer-inner {
  max-width: 68rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

.footer-logo {
  height: 3.5rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

.footer-legal a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--accent-1);
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  width: 100%;
  text-align: right;
}

@media (max-width: 768px) {
  .footer-copyright {
    text-align: center;
  }
}

/* ============================================
   Legal Page
   ============================================ */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: hsla(280, 60%, 10%, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsla(0, 0%, 100%, 0.08);
  padding: 1rem clamp(1rem, 5vw, 2rem);
}

.legal-nav-inner {
  max-width: 52rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

.legal-nav a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.legal-nav a:hover,
.legal-nav a.active {
  color: var(--accent-1);
}

.legal-page {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 5vw, 2rem) 4rem;
}

.legal-section {
  padding-top: 3rem;
  margin-bottom: 4rem;
  border-bottom: 1px solid hsla(0, 0%, 100%, 0.06);
  padding-bottom: 4rem;
}

.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.legal-section h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.legal-section .legal-meta {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.legal-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.legal-section p {
  font-size: 0.95rem;
  color: hsla(0, 0%, 100%, 0.8);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-section ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-section ul li {
  font-size: 0.95rem;
  color: hsla(0, 0%, 100%, 0.8);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.legal-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  overflow-x: auto;
  display: block;
}

.legal-section thead th {
  background-color: hsla(280, 45%, 25%, 0.5);
  color: var(--foreground);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
}

.legal-section tbody td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  color: hsla(0, 0%, 100%, 0.75);
  vertical-align: top;
}

.legal-section tbody tr:nth-child(even) {
  background-color: hsla(280, 45%, 20%, 0.2);
}

.legal-section strong {
  color: var(--foreground);
}

@media (max-width: 640px) {
  .legal-section table {
    font-size: 0.8rem;
  }

  .legal-section thead th,
  .legal-section tbody td {
    padding: 0.5rem 0.75rem;
  }
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background-color: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  min-width: 300px;
  max-width: 420px;
  box-shadow: 0 10px 40px hsla(280, 60%, 5%, 0.5);
  animation: slideIn 0.3s ease-out;
}

.toast.success {
  border-color: var(--accent-2);
}

.toast.error {
  border-color: hsl(0, 84%, 60%);
}

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ============================================
   Fade Up Animation
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SCROLL-TRIGGERED ANIMATIONS
   ============================================ */

/* Scroll-triggered animation keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scroll animation base classes */
.scroll-fade-up {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-timeline: view();
  animation-range: entry 0% cover 50%;
}

.scroll-fade-left {
  animation: fadeInLeft 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-timeline: view();
  animation-range: entry 0% cover 50%;
}

.scroll-fade-right {
  animation: fadeInRight 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-timeline: view();
  animation-range: entry 0% cover 50%;
}

/* Stagger delays for sequential items */
.scroll-delay-1 {
  animation-delay: 0.15s;
}

.scroll-delay-2 {
  animation-delay: 0.3s;
}

.scroll-delay-3 {
  animation-delay: 0.45s;
}

/* Fallback for browsers without view timeline support */
@supports not (animation-timeline: view()) {
  .scroll-fade-up,
  .scroll-fade-left,
  .scroll-fade-right {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
