/* ===== Fun Maxed Games dark theme ===== */
:root {
  --bg: #111214;
  --bg-elevated: #1a1c1f;
  --bg-card: #202327;
  --border: #33373d;
  --text: #f2f2f2;
  --text-muted: #a3a8ae;
  --accent: #ffffff;
  --brand: #8ccf1c;        /* Fun Maxed green from the logo */
  --brand-dark: #6aa815;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

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

html {
  background: var(--bg);
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
.site-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1rem;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.logo {
  width: min(380px, 85%);
  height: auto;
}

/* Keeps the studio name in the document without showing it twice.
   The logo already displays it. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== Menu bar ===== */
.menu-bar {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0.5rem;
}

.menu-items {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

/* Hamburger toggle, hidden on desktop */
.menu-toggle {
  display: none;
  width: 100%;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  cursor: pointer;
}

.menu-toggle-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 1rem;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-btn:hover {
  background: var(--bg-card);
  color: var(--text);
}

.nav-btn.active {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--brand);
}

/* Hire button stands out from the rest of the menu */
.nav-btn-hire {
  border: 1px solid var(--brand);
  color: var(--brand);
  font-weight: 600;
}

.nav-btn-hire:hover {
  background: var(--brand);
  color: #0d0d0d;
}

.nav-btn-hire.active {
  background: var(--brand);
  color: #0d0d0d;
  box-shadow: none;
}

/* ===== Panels ===== */
main {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel h2 {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
}

.panel-intro {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.panel-note {
  color: var(--text-muted);
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.panel-note a,
.modal a {
  color: var(--text);
}

/* Platform groups sit side by side on desktop, stack on phones */
.platform-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.group-heading {
  font-size: 1.15rem;
  margin: 0 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
}

.card-placeholder {
  cursor: default;
  opacity: 0.65;
}

.card-placeholder:hover {
  transform: none;
  border-color: var(--border);
}

.card-thumb {
  font-size: 2.4rem;
  background: var(--bg-elevated);
  border-radius: 8px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
  overflow: hidden;
}

/* Art-led thumb: taller, so a game logo has room to read */
.card-thumb-img {
  height: 170px;
  padding: 0.75rem;
}

.card-thumb-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Full-bleed art (screenshots) fills the whole thumbnail edge to edge */
.card-thumb-cover {
  padding: 0;
}

.card-thumb-cover img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: 60% center;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--bg-elevated);
  border: 1px solid var(--brand-dark);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

/* ===== About ===== */
.about-content {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.about-logo {
  width: 200px;
  height: auto;
  flex-shrink: 0;
}

.about-content p + p {
  margin-top: 0.75rem;
}

/* ===== Contact form ===== */
.contact-form {
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 0.6rem 0.75rem;
  resize: vertical;
}

.form-row select {
  cursor: pointer;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--brand);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #6b7076;
}

.btn-primary {
  background: var(--brand);
  color: #0d0d0d;
  border: none;
  font: inherit;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-link {
  display: inline-block;
  text-decoration: none;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2rem 1rem 1.5rem;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.footer-logo {
  width: 120px;
  height: auto;
}

.footer-blurb {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.footer-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  text-align: center;
}

/* ===== Modals ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.75rem;
  position: relative;
  animation: fadeIn 0.2s ease;
}

.modal-wide {
  max-width: 620px;
}

/* ===== Game modal with trailer + screenshots ===== */
.modal-game {
  max-width: 920px;
}

.modal ul {
  color: var(--text-muted);
  padding-left: 1.2rem;
}

.modal li + li {
  margin-top: 0.3rem;
}

.game-hero-logo {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 auto 1.5rem;
}

.game-top {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.game-intro h4:first-of-type {
  margin-top: 1rem;
}

/* Vertical 9:16 frame sized for a YouTube Short */
.video-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* App store badges */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modal .store-badge,
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 178px;
  padding: 0.45rem 1.1rem 0.45rem 0.85rem;
  background: #000;
  color: #fff;
  border: 1px solid #a6a6a6;
  border-radius: 9px;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.store-badge:hover,
.store-badge:focus-visible {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.store-badge svg {
  width: 24px;
  height: 26px;
  flex-shrink: 0;
}

.store-badge-small {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.4px;
  line-height: 1.1;
}

.store-badge-big {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.15;
}

/* Horizontal screenshot strip */
.shots {
  position: relative;
  margin-bottom: 0.5rem;
}

.shots-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.shot {
  flex: 0 0 168px;
  aspect-ratio: 9 / 16;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  scroll-snap-align: start;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.shot:hover,
.shot:focus-visible {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shots-btn {
  position: absolute;
  top: calc(50% - 0.25rem);
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(13, 13, 13, 0.8);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.shots-btn:hover {
  border-color: var(--brand);
}

.shots-prev { left: -0.5rem; }
.shots-next { right: -0.5rem; }

.game-links {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.modal .game-links a {
  color: var(--text-muted);
}

/* Full-size screenshot viewer (sits above modals) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(92vw, 540px);
  max-height: 90vh;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.lightbox-close,
.lightbox-nav {
  background: rgba(32, 35, 39, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  font-size: 1.6rem;
}

.lightbox-nav {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  font-size: 1.8rem;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  border-color: var(--brand);
}

/* Emoji stand-in when an image file isn't in place yet */
.img-fallback {
  display: block;
  font-size: 3rem;
  line-height: 1.4;
  text-align: center;
  color: var(--text-muted);
}

.modal h4 {
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.3px;
  margin: 1.25rem 0 0.35rem;
}

.modal .modal-lead {
  color: var(--text);
}

.modal .modal-callout {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 1.25rem;
  text-align: center;
}

.modal h3 {
  margin-bottom: 0.75rem;
  padding-right: 2rem;
}

.modal p {
  color: var(--text-muted);
}

.modal p + p {
  margin-top: 0.75rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
  }

  .logo {
    width: 90%;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Menu becomes a dropdown on phones */
  .menu-toggle {
    display: flex;
  }

  .menu-items {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem;
    animation: fadeIn 0.15s ease;
  }

  .menu-bar.open .menu-items {
    display: flex;
  }

  .nav-btn {
    width: 100%;
    text-align: left;
    white-space: nowrap;
  }

  .nav-btn.active {
    box-shadow: inset 3px 0 0 var(--brand);
  }

  .nav-btn-hire.active {
    box-shadow: none;
  }

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

  .footer-brand,
  .footer-links {
    justify-content: center;
    align-items: center;
  }

  .footer-blurb {
    margin: 0 auto;
  }

  .platform-groups {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .modal {
    padding: 1.25rem;
  }

  .game-top {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .video-frame {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .shot {
    flex-basis: 132px;
  }

  .shots-btn {
    display: none;
  }

  .lightbox-nav {
    position: absolute;
    bottom: 1.25rem;
  }

  .lightbox-prev { left: calc(50% - 56px); }
  .lightbox-next { right: calc(50% - 56px); }
}
