/* =============================================
   Anti-Crisis — Landing Page Styles
   ============================================= */

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

:root {
  --red: #E53935;
  --red-dark: #C62828;
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --transition-theme: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* --- Light Theme --- */
[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-alt: #F5F5F5;
  --surface: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #555;
  --text-dim: #888;
  --border: #E8E8E8;
  --border-light: #F5F5F5;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-border: rgba(0, 0, 0, 0.06);
  --card-bg: #FFFFFF;
  --card-border: #F0F0F0;
  --card-hover-border: #CCC;
  --card-shadow: rgba(0, 0, 0, 0.06);
  --reason-bg: #F5F5F5;
  --tag-bg: rgba(229, 57, 53, 0.06);
  --hero-tag-bg: #FFFFFF;
  --hero-tag-border: #CCC;
  --btn-outline-border: #CCC;
  --btn-outline-hover: #1A1A1A;
  --btn-outline-text: #1A1A1A;
  --btn-nav-bg: #1A1A1A;
  --mobile-menu-bg: #FFFFFF;
  --mobile-menu-shadow: rgba(0, 0, 0, 0.08);
  /* SVG illustration tokens */
  --line-color: #CCC;
  --red-val: #E53935;
  --node-bg: #FFFFFF;
  --node-border: #E0E0E0;
  --node-text: #1A1A1A;
  --node-text-dim: #999;
  --bottleneck-bg: rgba(229, 57, 53, 0.06);
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --bg: #111111;
  --bg-alt: #1A1A1A;
  --surface: #1E1E1E;
  --text: #F0F0F0;
  --text-secondary: #AAA;
  --text-dim: #666;
  --border: #2A2A2A;
  --border-light: #222;
  --nav-bg: rgba(17, 17, 17, 0.92);
  --nav-border: rgba(255, 255, 255, 0.06);
  --card-bg: #1A1A1A;
  --card-border: #2A2A2A;
  --card-hover-border: #444;
  --card-shadow: rgba(0, 0, 0, 0.3);
  --reason-bg: #1A1A1A;
  --tag-bg: rgba(229, 57, 53, 0.12);
  --hero-tag-bg: #1A1A1A;
  --hero-tag-border: #333;
  --btn-outline-border: #444;
  --btn-outline-hover: #F0F0F0;
  --btn-outline-text: #F0F0F0;
  --btn-nav-bg: #F0F0F0;
  --mobile-menu-bg: #1A1A1A;
  --mobile-menu-shadow: rgba(0, 0, 0, 0.4);
  /* SVG illustration tokens */
  --line-color: #444;
  --red-val: #E53935;
  --node-bg: #1E1E1E;
  --node-border: #333;
  --node-text: #EEE;
  --node-text-dim: #666;
  --bottleneck-bg: rgba(229, 57, 53, 0.12);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: var(--transition-theme);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 50px;
  padding: 14px 32px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(229, 57, 53, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--btn-outline-text);
  border: 2px solid var(--btn-outline-border);
}

.btn-outline:hover {
  border-color: var(--btn-outline-hover);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 100;
  background: rgba(240, 238, 236, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px 24px 0 0;
  transition: var(--transition-theme);
}

[data-theme="dark"] .nav {
  background: rgba(30, 28, 26, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  color: var(--red);
  font-size: 0.7rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links .btn {
  color: var(--bg);
  background: var(--btn-nav-bg);
}

.nav-links .btn:hover {
  background: var(--red);
  color: #fff;
}

/* --- Theme Toggle --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  margin-right: 8px;
}

.theme-toggle:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }

/* --- Mobile Menu Toggle --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Frame (notch container) --- */
.hero-frame {
  background: #F0EEEC;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  min-height: 100vh;
  margin: 8px;
  transition: var(--transition-theme);
}

/*
 * Faceted diamond using four corner gradients that create
 * soft diagonal fold lines from each corner toward center.
 * The center reads as white, corners as barely-there warm grey.
 */
.hero-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Bottom fade to page background */
    linear-gradient(180deg, transparent 72%, var(--bg) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Top-left corner fold */
    linear-gradient(135deg, rgba(0,0,0,0.045) 0%, rgba(0,0,0,0.02) 12%, transparent 28%),
    /* Top-right corner fold */
    linear-gradient(225deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.025) 12%, transparent 28%),
    /* Bottom-left corner fold */
    linear-gradient(45deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.02) 10%, transparent 25%),
    /* Bottom-right corner fold */
    linear-gradient(315deg, rgba(0,0,0,0.045) 0%, rgba(0,0,0,0.02) 10%, transparent 25%),
    /* White center wash */
    radial-gradient(ellipse 80% 70% at 50% 45%, #FFFFFF 0%, #FFFFFF 50%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .hero-frame {
  background: #1A1918;
}

[data-theme="dark"] .hero-frame::after {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.08) 12%, transparent 28%),
    linear-gradient(225deg, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0.1) 12%, transparent 28%),
    linear-gradient(45deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.07) 10%, transparent 25%),
    linear-gradient(315deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.08) 10%, transparent 25%),
    radial-gradient(ellipse 80% 70% at 50% 45%, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
}

.hero-frame + .section {
  padding-top: 120px;
}

