/* ===== RESET & CUSTOM PROPERTIES ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Background */
  --bg-base: #FAFAF8;
  --bg-surface: #FFFFFF;
  --bg-card: #F0EDE7;
  --bg-card-hover: #E8E4DC;

  /* Text */
  --text-primary: #1A1A18;
  --text-secondary: #6B665E;
  --text-muted: #9C9689;

  /* Accent — mango */
  --accent: #C48A3F;
  --accent-hover: #B07830;
  --accent-subtle: rgba(196, 138, 63, 0.08);
  --accent-border: rgba(196, 138, 63, 0.20);

  /* Borders */
  --border: #E5E2DC;
  --border-hover: #D5D0C8;

  /* Visualizer card (dark) */
  --vis-bg: #1A1A18;
  --vis-border: #2A2A26;
  --vis-text: #E8E4DE;
  --vis-muted: #6B665E;

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--accent);
  color: white;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--accent-hover); }

/* ===== TOP BAR ===== */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
}

.top-bar__logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.top-bar__logo:hover { color: var(--text-primary); }

.top-bar__logo-icon {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-bar__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.top-bar__nav a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.top-bar__nav a:hover { color: var(--text-primary); }

/* ===== HERO ===== */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 2rem 2rem;
  max-width: 720px;
  margin: 0 auto;
  gap: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero__headline {
  margin-bottom: 0.75rem;
}

.hero__brand {
  display: block;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-variation-settings: "SOFT" 50, "WONK" 1;
}

.hero__desc {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  letter-spacing: 0;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  letter-spacing: -0.01em;
}
.hero__tagline span {
  color: var(--accent);
  font-style: italic;
}

/* ===== VISUALIZER CARD (dark contrast) ===== */
.visualizer {
  width: 100%;
  max-width: 460px;
  margin-bottom: 1.75rem;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
}

.visualizer__card {
  background: var(--vis-bg);
  border: 1px solid var(--vis-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.08),
    0 2px 12px rgba(0, 0, 0, 0.04);
}

.visualizer__controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.visualizer__btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--accent-border);
  background: rgba(196, 138, 63, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.visualizer__btn--record {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(196, 138, 63, 0.15);
}

.visualizer__btn-inner {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 3px;
  animation: recordPulse 2s ease-in-out infinite;
}

@keyframes recordPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.visualizer__btn--settings {
  color: var(--accent);
}

.visualizer__waveform {
  flex: 1;
  height: 42px;
  position: relative;
  overflow: hidden;
}

.visualizer__waveform canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.visualizer__transcript-row {
  min-height: 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
}

.visualizer__category {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.visualizer__category svg {
  flex-shrink: 0;
}
.visualizer__category.fade-out {
  opacity: 0;
}

.visualizer__transcript {
  display: block;
  width: 100%;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--vis-text);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visualizer__transcript--tagline {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.86rem;
}

.visualizer__cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--accent);
  border-radius: 1px;
  animation: cursorBlink 0.8s step-end infinite;
  margin-left: 0.45em;
  vertical-align: text-bottom;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== WINDOWS LOGO ===== */
.win-logo {
  display: inline-block;
  vertical-align: -0.15em;
  transform: perspective(200px) rotateY(-6deg);
  flex-shrink: 0;
  overflow: visible;
}
.win-logo--btn {
  vertical-align: -0.1em;
}

.win-pane {
  animation: winPulse 2.4s ease-in-out infinite;
}
.win-pane--1 { transform-origin: 5.5px 5.5px;   animation-delay: 0s; }
.win-pane--2 { transform-origin: 16.5px 5.5px;  animation-delay: 0.6s; }
.win-pane--3 { transform-origin: 5.5px 16.5px;  animation-delay: 1.2s; }
.win-pane--4 { transform-origin: 16.5px 16.5px; animation-delay: 1.8s; }

@keyframes winPulse {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(0.7); }
  28% { transform: scale(1.35); }
  42% { transform: scale(1); }
}

/* ===== BUTTONS ===== */
.hero__actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.6rem 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: white;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(196, 138, 63, 0.25);
}

.btn--secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn--secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ===== STEP CAROUSEL ===== */
.carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.carousel__track {
  position: relative;
  height: 2rem;
  width: 200px;
  overflow: hidden;
}

.carousel__step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: absolute;
  inset: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.carousel__step.active {
  opacity: 1;
  transform: translateX(0);
}
.carousel__step.exit {
  opacity: 0;
  transform: translateX(-100%);
}

.carousel__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.carousel__text {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.carousel__dots {
  display: flex;
  gap: 0.35rem;
}

.carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.carousel__dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 1.25rem 2rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal:nth-child(2) { transition-delay: 80ms; }
.reveal:nth-child(3) { transition-delay: 160ms; }
.reveal:nth-child(4) { transition-delay: 240ms; }
.reveal:nth-child(5) { transition-delay: 320ms; }
.reveal:nth-child(6) { transition-delay: 400ms; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .top-bar { padding: 0 1.25rem; }

  .hero {
    padding: 80px 1.25rem 1.5rem;
    gap: 0;
  }

  .badge { margin-bottom: 1.25rem; }

  .hero__brand { font-size: 2.4rem; }
  .hero__desc { font-size: 0.95rem; }
  .hero__tagline {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
  }

  .visualizer { max-width: 100%; }
  .visualizer__card { padding: 1.25rem; }

  .hero__actions { margin-bottom: 1.25rem; }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
  }

  .hero__pills { gap: 0.35rem; }
  .pill { font-size: 0.72rem; padding: 0.3rem 0.7rem; }
}

@media (max-width: 380px) {
  .hero__brand { font-size: 2rem; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
