/* ─────────────────────────────────────────────────────────────
   VibeFrog — design tokens + global styles
   Aesthetic: "terminal-meets-amphibian-lab"
   Warm paper / ink / frog-green / muted teal
   ─────────────────────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
}

:root {
  /* Palette */
  --paper:       #F4EFE6;
  --paper-2:     #EBE5D8;
  --paper-3:     #E2DBCA;
  --ink:         #121311;
  --ink-2:       #2B2C28;
  --ink-3:       #5B5C55;
  --ink-4:       #8A8A80;

  --frog:        oklch(54% 0.13 148);   /* primary green */
  --frog-deep:   oklch(42% 0.12 148);
  --frog-soft:   oklch(88% 0.06 148);
  --pond:        oklch(54% 0.08 210);   /* muted teal accent */
  --tongue:      oklch(64% 0.18 20);    /* warm pink for tiny accents */

  --edge:        #1c1d1a;
  --hair:        rgba(18,19,17,0.12);
  --hair-2:      rgba(18,19,17,0.06);

  /* Type */
  --sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  /* Subtle paper texture using layered radial noise */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(45,125,58,0.04), transparent 40%),
    radial-gradient(circle at 100% 30%, rgba(55,130,150,0.03), transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: inherit; }

/* ── Layout container ─────────────────────────────────── */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
}

/* ── Top bar ──────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--paper) 78%, transparent);
  border-bottom: 1px solid var(--hair);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 63px;
}
.topbar nav {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.topbar nav a { text-decoration: none; }
.topbar nav a:hover { color: var(--ink); }

@media (max-width: 720px) {
  .topbar nav { display: none; }
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--frog-deep);
  border-color: var(--frog-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hair);
}
.btn-ghost:hover {
  background: var(--paper-2);
}
.btn-ghost .btn-arrow {
  display: inline-block;
  animation: btn-arrow-bounce 1.6s ease-in-out infinite;
}
@keyframes btn-arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

/* Keyboard key display */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(18,19,17,0.22);
  border-bottom-width: 2px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}
.kbd-dark {
  background: #1a1b17;
  color: #e8e5db;
  border-color: #000;
  border-bottom-color: #000;
}

/* ── Section headings ─────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-4);
}

.display {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--ink);
  margin: 0;
}

section {
  padding: 120px 0;
  position: relative;
}

@media (max-width: 720px) {
  section { padding: 80px 0; }
}

/* ── Divider rule ─────────────────────────────────────── */
.rule {
  height: 1px;
  background: var(--hair);
  margin: 0;
}

/* ── Frog logo mark ───────────────────────────────────── */
.frogmark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--frog);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
}

/* ── Browser frame (used in sandbox + video) ──────────── */
.browser {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 30px 60px -30px rgba(0,0,0,0.35),
    0 10px 20px -15px rgba(0,0,0,0.25);
}
.browser-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #efebe2;
  border-bottom: 1px solid var(--edge);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots i {
  width: 11px; height: 11px; border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.18);
}
.browser-dots i:nth-child(1) { background: #ff6159; }
.browser-dots i:nth-child(2) { background: #ffbf2f; }
.browser-dots i:nth-child(3) { background: #2aca44; }

.browser-url {
  flex: 1;
  height: 26px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 6px;
  display: flex; align-items: center;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  gap: 8px;
}
.browser-url::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.6px solid var(--ink-4);
  flex-shrink: 0;
}

/* Terminal frame */
.terminal {
  background: #161712;
  color: #e8e5db;
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid #000;
  box-shadow:
    0 30px 60px -30px rgba(0,0,0,0.55);
}
.terminal-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #0f100d;
  border-bottom: 1px solid #000;
}
.terminal-chrome .dots { display: flex; gap: 6px; }
.terminal-chrome .dots i {
  width: 11px; height: 11px; border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.4);
}
.terminal-chrome .dots i:nth-child(1) { background: #ff6159; }
.terminal-chrome .dots i:nth-child(2) { background: #ffbf2f; }
.terminal-chrome .dots i:nth-child(3) { background: #2aca44; }
.terminal-chrome .title {
  font-family: var(--mono);
  font-size: 11px;
  color: #8a8a7e;
  letter-spacing: 0.04em;
}

.terminal-body {
  padding: 20px 22px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Terminal syntax colors */
.t-prompt { color: oklch(78% 0.12 148); }
.t-dim    { color: #8a8a7e; }
.t-user   { color: #e8e5db; }
.t-key    { color: oklch(80% 0.11 210); }
.t-str    { color: oklch(80% 0.14 80); }
.t-comment{ color: #5e5e54; font-style: italic; }
.t-flash  { background: rgba(72,191,83,0.22); color: #d4f5c9; padding: 2px 6px; border-radius: 3px; }

/* Cursor blink */
.caret {
  display: inline-block;
  width: 8px; height: 15px;
  background: oklch(78% 0.12 148);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* ── Tickers / dashed rules ───────────────────────────── */
.dashed {
  border-top: 1px dashed rgba(18,19,17,0.28);
  height: 1px;
  margin: 40px 0;
}

/* Marquee-style stat row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hair);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.stat {
  background: var(--paper);
  padding: 22px 20px;
}
.stat-v {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-k {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Section label strip (terminal-window style tag) */
.striplabel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
}
.striplabel::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--frog);
  border-radius: 50%;
  display: inline-block;
}

/* Scroll-linked subtle fade for sections */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.fade-in.in {
  opacity: 1;
  transform: none;
}
