/* ===== Wave Reader Landing Page Styles ===== */

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

:root {
  --wr-accent: #D4A054;
  --wr-accent-light: #E0B876;
  --wr-accent-glow: rgba(212, 160, 84, 0.25);
  --wr-accent-dim: rgba(212, 160, 84, 0.08);
  --wr-blue: #007AFF;
  --wr-blue-glow: rgba(0, 122, 255, 0.25);
  --wr-radius: 16px;
  --wr-radius-sm: 8px;
  --wr-radius-pill: 100px;
  --wr-font-display: 'Sora', system-ui, sans-serif;
  --wr-font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --wr-font-mono: 'IBM Plex Mono', monospace;
  --wr-container: 1100px;
  --wr-section-gap: clamp(80px, 12vw, 160px);
}

/* Light theme (default) */
:root,
[data-theme="light"] {
  --wr-bg: #faf8f4;
  --wr-bg-alt: #f0ebe2;
  --wr-text: #1d1d1f;
  --wr-text-muted: #555558;
  --wr-border: rgba(0, 0, 0, 0.12);
  --wr-card-bg: #fffdf9;
  --wr-card-border: rgba(0, 0, 0, 0.10);
  --wr-glass-bg: rgba(255, 252, 245, 0.85);
  --wr-hero-bg: #f0ebe2;
  --wr-hero-gradient: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(212, 160, 84, 0.18) 0%, transparent 70%);
  --wr-accent-dim: rgba(212, 160, 84, 0.14);
  --wr-accent-glow: rgba(212, 160, 84, 0.32);
}

/* Dark theme */
[data-theme="dark"] {
  --wr-bg: #0a0a0a;
  --wr-bg-alt: #111110;
  --wr-text: #f5f5f7;
  --wr-text-muted: #86868b;
  --wr-border: rgba(255, 255, 255, 0.08);
  --wr-card-bg: rgba(255, 255, 255, 0.04);
  --wr-card-border: rgba(255, 255, 255, 0.06);
  --wr-glass-bg: rgba(255, 255, 255, 0.04);
  --wr-hero-bg: #0a0a0a;
  --wr-hero-gradient: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(212, 160, 84, 0.1) 0%, transparent 70%);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--wr-font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--wr-text);
  background: var(--wr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--wr-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Skip Link --- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--wr-accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 var(--wr-radius-sm) var(--wr-radius-sm);
}
.skip:focus { left: 50%; transform: translateX(-50%); }

/* --- Container --- */
.wr-container {
  max-width: var(--wr-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
.wr-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: var(--wr-glass-bg);
  border-bottom: 1px solid var(--wr-border);
  transition: background 0.3s;
}

.wr-header-inner {
  max-width: var(--wr-container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.wr-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wr-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--wr-font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--wr-text);
  text-decoration: none;
}
.wr-brand:hover { text-decoration: none; }

.wr-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wr-accent);
  flex-shrink: 0;
}

/* Language Switch */
.wr-lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--wr-glass-bg);
  border: 1px solid var(--wr-border);
  border-radius: var(--wr-radius-sm);
}

.wr-lang-switch a {
  padding: 4px 8px;
  font-size: 16px;
  line-height: 1;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
  opacity: 0.6;
}

.wr-lang-switch a:hover {
  opacity: 1;
  text-decoration: none;
}

.wr-lang-switch a.active {
  background: var(--wr-accent-dim);
  opacity: 1;
}

.wr-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.wr-nav a {
  font-size: 14px;
  color: var(--wr-text-muted);
  transition: color 0.2s;
}
.wr-nav a:hover { color: var(--wr-text); text-decoration: none; }

/* Theme Toggle */
.wr-theme-toggle {
  background: none;
  border: 1px solid var(--wr-border);
  border-radius: var(--wr-radius-pill);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--wr-text-muted);
  font-size: 13px;
  font-family: var(--wr-font-body);
  transition: border-color 0.2s, color 0.2s;
}
.wr-theme-toggle:hover { border-color: var(--wr-text-muted); color: var(--wr-text); }
.wr-theme-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.wr-theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .wr-theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .wr-theme-toggle .icon-moon { display: block; }

