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

html {
  scroll-behavior: smooth;
  background-color: var(--ink);
  color-scheme: dark;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--bone);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

[data-theme="light"] body {
  -webkit-font-smoothing: auto;
}

/* ========== Utility ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== Reveal Animations ========== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ========== Section Patterns ========== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  max-width: 600px;
  margin-bottom: 64px;
}

.section-header.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: var(--pure);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--slate-light);
  line-height: 1.7;
}

/* ========== Buttons ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: var(--ink);
  padding: 16px 32px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(6, 214, 160, 0.3);
}

[data-theme="light"] .btn-primary {
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--bone);
  padding: 16px 32px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid rgba(226, 232, 240, 0.15);
  transition: all 0.3s;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

[data-theme="light"] .btn-secondary {
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .btn-secondary:hover {
  background: var(--accent-glow);
}

/* ========== Hero (shared pattern) ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(6, 214, 160, 0.08) 0%, transparent 70%);
  animation: float-slow 20s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.06) 0%, transparent 70%);
  animation: float-slow 15s ease-in-out infinite reverse;
}

[data-theme="light"] .hero-bg::before {
  background: radial-gradient(circle, rgba(5, 150, 105, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .hero-bg::after {
  background: radial-gradient(circle, rgba(8, 145, 178, 0.05) 0%, transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 214, 160, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 214, 160, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

[data-theme="light"] .hero-grid {
  background-image:
    linear-gradient(rgba(5, 150, 105, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 150, 105, 0.06) 1px, transparent 1px);
}

.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(6, 214, 160, 0.1);
}

.hero-shape:nth-child(1) {
  width: 300px;
  height: 300px;
  top: 10%;
  right: 5%;
  animation: drift 25s ease-in-out infinite;
}

.hero-shape:nth-child(2) {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 20%;
  border-color: rgba(34, 211, 238, 0.08);
  animation: drift 18s ease-in-out infinite reverse;
}

.hero-shape:nth-child(3) {
  width: 150px;
  height: 150px;
  top: 20%;
  left: 10%;
  border-color: rgba(139, 92, 246, 0.06);
  animation: drift 22s ease-in-out infinite 3s;
}

[data-theme="light"] .hero-shape {
  border-color: rgba(5, 150, 105, 0.1);
}

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

.hero-content {
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(6, 214, 160, 0.2);
  color: var(--accent);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--pure);
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--slate-light);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
}

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

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

  .hero-bg::before,
  .hero-bg::after,
  .hero-shape {
    animation: none;
  }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 375px) {
  .hero h1 {
    font-size: 30px;
  }

  .section-title {
    font-size: 26px;
  }

  .hero-sub {
    font-size: 16px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 14px 20px;
    font-size: 14px;
  }
}