/* ====================================
   CSS Variables (Design Tokens)
   ==================================== */
:root {
  /* Primary */
  --color-primary: #3ecf8e;

  /* Background */
  --color-bg-primary: #0b0f14;
  --color-bg-secondary: #1a1f26;
  --color-bg-elevated: #21262d;

  /* Text */
  --color-text-primary: #ffffff;
  --color-text-secondary: #8b949e;
  --color-text-tertiary: #6e7681;

  /* Border */
  --color-border: #30363d;
  --color-border-hover: #484f58;

  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-backdrop-blur: 24px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --spacing-section: 160px;
  --container-max-width: 1200px;
  --container-padding: 80px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

html,
body {
  height: 100%;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

em {
  font-style: normal;
}

/* ====================================
   Background Effects
   ==================================== */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 10s ease-in-out infinite;
}

.orb--a {
  left: -160px;
  top: -160px;
  background: radial-gradient(circle at 30% 30%, rgba(62, 207, 142, 0.5), transparent 60%);
  animation-duration: 11.5s;
}

.orb--b {
  right: -220px;
  top: 120px;
  background: radial-gradient(circle at 30% 30%, rgba(96, 165, 250, 0.3), transparent 62%);
  animation-duration: 13.5s;
}

@keyframes float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, 18px, 0) scale(1.03); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent) 0 0 / 100% 400px no-repeat,
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.05), transparent 55%);
  opacity: 0.7;
}

/* ====================================
   Reveal Animation
   ==================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 600ms var(--transition-smooth),
    transform 600ms var(--transition-smooth);
  will-change: opacity, transform;
}

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

/* ====================================
   Buttons
   ==================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 200ms var(--transition-smooth);
  cursor: pointer;
  white-space: nowrap;
}

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

.btn--primary:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

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

.btn--outline:hover {
  background: var(--color-bg-secondary);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 14px;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn--full {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
}

/* ====================================
   1. Header
   ==================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header__inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-padding);
}

.header__logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__nav-link {
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: color 200ms var(--transition-smooth);
}

.header__nav-link:hover {
  color: var(--color-text-primary);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
}

.header__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 1px;
  transition: all 200ms var(--transition-smooth);
}

.header__hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.header__hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header__mobile-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 16px var(--container-padding);
  background: rgba(11, 15, 20, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.header__mobile-menu.is-open {
  display: flex;
}

.header__mobile-link {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.header__mobile-link:hover {
  color: var(--color-text-primary);
}

.header__mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}

/* ====================================
   2. Hero Section
   ==================================== */
.hero {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 192px var(--container-padding) 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 80px;
}

.hero__content {
  max-width: 700px;
}

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(62, 207, 142, 0.12);
  border: 1px solid rgba(62, 207, 142, 0.25);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.hero__title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  margin-bottom: 24px;
}

.hero__highlight {
  color: var(--color-primary);
}

.hero__subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero__cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Recorder Preview (Glassmorphism) */
.hero__visual {
  width: 100%;
  max-width: 480px;
}

.recorder-preview {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--glass-backdrop-blur));
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.recorder-preview__waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 60px;
  width: 100%;
}

.waveform-bar {
  width: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  animation: waveform 1.2s ease-in-out infinite;
  opacity: 0.7;
}

.waveform-bar:nth-child(1)  { height: 20px; animation-delay: 0s; }
.waveform-bar:nth-child(2)  { height: 35px; animation-delay: 0.05s; }
.waveform-bar:nth-child(3)  { height: 25px; animation-delay: 0.1s; }
.waveform-bar:nth-child(4)  { height: 45px; animation-delay: 0.15s; }
.waveform-bar:nth-child(5)  { height: 30px; animation-delay: 0.2s; }
.waveform-bar:nth-child(6)  { height: 50px; animation-delay: 0.25s; }
.waveform-bar:nth-child(7)  { height: 20px; animation-delay: 0.3s; }
.waveform-bar:nth-child(8)  { height: 40px; animation-delay: 0.35s; }
.waveform-bar:nth-child(9)  { height: 55px; animation-delay: 0.4s; }
.waveform-bar:nth-child(10) { height: 30px; animation-delay: 0.45s; }
.waveform-bar:nth-child(11) { height: 45px; animation-delay: 0.5s; }
.waveform-bar:nth-child(12) { height: 25px; animation-delay: 0.55s; }
.waveform-bar:nth-child(13) { height: 50px; animation-delay: 0.6s; }
.waveform-bar:nth-child(14) { height: 35px; animation-delay: 0.65s; }
.waveform-bar:nth-child(15) { height: 20px; animation-delay: 0.7s; }
.waveform-bar:nth-child(16) { height: 40px; animation-delay: 0.75s; }
.waveform-bar:nth-child(17) { height: 30px; animation-delay: 0.8s; }
.waveform-bar:nth-child(18) { height: 50px; animation-delay: 0.85s; }
.waveform-bar:nth-child(19) { height: 25px; animation-delay: 0.9s; }
.waveform-bar:nth-child(20) { height: 35px; animation-delay: 0.95s; }

