/* ============================================================
   Dog Bark Detector - marketing site
   Design tokens
   ============================================================ */

:root {
  --ink:        #10201d;
  --ink-soft:   #48605a;
  --ink-faint:  #7c9089;
  --paper:      #f2f4ef;
  --paper-dim:  #e6e9e1;
  --panel:      #ffffff;
  --line:       #d7dcd2;

  --brand:      #2f8f7a;
  --brand-dark: #1f6357;
  --brand-tint: #e2f0ec;

  --alert:      #e2a33b;
  --alert-tint: #fbf0dc;

  --flag:       #c1502e;
  --flag-tint:  #f7e2da;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body:    'IBM Plex Sans', 'Segoe UI', sans-serif;

  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: 62ch; }
p.wide { max-width: 74ch; }

a { color: var(--brand-dark); }
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 3px;
}

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

/* ----------------------------- nav ----------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 244, 239, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
}
.brand-mark span {
  width: 4px;
  background: var(--brand);
  border-radius: 2px;
}
.brand-mark span:nth-child(1) { height: 40%; }
.brand-mark span:nth-child(2) { height: 100%; background: var(--alert); }
.brand-mark span:nth-child(3) { height: 65%; }
.brand-mark span:nth-child(4) { height: 85%; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--ink); background: var(--paper-dim); }
.nav-links a[aria-current="page"] {
  color: var(--brand-dark);
  background: var(--brand-tint);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 16px;
    gap: 2px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 8px; }
}

/* ----------------------------- buttons ----------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--brand-dark);
  color: #fff;
}
.btn-primary:hover { background: var(--ink); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--brand-dark); color: var(--brand-dark); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ----------------------------- hero ----------------------------- */

.hero {
  padding: 76px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-tint);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-visual {
  background: var(--ink);
  border-radius: 18px;
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
}

.waveform {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 160px;
}

.waveform .bar {
  flex: 1;
  background: #3a5650;
  border-radius: 3px 3px 0 0;
  animation: bob 2.4s ease-in-out infinite;
}
.waveform .bar.hit {
  background: var(--alert);
  box-shadow: 0 0 18px rgba(226, 163, 59, 0.55);
}

@keyframes bob {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.82); }
}

.waveform .bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.waveform .bar:nth-child(2) { height: 55%; animation-delay: 0.1s; }
.waveform .bar:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.waveform .bar:nth-child(4) { height: 70%; animation-delay: 0.3s; }
.waveform .bar:nth-child(5) { height: 100%; animation-delay: 0.4s; }
.waveform .bar:nth-child(6) { height: 65%; animation-delay: 0.5s; }
.waveform .bar:nth-child(7) { height: 45%; animation-delay: 0.6s; }
.waveform .bar:nth-child(8) { height: 80%; animation-delay: 0.7s; }
.waveform .bar:nth-child(9) { height: 35%; animation-delay: 0.8s; }
.waveform .bar:nth-child(10) { height: 58%; animation-delay: 0.9s; }
.waveform .bar:nth-child(11) { height: 25%; animation-delay: 1s; }
.waveform .bar:nth-child(12) { height: 48%; animation-delay: 1.1s; }
.waveform .bar:nth-child(13) { height: 90%; animation-delay: 1.2s; }
.waveform .bar:nth-child(14) { height: 38%; animation-delay: 1.3s; }
.waveform .bar:nth-child(15) { height: 60%; animation-delay: 1.4s; }
.waveform .bar:nth-child(16) { height: 28%; animation-delay: 1.5s; }

.hero-visual-caption {
  margin-top: 18px;
  color: #a9bdb7;
  font-size: 0.85rem;
  font-family: var(--font-display);
}
.hero-visual-caption strong { color: var(--alert); font-weight: 600; }

/* ----------------------------- sections ----------------------------- */

section { padding: 64px 0; }
section.tight { padding: 40px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* feature grid: intentionally asymmetric, not identical cards */
.feature-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}
@media (max-width: 780px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-lead {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px;
}
.feature-lead .tag {
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: block;
}

.feature-stack { display: flex; flex-direction: column; gap: 24px; }
.feature-small {
  border-left: 3px solid var(--brand);
  padding-left: 20px;
}
.feature-small:nth-child(2) { border-left-color: var(--alert); }

/* ----------------------------- steps (how it works) ----------------------------- */

.steps { display: flex; flex-direction: column; }

.step {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }

.step-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--paper-dim);
  -webkit-text-stroke: 1.5px var(--brand);
  color: transparent;
}

.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-soft); }

@media (max-width: 600px) {
  .step { grid-template-columns: 50px 1fr; }
  .step-num { font-size: 1.5rem; }
}

/* ----------------------------- gallery (screenshots) ----------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
@media (max-width: 700px) {
  .gallery { grid-template-columns: 1fr; }
}

.shot {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.shot .frame {
  aspect-ratio: 16 / 9;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.shot .frame-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shot .placeholder {
  color: #6c847d;
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}
.expand-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(16, 32, 29, 0);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.frame-link:hover .expand-hint,
.frame-link:focus-visible .expand-hint {
  opacity: 1;
  background: rgba(16, 32, 29, 0.55);
}
.expand-hint svg { width: 18px; height: 18px; }
.shot figcaption {
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.shot figcaption strong { color: var(--ink); display: block; margin-bottom: 2px; }

/* ----------------------------- callout / cta band ----------------------------- */

