/* ============================================================
   VibePet — design tokens + base
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Pixelify+Sans:wght@400;500;700&display=swap');

:root {
  --accent-mint:   #00D6A3;
  --accent-blue:   #006BFF;
  --accent-coral:  #FF7A59;
  --accent-amber:  #FFB547;
  --accent-purple: #B785F5;

  --font-display: "Inter", "SF Pro Display", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  --font-pixel:   "Pixelify Sans", "JetBrains Mono", monospace;

  --radius-pill: 9999px;
  --radius-card: 16px;
  --radius-input: 10px;
  --radius-chip: 6px;

  --section-py: clamp(80px, 12vw, 160px);
  --container: 1120px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 200ms var(--ease);
  --t-med: 300ms var(--ease);
  --t-slow: 500ms var(--ease);
}

[data-theme="dark"] {
  --bg-canvas:    #0a0a0a;
  --bg-surface:   #141414;
  --bg-elevated:  #1c1c1c;
  --bg-deeper:    #050505;
  --border-subtle: rgba(255,255,255,.06);
  --border-strong: rgba(255,255,255,.12);
  --border-emph:   rgba(255,255,255,.18);
  --text-primary:  #f5f5f5;
  --text-secondary:#a3a3a3;
  --text-muted:    #6b6b6b;
  --shadow-capsule: 0 24px 60px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
  --tile-tint:    rgba(255,255,255,.02);
}

[data-theme="light"] {
  --bg-canvas:    #FFFFFF;
  --bg-surface:   #FAFAF7;
  --bg-elevated:  #F4F4EF;
  --bg-deeper:    #EBEAE3;
  --border-subtle: rgba(0,0,0,.06);
  --border-strong: rgba(0,0,0,.10);
  --border-emph:   rgba(0,0,0,.16);
  --text-primary:  #0a0a0a;
  --text-secondary:#525252;
  --text-muted:    #8a8a8a;
  --shadow-capsule: 0 24px 60px -20px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.04);
  --tile-tint:    rgba(0,0,0,.015);
}

/* density */
[data-density="tight"] { --section-py: clamp(56px, 8vw, 110px); }
[data-density="spacious"] { --section-py: clamp(100px, 14vw, 180px); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-display);
  background: var(--bg-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
  transition: background 250ms ease, color 250ms ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

::selection { background: color-mix(in oklch, var(--accent-blue) 35%, transparent); color: var(--text-primary); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }

.mono { font-family: var(--font-mono); font-feature-settings: "calt" 0; }
.pixel { font-family: var(--font-pixel); letter-spacing: 0.02em; }

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.h-section {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

.h-hero {
  font-size: clamp(46px, 8vw, 92px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
  text-wrap: balance;
}

.sub {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 60ch;
  text-wrap: pretty;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 15px;
  transition: var(--t-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}
.btn-primary:hover { background: color-mix(in oklch, var(--accent-blue) 88%, white); }
[data-accent="mint"] .btn-primary { background: var(--accent-mint); color: #001a13; }
[data-accent="mint"] .btn-primary:hover { background: color-mix(in oklch, var(--accent-mint) 88%, white); }
[data-accent="coral"] .btn-primary { background: var(--accent-coral); color: #1a0a05; }
[data-accent="coral"] .btn-primary:hover { background: color-mix(in oklch, var(--accent-coral) 88%, white); }

.btn-ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-elevated); border-color: var(--border-emph); }

.kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* divider rule */
.rule {
  height: 1px;
  background: var(--border-subtle);
  width: 100%;
}

/* focus */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* dotted bg for empty/placeholder zones */
.placeholder-zone {
  background-color: var(--bg-surface);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 9px,
      var(--border-subtle) 9px,
      var(--border-subtle) 10px
    );
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* section base */
section.s {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  position: relative;
}

/* tiny utility */
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.center { text-align: center; }
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-6 { gap: 24px; } .gap-8 { gap: 32px; } .gap-12 { gap: 48px; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* pet sprite frame */
.pet-frame {
  display: inline-grid;
  place-items: center;
  background: var(--bg-deeper);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  position: relative;
}
[data-theme="light"] .pet-frame {
  background: var(--bg-elevated);
}

/* status dot */
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-mint);
  flex: none;
}
.dot.mint  { background: var(--accent-mint); }
.dot.blue  { background: var(--accent-blue); }
.dot.coral { background: var(--accent-coral); box-shadow: 0 0 0 0 var(--accent-coral); animation: pulse 2s infinite; }
.dot.amber { background: var(--accent-amber); }
.dot.purple { background: var(--accent-purple); }
.dot.muted { background: var(--text-muted); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent-coral) 60%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* progress bar */
.bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border-subtle);
  overflow: hidden;
  position: relative;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
}