/* --- Hero (split layout) --- */
.hero {
  padding: 140px 0 80px;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.hero-halftone {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--text) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.03;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -80px;
  right: -60px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(229, 57, 53, 0.08) 0%, rgba(229, 57, 53, 0.03) 40%, transparent 70%);
  pointer-events: none;
}

[data-theme="light"] .hero-glow {
  opacity: 0.7;
}

/* --- Scroll indicator with line --- */
.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 48px;
  position: relative;
  z-index: 1;
}

.hero-scroll-line {
  width: 80%;
  max-width: 800px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
}

[data-theme="dark"] .hero-scroll-line {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.hero-scroll span {
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  padding: 28px 0 12px;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-left {
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-block;
  background: var(--hero-tag-bg);
  border: 1px solid var(--hero-tag-border);
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 28px;
  transition: var(--transition-theme);
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Hero Visual (Flow Diagram) --- */
.hero-right {
  position: relative;
  z-index: 1;
}

.illustration-flow {
  width: 100%;
  height: auto;
}

/* --- Sections --- */
.section {
  padding: 100px 0;
  transition: var(--transition-theme);
}

.section-dark {
  background: #1A1A1A;
  color: #F0F0F0;
}

[data-theme="dark"] .section-dark {
  background: #0A0A0A;
}

.section-dark .section-tag {
  color: var(--red);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.section-dark .section-sub {
  color: #AAA;
}

.section-accent {
  background: var(--bg-alt);
  transition: var(--transition-theme);
}

/* --- Section visual overlays --- */
.section-examples,
.section-how,
.section-why,
.section-cta {
  position: relative;
  overflow: hidden;
}

.section-halftone {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.03;
  pointer-events: none;
}

.section-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--text) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.025;
  pointer-events: none;
}

.section-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.3;
  pointer-events: none;
}

[data-theme="dark"] .section-grid-bg {
  opacity: 0.15;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(229, 57, 53, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  margin-bottom: 16px;
  background: var(--tag-bg);
  padding: 6px 16px;
  border-radius: 50px;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 56px;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: linear-gradient(to top, rgba(229, 57, 53, 0.04), transparent);
  transition: height 0.3s ease;
}

.card:hover {
  border-color: var(--card-hover-border);
  box-shadow: 0 8px 32px var(--card-shadow);
  transform: translateY(-4px);
}

.card:hover::after {
  height: 100%;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-alt);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  margin-bottom: 20px;
  transition: var(--transition-theme);
}

.card:hover .card-icon {
  background: var(--red);
  color: #fff;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Examples --- */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.example-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.example-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), transparent);
  opacity: 0.6;
}

.section-dark .example-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.example-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  background: rgba(229, 57, 53, 0.12);
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.example-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.example-before {
  font-size: 0.82rem;
  color: #777;
  font-style: italic;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 2px solid rgba(229, 57, 53, 0.3);
  line-height: 1.5;
}

.example-card p {
  font-size: 0.88rem;
  color: #AAA;
  line-height: 1.6;
  margin-bottom: 20px;
}

.example-result {
  font-size: 0.85rem;
  color: #666;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.example-result-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--red);
  margin-right: 4px;
}

/* --- How It Works (split with sphere) --- */
.section-how {
  background: var(--bg-alt);
}

[data-theme="dark"] .section-how {
  background: var(--bg);
}

.how-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.how-sphere {
  display: flex;
  justify-content: center;
  align-items: center;
}

.how-sphere svg {
  width: 100%;
  max-width: 360px;
  height: auto;
}

/* --- Steps --- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.step {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  opacity: 0.7;
  flex-shrink: 0;
  width: 52px;
}

.step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Reasons --- */
.reasons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.reason {
  padding: 36px;
  background: var(--reason-bg);
  border-radius: var(--radius);
  border: 1px solid transparent;
  border-left: 3px solid var(--red);
  transition: all 0.25s ease;
  position: relative;
}

.reason:hover {
  border-color: var(--card-hover-border);
  border-left-color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--card-shadow);
}

.reason h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.reason p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- CTA with inline stats --- */
.cta-block {
  text-align: center;
  max-width: 700px;
}

.cta-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cta-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cta-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.03em;
}

.cta-stat span:last-child {
  font-size: 0.82rem;
  color: #777;
}

.cta-block h2 {
  margin-bottom: 20px;
}

.cta-block .section-sub {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

.cta-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: #666;
}

/* --- Sticky Brand Badge --- */
.brand-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(229, 57, 53, 0.35);
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

.brand-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(229, 57, 53, 0.45);
  background: var(--red-dark);
}

.brand-badge-icon {
  font-size: 0.55rem;
  opacity: 0.8;
}

/* --- Footer --- */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-light);
  transition: var(--transition-theme);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-right {
    max-width: 480px;
    margin: 0 auto;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-layout {
    grid-template-columns: 1fr;
  }

  .how-sphere {
    order: -1;
  }

  .how-sphere svg {
    max-width: 280px;
  }

  .cta-stats {
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 680px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: 8px;
    right: 8px;
    background: var(--mobile-menu-bg);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-light);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 32px var(--mobile-menu-shadow);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero h1 br,
  .section h2 br {
    display: none;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .examples-grid {
    grid-template-columns: 1fr;
  }

  .reasons {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 72px 0;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}