.band {
  background: var(--ink);
  color: var(--paper);
  border-radius: 18px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.band h2 { color: #fff; margin-bottom: 6px; }
.band p { color: #b9c8c3; margin: 0; }
.band .btn-primary { background: var(--alert); color: var(--ink); }
.band .btn-primary:hover { background: #fff; }

/* ----------------------------- contact ----------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
}
.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.contact-row:first-child { border-top: none; }
.contact-row .label { color: var(--ink-faint); font-size: 0.9rem; }
.contact-row .value { font-weight: 600; text-align: right; }

.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
}
.badge.ok   { background: var(--brand-tint); color: var(--brand-dark); }
.badge.warn { background: var(--alert-tint); color: #8a6117; }
.badge.flag { background: var(--flag-tint); color: var(--flag); }

/* ----------------------------- example report ----------------------------- */

.disclaimer {
  background: var(--alert-tint);
  border: 1px solid #e8cd94;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 0.92rem;
  color: #7a5813;
  margin-bottom: 40px;
}
.disclaimer strong { color: #5c4310; }

.data-card {
  background: var(--ink);
  color: #cfe3dd;
  border-radius: 12px;
  padding: 24px 26px;
  font-family: 'IBM Plex Mono', 'Consolas', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}
.data-card .fade { color: #5f7b73; }

.report-doc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 44px;
  margin-top: 32px;
}
@media (max-width: 640px) {
  .report-doc { padding: 28px 20px; }
}
.report-doc h2 { margin-top: 40px; }
.report-doc h2:first-child { margin-top: 0; }
.report-doc ul { padding-left: 20px; color: var(--ink-soft); }
.report-doc li { margin-bottom: 6px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0 8px;
}
@media (max-width: 700px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-tile {
  background: var(--paper-dim);
  border-radius: 10px;
  padding: 16px 16px;
}
.stat-tile .num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-dark);
  display: block;
}
.stat-tile .lbl {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.cluster-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 8px;
  font-size: 0.92rem;
}
.cluster-table th, .cluster-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.cluster-table th {
  color: var(--ink-faint);
  font-weight: 600;
  font-size: 0.82rem;
}
.cluster-table tr:last-child td { border-bottom: none; }

.day-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
  margin: 18px 0 6px;
  padding: 0 2px;
}
.day-chart .col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.day-chart .bar {
  width: 100%;
  background: var(--brand);
  border-radius: 2px 2px 0 0;
}
.day-chart .hr {
  font-size: 0.62rem;
  color: var(--ink-faint);
  margin-top: 4px;
}
.chart-caption {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* prompt tabs */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 6px;
}
.tab-btn {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-soft);
  cursor: pointer;
}
.tab-btn:hover { border-color: var(--brand); color: var(--ink); }
.tab-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.prompt-used-for {
  font-size: 0.88rem;
  color: var(--ink-soft);
  background: var(--paper-dim);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 28px;
  display: inline-block;
}
.prompt-used-for strong { color: var(--ink); }

/* formal letter look */
.letter {
  font-family: var(--font-body);
  max-width: 66ch;
}
.letter .letterhead {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 24px;
  line-height: 1.5;
}
.letter p { max-width: none; }
.letter .sig { margin-top: 28px; }
code.ph {
  background: var(--alert-tint);
  color: #7a5813;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88em;
}

/* ascii visual summary */
.ascii-block {
  background: var(--ink);
  color: #cfe3dd;
  border-radius: 12px;
  padding: 22px 24px;
  font-family: 'IBM Plex Mono', 'Consolas', monospace;
  font-size: 0.8rem;
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre;
}
.ascii-block .amber { color: var(--alert); }
.ascii-block .dim { color: #5f7b73; }

/* comparison table variant */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 6px;
  font-size: 0.92rem;
}
.compare-table th, .compare-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.compare-table th { color: var(--ink-faint); font-size: 0.82rem; font-weight: 600; }
.compare-table td.better { color: var(--brand-dark); font-weight: 600; }

/* ----------------------------- time comparison ----------------------------- */

.time-compare { margin: 26px 0 28px; }
.time-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.time-row .tag {
  width: 180px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.92rem;
}
.time-row .track {
  flex: 1;
  height: 32px;
  background: var(--paper-dim);
  border-radius: 7px;
  overflow: hidden;
}
.time-row .fill { height: 100%; border-radius: 7px 0 0 7px; }
.time-row .fill.manual { background: var(--flag); }
.time-row .fill.ai { background: var(--brand); min-width: 16px; }
.time-row .value {
  width: 150px;
  flex-shrink: 0;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
}

@media (max-width: 600px) {
  .time-row { flex-wrap: wrap; }
  .time-row .tag { width: 100%; }
  .time-row .track { flex-basis: 100%; order: 3; }
  .time-row .value { width: auto; text-align: left; }
}

/* ----------------------------- footer ----------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  margin-top: 40px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 0.88rem;
}
.footer-row a { color: var(--ink-soft); }
