/* =========================================================
   Ghety Studios — shared styles
   ========================================================= */
:root {
  --bg: #120e0b;
  --bg-raised: #1c1612;
  --bg-card: #231b15;
  --line: #3a2d22;
  --text: #efe6d8;
  --text-muted: #b8a993;
  --gold: #f2b632;
  --gold-light: #ffd774;
  --gold-dark: #b9801a;
  --red: #b3202a;
  --red-light: #d9343f;
  --red-text: #ef5a63; /* 5.7:1 on --bg, passes WCAG AA for small text */
  --focus: #ffd774;
  --radius: 14px;
  --maxw: 1160px;
  --font-display: "Cinzel Decorative", "Cinzel", Georgia, serif;
  --font-heading: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Alegreya Sans", "Gill Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .6em;
  letter-spacing: .03em;
}
.hero-intro h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; }
/* Gold foil text, used on key headings */
.hero-intro h1 span, .game-title {
  background: linear-gradient(180deg, #fff1c4 0%, var(--gold-light) 30%, var(--gold) 60%, var(--gold-dark) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--gold); color: #1a1208; padding: 8px 14px; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { left: 8px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 14, 11, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem;
  letter-spacing: .12em; color: var(--gold); text-decoration: none;
}
.brand small { color: var(--text); font-weight: 600; letter-spacing: .3em; font-size: .7rem; margin-left: 2px; }

.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text); text-decoration: none; font-family: var(--font-heading); font-size: .88rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 8px 12px; font: inherit; cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-raised); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 20px; border-bottom: 1px solid var(--line); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px; border-radius: 999px; font-family: var(--font-heading); font-weight: 700; font-size: .9rem;
  letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary {
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  color: #241605;
  box-shadow: 0 6px 22px rgba(242, 182, 50, .28);
}
.btn-primary:hover { color: #241605; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(242, 182, 50, .38); }
.btn-ghost { border-color: rgba(239, 230, 216, .35); color: var(--text); background: rgba(0,0,0,.25); }
.btn-ghost:hover { color: var(--gold-light); border-color: var(--gold); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-art { width: 100%; height: auto; max-height: 86vh; object-fit: cover; object-position: center 40%; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background: linear-gradient(to bottom, rgba(18,14,11,0), var(--bg));
  pointer-events: none;
}
.hero-intro { position: relative; z-index: 2; text-align: center; margin-top: -60px; padding-bottom: 40px; }
.hero-intro h1 {
  font-size: clamp(1.7rem, 4.4vw, 3rem); color: var(--text);
  text-shadow: 0 2px 18px rgba(0,0,0,.6);
}
.hero-intro h1 span { color: var(--gold); }
.hero-intro p { color: var(--text-muted); max-width: 640px; margin: 0 auto 1.6em; font-size: 1.1rem; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 760px) {
  .hero-intro { margin-top: -10px; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow {
  display: inline-block; font-family: var(--font-heading); font-weight: 600; font-size: .8rem; letter-spacing: .3em;
  color: var(--red-text); text-transform: uppercase; margin-bottom: 10px;
}
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.08rem; }

.divider {
  display: flex; align-items: center; gap: 14px; justify-content: center; margin: 0 auto 18px; color: var(--gold);
}
.divider::before, .divider::after { content: ""; height: 1px; width: 60px; background: linear-gradient(90deg, transparent, var(--gold-dark)); }
.divider::after { transform: scaleX(-1); }
.divider i { width: 24px; height: 27px; background: url("crest.svg") center / contain no-repeat; filter: drop-shadow(0 0 6px rgba(242, 182, 50, .35)); }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; position: relative;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7;
}
.card p { color: var(--text-muted); margin: 0; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(242, 182, 50, .1); border: 1px solid rgba(242, 182, 50, .3); color: var(--gold);
}
.card-icon svg { width: 24px; height: 24px; }

/* About split */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.split-art { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.split-art img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 70% 0; }
.stats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 28px; }
.stat strong { display: block; font-family: var(--font-heading); color: var(--gold); font-size: 1.5rem; }
.stat span { color: var(--text-muted); font-size: .9rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 36px; } }

