/* RubbleFront site. Dark is the default. The light theme is set by the toggle (data-theme="light").
   No inline styles anywhere on the site, so every rule lives in this file. */

:root,
:root[data-theme="dark"] {
  --bg: #0c1118;
  --surface: #151d29;
  --surface-2: #1c2634;
  --line: #2f3d50;
  --text: #eef3f7;
  --muted: #b3c0cd;
  --accent: #2fd0e0;
  --accent-ink: #061014;
  --hot: #ff7a3d;
  --link: #7fe3ee;
  --focus: #ffd45c;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #e7eef5;
  --line: #c3d0dc;
  --text: #111a25;
  --muted: #3f4f63;
  --accent: #05707f;
  --accent-ink: #ffffff;
  --hot: #b9440c;
  --link: #05606e;
  --focus: #8a4b00;
  --shadow: 0 12px 32px rgba(20, 30, 45, 0.14);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
}

.stripe {
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--hot));
}

/* Header and navigation */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 0;
}

.brand {
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
}

.theme-toggle {
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

/* Sections and cards */

.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-first {
  border-top: 0;
}

.section-intro {
  color: var(--muted);
  max-width: 62ch;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.lede {
  font-size: 1.15rem;
  color: var(--text);
}

.muted {
  color: var(--muted);
}

.fine {
  font-size: 0.92rem;
  color: var(--muted);
}

/* Buttons and badges */

.button {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 0.8rem 1.25rem;
  border-radius: 8px;
  border: 2px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

.button:hover {
  filter: brightness(1.08);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.button-off {
  background: var(--surface-2);
  color: var(--muted);
  border: 2px dashed var(--line);
  cursor: default;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}

/* Hero */

.hero {
  padding: 36px 0 52px;
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr 1.15fr;
  }
}

.hero-logo {
  width: min(100%, 520px);
  height: auto;
}

.pitch {
  font-size: 1.2rem;
  margin: 18px 0 16px;
}

.facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
}

.facts li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.95rem;
}

.wishlist {
  margin-bottom: 12px;
}

.hero-figure {
  margin: 0;
}

.hero-figure img {
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* Feature list */

.features {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 28px;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

.features h3 {
  margin-bottom: 0.4em;
}

.features p {
  margin: 0;
  color: var(--muted);
}

/* Screenshot gallery */

.gallery {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  margin-top: 28px;
}

@media (min-width: 620px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .gallery {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.gallery figure {
  margin: 0;
}

.gallery a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.gallery figcaption {
  font-size: 0.95rem;
  color: var(--muted);
  padding-top: 8px;
}

/* Trailer */

.trailer {
  display: grid;
  gap: 24px;
  align-items: center;
  margin-top: 24px;
}

@media (min-width: 800px) {
  .trailer {
    grid-template-columns: 1.1fr 1fr;
  }
}

.trailer-poster {
  border-radius: 10px;
  border: 1px solid var(--line);
  width: 100%;
  height: auto;
}

.trailer-video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  border: 1px solid var(--line);
  margin-top: 24px;
}

.trailer video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  border: 1px solid var(--line);
}

/* How it is made */

.made-list {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.made-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
}

.made-list strong {
  display: block;
  margin-bottom: 4px;
}

/* FAQ */

.faq {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 4px 0;
}

.faq details p {
  margin: 0.7em 0 0;
  color: var(--muted);
}

/* Forms */

.signup {
  display: grid;
  gap: 12px;
  max-width: 520px;
  margin-top: 20px;
}

.signup label {
  font-weight: 700;
}

.signup input[type="email"] {
  font: inherit;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.signup button {
  justify-self: start;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

/* Lightbox */

dialog.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(1200px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100% - 24px);
  color: var(--text);
}

dialog.lightbox::backdrop {
  background: rgba(4, 7, 11, 0.88);
}

.lightbox-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.lightbox-slot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.lightbox-inner img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.lightbox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.lightbox-bar p {
  margin: 0;
  color: var(--muted);
}

/* Press page */

.facts-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.facts-table th,
.facts-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.facts-table th {
  width: 32%;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 560px) {
  .facts-table th,
  .facts-table td {
    display: block;
    width: auto;
  }

  .facts-table th {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

.logo-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 20px;
}

@media (min-width: 720px) {
  .logo-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.logo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.logo-preview {
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
}

.logo-preview img {
  width: 100%;
  height: auto;
}

.logo-preview--dark {
  background: #0c1118;
}

.logo-preview--light {
  background: #f4f7fa;
}

.logo-preview--grey {
  background: #6b7685;
}

.download-list {
  padding-left: 1.2em;
}

.download-list li {
  margin-bottom: 8px;
}

.shot-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 20px;
}

@media (min-width: 620px) {
  .shot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .shot-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

.shot-grid figure {
  margin: 0;
}

.shot-grid img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.shot-grid figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 6px;
}

/* Thanks and 404 */

.narrow {
  max-width: 640px;
  padding: 72px 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 0;
  margin: 0 0 16px;
}

.site-footer a {
  color: var(--text);
}

.social ul {
  margin-bottom: 16px;
}
