/* DuckTap Website — Mistral.ai inspired aesthetic */
/* Warm cream, elegant serif, subtle grids, premium feel */

:root {
  --bg: #FFFDF8;
  --bg-warm: #FFF8E7;
  --bg-dark: #111111;
  --bg-card: #FFFFFF;
  --border: #E8E0D0;
  --border-light: #F0E8D8;
  --text: #1A1A1A;
  --text-secondary: #4A4A4A;
  --text-muted: #7A7A7A;
  --text-light: #A0A0A0;
  --accent: #E85D04;
  --accent-warm: #F48C06;
  --accent-dark: #9D0208;
  --green: #2D6A4F;
  --terminal-bg: #1A1A2E;
  --terminal-border: #2D2D4A;
  --terminal-header: #16213E;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --radius: 16px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---- Grid Overlay ---- */
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.4;
}

/* ---- Navigation ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-img {
  flex-shrink: 0;
  display: block;
}

.logo span {
  color: var(--text);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 0.5rem 1.25rem;
  background: var(--bg-dark);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.25s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--bg-dark);
  color: #fff;
  border-color: var(--bg-dark);
}

.btn-primary:hover {
  background: var(--text-secondary);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

.btn-outline:hover {
  border-color: var(--text);
  background: rgba(0, 0, 0, 0.02);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 10rem 0 4rem;
  z-index: 1;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.hero-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(232, 93, 4, 0.08);
  border: 1px solid rgba(232, 93, 4, 0.15);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
}

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

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* ---- Demo / Terminal ---- */
.demo {
  position: relative;
  z-index: 1;
  padding: 2rem 0 5rem;
}

.demo-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.terminal {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--terminal-header);
  border-bottom: 1px solid var(--terminal-border);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dots .dot.red {
  background: #FF5F56;
}

.terminal-dots .dot.yellow {
  background: #FFBD2E;
}

.terminal-dots .dot.green {
  background: #27C93F;
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #8892b0;
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1.5rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 2;
}

.tline {
  opacity: 0;
  animation: fadeInLine 0.4s ease forwards;
}

.tline:nth-child(1) {
  animation-delay: 0.3s;
}

.tline:nth-child(2) {
  animation-delay: 0.7s;
}

.tline:nth-child(3) {
  animation-delay: 1.1s;
}

.tline:nth-child(4) {
  animation-delay: 1.3s;
}

.tline:nth-child(5) {
  animation-delay: 1.45s;
}

.tline:nth-child(6) {
  animation-delay: 1.55s;
}

.tline:nth-child(7) {
  animation-delay: 1.65s;
}

.tline:nth-child(8) {
  animation-delay: 1.8s;
}

.tline:nth-child(9) {
  animation-delay: 1.9s;
}

.tline:nth-child(10) {
  animation-delay: 2.0s;
}

.tline:nth-child(11) {
  animation-delay: 2.1s;
}

.tline:nth-child(12) {
  animation-delay: 2.2s;
}

.tline:nth-child(13) {
  animation-delay: 2.7s;
}

@keyframes fadeInLine {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.prompt {
  color: #64ffda;
  margin-right: 0.5rem;
  font-weight: 600;
}

.cmd {
  color: #82aaff;
}

.arg {
  color: #ffcb6b;
}

.out {
  color: #a0a0c0;
}

.out.blank {
  height: 0.5em;
}

.out.highlight {
  color: #64ffda;
  font-weight: 600;
}

.cursor {
  display: inline-block;
  animation: blink 1.1s step-end infinite;
  color: #82aaff;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---- Sections ---- */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

/* ---- Features ---- */
.features {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card {
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  transition: background 0.3s;
}

.feature-card:hover {
  background: var(--bg);
}

.feature-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---- How It Works ---- */
.how-it-works {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.step {
  flex: 1;
  text-align: center;
  max-width: 240px;
}

.step-circle {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  background: var(--bg-dark);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  color: #fff;
}

.step h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

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

.step-arrow {
  flex-shrink: 0;
  margin-top: 1.2rem;
  color: var(--border);
}

/* ---- Install ---- */
.install {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
  background: var(--bg-warm);
}

.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.install-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.install-card.full {
  grid-column: 1 / -1;
}

.install-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.code-block {
  position: relative;
  background: var(--terminal-bg);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: auto;
}

.code-block code {
  color: #e2e8f0;
  white-space: pre;
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.code-block:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.copy-btn.copied {
  color: #64ffda;
  border-color: #64ffda;
}

/* ---- Comparison ---- */
.comparison {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}

.comp-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comp-table th,
.comp-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.comp-table thead th {
  background: var(--bg-warm);
  font-weight: 600;
  color: var(--text);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comp-table tbody tr:last-child td {
  border-bottom: none;
}

.comp-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

.dt-col {
  color: var(--accent);
  font-weight: 500;
}

.comp-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- CTA ---- */
.cta {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 8rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
}

.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.cta-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-light);
  padding: 2rem 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left p {
  color: var(--text-light);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.footer-right {
  display: flex;
  gap: 2rem;
}

.footer-right a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .section-container,
  .hero-container,
  .demo-container,
  .footer-container,
  .nav-container {
    padding: 0 1rem;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    padding: 6rem 0 2rem;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }

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

  .feature-card {
    padding: 1.75rem 1.25rem;
  }

  .terminal-body {
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    line-height: 1.8;
  }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step-arrow {
    display: none;
  }

  .step {
    max-width: 100%;
  }

  .install-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .install-card {
    padding: 1.25rem;
    min-width: 0;
  }

  .install-card.full {
    grid-column: auto;
  }

  .code-block {
    padding: 1rem;
    font-size: 0.75rem;
  }

  .code-block code {
    word-break: break-all;
    white-space: pre-wrap;
  }

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

  .comp-table th,
  .comp-table td {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }

  .comp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 0.9rem;
  }

  .terminal-body {
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
  }

  .tline {
    word-break: break-all;
  }

  .section-title {
    font-size: 2rem;
  }

  .feature-card {
    padding: 1.5rem 1rem;
  }

  .feature-card h3 {
    font-size: 1.1rem;
  }

  .install-card {
    padding: 1rem;
  }

  .code-block {
    padding: 0.75rem;
    font-size: 0.7rem;
  }

  .cta-title {
    font-size: 2rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Mobile nav open */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
  gap: 1.25rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}