/* Game teaser */
.game-teaser {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  min-height: 380px; display: flex; align-items: center;
  background: radial-gradient(ellipse at 20% 50%, rgba(179, 32, 42, .22), transparent 65%), var(--bg-card);
}
.game-teaser img {
  position: absolute; top: 0; right: 0; height: 100%; width: 42%; object-fit: cover; object-position: 50% 35%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 45%);
          mask-image: linear-gradient(to right, transparent, #000 45%);
}
.game-teaser-body { position: relative; padding: 48px; max-width: 620px; }
@media (max-width: 700px) {
  .game-teaser { flex-direction: column; align-items: stretch; }
  .game-teaser img { position: static; width: 100%; height: 240px; object-position: 50% 30%;
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
}
.badge {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; background: var(--red); color: #fff; margin-bottom: 14px;
}
.game-teaser-body p { color: var(--text); opacity: .9; }
@media (max-width: 600px) { .game-teaser-body { padding: 26px; } }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 0 22px; }
.faq details[open] { border-color: rgba(242, 182, 50, .45); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 1.1rem;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.5rem; line-height: 1; flex-shrink: 0; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-muted); margin: 0 0 18px; }

/* Contact */
.contact-card { display: flex; flex-direction: column; gap: 6px; }
.contact-card h3 { margin-bottom: 4px; }
.contact-card .email {
  font-size: 1.15rem; font-weight: 600; word-break: break-all; margin-top: 12px;
}
.contact-card ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-muted); }
.contact-note { margin-top: 28px; color: var(--text-muted); font-size: .95rem; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: #0c0907; border-top: 1px solid var(--line); padding: 64px 0 28px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h4 { font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); text-decoration: underline; }
.footer-company { color: var(--text-muted); }
.footer-company p { margin: 0 0 4px; }
.footer-bottom {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #8c7d68; font-size: .85rem;
}
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Legal pages ---------- */
.legal-hero { padding: 72px 0 36px; border-bottom: 1px solid var(--line); background:
  radial-gradient(ellipse at top, rgba(179, 32, 42, .18), transparent 60%), var(--bg); }
.legal-hero h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--gold); }
.legal-hero p { color: var(--text-muted); margin: 0; }

