/* Sputnik Gamefarm — mobile-first, light mode. */
:root {
  --red: #C00808;
  --red-dark: #9a0606;
  --ink: #181818;
  --near: #101010;
  --bg: #FAFAFA;
  --white: #fff;
  --muted: #5c5c5c;
  --line: #e7e7e7;
  --pad: 20px;
  --radius: 16px;
  --header: 56px;
  --tabbar: 64px;
  --max: 720px;
  --shadow: 0 8px 28px rgba(16, 16, 16, 0.12);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (min-width: 768px) {
  :root { --pad: 32px; --max: 840px; --header: 64px; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6em; color: var(--ink); }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

.sg-skip {
  position: absolute; left: -999px; top: 0;
}
.sg-skip:focus { left: 8px; top: 8px; z-index: 100; background: var(--white); padding: 8px 12px; }

/* Header */
.sg-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 0 var(--pad);
  background: rgba(250,250,250,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.sg-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.sg-brand:hover { text-decoration: none; }
.sg-logo { width: 40px; height: 36px; object-fit: contain; flex: 0 0 auto; }
.sg-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.sg-brand-text strong { font-size: 1.02rem; letter-spacing: -0.03em; }
.sg-brand-text small { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.sg-nav-desk { display: none; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.sg-nav-desk a {
  color: var(--ink); font-size: 0.88rem; font-weight: 600;
  padding: 8px 10px; border-radius: 999px; text-decoration: none;
}
.sg-nav-desk a:hover, .sg-nav-desk a.is-active { background: #f0f0f0; }
.sg-nav-desk a.sg-nav-inquire {
  background: var(--red); color: var(--white); padding: 8px 14px; margin-left: 4px;
}
.sg-nav-desk a.sg-nav-inquire:hover { background: var(--red-dark); }

@media (min-width: 960px) {
  .sg-nav-desk { display: flex; }
}

/* Main */
.sg-main { padding-bottom: 8px; }
@media (min-width: 960px) {
  .sg-main { padding-bottom: 48px; }
}

/* Hero */
.sg-hero { position: relative; background: var(--near); color: var(--white); }
.sg-hero-img {
  width: 100%; height: min(78vw, 520px); object-fit: cover; object-position: center 30%;
}
.sg-hero-copy {
  padding: 22px var(--pad) 28px;
  background: linear-gradient(180deg, rgba(16,16,16,0) 0%, var(--near) 28px, var(--near) 100%);
  margin-top: -28px; position: relative;
}
.sg-hero .sg-eyebrow { color: #f3c7c7; }
.sg-hero .sg-tagline {
  color: var(--white); font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 800; letter-spacing: -0.04em; margin: 0 0 12px; line-height: 1.08;
}
.sg-hero .sg-lead { color: #ececec; }
@media (min-width: 900px) {
  .sg-hero {
    display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: stretch;
    max-width: 1200px; margin: 0 auto;
  }
  .sg-hero-img { height: 100%; min-height: 560px; margin: 0; }
  .sg-hero-copy {
    margin: 0; display: flex; flex-direction: column; justify-content: center;
    padding: 48px 48px 48px 40px; background: var(--near);
  }
}

.sg-eyebrow {
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--red); font-weight: 700; margin: 0 0 8px;
}
.sg-tagline { font-weight: 800; letter-spacing: -0.04em; }
.sg-lead { font-size: 1.05rem; color: #333; }
.sg-muted { color: var(--muted); }
/* Every main block except the full-bleed hero shares one centred column. */
.sg-main > *:not(.sg-hero) {
  width: min(calc(100% - (var(--pad) * 2)), var(--max));
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.sg-pagehead { padding: 28px 0 8px; }
.sg-section { padding: 8px 0 28px; }
.sg-pagehead, .sg-section, .sg-panel, .sg-contact-strip, .sg-form, #inquire-form {
  text-align: left;
}
.sg-actions, .sg-contact-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start;
}
.sg-actions { margin: 16px 0 0; }

/* Buttons */
.sg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; border: 0; cursor: pointer;
  text-decoration: none; font-family: inherit;
}
.sg-btn:hover { text-decoration: none; }
.sg-btn-primary { background: var(--red); color: var(--white); }
.sg-btn-primary:hover { background: var(--red-dark); color: var(--white); }
.sg-btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.sg-btn-ghost:hover { background: var(--ink); color: var(--white); }
.sg-hero .sg-btn-ghost { box-shadow: inset 0 0 0 1.5px #fff; color: #fff; }
.sg-hero .sg-btn-ghost:hover { background: #fff; color: var(--ink); }
.sg-btn-block { width: 100%; }

/* Cards / gallery */
.sg-cards { display: grid; gap: 10px; }
.sg-cards-2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .sg-cards-2 { grid-template-columns: repeat(2, 1fr); } }
.sg-cards-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .sg-cards-3 { grid-template-columns: repeat(3, 1fr); } }
.sg-cards-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 800px) { .sg-cards-4 { grid-template-columns: repeat(4, 1fr); } }
.sg-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; color: var(--ink); text-decoration: none;
  min-height: 108px; display: flex; flex-direction: column; gap: 6px;
}
.sg-card:hover { text-decoration: none; border-color: var(--red); box-shadow: var(--shadow); }
.sg-card strong { font-size: 1.02rem; }
.sg-card span { color: var(--muted); font-size: 0.88rem; }

.sg-gallery {
  display: flex; gap: 12px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding: 4px 0 12px; margin: 0 calc(var(--pad) * -1);
  padding-left: var(--pad); padding-right: var(--pad);
}
.sg-gallery-item {
  flex: 0 0 72%; max-width: 320px; margin: 0;
  scroll-snap-align: start; border-radius: var(--radius); overflow: hidden;
  background: #ddd; aspect-ratio: 2 / 3;
}
@media (min-width: 700px) { .sg-gallery-item { flex-basis: 240px; } }
.sg-gallery-img { width: 100%; height: 100%; object-fit: cover; }
.sg-banner { width: 100%; border-radius: var(--radius); overflow: hidden; }
.sg-media-link { display: block; }
.sg-media-link:hover { text-decoration: none; opacity: 0.96; }
.sg-figure { margin: 0 auto 20px; }
.sg-figure figcaption, .sg-about-photo figcaption {
  font-size: 0.88rem; color: var(--muted); margin-top: 8px;
}

/* Bloodlines */
.sg-lines { display: grid; gap: 10px; padding-bottom: 16px; }
.sg-line {
  display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px;
}
.sg-line h2 { font-size: 1.08rem; margin: 0 0 2px; }
.sg-line-body { min-width: 0; }
.sg-line .sg-actions { margin: 10px 0 0; gap: 8px; }
.sg-line .sg-btn { padding: 8px 14px; font-size: 0.9rem; }
.sg-panel h2 { font-size: 1.1rem; margin: 0 0 8px; }
.sg-line-ph {
  width: 72px; height: 72px; border-radius: 12px;
  background:
    linear-gradient(180deg, #f4f4f4, #ececec);
  position: relative;
}
.sg-line-ph::after {
  content: "";
  position: absolute; inset: 16px;
  background: url("../img/sputnik-gamefarm-logo-2025.webp") center / contain no-repeat;
  opacity: 0.28;
}

.sg-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 24px;
}
.sg-steps { padding-left: 1.3em; }
.sg-steps li, .sg-list li { margin: 0 0 0.6em; }
.sg-list { list-style: none; padding-left: 0; }
.sg-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sg-list li:last-child { border-bottom: 0; }

.sg-contact-strip { padding: 8px 0 32px; }
.sg-about-photo { margin: 0 auto 20px; max-width: 420px; }
.sg-bj { width: 100%; object-fit: contain; background: var(--bg); }
.sg-cares-logo { max-width: 220px; margin: 0 auto 16px; }
.sg-cares-img { width: 220px; margin: 0 auto; }

/* Form */
.sg-form { display: grid; gap: 12px; padding: 8px 0 32px; }
.sg-field { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.sg-field input, .sg-field select, .sg-field textarea {
  width: 100%; min-height: 44px; border: 1px solid #d0d0d0; border-radius: 12px;
  padding: 10px 12px; font: inherit; font-weight: 400; background: var(--white); color: var(--ink);
}
.sg-field textarea { min-height: 120px; resize: vertical; }
.sg-field input:focus, .sg-field select:focus, .sg-field textarea:focus {
  outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red);
}
.sg-hint { font-size: 0.85rem; color: var(--muted); margin: 0; }
.sg-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.sg-toast { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.sg-toast-ok { background: #eaf8ee; color: #14532d; }
.sg-toast-err { background: #fdecec; color: #7f1d1d; }
.sg-turnstile { min-height: 65px; }

/* Footer + tab bar */
.sg-footer .sg-contact-actions { justify-content: center; margin: 12px auto 0; }
.sg-footer {
  background: var(--white); border-top: 1px solid var(--line);
  text-align: center;
  padding: 32px var(--pad) calc(var(--tabbar) + 28px + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
}
@media (min-width: 960px) {
  .sg-footer { padding-bottom: 40px; }
}
.sg-logo-foot { width: 88px; height: auto; margin: 0 auto 10px; }
.sg-brand-foot { display: inline-flex; justify-content: center; }
.sg-tagline-foot { color: var(--ink); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
.sg-foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin: 16px 0; }
.sg-foot-nav a { color: var(--ink); font-size: 0.9rem; font-weight: 600; }
.sg-copy { font-size: 0.8rem; }

.sg-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; gap: 2px; justify-content: space-around; align-items: stretch;
  min-height: var(--tabbar);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.sg-tabbar a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--muted);
  text-decoration: none; border-radius: 12px; min-height: 44px; padding: 4px 2px;
}
.sg-tabbar a.is-active { color: var(--ink); }
.sg-tabbar a.sg-tab-inquire {
  background: var(--red); color: var(--white); font-size: 0.78rem;
  max-width: 92px;
}
.sg-tabbar a.sg-tab-inquire.is-active { background: var(--red-dark); }
@media (min-width: 960px) {
  .sg-tabbar { display: none; }
}

/* WP / GP leftovers */
.site-header, .site-footer, #right-sidebar, #left-sidebar { display: none !important; }
.generate-page-header, .page-header, .entry-header { display: none !important; }
body.sg-body .site { overflow: visible; }
#wpadminbar { position: fixed; }
body.admin-bar .sg-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .sg-header { top: 46px; }
}