@keyframes waveform {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 0.8; }
}

.recorder-preview__time {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.recorder-preview__controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.recorder-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 200ms var(--transition-smooth);
}

.recorder-btn--primary {
  width: 56px;
  height: 56px;
  background: var(--color-primary);
  color: var(--color-bg-primary);
  animation: pulse 2s ease-in-out infinite;
}

.recorder-btn--secondary {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
}

.recorder-btn:hover {
  transform: scale(1.08);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(62, 207, 142, 0); }
}

/* ====================================
   Section (Shared)
   ==================================== */
.section {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--spacing-section) var(--container-padding) 0;
}

.section__head {
  text-align: center;
  margin-bottom: 64px;
}

.section__title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: 16px;
}

.section__subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ====================================
   3. Core Features Grid
   ==================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  padding: 32px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all 300ms var(--transition-smooth);
}

.feature-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  border-radius: 50%;
  margin-bottom: 24px;
  color: var(--color-bg-primary);
}

.feature-card__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.feature-card__text {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ====================================
   4. Pipeline Flow
   ==================================== */
.pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.pipeline-step__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: all 300ms var(--transition-smooth);
}

.pipeline-step:hover .pipeline-step__icon {
  background: rgba(62, 207, 142, 0.12);
  transform: scale(1.05);
}

.pipeline-step__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.pipeline-arrow {
  color: var(--color-text-tertiary);
  display: flex;
  align-items: center;
}

/* ====================================
   5. AGMO Differentiation
   ==================================== */
.diff-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.diff-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all 300ms var(--transition-smooth);
}

.diff-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.diff-card__left {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.diff-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  border-radius: 50%;
  color: var(--color-bg-primary);
}

.diff-card__text {
  flex: 1;
}

.diff-card__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.diff-card__desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.diff-card__arrow {
  flex-shrink: 0;
  color: var(--color-text-tertiary);
  margin-left: 24px;
}

/* ====================================
   6. Footer
   ==================================== */
.footer {
  border-top: 1px solid var(--color-border);
  margin-top: var(--spacing-section);
}

.footer__container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 64px var(--container-padding) 32px;
}

.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand {
  max-width: 280px;
}

.footer__logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 16px;
}

.footer__desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer__col-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 16px;
}

.footer__link {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 2.0;
  transition: color 200ms var(--transition-smooth);
}

.footer__link:hover {
  color: var(--color-text-primary);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: color 200ms var(--transition-smooth);
}

.footer__social-link:hover {
  color: var(--color-text-primary);
}

.footer__copyright {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

/* ====================================
   Responsive - Tablet (768px - 1199px)
   ==================================== */
@media (max-width: 1199px) {
  :root {
    --container-padding: 60px;
  }

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

  .pipeline {
    gap: 16px;
  }

  .pipeline-step__icon {
    width: 64px;
    height: 64px;
  }

  .pipeline-step__icon svg {
    width: 22px;
    height: 22px;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
  }

  .footer__brand {
    grid-column: 1 / -1;
    max-width: none;
  }
}

/* ====================================
   Responsive - Mobile (< 768px)
   ==================================== */
@media (max-width: 767px) {
  :root {
    --container-padding: 24px;
    --spacing-section: 100px;
  }

  /* Header mobile */
  .header__inner {
    padding: 0 24px;
  }

  .header__nav,
  .header__actions {
    display: none;
  }

  .header__hamburger {
    display: flex;
  }

  .header__mobile-menu {
    padding: 16px 24px;
  }

  /* Hero mobile */
  .hero {
    padding: 132px 24px 80px;
    gap: 48px;
  }

  .hero__title {
    font-size: 36px;
  }

  .hero__subtitle {
    font-size: 14px;
    margin-bottom: 32px;
  }

  .hero__cta-group {
    flex-direction: column;
  }

  .hero__cta-group .btn {
    width: 100%;
  }

  .recorder-preview {
    padding: 24px 16px;
  }

  .recorder-preview__time {
    font-size: 24px;
  }

  /* Section */
  .section__title {
    font-size: 28px;
  }

  .section__head {
    margin-bottom: 40px;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px;
  }

  /* Pipeline */
  .pipeline {
    flex-direction: column;
    gap: 12px;
  }

  .pipeline-arrow {
    transform: rotate(90deg);
  }

  .pipeline-step__icon {
    width: 56px;
    height: 56px;
  }

  .pipeline-step__icon svg {
    width: 20px;
    height: 20px;
  }

  /* Diff */
  .diff-card {
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .diff-card__arrow {
    display: none;
  }

  .diff-card__title {
    font-size: 18px;
  }

  /* Footer */
  .footer__container {
    padding: 40px 24px 24px;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__brand {
    max-width: none;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ====================================
   Accessibility
   ==================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