/* --- Hero Section --- */
.wr-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: var(--wr-hero-bg);
  position: relative;
  overflow: hidden;
}

.wr-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--wr-hero-gradient);
  pointer-events: none;
}

/* Animated gradient orb */
.wr-hero-orb {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 160, 84, 0.12) 0%, transparent 70%);
  filter: blur(80px);
  animation: wr-orb-float 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes wr-orb-float {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -55%) scale(1.1); opacity: 0.9; }
}

.wr-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.wr-badge {
  display: inline-block;
  font-family: var(--wr-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wr-accent);
  border: 1px solid var(--wr-accent-glow);
  background: var(--wr-accent-dim);
  padding: 6px 16px;
  border-radius: var(--wr-radius-pill);
  margin-bottom: 32px;
}

.wr-hero h1 {
  font-family: var(--wr-font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
}

.wr-hero h1 span {
  background: linear-gradient(135deg, var(--wr-accent) 0%, var(--wr-accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wr-hero-sub {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--wr-text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.5;
}

/* Hero screenshot */
.wr-hero-screenshot {
  position: relative;
  width: 280px;
  margin: 0 auto;
}

.wr-hero-screenshot img {
  width: 280px;
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

/* --- Sections --- */
.wr-section {
  padding: var(--wr-section-gap) 24px;
}

.wr-section--alt {
  background: var(--wr-bg-alt);
}

.wr-section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.wr-section-head h2 {
  font-family: var(--wr-font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.wr-section-head p {
  font-size: 18px;
  color: var(--wr-text-muted);
  line-height: 1.6;
}

/* --- Problem/Solution --- */
.wr-problem-grid {
  max-width: var(--wr-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.wr-problem-card {
  padding: 48px;
  border-radius: var(--wr-radius);
  border: 1px solid var(--wr-card-border);
  background: var(--wr-card-bg);
}

.wr-problem-card h3 {
  font-family: var(--wr-font-display);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.2;
}

.wr-problem-card p {
  color: var(--wr-text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.wr-problem-card--problem {
  opacity: 0.7;
}

.wr-problem-card--solution h3 {
  color: var(--wr-accent);
}

/* --- How It Works --- */
.wr-steps {
  max-width: var(--wr-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.wr-step {
  text-align: center;
  padding: 40px 24px;
}

.wr-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--wr-accent-dim);
  border: 1px solid var(--wr-accent-glow);
  color: var(--wr-accent);
  font-family: var(--wr-font-display);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 24px;
}

.wr-step h3 {
  font-family: var(--wr-font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.wr-step p {
  color: var(--wr-text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* --- Features --- */
.wr-features {
  max-width: var(--wr-container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 120px;
  position: relative;
}

.wr-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
}

.wr-feature:nth-child(even) {
  direction: rtl;
}
.wr-feature:nth-child(even) > * {
  direction: ltr;
}

/* Feature connectors — subtle accent lines between items */
.wr-feature:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 40px;
  background: linear-gradient(180deg, var(--wr-accent-glow) 0%, var(--wr-accent) 50%, var(--wr-accent-glow) 100%);
  border-radius: 2px;
}

/* Accent dot at connector midpoint */
.wr-feature:not(:last-child)::before {
  content: '';
  position: absolute;
  bottom: -64px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wr-accent);
  box-shadow: 0 0 12px var(--wr-accent-glow);
  z-index: 1;
}

.wr-feature-text h3 {
  font-family: var(--wr-font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.wr-feature-text p {
  color: var(--wr-text-muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 460px;
}

/* Feature screenshot */
.wr-feature-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wr-feature-visual img {
  width: 260px;
  border-radius: 32px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

/* --- Tech Stack --- */
.wr-tech {
  max-width: var(--wr-container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.wr-tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--wr-radius-pill);
  border: 1px solid var(--wr-card-border);
  background: var(--wr-card-bg);
  font-family: var(--wr-font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--wr-text);
  transition: border-color 0.2s, transform 0.2s;
}

.wr-tech-pill:hover {
  border-color: var(--wr-accent-glow);
  transform: translateY(-2px);
}

/* --- CTA Section --- */
.wr-cta {
  text-align: center;
  padding: var(--wr-section-gap) 24px;
}

.wr-cta h2 {
  font-family: var(--wr-font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.wr-cta p {
  color: var(--wr-text-muted);
  font-size: 18px;
  margin-bottom: 40px;
}

.wr-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--wr-radius-pill);
  background: var(--wr-blue);
  color: #fff;
  font-family: var(--wr-font-display);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wr-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--wr-blue-glow);
  text-decoration: none;
}

/* --- Footer --- */
.wr-footer {
  border-top: 1px solid var(--wr-border);
  padding: 40px 24px;
}

.wr-footer-inner {
  max-width: var(--wr-container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.wr-footer-copy {
  font-size: 14px;
  color: var(--wr-text-muted);
}

.wr-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.wr-footer-links a {
  font-size: 14px;
  color: var(--wr-text-muted);
  transition: color 0.2s;
}
.wr-footer-links a:hover { color: var(--wr-text); text-decoration: none; }

/* --- Light-Mode Enhancements --- */
[data-theme="light"] .wr-hero-orb {
  background: radial-gradient(circle, rgba(212, 160, 84, 0.20) 0%, transparent 70%);
}

[data-theme="light"] .wr-problem-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .wr-tech-pill {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .wr-hero-screenshot img {
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.16);
}

[data-theme="light"] .wr-feature-visual img {
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .wr-step {
  background: var(--wr-card-bg);
  border-radius: var(--wr-radius);
  border: 1px solid var(--wr-card-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* --- Scroll Animations --- */
.wr-fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.wr-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.wr-stagger > .wr-fade-up:nth-child(1) { transition-delay: 0s; }
.wr-stagger > .wr-fade-up:nth-child(2) { transition-delay: 0.1s; }
.wr-stagger > .wr-fade-up:nth-child(3) { transition-delay: 0.2s; }
.wr-stagger > .wr-fade-up:nth-child(4) { transition-delay: 0.3s; }

/* --- Responsive --- */

/* Tablet */
@media (max-width: 900px) {
  .wr-problem-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .wr-steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .wr-feature {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .wr-feature:nth-child(even) {
    direction: ltr;
  }

  .wr-feature-text p {
    max-width: none;
    margin: 0 auto;
  }

  .wr-feature-visual {
    order: -1;
  }

  .wr-feature-visual img {
    width: 220px;
  }

  .wr-features {
    gap: 80px;
  }

  .wr-feature:not(:last-child)::after {
    bottom: -56px;
    height: 32px;
  }

  .wr-feature:not(:last-child)::before {
    bottom: -44px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  body { font-size: 16px; }

  .wr-hero { padding: 100px 20px 60px; min-height: 90vh; }
  .wr-hero h1 { font-size: 40px; }
  .wr-hero-sub { font-size: 17px; }
  .wr-hero-screenshot img { width: 220px; border-radius: 28px; }

  .wr-section { padding: 64px 20px; }
  .wr-section-head { margin-bottom: 40px; }
  .wr-section-head h2 { font-size: 28px; }

  .wr-problem-card { padding: 28px; }
  .wr-problem-card h3 { font-size: 22px; }

  .wr-step { padding: 24px 16px; }
  .wr-step h3 { font-size: 19px; }

  .wr-feature-text h3 { font-size: 26px; }
  .wr-feature-visual img { width: 200px; border-radius: 24px; }

  .wr-features { gap: 64px; }

  .wr-feature:not(:last-child)::after {
    bottom: -46px;
    height: 28px;
  }

  .wr-feature:not(:last-child)::before {
    bottom: -36px;
  }

  .wr-cta h2 { font-size: 28px; }

  .wr-footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .wr-header-inner { padding: 0 16px; }
  .wr-nav { gap: 12px; }
  .wr-nav a { font-size: 13px; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .wr-fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .wr-hero-orb {
    animation: none;
  }

  html { scroll-behavior: auto; }
}
