/* Barnyard Blackout playtest hub - "Grounded Rustic" design system */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin.woff2") format("woff2");
}

:root {
  --bg: #f3eee5;
  --bg-band: #eae2d5;
  --card: #fffdf8;
  --inset: #f7f3eb;
  --tile: #f0ebe1;
  --disabled: #ebe5da;
  --line: #e5dece;
  --line-strong: #d8cfc0;
  --ink: #25313a;
  --muted: #56636c;
  --primary: #a84f3c;
  --primary-dark: #893827;
  --gold: #d9ac4e;
  --gold-dark: #c79a3c;
  --gold-ink: #261b00;
  --sky: #4f6d7f;
  --sky-ink: #365566;
  --sky-light: #e9f0f4;
  --navy: #1f2933;
  --navy-card: #161f28;
  --navy-line: #374758;
  --shadow: 0 2px 4px rgba(37, 49, 58, 0.06), 0 1px 2px rgba(37, 49, 58, 0.04);
  --max: 1152px;
  --gutter: 16px;
  --font-headline: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

a {
  color: inherit;
}

img,
svg,
video {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

button,
input,
select,
textarea {
  box-sizing: border-box;
  max-width: 100%;
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-inline-size: 100%;
}

h1,
h2,
h3,
p,
figure,
ol,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-headline);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--card);
  font-family: var(--font-headline);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: calc(12px + env(safe-area-inset-top));
}

/* ------------------------------------------------------------ page frame */

.page {
  min-height: 100vh;
  min-height: 100svh;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  min-width: 0;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.blackout-bar {
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--line);
  background: var(--bg-band);
}

.blackout-bar .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pip {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

main {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 28px;
  padding-bottom: 28px;
}

main > * {
  min-width: 0;
}

/* ------------------------------------------------------------- surfaces */

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-band);
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  white-space: nowrap;
}

