/* ============================================================
   MF Gaming — mfgaming.gg
   Palette borrowed from KNELL's art direction:
   near-black, bone, umber, candle-orange, vigil-green.
   ============================================================ */

:root {
  --void:        #0B0A0F;
  --void-2:      #100E17;
  --panel:       #16131f;
  --panel-2:     #1c1826;
  --bone:        #E6DFD2;
  --bone-dim:    #b3aa97;
  --ash:         #837b6c;
  --umber:       #8A7A5C;
  --candle:      #E8A33D;
  --candle-dim:  #b57e2f;
  --vigil:       #8FBF9F;
  --line:        rgba(138, 122, 92, 0.25);

  --font-display: "IM Fell English", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  --max-width: 1080px;
  --max-narrow: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--bone-dim);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(232, 163, 61, 0.35); color: var(--bone); }

/* ------------------------------------------------------------
   Atmosphere overlays: film grain + vignette
   ------------------------------------------------------------ */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 1.5%); }
  50%  { transform: translate(1.5%, -1%); }
  75%  { transform: translate(-1%, -2%); }
  100% { transform: translate(0, 0); }
}

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

/* ------------------------------------------------------------
   Header / nav
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(11, 10, 15, 0.88);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.brand-mark { color: var(--candle); font-size: 1.1rem; }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.nav-links a:hover { color: var(--candle); }

.nav-links a.nav-knell {
  color: var(--candle);
  border-bottom: 1px solid rgba(232, 163, 61, 0.4);
  padding-bottom: 2px;
}

.nav-links a.nav-knell:hover { color: var(--bone); border-bottom-color: var(--bone); }

/* ------------------------------------------------------------
   Sections & typography
   ------------------------------------------------------------ */
main { position: relative; z-index: 1; }

section { position: relative; padding: 7rem 1.5rem; }

.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-inner.narrow { max-width: var(--max-narrow); }

.section-kicker {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--vigil);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  color: var(--bone);
  line-height: 1.2;
  margin-bottom: 1.75rem;
}

h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--bone);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

em { font-style: italic; }
strong { color: var(--bone); font-weight: 500; }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 8rem;
}

.hero-game { min-height: 88svh; }

.candle-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: min(80vw, 900px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
              rgba(232, 163, 61, 0.10) 0%,
              rgba(232, 163, 61, 0.045) 35%,
              transparent 70%);
  pointer-events: none;
  animation: flicker 6s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  18%      { opacity: 0.82; }
  22%      { opacity: 0.95; }
  47%      { opacity: 0.86; }
  53%      { opacity: 1; }
  71%      { opacity: 0.78; }
  76%      { opacity: 0.94; }
}

.hero-inner { max-width: 780px; position: relative; }

.hero-kicker {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--vigil);
  margin-bottom: 1.4rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  color: var(--bone);
  line-height: 1.1;
  margin-bottom: 1.6rem;
  text-shadow: 0 0 60px rgba(232, 163, 61, 0.18);
}

.game-hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4rem, 14vw, 8.5rem);
  letter-spacing: 0.12em;
  color: var(--bone);
  line-height: 1;
  margin: 0.5rem 0 1.6rem;
  text-shadow: 0 0 80px rgba(232, 163, 61, 0.3);
  cursor: pointer;
  user-select: none;
  transition: text-shadow 0.4s ease;
}

.game-hero-title:hover { text-shadow: 0 0 90px rgba(232, 163, 61, 0.5); }

.game-hero-title.tolling { animation: toll-sway 1.1s ease-in-out; }

@keyframes toll-sway {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-1.6deg); }
  45%  { transform: rotate(1.2deg); }
  70%  { transform: rotate(-0.6deg); }
  100% { transform: rotate(0deg); }
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--bone-dim);
  max-width: 620px;
  margin: 0 auto 2.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
}

.hero-actions.center { justify-content: center; }

.scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 38px;
  border: 1px solid var(--umber);
  border-radius: 12px;
  opacity: 0.6;
}

.scroll-hint span {
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--candle);
  animation: scroll-drop 2.2s ease-in-out infinite;
}

@keyframes scroll-drop {
  0%   { transform: translateY(0);   opacity: 1; }
  60%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 0; }
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 0.8rem 1.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.btn-candle {
  color: var(--void);
  background: var(--candle);
  border: 1px solid var(--candle);
  box-shadow: 0 0 24px rgba(232, 163, 61, 0.25);
}

.btn-candle:hover {
  background: var(--bone);
  border-color: var(--bone);
  box-shadow: 0 0 36px rgba(232, 163, 61, 0.45);
}

.btn-ghost {
  color: var(--bone-dim);
  border: 1px solid var(--line);
  background: transparent;
}

.btn-ghost:hover { color: var(--bone); border-color: var(--umber); }

.wishlist-note {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
}

.wishlist-note.big { font-size: 0.9rem; color: var(--bone-dim); }

/* ------------------------------------------------------------
   Featured game (index)
   ------------------------------------------------------------ */
.featured {
  background: linear-gradient(180deg, var(--void) 0%, var(--void-2) 50%, var(--void) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.featured-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 3fr;
  gap: 4rem;
  align-items: center;
  margin-top: 2rem;
}

.featured-art { display: flex; justify-content: center; }

.bell-svg { width: min(100%, 340px); height: auto; }

.bell-body { transform-origin: 100px 34px; animation: bell-sway 7s ease-in-out infinite; }

@keyframes bell-sway {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(2.2deg); }
}

