/* Orvyn Living — game portal styles
   Dark theme. Bold display sans. Vibrant accents. Hover glow. */

:root {
  /* Surfaces */
  --bg: #0d0e1c;
  --bg-soft: #11132a;
  --surface: #181a36;
  --surface-2: #20234a;
  --surface-3: #2a2e5e;

  /* Text */
  --ink: #f6f0e6;
  --ink-soft: #c8c0ad;
  --muted: #8b88aa;
  --line: rgba(255, 255, 255, 0.08);

  /* Accents */
  --accent: #ff6b8a;          /* hot pink — primary CTA */
  --accent-2: #ffd166;        /* gold — highlights, badges */
  --accent-3: #6ce4b4;         /* mint — score / success */
  --accent-4: #7aa8ff;         /* sky — secondary */
  --terracotta: #ff7a5a;
  --pink: #d8a7a0;
  --sage: #8aa489;
  --gold: #ffd166;
  --danger: #ff5577;

  /* Effects */
  --glow-pink: 0 0 30px rgba(255, 107, 138, 0.4);
  --glow-gold: 0 0 24px rgba(255, 209, 102, 0.35);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.3);

  --radius: 12px;
  --radius-lg: 16px;
  --max-w: 1200px;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(800px 400px at 90% -5%, rgba(255, 107, 138, 0.12), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(122, 168, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(255, 209, 102, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--accent-4); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }

code, pre, .mono { font-family: var(--font-mono); font-size: 0.92em; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  padding: 1rem 0;
  background: rgba(13, 14, 28, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--terracotta) 100%);
  box-shadow: var(--glow-pink);
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute;
  top: 6px; left: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.9;
}
.nav { display: flex; gap: 1.5rem; align-items: center; }
.nav a {
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 500;
  position: relative;
  transition: color .15s ease;
}
.nav a:not(.nav-primary):hover { color: var(--ink); }
.nav-primary {
  background: var(--accent);
  color: #fff !important;
  padding: .55rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: var(--glow-pink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.nav-primary:hover {
  background: var(--terracotta);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 0 36px rgba(255, 122, 90, 0.55);
}
@media (max-width: 720px) {
  .nav { gap: 1rem; }
  .nav a:not(.nav-primary) { display: none; }
}

/* Hero */
.hero {
  padding: 5rem 0 3rem;
  text-align: center;
  position: relative;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-3);
  font-weight: 600;
  background: rgba(108, 228, 180, 0.1);
  padding: .4rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(108, 228, 180, 0.2);
  margin-bottom: 1.4rem;
}
.hero .eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 8px var(--accent-3);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}
.hero h1 {
  max-width: 18ch;
  margin: 0 auto .9rem;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink) 60%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p.lead {
  max-width: 56ch;
  margin: 0 auto 2rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
}
.hero-cta {
  display: inline-flex;
  gap: .8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease,
              box-shadow .18s ease, border-color .15s ease;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--glow-pink);
}
.btn-primary:hover {
  background: var(--terracotta);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(255, 122, 90, 0.6);
}
.btn-primary::after {
  content: '→';
  transition: transform .15s ease;
}
.btn-primary:hover::after { transform: translateX(3px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Section */
section { padding: 3rem 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head p { margin: 0; max-width: 42ch; }
.section-head a {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: var(--accent-2);
  font-weight: 500;
}
.section-head a:hover { color: var(--accent); }

/* Game grid + cards */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}
.game-card {
  display: block;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform .25s cubic-bezier(.2,.8,.2,1),
              border-color .2s ease,
              box-shadow .25s ease;
  isolation: isolate;
}
.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, transparent 30%, var(--accent) 50%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  z-index: 1;
}
.game-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5), 0 0 60px rgba(255, 107, 138, 0.15);
}
.game-card:hover::before { opacity: 1; }

.game-card .thumb {
  aspect-ratio: 16/10;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}
.game-card .thumb canvas,
.game-card .thumb svg {
  width: 100%; height: 100%; display: block;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.game-card:hover .thumb svg { transform: scale(1.06); }

.game-card .thumb::after {
  content: 'PLAY';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity .2s ease;
  text-shadow: 0 0 20px var(--accent);
  z-index: 2;
}
.game-card:hover .thumb::after { opacity: 1; }

.game-card .body {
  padding: 1.1rem 1.2rem 1.3rem;
}
.game-card .body h3 {
  margin: 0 0 .35rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.game-card .body p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}
.game-card .tag {
  display: inline-flex;
  align-items: center;
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-2);
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.2);
  padding: .2rem .55rem;
  border-radius: 6px;
  margin-bottom: .55rem;
}

/* Featured card (1st in grid: span 2 columns at >= 720px) */
.game-grid .game-card.featured {
  grid-column: span 1;
}
@media (min-width: 720px) {
  .game-grid .game-card.featured {
    grid-column: span 2;
    grid-row: span 1;
  }
  .game-grid .game-card.featured .thumb { aspect-ratio: 16/8; }
  .game-grid .game-card.featured h3 { font-size: 1.6rem; }
  .game-grid .game-card.featured p { font-size: 1rem; }
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}
.stats-strip .stat {
  text-align: center;
}
.stats-strip .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stats-strip .stat span {
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .04em;
}

/* Prose (legal / about pages) */
.prose {
  max-width: 70ch;
  margin: 0 auto;
}
.prose h2 { margin-top: 2.4em; }
.prose h3 { margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; color: var(--ink-soft); }
.prose li { margin-bottom: .35em; }
.prose code {
  background: var(--surface);
  padding: .15em .4em;
  border-radius: 4px;
  font-size: .9em;
}
.prose .center { text-align: center; }

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  font-family: var(--font-sans);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
  font-weight: 600;
}
.footer-grid a {
  display: block;
  color: var(--ink-soft);
  font-size: .92rem;
  padding: .2rem 0;
  font-weight: 500;
}
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: .85rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  z-index: 100;
  display: none;
  font-size: .9rem;
}
.cookie-banner.show { display: block; }
.cookie-banner p { margin: 0 0 .8rem; }
.cookie-banner .row { display: flex; gap: .5rem; flex-wrap: wrap; }
.cookie-banner button { font-size: .85rem; padding: .55rem 1rem; }

/* Misc utilities */
.center { text-align: center; }
.muted { color: var(--muted); }
.divider {
  height: 1px; background: var(--line);
  margin: 2.5rem 0; border: none;
}

/* Form */
.field { display: block; margin-bottom: 1rem; }
.field label {
  display: block; font-size: .85rem; color: var(--ink-soft);
  margin-bottom: .35rem; font-weight: 500;
}
.field input, .field textarea {
  width: 100%; padding: .75rem .95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: inherit; font-size: .95rem;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 138, 0.18);
}

/* Light-theme override for prose-heavy pages (legal) — keep dark by default */

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
