/* R.G. Studios · rgstudios.dev
   Cosmic / alchemical look in Prestige's dragon red and gold. */

:root {
  --void: #07050a;
  --ink: #0f0a10;
  --panel: rgba(24, 14, 20, 0.72);
  --panel-solid: #170d13;
  --line: rgba(217, 164, 65, 0.22);
  --line-strong: rgba(217, 164, 65, 0.5);
  --red: #d6202b;
  --red-glow: rgba(214, 32, 43, 0.45);
  --gold: #d9a441;
  --gold-soft: #f0d39a;
  --text: #f3e9e1;
  --muted: #b7a69c;
  --air: #9fd3ff;
  --water: #4fb3c8;
  --fire: #ff6a3d;
  --earth: #9bbf6a;
  --radius: 18px;
  --max: 1160px;
  --display: "Rye", Georgia, serif;
  --tech: "Oxanium", "Segoe UI", sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% -10%, #2a0b12 0%, var(--void) 55%) fixed, var(--void);
  color: var(--text);
  font: 16px/1.65 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-soft); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

#starfield { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(7, 5, 10, 0.7);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 8px 16px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.02em; }
.brand-mark { width: 30px; height: 30px; }
.nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-family: var(--tech); font-size: 0.95rem; padding: 6px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(217, 164, 65, 0.1); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font: 600 1rem/1 var(--tech); letter-spacing: 0.03em; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--red), #8f0f18); color: #fff; box-shadow: 0 8px 30px var(--red-glow); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 40px var(--red-glow), 0 0 0 1px var(--gold) inset; }
.btn-ghost { border-color: var(--line-strong); color: var(--gold-soft); background: rgba(217, 164, 65, 0.06); }
.btn-ghost:hover { background: rgba(217, 164, 65, 0.14); color: var(--gold-soft); }
.btn-sponsor { border-color: rgba(234, 74, 170, 0.6); color: #ffc2e6; background: rgba(234, 74, 170, 0.08); }
.btn-sponsor:hover { color: #fff; background: rgba(234, 74, 170, 0.2); }
.btn small { font: 400 0.8rem/1 var(--body); opacity: 0.85; }
.btn-col { flex-direction: column; gap: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Hero */
.hero { position: relative; padding: 96px 0 72px; text-align: center; overflow: hidden; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.05; margin: 0 0 16px; }
.hero h1 .gold { color: var(--gold); text-shadow: 0 0 30px rgba(217, 164, 65, 0.35); }
.eyebrow { font-family: var(--tech); text-transform: uppercase; letter-spacing: 0.25em; font-size: 0.8rem; color: var(--gold); margin: 0 0 18px; }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 680px; margin: 0 auto 32px; }
.hero .actions { justify-content: center; }
.hero-icon { width: 120px; height: 120px; margin: 0 auto 24px; filter: drop-shadow(0 0 30px var(--red-glow)); }
.release-line { margin-top: 16px; color: var(--muted); font-family: var(--tech); font-size: 0.9rem; }

/* Transmutation circle */
.circle {
  position: absolute; left: 50%; top: 50%; width: min(900px, 140vw); aspect-ratio: 1;
  transform: translate(-50%, -50%); z-index: -1; opacity: 0.32; pointer-events: none;
}
.circle .ring-a { transform-origin: 50% 50%; animation: spin 120s linear infinite; }
.circle .ring-b { transform-origin: 50% 50%; animation: spin 80s linear infinite reverse; }
.circle .ring-c { transform-origin: 50% 50%; animation: spin 200s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sections */
section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 10px; }
.section-head p { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* Cards (cursor-reactive) */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; padding: 28px; border-radius: var(--radius);
  background: radial-gradient(400px circle at var(--mx) var(--my), rgba(217, 164, 65, 0.12), transparent 45%), var(--panel);
  border: 1px solid var(--line);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.25s ease-out, border-color 0.25s;
  backdrop-filter: blur(6px);
}
.card:hover { border-color: var(--line-strong); }
.card h3 { font-family: var(--tech); font-size: 1.25rem; margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); }
.card .tag { font-family: var(--tech); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold); }

.product-card { display: flex; flex-direction: column; gap: 16px; }
.product-card .head { display: flex; align-items: center; gap: 16px; }
.product-card .head img { width: 64px; height: 64px; }
.product-card .actions { margin-top: auto; }

/* Elements */
.element { border-top: 3px solid var(--el, var(--gold)); }
.element .sigil { width: 44px; height: 44px; color: var(--el); margin-bottom: 10px; }
.element h3 { color: var(--el); display: flex; align-items: baseline; gap: 10px; }
.element h3 span { font-family: var(--body); font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.element ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.element li { color: var(--muted); font-size: 0.95rem; }
.element li strong { color: var(--text); font-weight: 600; }
.el-air { --el: var(--air); }
.el-water { --el: var(--water); }
.el-fire { --el: var(--fire); }
.el-earth { --el: var(--earth); }

/* Gallery */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.gallery figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-solid); cursor: zoom-in; transition: transform 0.25s, border-color 0.25s; }
.gallery figure:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.gallery img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.gallery-one { grid-template-columns: 1fr; max-width: 1080px; margin: 0 auto; }
.gallery-one img { aspect-ratio: auto; }
.gallery figcaption { padding: 10px 14px; font-family: var(--tech); font-size: 0.9rem; color: var(--muted); }

.lightbox { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 3, 6, 0.92); }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 1400px; width: 100%; }
.lightbox img { max-height: 82vh; margin: 0 auto; border-radius: 10px; border: 1px solid var(--line); }
.lightbox figcaption { text-align: center; margin-top: 12px; font-family: var(--tech); color: var(--gold-soft); }
.lightbox button { position: absolute; top: 16px; right: 16px; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 999px; width: 44px; height: 44px; font-size: 1.4rem; cursor: pointer; }

/* Steps and prose */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding: 20px 20px 20px 72px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 18px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--tech); font-weight: 700; color: var(--void); background: var(--gold); }
.note { padding: 18px 22px; border-radius: 14px; border: 1px solid rgba(214, 32, 43, 0.5); background: rgba(214, 32, 43, 0.08); }
.note strong { color: var(--gold-soft); }
code, kbd { font-family: "JetBrains Mono", Consolas, monospace; font-size: 0.9em; background: rgba(217, 164, 65, 0.1); padding: 2px 6px; border-radius: 6px; color: var(--gold-soft); word-break: break-word; }

.prose { max-width: 780px; margin-inline: auto; }
.prose h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 12px; }
.prose h2 { font-family: var(--tech); font-size: 1.4rem; margin: 40px 0 10px; color: var(--gold-soft); }
.prose p, .prose li { color: #e3d6cd; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--tech); color: var(--gold); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.updated { color: var(--muted); font-family: var(--tech); font-size: 0.9rem; }

/* Sponsor band */
.sponsor-band { text-align: center; padding: 56px 24px; border-radius: 24px; border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 0%, rgba(214, 32, 43, 0.25), transparent 70%), var(--panel); }
.sponsor-band h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 10px; }
.sponsor-band p { color: var(--muted); max-width: 560px; margin: 0 auto 24px; }
.sponsor-band .actions { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; margin-top: 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .hero { padding: 64px 0 48px; }
  section { padding: 52px 0; }
  .card { padding: 22px; }
  .steps li { padding: 18px 16px 18px 64px; }
  .nav { margin-left: 0; width: 100%; justify-content: flex-start; padding-bottom: 8px; }
  .btn { width: 100%; }
  .hero .actions, .sponsor-band .actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .card { transform: none !important; }
}
