/* LMPlay - shared stylesheet */
:root {
  --bg: #0c0a1a;
  --bg-2: #120f26;
  --surface: #1a1634;
  --surface-2: #231e44;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f3f1ff;
  --muted: #b7b2d6;
  --pink: #ff4fa8;
  --cyan: #36d6ff;
  --yellow: #ffd23a;
  --green: #3ee08f;
  --orange: #ff9a3c;
  --accent: var(--pink);
  --accent-2: var(--cyan);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font-head: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
  --gutter: 16px;
  color-scheme: dark;
}

/* Per-game accents */
.theme-sabores { --accent: #ffb02e; --accent-2: #2ee6d6; }
.theme-neon { --accent: #ff4fa8; --accent-2: #36d6ff; }
.theme-bastion { --accent: #e3a857; --accent-2: #7fd1c7; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 79, 168, 0.14), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(54, 214, 255, 0.12), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; letter-spacing: 0.2px; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--yellow); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 10, 26, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 1.55rem; }
.logo img { width: 34px; height: 34px; }
.logo span b { background: linear-gradient(90deg, var(--pink), var(--yellow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
.site-nav { position: absolute; top: 66px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); display: none; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 16px; }
.site-nav a { display: block; padding: 12px 6px; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--yellow); }
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: block; background: none; border: 0; }
  .site-nav ul { display: flex; gap: 6px; padding: 0; }
  .site-nav a { border: 0; padding: 8px 14px; border-radius: 999px; }
  .site-nav a:hover { background: var(--surface); }
}

/* Buttons and badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: linear-gradient(135deg, var(--pink), #ff7a59); color: #fff; box-shadow: 0 10px 28px rgba(255, 79, 168, 0.35); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(255, 79, 168, 0.5); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.btn-soon { background: rgba(255, 255, 255, 0.05); color: var(--muted); border: 1px dashed rgba(255, 255, 255, 0.25); cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.3px; }
.badge-dev { background: rgba(255, 210, 58, 0.14); color: var(--yellow); border: 1px solid rgba(255, 210, 58, 0.35); }
.badge-dev::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 10px var(--yellow); animation: pulse 1.8s ease-in-out infinite; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; background: rgba(255, 255, 255, 0.07); color: var(--muted); border: 1px solid var(--line); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.eyebrow { display: inline-block; font-weight: 800; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-2); margin-bottom: 10px; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* Home hero */
.hero { padding: 56px 0 64px; position: relative; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } .hero { padding: 88px 0 96px; } }
.hero h1 .grad { background: linear-gradient(90deg, var(--pink), var(--yellow) 55%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { max-width: 560px; margin-bottom: 28px; }
.hero-art { position: relative; height: 440px; max-width: 520px; width: 100%; margin: 0 auto; }
.hero-art .phone, .hero-art .pc { position: absolute; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); border: 3px solid rgba(255, 255, 255, 0.12); background: #000; }
.hero-art .phone { width: 42%; aspect-ratio: 9 / 16; }
.hero-art .phone img, .hero-art .pc img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .p1 { left: 2%; top: 30px; transform: rotate(-8deg); z-index: 2; }
.hero-art .p2 { right: 2%; top: 0; transform: rotate(7deg); z-index: 1; }
.hero-art .pc { width: 78%; aspect-ratio: 16 / 9; left: 11%; bottom: 0; z-index: 3; border-radius: 14px; }
.hero-art::before { content: ""; position: absolute; inset: 10% 5%; background: radial-gradient(circle, rgba(255, 79, 168, 0.35), transparent 65%); filter: blur(30px); }
@media (max-width: 480px) { .hero-art { height: 360px; } }
.floaty { animation: floaty 6s ease-in-out infinite; }
.hero-art .p2.floaty { animation-delay: -2s; }
@keyframes floaty { 50% { translate: 0 -10px; } }

/* Game cards */
.cards { display: grid; gap: 24px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-media img { transform: scale(1.06); }
.card-media .badge { position: absolute; top: 14px; left: 14px; backdrop-filter: blur(6px); background: rgba(12, 10, 26, 0.7); }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.5rem; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; }
.card-body p { color: var(--muted); margin: 0; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.card-cta { color: var(--accent); font-weight: 700; font-family: var(--font-head); }

/* Feature grid */
.features { display: grid; gap: 18px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform 0.2s ease, border-color 0.2s ease; }
.feature:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.feature .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: color-mix(in srgb, var(--accent) 18%, transparent); margin-bottom: 12px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* Roadmap */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.timeline > li { position: relative; padding: 22px 22px 22px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-left: 4px solid var(--accent); }
.timeline > li.t-sabores { --accent: #ffb02e; }
.timeline > li.t-neon { --accent: #ff4fa8; }
.timeline > li.t-bastion { --accent: #e3a857; }
.timeline h3 { margin-bottom: 4px; }
.timeline ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.timeline .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }

/* Studio values */
.values { display: grid; gap: 18px; }
@media (min-width: 760px) { .values { grid-template-columns: repeat(4, 1fr); } }

/* Contact block */
.contact-box { background: linear-gradient(135deg, rgba(255, 79, 168, 0.18), rgba(54, 214, 255, 0.14)); border: 1px solid var(--line); border-radius: 28px; padding: 40px 24px; text-align: center; }
.contact-box .mail { font-family: var(--font-head); font-size: clamp(1.3rem, 5vw, 2.2rem); font-weight: 600; color: #fff; word-break: break-word; }

/* Game page hero */
.game-hero { position: relative; padding: 56px 0 48px; overflow: hidden; }
.game-hero .bg { position: absolute; inset: 0; z-index: -1; }
.game-hero .bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(22px) brightness(0.45) saturate(1.2); transform: scale(1.15); }
.game-hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 10, 26, 0.2), var(--bg)); }
.game-hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .game-hero-grid { grid-template-columns: 1.2fr 1fr; } .game-hero { padding: 80px 0 72px; } }
.game-hero .tagline { font-size: 1.2rem; color: #e6e2ff; max-width: 600px; }
.game-hero .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.game-shot { justify-self: center; width: min(300px, 78vw); border-radius: 26px; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.14); box-shadow: var(--shadow); }
.game-shot.wide { width: 100%; max-width: 560px; border-radius: 16px; }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.soon-note { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* Prose */
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--yellow); font-weight: 700; }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 1.2em; }
.callout p:last-child { margin: 0; }

