/* FiveNova Savvy
 *
 * Token block is duplicated from site/styles.css on purpose. Savvy and the studio site
 * are separate Cloudflare Pages projects and cannot share a file without adding a build
 * step. If you change a colour here, change it there too.
 */

:root {
  --bg-0: #0f0f12;
  --bg-1: #15101f;
  --bg-2: #0a0712;
  --ink: #efdcff;
  --ink-dim: #b8a3d4;
  --ink-mute: #6e5a8f;
  --violet: #7e22ff;
  --violet-soft: #a555ff;
  --violet-deep: #2f024f;
  --line: rgba(239, 220, 255, 0.08);
  --glass: rgba(239, 220, 255, 0.03);
  --radius: 18px;
  --maxw: 1240px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100svh;
}

body {
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(126, 34, 255, 0.18), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(47, 2, 79, 0.55), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 60%, var(--bg-2) 100%);
  position: relative;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
::selection { background: rgba(126, 34, 255, 0.4); color: var(--ink); }

/* ---------- Background layers ---------- */

.aurora {
  position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 40% at 28% 32%, rgba(126, 34, 255, 0.32), transparent 60%),
    radial-gradient(35% 35% at 72% 58%, rgba(165, 85, 255, 0.16), transparent 60%),
    radial-gradient(30% 30% at 50% 80%, rgba(47, 2, 79, 0.55), transparent 60%);
  filter: blur(80px) saturate(140%);
  opacity: 0.6;
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -2%, 0) scale(1.05); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1); }
}

.grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(239, 220, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 220, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
  opacity: 0.55;
}

.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.65) 100%);
}

.noise {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform-origin: left; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--violet), var(--violet-soft));
  box-shadow: 0 0 14px rgba(126, 34, 255, 0.75);
  z-index: 60; pointer-events: none;
  transition: transform 90ms linear;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 28px;
  max-width: var(--maxw); margin: 0 auto;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; }
.brand img {
  height: 34px; width: auto;
  filter: drop-shadow(0 0 16px rgba(126, 34, 255, 0.65));
  transition: filter 300ms var(--ease);
}
.brand:hover img { filter: drop-shadow(0 0 26px rgba(165, 85, 255, 0.95)); }

.nav { display: inline-flex; align-items: center; gap: 22px; }
.nav a {
  font-size: 14px; color: var(--ink-dim); position: relative;
  transition: color 200ms var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--violet-soft));
  transform: scaleX(0); transform-origin: left;
  transition: transform 320ms var(--ease-out);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a.ext { color: var(--ink-mute); }

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

.wrap {
  position: relative; z-index: 4;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(40px, 7vh, 90px) 28px;
}

.kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-mute); margin: 0 0 10px;
}
.kicker span { color: var(--violet-soft); margin-right: 6px; }