.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 56px 20px 96px; }
.legal > * { min-width: 0; }
.legal-body { overflow-wrap: break-word; }
.legal-body table:has(thead) { min-width: 560px; } /* wide data tables scroll inside .table-wrap on phones */
.legal-toc { position: sticky; top: 92px; align-self: start; font-size: .92rem; }
.legal-toc h2 { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.legal-toc ol { margin: 0; padding-left: 0; list-style: none; color: var(--text-muted); }
.legal-toc li { margin-bottom: 6px; }
.legal-toc a { color: var(--text-muted); text-decoration: none; }
.legal-toc a:hover { color: var(--gold-light); }

.legal-body { max-width: 760px; }
.legal-body h2 { font-family: var(--font-heading); font-size: 1.45rem; margin-top: 2.2em; padding-top: .4em; color: var(--gold-light); scroll-margin-top: 90px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.12rem; margin-top: 1.6em; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
.legal-body ul, .legal-body ol { padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: .94rem; }
.legal-body th, .legal-body td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.legal-body th { background: var(--bg-card); color: var(--gold); font-weight: 600; }
.table-wrap { overflow-x: auto; }

.notice {
  background: rgba(242, 182, 50, .07); border: 1px solid rgba(242, 182, 50, .35); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 16px 18px; margin-bottom: 2em; font-size: .95rem; color: var(--text);
}
.notice strong { color: var(--gold); }

/* Placeholder marker — replace every one of these before going live */
.ph { background: rgba(217, 52, 63, .18); color: #ffb3b8; border: 1px dashed rgba(217, 52, 63, .7); border-radius: 4px; padding: 0 5px; font-style: normal; }

@media (max-width: 900px) {
  .legal { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .legal-toc { position: static; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
}

.breadcrumb { font-size: .9rem; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb [aria-current] { color: var(--text); }
.legal-body .caps { font-size: .92rem; letter-spacing: .01em; line-height: 1.6; }
.legal-body .notice p:last-child { margin-bottom: 0; }

/* 404 page */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px 20px; }
.error-page .code { font-family: var(--font-display); font-size: clamp(4rem, 14vw, 8rem); color: var(--gold); line-height: 1; margin: 0; }
.error-page p { color: var(--text-muted); max-width: 520px; margin: 0 auto 1.6em; }

/* Brand crest (replaces the old gem) */
.brand-crest { width: 30px; height: 34px; filter: drop-shadow(0 0 6px rgba(242, 182, 50, .35)); }

/* ---------- Project M: featured game ---------- */
.nav-highlight { color: var(--gold) !important; }

.now-forging {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  padding: 8px 18px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-heading); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); background: rgba(18, 14, 11, .7); border: 1px solid rgba(242, 182, 50, .55);
  box-shadow: 0 0 24px rgba(242, 182, 50, .18);
}
.now-forging strong { color: var(--gold); }
.now-forging:hover { color: var(--gold-light); border-color: var(--gold); }
.hero-intro .eyebrow { display: block; }

.pulse { width: 9px; height: 9px; border-radius: 50%; background: #ff5a63; box-shadow: 0 0 0 0 rgba(255, 90, 99, .7); animation: pulse 1.8s infinite; flex-shrink: 0; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 90, 99, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 99, 0); } }

.featured {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(242, 182, 50, .10), transparent 55%),
    radial-gradient(ellipse at 20% 100%, rgba(179, 32, 42, .18), transparent 60%),
    var(--bg-raised);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.game-feature {
  position: relative; overflow: hidden; border-radius: 20px; min-height: 520px;
  display: flex; align-items: center;
  background: linear-gradient(100deg, #1a120d 0%, #241812 50%, #2a1410 100%);
  border: 1px solid rgba(242, 182, 50, .5);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 30px 80px rgba(0,0,0,.55), 0 0 60px rgba(242, 182, 50, .12);
}
.game-feature-art {
  position: absolute; top: 0; right: 0; height: 100%; width: 48%; object-fit: cover; object-position: 50% 30%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40%);
          mask-image: linear-gradient(to right, transparent, #000 40%);
}
.game-watermark {
  position: absolute; left: -2%; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 900; font-size: 34rem; line-height: 1;
  color: rgba(242, 182, 50, .05); pointer-events: none; user-select: none;
}
.game-feature-body { position: relative; padding: 56px; max-width: 700px; }
.badge-live { display: inline-flex; align-items: center; gap: 8px; background: rgba(179, 32, 42, .9); }
.badge-live .pulse { background: #fff; animation-name: pulse-white; }
@keyframes pulse-white { 70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.game-title {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(2.5rem, 7vw, 4.6rem);
  line-height: 1.05; letter-spacing: .02em; margin: 8px 0 12px; white-space: nowrap;
  filter: drop-shadow(0 4px 18px rgba(242, 182, 50, .35));
}
.game-tagline { font-family: var(--font-heading); font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 16px; }
.game-feature-body > p:not(.game-tagline) { color: var(--text-muted); }
.game-meta { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.game-meta li {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 18px 10px 14px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(242, 182, 50, .14), rgba(20, 13, 9, .75) 55%);
  border: 1px solid rgba(242, 182, 50, .5);
  box-shadow: inset 0 1px 0 rgba(255, 233, 168, .25), inset 0 0 0 3px rgba(0, 0, 0, .35), 0 8px 22px rgba(0, 0, 0, .35);
}
/* small gold studs in the corners, like a forged plaque */
.game-meta li::before, .game-meta li::after {
  content: ""; position: absolute; top: 6px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 4px rgba(242, 182, 50, .8); opacity: .8;
}
.game-meta li::before { left: 6px; }
.game-meta li::after { right: 6px; }
.meta-icon {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  color: #2a1606;
  background: radial-gradient(circle at 35% 30%, #fff1c4, var(--gold) 55%, var(--gold-dark));
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 0 14px rgba(242, 182, 50, .35);
}
.meta-icon svg { width: 21px; height: 21px; }
.meta-label { display: block; font-family: var(--font-heading); font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.game-meta strong { display: block; font-family: var(--font-heading); font-weight: 700; font-size: .98rem; margin-top: 2px; letter-spacing: .03em; color: #fff1c4; }
.game-cta { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .game-feature { flex-direction: column; align-items: stretch; min-height: 0; }
  .game-feature-art { position: static; width: 100%; height: 280px; object-position: 50% 25%;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
  .game-feature-body { padding: 4px 24px 32px; margin-top: -40px; }
  .game-watermark { font-size: 20rem; top: auto; bottom: -40px; transform: none; }
}

@media (max-width: 520px) {
  .game-meta { grid-template-columns: 1fr; }
  .game-meta li { flex-direction: row; text-align: left; padding: 12px 16px 12px 12px; gap: 12px; }
}
