/*
Theme Name: GM Sims Store
Description: The GM Sims sales and download site, in the games' own look: a night stadium, glowing panels and chrome titles. Made for the GM Sims Store plugin (products, license keys, downloads); its pages work as an ordinary site too.
Version: 1.0.1
Author: GM Sims
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: gms-store-theme
*/

:root {
  --bg: #05080e; --bg2: #0a111b; --panel: #0d1622; --panel2: #111c2b; --line: #1d2b3d; --glow: #38bdf8; --glow-soft: rgba(56,189,248,.35);
  --red: #e5484d; --ink: #e9eef4; --dim: #9fb0c3; --mute: #6c7d91; --accent: #38bdf8; --ok: #3fb950;
  --chrome: linear-gradient(180deg, #ffffff 0%, #dfe6ee 38%, #8c99a8 52%, #e8edf3 70%, #b9c4cf 100%);
  --head: "Bahnschrift", "Bahnschrift SemiBold", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", system-ui, sans-serif;
  --body: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, Consolas, "SF Mono", monospace;
  --wrap: 1180px; --r: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body);
  background-image: radial-gradient(1200px 500px at 50% -120px, rgba(56,189,248,.16), transparent 70%), radial-gradient(900px 400px at 100% 0, rgba(229,72,77,.08), transparent 70%); background-repeat: no-repeat; }
a { color: var(--glow); }
a:hover { color: #7dd3fc; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; z-index: 1000; width: auto; height: auto; clip: auto; background: var(--panel); padding: 10px 14px; border-radius: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* type */
h1, h2, h3, .chrome, .gms-card-title { font-family: var(--head); letter-spacing: .02em; line-height: 1.1; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); margin: .2em 0 .25em; font-weight: 800; text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 1.6em 0 .6em; font-weight: 700; text-transform: uppercase; }
h3 { font-size: 1.25rem; margin: 1.2em 0 .4em; font-weight: 700; }
.chrome { background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,.55)) drop-shadow(0 0 18px rgba(56,189,248,.25)); }
.kicker { font-family: var(--head); text-transform: uppercase; letter-spacing: .22em; font-size: .8rem; color: var(--glow); }
.lead { font-size: 1.15rem; color: var(--dim); max-width: 760px; }
.dim { color: var(--dim); } .small { font-size: .88rem; }

/* header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(5,8,14,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 22px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font: 800 15px var(--head); color: #fff; background: linear-gradient(135deg, #0e2a44, #08121d); border: 1px solid var(--glow-soft); box-shadow: 0 0 14px rgba(56,189,248,.25) inset; }
.brand-name { font: 800 1.25rem var(--head); text-transform: uppercase; letter-spacing: .08em; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font: 600 .95rem var(--head); text-transform: uppercase; letter-spacing: .08em; }
.nav a:hover, .nav .current-menu-item > a { background: var(--panel2); color: #fff; }
.nav .menu-cta > a { background: var(--red); color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: 600 .9rem var(--head); text-transform: uppercase; letter-spacing: .1em; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 66px; background: var(--bg2); border-bottom: 1px solid var(--line); padding: 10px 22px 16px; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; }
}

/* buttons */
.btn, .gms-btn, .wp-block-button__link, button.gms-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: .7em 1.3em; border-radius: 9px; border: 1px solid transparent; cursor: pointer;
  font: 700 .95rem var(--head); text-transform: uppercase; letter-spacing: .1em; text-decoration: none; color: #fff !important;
  background: linear-gradient(180deg, #1e7fd6, #0f4f8f); box-shadow: 0 0 0 1px rgba(56,189,248,.45) inset, 0 6px 20px rgba(14,90,160,.35); }
.btn:hover, .gms-btn:hover { filter: brightness(1.12); }
.btn-red { background: linear-gradient(180deg, #ef5a5f, #b5262b); box-shadow: 0 0 0 1px rgba(255,140,140,.4) inset, 0 6px 20px rgba(181,38,43,.35); }
.btn-ghost, .gms-btn-ghost { background: transparent; box-shadow: 0 0 0 1px var(--line) inset; }
.btn-big, .gms-btn-big { font-size: 1.05rem; padding: .85em 1.6em; }

/* HUD panels, like the games' title screens */
.panel { position: relative; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); padding: 22px;
  box-shadow: 0 0 0 1px rgba(56,189,248,.06) inset, 0 20px 40px rgba(0,0,0,.35); }
.panel::before { content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .8; border-radius: 2px; }
.panel-title { font: 700 .82rem var(--head); text-transform: uppercase; letter-spacing: .2em; color: var(--accent); margin: 0 0 12px; }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-art { position: absolute; inset: 0; background-size: cover; background-position: center top; opacity: .55; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,8,14,.15) 0%, rgba(5,8,14,.55) 55%, var(--bg) 100%); }
.hero .wrap { position: relative; padding: 90px 22px 70px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: absolute; inset: 0; opacity: .55; }
.hero-tiles div { background-size: cover; background-position: center top; }
.hero-lights { opacity: .7; background-size: cover; background-position: center top; }
.bundle-band { position: relative; display: block; margin-top: 22px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.bundle-band img { display: block; width: 100%; height: 300px; object-fit: cover; opacity: .55; }
.bundle-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,8,14,.95) 0%, rgba(5,8,14,.7) 45%, rgba(5,8,14,.1) 100%); }
.bundle-text { position: absolute; z-index: 1; left: 32px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; max-width: 520px; align-items: flex-start; }
.bundle-title { font: 800 clamp(1.6rem, 3vw, 2.4rem) var(--head); text-transform: uppercase; }
.bundle-band:hover { box-shadow: 0 0 0 1px #f5b301, 0 16px 34px rgba(0,0,0,.45); }
@media (max-width: 820px) { .bundle-band img { height: 340px; } .bundle-text { left: 18px; right: 18px; } }
@media (max-width: 820px) { .hero .wrap { padding: 60px 22px 46px; } .hero-tiles { grid-template-columns: repeat(2, 1fr); } }

/* game tiles on the home page */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: -40px auto 0; position: relative; z-index: 2; }
.tile { display: block; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--tile-accent, var(--glow)), 0 14px 34px rgba(0,0,0,.5); color: #fff; }
.tile img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.tile span { display: block; padding: 10px 12px; font: 700 1rem var(--head); text-transform: uppercase; letter-spacing: .08em; border-top: 2px solid var(--tile-accent, var(--glow)); }
@media (max-width: 820px) { .tiles { grid-template-columns: repeat(2, 1fr); } }