.section-title {
  margin: 0 0 8px;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  background: linear-gradient(180deg, var(--ink), var(--violet-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub {
  margin: 0 0 44px; color: var(--ink-dim);
  font-size: clamp(15px, 1.6vw, 17px); max-width: 62ch; line-height: 1.6;
}

/* ---------- Score badge — Savvy's signature element ---------- */

.score {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-family: "Orbitron", sans-serif; font-weight: 900;
  line-height: 1; letter-spacing: 0.01em;
  padding: 10px 14px; border-radius: 12px;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.score .n { font-size: 1.9em; }
.score .d { font-size: 0.85em; opacity: 0.55; font-weight: 600; }

/* Bands. Colour carries meaning, so it is never the only signal —
   the numeral is always present and legible. */
.score.band-high {
  color: var(--violet-soft);
  box-shadow: 0 0 28px color-mix(in srgb, var(--violet-soft) 45%, transparent),
              0 0 0 1px color-mix(in srgb, var(--violet-soft) 30%, transparent) inset;
}
.score.band-mid  { color: var(--violet); }
.score.band-low  { color: var(--ink-mute); background: transparent; }

.score-lg { padding: 16px 22px; border-radius: 16px; }
.score-sm { padding: 6px 10px; border-radius: 9px; font-size: 12px; }

/* ---------- Review cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(239,220,255,0.04), rgba(239,220,255,0.015));
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 340px;
  opacity: 0; transform: translateY(24px);
  transition: transform 220ms var(--ease-out), opacity 900ms var(--ease-out),
              border-color 350ms var(--ease), box-shadow 380ms var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}
.card.in-view { opacity: 1; transform: translateY(0); }
.card:hover {
  border-color: rgba(126, 34, 255, 0.55);
  box-shadow: 0 22px 60px rgba(126, 34, 255, 0.28),
              0 0 0 1px rgba(126, 34, 255, 0.4) inset;
}

.card-banner { position: relative; overflow: hidden; }
.card-banner img {
  width: 100%; height: 168px; object-fit: cover; display: block;
  transition: transform 560ms var(--ease-out);
  background: var(--violet-deep);
}
.card:hover .card-banner img { transform: scale(1.05); }
.card-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--bg-1) 82%, transparent) 100%);
  pointer-events: none;
}
.card-banner .score {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  background: color-mix(in srgb, var(--bg-0) 78%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }

.card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 10px;
}
.card-title {
  margin: 0 0 6px;
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-weight: 800; font-size: 21px; color: var(--ink);
  text-shadow: 0 0 24px rgba(126, 34, 255, 0.5);
}
.card-verdict {
  margin: 0 0 14px; color: var(--ink-dim);
  font-size: 14px; line-height: 1.55; flex: 1;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.card-tags span {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px; padding: 4px 8px; border-radius: 6px;
  background: rgba(239,220,255,0.04); border: 1px solid var(--line);
  color: var(--ink-dim); letter-spacing: 0.06em;
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; color: var(--ink-mute);
}
.card a.stretch::after { content: ""; position: absolute; inset: 0; z-index: 3; }

.featured-flag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--violet) 85%, transparent);
  color: var(--ink);
  box-shadow: 0 0 18px rgba(126, 34, 255, 0.7);
}

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

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  border: 1px solid var(--line); background: var(--glass); color: var(--ink);
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform 300ms var(--ease-out), box-shadow 320ms var(--ease),
              border-color 250ms var(--ease), background 250ms var(--ease);
}
.btn img, .btn svg { width: 16px; height: 16px; position: relative; z-index: 1; }
.btn span { position: relative; z-index: 1; }
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  border-color: transparent;
  box-shadow: 0 12px 40px rgba(126, 34, 255, 0.45);
}
.btn.primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(239,220,255,0.28) 50%, transparent 100%);
  transform: translateX(-130%);
  transition: transform 720ms var(--ease-out);
  pointer-events: none;
}
.btn.primary:hover::before { transform: translateX(130%); }
.btn.ghost:hover { background: rgba(126, 34, 255, 0.08); border-color: rgba(126, 34, 255, 0.5); }

/* ---------- Filter chips (browse) ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass);
  color: var(--ink-dim); cursor: pointer;
  transition: all 220ms var(--ease);
}
.chip:hover { color: var(--ink); border-color: rgba(126,34,255,0.5); }
.chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--violet) 22%, transparent);
  border-color: var(--violet); color: var(--ink);
}

/* ---------- Single review ---------- */

.review-hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); margin-bottom: 32px;
  min-height: 260px;
  background: var(--violet-deep);
}
.review-hero img { width: 100%; height: clamp(220px, 38vh, 420px); object-fit: cover; }
.review-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10,7,18,0.92) 100%);
}
.review-hero-inner {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; padding: 26px;
}
.review-title {
  margin: 0;
  font-family: "Orbitron", sans-serif; font-weight: 900;
  font-size: clamp(28px, 5vw, 52px); letter-spacing: -0.01em;
  color: var(--ink);
  text-shadow: 0 0 30px rgba(126, 34, 255, 0.6);
}
.review-verdict {
  margin: 10px 0 0; max-width: 60ch;
  font-size: clamp(15px, 1.8vw, 19px); line-height: 1.5;
  color: var(--ink-dim); font-style: italic;
}

.review-stats {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 30px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute);
}
.review-stats strong { color: var(--ink); font-weight: 600; margin-left: 6px; }

.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
@media (max-width: 900px) { .review-layout { grid-template-columns: 1fr; } }

.prose { color: var(--ink-dim); font-size: 16px; line-height: 1.75; max-width: 72ch; }
.prose h2 {
  margin: 36px 0 12px; font-size: 24px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.01em;
}
.prose h3 { margin: 28px 0 10px; font-size: 19px; font-weight: 600; color: var(--ink); }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--violet-soft); font-style: italic; }
.prose a { color: var(--violet-soft); text-decoration: underline; text-underline-offset: 3px; }
.prose code {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.88em;
  background: rgba(239,220,255,0.06); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 5px; color: var(--ink);
}
.prose blockquote {
  margin: 0 0 18px; padding: 12px 18px;
  border-left: 2px solid var(--violet);
  background: rgba(126, 34, 255, 0.07);
  border-radius: 0 8px 8px 0; color: var(--ink);
}

.aside {
  position: sticky; top: 90px; align-self: start;
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(239,220,255,0.04), rgba(239,220,255,0.015));
}
.aside h3 {
  margin: 0 0 4px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--ink-mute);
  font-weight: 500;
}
.aside .btn { justify-content: center; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 36px; }
.gallery img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line);
  transition: transform 400ms var(--ease-out), border-color 250ms var(--ease);
}
.gallery img:hover { transform: scale(1.03); border-color: rgba(126,34,255,0.6); }

/* ---------- States ---------- */

.notice {
  padding: 16px 20px; border-radius: 12px; margin-bottom: 24px;
  border: 1px solid rgba(255, 182, 230, 0.35);
  background: rgba(255, 182, 230, 0.07);
  color: #ffb6e6;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px;
  letter-spacing: 0.06em;
}
.empty {
  padding: 60px 20px; text-align: center; color: var(--ink-mute);
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase;
}

.skeleton {
  border-radius: var(--radius); min-height: 340px;
  border: 1px solid var(--line);
  background: linear-gradient(100deg,
    rgba(239,220,255,0.03) 30%,
    rgba(126,34,255,0.10) 50%,
    rgba(239,220,255,0.03) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { background-position: -120% 0; } }

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

.foot {
  position: relative; z-index: 4;
  border-top: 1px solid var(--line);
  margin-top: 60px; padding: 30px 28px 46px;
}
.foot-row {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; gap: 14px; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute);
}
.foot a:hover { color: var(--ink); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .card { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
  .wrap { padding: 40px 18px; }
  .topbar { padding: 14px 16px; }
  .nav { gap: 14px; }
  .nav a { font-size: 13px; }
}
