/*
 * Variant Vault — "Sky Hero" theme
 * Sky blue + navy + hero red/gold. Mobile-first (iPhone 16 Plus), scales to
 * desktop. Templates use Tailwind CDN utilities for layout + these component
 * classes for the distinctive look. See DESIGN-iphone16plus.md for the spec.
 */

:root {
  --sky:        #38BDF8;
  --sky-deep:   #0EA5E9;
  --navy:       #0F2A47;
  --ink:        #1E293B;
  --hero-red:   #E63946;
  --gold:       #FFB703;
  --paper:      #F4F9FF;
  --card:       #FFFFFF;
  --line:       #DBEAFE;
  --muted:      #64748B;
  --mainstream: #2563EB;
  --ok:         #16A34A;
  --shadow:     0 4px 16px rgba(15, 42, 71, .08);
  --shadow-lg:  0 10px 30px rgba(15, 42, 71, .16);
}

* { -webkit-tap-highlight-color: transparent; }

body {
  background: var(--paper);
  color: var(--ink);
}

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.cv-topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
  position: sticky;
  top: 0;
  z-index: 40;
}
.cv-brand {
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: .04em;
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
}
.cv-brand .pow { color: var(--hero-red); }

/* ── Hero banner ──────────────────────────────────────────────────────────── */
.cv-banner {
  background: linear-gradient(135deg, var(--sky), var(--sky-deep));
  color: #fff;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cv-banner::after {            /* subtle halftone dots for comic feel */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .25) 1.5px, transparent 1.6px);
  background-size: 14px 14px;
  opacity: .5;
  pointer-events: none;
}
.cv-banner > * { position: relative; z-index: 1; }

/* ── Stat chips ───────────────────────────────────────────────────────────── */
.cv-chip {
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  padding: .25rem .7rem;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.cv-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cv-card--link { transition: transform .15s ease, box-shadow .15s ease; display: block; }
.cv-card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cv-cover { aspect-ratio: 2 / 3; background: #E2ECFB; overflow: hidden; }
.cv-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ── Badges (uniqueness / status) ─────────────────────────────────────────── */
.cv-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: .15rem .5rem;
  border-radius: 999px;
  text-transform: uppercase;
}
.cv-badge--unique     { background: #FDE7E9; color: var(--hero-red); }
.cv-badge--mainstream { background: #DBEAFE; color: var(--mainstream); }
.cv-badge--pending    { background: #FEF3C7; color: #B45309; }
.cv-badge--error      { background: #FEE2E2; color: #B91C1C; }
.cv-badge--doc        { background: #E0F2FE; color: var(--sky-deep); }

/* ── Price ────────────────────────────────────────────────────────────────── */
.cv-price { color: var(--navy); font-weight: 800; }
.cv-price .cur { color: var(--gold); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.cv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-weight: 700;
  font-size: .9rem;
  border-radius: 12px;
  padding: .65rem 1rem;
  min-height: 44px;
  cursor: pointer;
  transition: filter .15s ease, transform .05s ease;
  border: 1px solid transparent;
  text-align: center;
}
.cv-btn:active { transform: scale(.98); }
.cv-btn--primary { background: var(--sky-deep); color: #fff; }
.cv-btn--primary:hover { filter: brightness(1.06); }
.cv-btn--hero { background: var(--hero-red); color: #fff; }
.cv-btn--gold { background: var(--gold); color: var(--navy); }
.cv-btn--ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.cv-btn--ghost:hover { background: var(--paper); }
.cv-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Form controls ────────────────────────────────────────────────────────── */
.cv-label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: .25rem; }
.cv-input, .cv-select, .cv-textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .6rem .75rem;
  /* 16px min prevents iOS Safari from auto-zooming the viewport on focus. */
  font-size: 16px;
  color: var(--ink);
  min-height: 44px;
}
.cv-input:focus, .cv-select:focus, .cv-textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .25);
}

/* ── Filter pills ─────────────────────────────────────────────────────────── */
.cv-pill {
  display: inline-flex; align-items: center;
  padding: .4rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: #fff; color: var(--navy); border: 1px solid var(--line); white-space: nowrap;
}
.cv-pill--active { background: var(--navy); color: #fff; border-color: var(--navy); }
.cv-pill--unique.cv-pill--active { background: var(--hero-red); border-color: var(--hero-red); }
.cv-pill--mainstream.cv-pill--active { background: var(--mainstream); border-color: var(--mainstream); }

/* ── Bottom navigation (mobile) ───────────────────────────────────────────── */
.cv-bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 16px rgba(15, 42, 71, .06);
}
.cv-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .12rem;
  padding: .55rem 0 .4rem;
  font-size: .68rem;
  font-weight: 600;
  color: var(--muted);
}
.cv-tab svg { width: 22px; height: 22px; }
.cv-tab--active { color: var(--sky-deep); }

/* "More" sheet: the overflow destinations for the 5-slot bottom nav. Sits ABOVE
   the nav (which stays lit and tappable at z-50, so tapping More again closes
   it) and the backdrop sits below both. The slide-up transition is killed by the
   prefers-reduced-motion block at the end of this file. */
.cv-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 71, .35);
  z-index: 40;
}
.cv-sheet {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(3.6rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  border-radius: 1rem 1rem 0 0;
  padding: .4rem 0;
  z-index: 45;
  box-shadow: 0 -8px 28px rgba(15, 42, 71, .14);
  animation: cv-sheet-up .16s ease-out;
}
@keyframes cv-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.cv-sheet-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1.15rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--navy);
}
.cv-sheet-row svg { width: 20px; height: 20px; color: var(--muted); }
.cv-sheet-row.is-active, .cv-sheet-row.is-active svg { color: var(--sky-deep); }

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.cv-table th { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.cv-table td, .cv-table th { padding: .55rem .6rem; text-align: left; }
.cv-table tbody tr { border-top: 1px solid var(--line); }

/* Bottom-nav clearance: always exceed nav height + the home-indicator inset. */
@media (max-width: 767px) {
  body { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .cv-card--link:hover { transform: none; }
  * { transition: none !important; }
  .cv-sheet { animation: none; }
}