/* sections */
.section { padding: 56px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(13,22,34,.6), transparent); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) { .grid3, .grid2 { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; margin-bottom: 10px; font: 800 1rem var(--head); color: #fff; background: linear-gradient(180deg, #1e7fd6, #0f4f8f); box-shadow: 0 0 12px var(--glow-soft); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr 1fr; } }

/* product cards (the plugin's [gms_products]) */
.gms-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 1.2em 0; }
.gms-card { --gms-accent: var(--glow); display: flex; flex-direction: column; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.gms-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--gms-accent), 0 16px 34px rgba(0,0,0,.45); }
.gms-card-art img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.gms-card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; border-top: 2px solid var(--gms-accent); }
.gms-card-title { margin: 0; font-size: 1.35rem; text-transform: uppercase; } .gms-card-title a { color: var(--ink); text-decoration: none; }
.gms-card-tag { margin: 0; color: var(--dim); } .gms-card-meta { margin: 0; font-size: .82rem; color: var(--mute); }
.gms-card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; }
.gms-price { font: 800 1.3rem var(--head); color: #fff; } .gms-price-big { font-size: 2.2rem; }

/* product page */
.product-hero { position: relative; border-bottom: 1px solid var(--line); }
.art-band { position: relative; max-height: 460px; overflow: hidden; }
.art-band img { display: block; width: 100%; height: 460px; object-fit: cover; object-position: center top; }
.art-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,8,14,0) 45%, rgba(5,8,14,.85) 82%, var(--bg) 100%); }
.product-hero .wrap { position: relative; margin-top: -120px; padding: 0 22px 34px; }
@media (max-width: 820px) { .art-band img { height: 260px; } .product-hero .wrap { margin-top: -70px; } }
.product-hero .meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.chip { font: 600 .78rem var(--head); text-transform: uppercase; letter-spacing: .12em; padding: 4px 10px; border-radius: 30px; border: 1px solid var(--line); color: var(--dim); background: rgba(13,22,34,.7); }
.product-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; padding: 20px 0 60px; }
.product-body .side { position: sticky; top: 86px; }
@media (max-width: 960px) { .product-body { grid-template-columns: 1fr; } .product-body .side { position: static; } }
.writeup { font-size: 1.06rem; } .writeup p { color: #d6dee7; }
.gms-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.gms-list li { position: relative; padding: 10px 12px 10px 38px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.gms-list li::before { content: ""; position: absolute; left: 14px; top: 17px; width: 10px; height: 10px; border-radius: 2px; transform: rotate(45deg); background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.spec-list { list-style: none; padding: 0; margin: 0; } .spec-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); color: #d6dee7; }
.gms-buybox { margin: 0; } .gms-buy-what { color: var(--dim); } .gms-buy-after { font-size: .9rem; color: var(--dim); margin: 16px 0 8px; }

/* forms */
.gms-form label, .search-form label { display: block; font: 600 .78rem var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=search], input:not([type]), textarea, select { width: 100%; background: #070c14; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: .65em .8em; font: inherit; }
input:focus, textarea:focus, select:focus { border-color: var(--glow); outline: none; box-shadow: 0 0 0 3px rgba(56,189,248,.18); }
.gms-form p { margin: 0 0 12px; }
.gms-hp { position: absolute !important; left: -9999px; }
.gms-got { background: rgba(63,185,80,.08); border: 1px solid rgba(63,185,80,.4); border-radius: 10px; padding: 14px 16px; }
.gms-error { color: #ff8b8f; }
.gms-key { font: 700 1.25rem var(--mono); letter-spacing: .08em; color: #fff; background: #070c14; border: 1px solid var(--glow-soft); box-shadow: 0 0 16px rgba(56,189,248,.18) inset; padding: .5em .8em; border-radius: 8px; display: inline-block; }
.gms-key-label { margin-bottom: 4px; color: var(--dim); }
.gms-downloads h3 { margin-top: 1.6em; } .gms-small { color: var(--dim); font-size: .88rem; }

/* pages */
.page-head { padding: 70px 0 10px; }
.content { padding-bottom: 60px; } .content > * { max-width: 860px; }
.content .alignwide, .content .gms-cards, .content .gms-details { max-width: none; }
.entry-content blockquote { border-left: 3px solid var(--accent); margin: 1em 0; padding: .2em 1em; color: var(--dim); }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--bg2); padding: 36px 0; color: var(--mute); font-size: .9rem; }
.site-foot .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.site-foot a { color: var(--dim); text-decoration: none; } .site-foot a:hover { color: #fff; }

/* the bundle's page: the four games side by side, over the stadium lights */
.bundle-hero .wrap { margin-top: 0; padding: 56px 22px 34px; }
.bundle-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.bundle-row img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 14px 30px rgba(0,0,0,.5); }
@media (max-width: 820px) { .bundle-row { grid-template-columns: repeat(2, 1fr); gap: 10px; } .bundle-hero .wrap { padding-top: 34px; } }
