/* Guace site — light "intelligent knowledge base" identity.
   Mirrors the README's marketing presentation: light/paper surfaces,
   the brand's emerald-green accent, 1px hairlines, mono for information
   carriers (labels, filenames, status). Calm, Obsidian-adjacent. */

:root {
  /* Surfaces — pure white so the white-bg brand assets blend seamlessly */
  --bg-canvas: #ffffff;
  --bg-surface: #fafaf9;
  --bg-subtle: #f3f3f1;

  /* Foreground */
  --fg-primary: #16181c;
  --fg-secondary: #515761;
  --fg-muted: #8a8f97;
  --fg-on-accent: #ffffff;

  /* Borders */
  --border-hairline: #e7e7e3;
  --border-strong: #d4d5cf;

  /* Accent — brand emerald (from the Guace wordmark) */
  --accent: #12986a;
  --accent-hover: #0e8159;
  --accent-ink: #0b6e4b; /* darker, for accent text/links on white (AA) */
  --accent-bright: #41c08c; /* logo mint, decorative only */
  --accent-subtle: rgba(18, 152, 106, 0.1);

  /* Status (from app tui-mono-light) */
  --status-idle: #8a8f97;
  --status-busy: #12986a;
  --status-success: #2f8b5c;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Radius */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Inter Tight", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, "JetBrains Mono", monospace;

  /* Motion */
  --duration: 160ms;
  --easing: cubic-bezier(0.2, 0, 0, 1);

  --shadow-soft: 0 1px 2px rgba(16, 24, 28, 0.04);
  --shadow-shot: 0 30px 70px -30px rgba(16, 40, 32, 0.32), 0 2px 8px rgba(16, 24, 28, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg-canvas);
  background-image:
    radial-gradient(820px 480px at 80% -6%, rgba(65, 192, 140, 0.16), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.accent-text {
  color: var(--accent-ink);
}

/* ---- Layout ------------------------------------------------------------ */

.page {
  width: min(1080px, calc(100vw - 40px));
  margin: 0 auto;
}

/* ---- Topbar ------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-hairline);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.brand-mark {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-link {
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  color: var(--fg-secondary);
  border-radius: var(--radius);
  transition: color var(--duration) var(--easing), background var(--duration) var(--easing);
}

.nav-link:hover {
  color: var(--fg-primary);
  background: var(--bg-subtle);
}

/* ---- Buttons ----------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: 0 var(--space-4);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--duration) var(--easing), border-color var(--duration) var(--easing),
    color var(--duration) var(--easing);
}

.button-primary {
  background: var(--accent);
  color: var(--fg-on-accent);
}

.button-primary:hover {
  background: var(--accent-hover);
}

.button-ghost {
  border-color: var(--border-strong);
  color: var(--fg-primary);
  background: var(--bg-canvas);
}

.button-ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--fg-muted);
}

.button-sm {
  min-height: 34px;
  padding: 0 var(--space-3);
}

/* ---- Hero -------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: var(--space-16) 0 var(--space-12);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  margin-top: var(--space-4);
  max-width: 16ch;
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-ink);
}

.hero-body {
  max-width: 56ch;
  margin-top: var(--space-6);
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg-secondary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.hero-stat {
  position: relative;
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
}

.hero-stat .dl-count {
  color: var(--accent-ink);
  font-weight: 500;
}

/* Only hint interactivity once an actual trend chart is available. */
.hero-stat.has-chart .dl-trigger {
  cursor: default;
  border-bottom: 1px dashed var(--border-strong);
  padding-bottom: 1px;
}

.dl-chart {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: 240px;
  padding: var(--space-3);
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-shot);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity var(--duration) var(--easing), transform var(--duration) var(--easing);
  z-index: 10;
}

.hero-stat.has-chart:hover .dl-chart,
.hero-stat.has-chart:focus-within .dl-chart {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dl-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.dl-chart-head,
.dl-chart-foot {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
}

.dl-chart-head {
  margin-bottom: var(--space-2);
}

.dl-chart-foot {
  margin-top: var(--space-1);
}

/* ---- Hero screenshot --------------------------------------------------- */

.shots {
  margin-top: var(--space-12);
  width: 100%;
  outline: none;
}

.shots-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  background: var(--bg-subtle);
  box-shadow: var(--shadow-shot);
  aspect-ratio: 2562 / 1592;
}

.shots-track {
  display: flex;
  height: 100%;
  transition: transform var(--duration) var(--easing);
}

.shot {
  position: relative;
  min-width: 100%;
  height: 100%;
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shots-caption {
  margin: var(--space-4) 0 0;
  min-height: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--fg-secondary);
}

.shots-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.shots-controls[hidden] {
  display: none;
}

.shots-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
  color: var(--fg-secondary);
  background: var(--bg-canvas);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--duration) var(--easing), color var(--duration) var(--easing);
}

.shots-btn:hover {
  background: var(--bg-subtle);
  color: var(--fg-primary);
}

.shots-dots {
  display: flex;
  gap: var(--space-2);
}

.shots-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--border-strong);
  cursor: pointer;
  transition: background var(--duration) var(--easing), transform var(--duration) var(--easing);
}

.shots-dot.is-active {
  background: var(--accent);
  transform: scale(1.3);
}

@media (prefers-reduced-motion: reduce) {
  .shots-track {
    transition: none;
  }
}

/* ---- Generic section --------------------------------------------------- */

.section {
  padding: var(--space-16) 0;
  border-top: 1px solid var(--border-hairline);
}

.section-head {
  max-width: 680px;
}

.section-head h2 {
  margin-top: var(--space-3);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.section-head p {
  margin-top: var(--space-4);
  color: var(--fg-secondary);
  font-size: 16px;
  line-height: 1.6;
}

/* ---- Features ---------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-12);
}

.feature {
  padding: var(--space-6);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
  transition: border-color var(--duration) var(--easing), transform var(--duration) var(--easing);
}

.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-ink);
  letter-spacing: 0.1em;
}

.feature h3 {
  margin-top: var(--space-4);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature p {
  margin-top: var(--space-3);
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-secondary);
}

.feature p code,
.feature p .mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-primary);
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
}

/* ---- Privacy band ------------------------------------------------------ */

.band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-12);
  align-items: start;
}

.band h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.band-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.band-points li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-secondary);
}

.band-points .tick {
  color: var(--accent);
  font-family: var(--font-mono);
}

.band-points b {
  color: var(--fg-primary);
  font-weight: 600;
}

.band-points .mono {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-primary);
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
}

/* ---- Footer ------------------------------------------------------------ */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-12) 0;
  margin-top: var(--space-8);
  border-top: 1px solid var(--border-hairline);
}

.footer-wordmark {
  height: 40px;
  width: auto;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
}

.footer-links a {
  color: var(--fg-secondary);
}

.footer-links a:hover {
  color: var(--accent-ink);
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: var(--space-8);
  }

  .band {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100vw - 28px, 1080px);
  }

  .nav .nav-link {
    display: none;
  }

  .hero {
    padding: var(--space-12) 0 var(--space-8);
  }

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

  .section {
    padding: var(--space-12) 0;
  }

  .button {
    width: 100%;
  }

  .hero-actions {
    width: 100%;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .footer-links {
    align-items: flex-start;
  }
}