/* Spec sheet */
.spec { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 640px) { .spec { grid-template-columns: repeat(2, 1fr); } }
.spec div { background: var(--surface); padding: 16px 20px; }
.spec dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-weight: 700; }
.spec dd { margin: 4px 0 0; font-weight: 600; }

/* Gallery */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(62%, 260px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-color: var(--surface-2) transparent; }
.gallery.wide { grid-auto-columns: min(86%, 520px); }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: start; border-radius: 16px; overflow: hidden; border: 2px solid var(--line); transition: transform 0.2s ease, border-color 0.2s ease; }
.gallery button:hover { transform: translateY(-3px); border-color: var(--accent); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
.gallery.wide img { aspect-ratio: 16 / 9; }
.gallery figcaption { font-size: 0.85rem; color: var(--muted); padding: 8px 10px; text-align: left; background: var(--surface); }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
dialog.lightbox::backdrop { background: rgba(5, 4, 12, 0.88); }
dialog.lightbox img { max-width: 96vw; max-height: 86vh; width: auto; border-radius: 14px; }
dialog.lightbox p { color: #fff; text-align: center; margin: 10px 0 0; }
dialog.lightbox .close { position: fixed; top: 14px; right: 14px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 1.6rem; cursor: pointer; }

/* Two-column layout helper */
.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 1.3fr 1fr; align-items: start; } }

.legal-links { display: grid; gap: 14px; }
@media (min-width: 640px) { .legal-links { grid-template-columns: repeat(2, 1fr); } }
.legal-links a { display: block; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; transition: border-color 0.2s ease, transform 0.2s ease; }
.legal-links a:hover { border-color: var(--accent); transform: translateY(-2px); }
.legal-links a small { display: block; color: var(--muted); font-weight: 400; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 48px 0 32px; margin-top: 40px; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }

/* Reveal on scroll (only when JS adds .js) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

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

/* Spacing refinements */
.prose > .eyebrow + h2 { margin-top: 0; }
@media (max-width: 719px) { section { padding: 52px 0; } .hero { padding: 40px 0 48px; } }
@media (min-width: 900px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); overflow: visible; }
  .gallery.wide { grid-template-columns: repeat(3, 1fr); }
}