.bell-waves { animation: flicker 6s ease-in-out infinite; }

.game-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4rem);
  letter-spacing: 0.14em;
  color: var(--bone);
  line-height: 1;
  text-shadow: 0 0 60px rgba(232, 163, 61, 0.25);
}

.game-tag {
  color: var(--candle);
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0.6rem 0 1.4rem;
}

.feature-list {
  list-style: none;
  margin: 1.6rem 0 2rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
}

.feature-list li::before {
  content: "†";
  position: absolute;
  left: 0;
  color: var(--vigil);
  font-family: var(--font-display);
}

/* Platforms */
.platform-row { margin: 1.8rem 0; }
.platform-row.center { display: flex; justify-content: center; }

.platform-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 0.8rem;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  list-style: none;
}

.platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(22, 19, 31, 0.6);
  color: var(--bone);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.platform:hover {
  border-color: rgba(232, 163, 61, 0.45);
  box-shadow: 0 0 20px rgba(232, 163, 61, 0.12);
}

.platform svg { width: 22px; height: 22px; color: var(--candle); margin-bottom: 0.25rem; }

.platform-sub { font-size: 0.68rem; color: var(--ash); letter-spacing: 0.08em; }
.platform-sub.price { color: var(--candle-dim); }

/* ------------------------------------------------------------
   Studio section
   ------------------------------------------------------------ */
.studio { text-align: center; }

.studio-copy p { margin-bottom: 1.2rem; max-width: 640px; margin-inline: auto; }

.tenets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 3.5rem;
  text-align: center;
}

.tenet {
  padding: 2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(22, 19, 31, 0.45);
}

.tenet-mark { display: block; margin-bottom: 0.8rem; }

.tenet p { font-size: 0.95rem; color: var(--ash); }

/* ------------------------------------------------------------
   Contact
   ------------------------------------------------------------ */
.contact {
  text-align: center;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--void) 0%, var(--void-2) 100%);
}

.contact-copy { max-width: 520px; margin: 0 auto 2rem; }

/* ------------------------------------------------------------
   KNELL page
   ------------------------------------------------------------ */
.premise { padding-top: 2rem; }

.premise-copy .drop-cap::first-letter {
  font-family: var(--font-display);
  font-size: 3.4em;
  float: left;
  line-height: 0.85;
  padding: 0.05em 0.12em 0 0;
  color: var(--candle);
}

.premise-copy p { font-size: 1.15rem; }

.features {
  background: linear-gradient(180deg, var(--void) 0%, var(--void-2) 50%, var(--void) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.card {
  padding: 2rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(22, 19, 31, 0.55);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.card:hover {
  border-color: rgba(143, 191, 159, 0.35);
  transform: translateY(-3px);
}

.card-mark { display: block; margin-bottom: 0.9rem; }

.card-mark svg,
.tenet-mark svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--candle);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.tenet-mark svg { margin-inline: auto; }

.card-mark svg .filled { fill: var(--candle); stroke: none; }

.card p { font-size: 0.95rem; color: var(--ash); }

/* Roster */
.roster-intro { margin-bottom: 2rem; }

.roster-list { list-style: none; }

.roster-list li {
  padding: 1rem 0 1rem 1.8rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 1rem;
  color: var(--ash);
}

.roster-list li:first-child { border-top: 1px solid var(--line); }

.roster-list li::before {
  content: "☠";
  position: absolute;
  left: 0;
  color: var(--umber);
  font-size: 0.9rem;
}

/* Fair play */
.fairplay {
  background: linear-gradient(180deg, var(--void) 0%, var(--void-2) 100%);
  border-top: 1px solid var(--line);
}

.fairplay-copy { margin-bottom: 2rem; }

.promise-list { list-style: none; }

.promise-list li {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.55rem 0;
  color: var(--bone-dim);
}

.promise-list li span { font-weight: 600; color: var(--umber); }
.promise-list li:last-child span { color: var(--vigil); }

/* Platforms CTA */
.platforms-cta { text-align: center; border-top: 1px solid var(--line); }

.cta-copy { max-width: 520px; margin: 2rem auto; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 1.5rem;
  text-align: center;
  background: var(--void-2);
  position: relative;
  z-index: 1;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--bone);
  margin-bottom: 0.4rem;
}

.footer-brand span { color: var(--candle); }

.footer-line { font-size: 0.85rem; color: var(--ash); margin-bottom: 1.2rem; }

.footer-legal { font-size: 0.75rem; color: rgba(131, 123, 108, 0.55); }

/* ------------------------------------------------------------
   Reveal-on-scroll
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ------------------------------------------------------------
   Reduced motion & responsive
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .candle-glow, .bell-body, .bell-waves,
  .scroll-hint span, .game-hero-title.tolling { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 860px) {
  section { padding: 5rem 1.25rem; }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .featured-copy .feature-list { text-align: left; display: inline-block; }
  .featured-copy .platforms,
  .featured-copy .hero-actions { justify-content: center; }
  .platform-row .platforms { justify-content: center; }

  .feature-grid { grid-template-columns: 1fr 1fr; }
  .tenets { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav { padding: 1rem 1.25rem; }
  .nav-links { gap: 1.2rem; }
  .brand-name { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-sub { font-size: 1.05rem; }
}