.tag--sky {
  border-color: rgba(79, 109, 127, 0.3);
  background: var(--sky-light);
  color: var(--sky-ink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: normal;
  text-wrap: balance;
}

.tag--red {
  border-color: rgba(168, 79, 60, 0.22);
  background: #f5e8e5;
  color: var(--primary-dark);
}

.button {
  min-height: 50px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.button--gold {
  background: var(--gold);
  color: var(--gold-ink);
}

.button--gold:hover {
  background: var(--gold-dark);
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(-1px, -1px);
}

.button--gold:active {
  box-shadow: none;
  transform: none;
}

.section {
  display: grid;
  gap: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
}

.section-title .icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

/* ----------------------------------------------------------------- hero */

.main-content {
  display: grid;
  gap: inherit;
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(460px, 58vw, 760px);
  isolation: isolate;
  background: var(--card);
}

.hero-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  display: grid;
  align-items: end;
  padding-block: 32px 58px;
  pointer-events: none;
}

/* ---------------------------------------------------- background videos */

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.is-playing > .bg-video {
  opacity: 1;
}

.bg-video-label {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.is-playing > .bg-video-label {
  opacity: 1;
}

.video-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(27, 38, 49, 0.85);
  color: #fff;
  cursor: pointer;
}

.video-toggle[hidden] {
  display: none;
}

.video-toggle:hover {
  background: rgba(27, 38, 49, 0.97);
}

.video-toggle .icon {
  width: 18px;
  height: 18px;
}

.hero-card {
  pointer-events: auto;
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 20px;
}

.hero-card h1 {
  font-size: clamp(32px, 9vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-card h1 span {
  color: var(--primary);
}

.hero-lead {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-card .button {
  width: 100%;
  margin-top: 4px;
}

/* ------------------------------------------------------- download cards */

.grid-2,
.grid-3 {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.platform {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.platform-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.platform-id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.icon-tile {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--tile);
}

.icon-tile .icon {
  width: 24px;
  height: 24px;
}

.platform h3 {
  font-size: 18px;
}

.build {
  color: var(--primary-dark);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
}

.platform-copy {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.app-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.app-badge img {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.app-badge p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.install-steps {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-left: 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.install-steps li::marker {
  color: var(--primary-dark);
  font-family: var(--font-headline);
  font-weight: 700;
}

.install-steps strong {
  color: var(--ink);
}

.platform-action {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.platform-action::before {
  content: "";
  height: 1px;
  margin-bottom: 8px;
  background: var(--line);
}

.status-pill {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--disabled);
  color: var(--muted);
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: not-allowed;
  -webkit-user-select: none;
  user-select: none;
}

.platform-action .button {
  width: 100%;
}

.fine {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* -------------------------------------------------------- image showcase */

.showcase {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.shot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #1c1917;
}

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

.shot-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 5px;
  background: rgba(27, 38, 49, 0.9);
  color: #fff;
  font-family: var(--font-headline);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.shot-label::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--gold);
}

.shot-label--red::before {
  background: #d9735f;
}

.caption {
  padding: 0 4px 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- steps */

.steps {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.step-number {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--sky);
  color: #fff;
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 700;
}

.step-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.step h3 {
  font-size: 16px;
}

.step p {
  color: var(--muted);
  font-size: 14.5px;
}

.step .hint {
  justify-self: start;
  margin-top: 4px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--tile);
  color: var(--primary-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
}

/* ------------------------------------------------------------ checklist */

.checklist-card {
  position: relative;
  overflow: hidden;
  padding: 24px 20px 20px;
}

.checklist-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--primary);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.card-title .icon {
  color: var(--primary);
}

.checklist {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(229, 222, 206, 0.7);
  border-radius: 10px;
  background: var(--inset);
  font-size: 14.5px;
  font-weight: 500;
}

.checklist .icon {
  width: 22px;
  height: 22px;
  color: var(--sky);
}

.checklist strong {
  color: var(--primary-dark);
}

/* -------------------------------------------------------- blackout note */

.blackout-note {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--navy-card);
  color: #fff;
  box-shadow: var(--shadow);
}

/* the night strip plays under a dark wash so the copy stays readable */
.blackout-note > .bg-video {
  z-index: -2;
}

.blackout-note::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(14, 20, 27, 0.8);
  pointer-events: none;
}

.blackout-copy {
  min-width: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.blackout-note h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bg);
  font-size: 16px;
}

.blackout-note h3 .icon {
  color: var(--gold);
}

.blackout-note p {
  margin-top: 4px;
  color: #d6d3d1;
  font-size: 14px;
}

.chip {
  flex: none;
  padding: 4px 8px;
  border: 1px solid rgba(217, 172, 78, 0.3);
  border-radius: 4px;
  background: #253241;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* ------------------------------------------------------ troubleshooting */

.faq {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px;
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq[open] summary .icon {
  transform: rotate(180deg);
}

.faq-body {
  margin: 0 14px;
  padding: 12px 0 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* -------------------------------------------------------------- holiday */

.holiday {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.holiday-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.holiday .card-title .icon {
  color: #4b7a5a;
}

/* --------------------------------------------------------------- footer */

.footer {
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--navy-card);
  background: var(--navy);
  color: #d0d7de;
}

.footer .wrap {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding-top: 26px;
  padding-bottom: 26px;
  text-align: center;
}

.footer-rule {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: var(--navy-line);
}

.footer-thanks {
  color: #d6d3d1;
  font-size: 15px;
  font-weight: 500;
}

.footer-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
}

.footer-legal {
  color: #a8a29e;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

/* ------------------------------------------------------------- 404 page */

.notfound {
  place-content: center;
  justify-items: center;
}

.notfound-card {
  width: min(100%, 460px);
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 28px 24px;
}

.notfound-card h1 {
  font-size: 32px;
}

.notfound-card p {
  color: var(--muted);
}

.notfound-card .button {
  margin-top: 6px;
}

/* ----------------------------------------------------------- responsive */

@media (min-width: 720px) {
  main {
    gap: 40px;
    padding-bottom: 40px;
  }

  .grid-2,
  .steps,
  .checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

@media (min-width: 820px) {
  .blackout-note {
    min-height: 168px;
    padding: 20px 24px;
  }

  .blackout-note::before {
    background: linear-gradient(90deg, rgba(14, 20, 27, 0.9) 0%, rgba(14, 20, 27, 0.78) 48%, rgba(14, 20, 27, 0.32) 100%);
  }

  .blackout-copy {
    max-width: 46ch;
  }

  .hero-content {
    align-items: center;
    padding-block: 32px;
  }

  .hero-card {
    width: clamp(256px, 29vw, 330px);
    padding: clamp(16px, 2.1vw, 24px);
  }

  .hero-card h1 {
    font-size: clamp(26px, 3vw, 34px);
  }

  .hero-lead {
    font-size: clamp(15px, 1.5vw, 17px);
  }
}

@media (max-width: 420px) {
  .platform-head {
    flex-wrap: wrap;
  }

  .blackout-bar .wrap {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}

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

  .pip {
    animation: none;
  }

  .button,
  .faq summary .icon,
  .bg-video,
  .bg-video-label {
    transition: none;
  }
}
