/* ============================================================
   Slip Studios · public site stylesheet

   Vibe: warm paper, fat ink, banana-yellow accents, hard
   shadows. Loud headlines, sharp corners, no fluff.
   ============================================================ */

:root {
  --paper: #f4f1e8;
  --paper-2: #ebe7db;
  --ink: #16140f;
  --ink-soft: #3c382e;
  --yellow: #ffd23f;
  --blue: #4f8bff;
  --green: #35c46e;
  --red: #ff5c39;
  --line: 2px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --display: "Archivo Black", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

/* ---------- Type ---------- */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

.kicker {
  font-family: var(--body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--yellow);
  border: var(--line);
  display: inline-block;
  padding: 4px 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--yellow);
  border: var(--line);
  padding: 12px 26px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.08s,
    box-shadow 0.08s;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn.dark {
  background: var(--ink);
  color: var(--paper);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  font-size: 12.5px;
  padding: 8px 16px;
  box-shadow: 3px 3px 0 var(--ink);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: wait;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: var(--line);
  padding: 3px 10px;
  background: var(--paper);
}

.badge.released {
  background: var(--green);
}

.badge.dev {
  background: var(--yellow);
}

.badge.soon {
  background: var(--blue);
  color: #fff;
}

.badge.hold {
  background: var(--paper-2);
}

/* ---------- Nav ---------- */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #171717;
  color: var(--paper);
  border-bottom: 3px solid var(--yellow);
}

#site-nav .nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 26px;
}

#site-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

#site-nav .brand img {
  width: 34px;
  height: 34px;
}

#site-nav .brand span {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#site-nav nav {
  display: flex;
  gap: 4px;
}

#site-nav nav a {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 12px;
  border-bottom: 3px solid transparent;
}

#site-nav nav a:hover {
  color: var(--yellow);
}

#site-nav nav a.active {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

#nav-toggle {
  appearance: none;
  background: transparent;
  border: 2px solid var(--paper);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  cursor: pointer;
  display: none;
}

@media (max-width: 820px) {
  #nav-toggle {
    display: block;
  }
  #site-nav nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #171717;
    border-bottom: 3px solid var(--yellow);
    padding: 10px 24px 18px;
    gap: 2px;
  }
  #site-nav nav.open {
    display: flex;
  }
  #site-nav nav a {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(244, 241, 232, 0.15);
  }
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(88vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 60px 0 110px;
  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(255, 210, 63, 0.5),
      transparent 42%
    ),
    radial-gradient(circle at 8% 88%, rgba(79, 139, 255, 0.25), transparent 40%);
}

.hero h1 {
  font-size: clamp(3rem, 7.2vw, 5.9rem);
  margin: 0;
}

.hero h1 .squish {
  display: inline-block;
  background: var(--yellow);
  border: var(--line);
  box-shadow: var(--shadow);
  padding: 0 0.18em;
  transform: rotate(-2deg);
}

/* 3D portal on the right side of the hero */
.hero-portal {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 47%;
  right: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-portal canvas {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 900px) {
  .hero-portal {
    left: 22%;
    opacity: 0.94;
  }
}

/* hero content fills the left, big and wide */
.hero .wrap {
  max-width: 1000px;
  margin: 0;
  padding-left: clamp(24px, 6vw, 90px);
}

.hero .lede {
  max-width: 640px;
  font-size: 18px;
  font-weight: 500;
  margin: 28px 0 32px;
}

.hero .cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Marquee ---------- */
.marquee {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: var(--paper);
  border-top: 3px solid var(--yellow);
  overflow: hidden;
  padding: 10px 0;
  transform: rotate(0.001deg);
}

.marquee .track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: slide 70s linear infinite;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.marquee .track span {
  padding-right: 3rem;
  flex: none;
}

@keyframes slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Zigzag divider ---------- */
.zigzag {
  height: 18px;
  background:
    linear-gradient(-45deg, var(--paper) 9px, transparent 0) 0 0 / 18px 18px
      repeat-x,
    linear-gradient(45deg, var(--paper) 9px, transparent 0) 0 0 / 18px 18px
      repeat-x;
}

/* ---------- Page headers ---------- */
.page-head {
  padding: 84px 0 54px;
}

.page-head h1 {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  margin-bottom: 0.15em;
}

.page-head .sub {
  max-width: 640px;
  font-size: 19px;
  font-weight: 500;
}

.page-head.centered {
  text-align: center;
}

.page-head.centered .sub {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Game cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding-bottom: 90px;
}

.game-card {
  display: block;
  text-decoration: none;
  background: #fff;
  border: var(--line);
  box-shadow: var(--shadow);
  transition:
    transform 0.1s,
    box-shadow 0.1s;
}

.game-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
}

.game-card .thumb {
  overflow: hidden;
  border-bottom: var(--line);
  background: linear-gradient(135deg, var(--yellow), var(--paper-2));
  position: relative;
  min-height: 120px;
}

.game-card .thumb img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.25s;
}

/* blurred copy of the same art fills the box behind the fitted image */
.game-card .thumb img.bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) saturate(1.1);
  transform: scale(1.2);
}

.game-card:hover .thumb img:not(.bg) {
  transform: scale(1.04);
}

.game-card .thumb img ~ .fallback {
  display: none;
}

.game-card .thumb .fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 26px;
  text-transform: uppercase;
  color: rgba(22, 20, 15, 0.55);
  padding: 20px;
  text-align: center;
}

.game-card .body {
  padding: 18px 20px 20px;
}

.game-card h3 {
  font-size: 22px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.game-card .tagline {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0;
}

/* ---------- Full-bleed game feature (home) ---------- */
.feature {
  padding: 90px 0;
  border-top: var(--line);
}

.feature:nth-child(even) {
  background: var(--paper-2);
}

.feature .feat-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 54px;
  align-items: center;
}

.feature .feat-grid.flip .feat-img {
  order: 2;
}

.feature .feat-img {
  border: var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: linear-gradient(135deg, var(--yellow), var(--paper-2));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

/* the image sizes the box - no fixed aspect ratio */
.feature .feat-img img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
}

/* blurred copy of the same art fills the box behind the fitted image */
.feature .feat-img img.bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) saturate(1.1);
  transform: scale(1.2);
}

.feature .feat-img img ~ .fallback {
  display: none;
}

.feature .feat-img .fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  text-transform: uppercase;
  color: rgba(22, 20, 15, 0.5);
  padding: 20px;
  text-align: center;
}

.feature h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.feature .tagline {
  font-size: 19px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 26px;
}

.feat-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .feature .feat-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .feature .feat-grid.flip .feat-img {
    order: 0;
  }
}

/* ---------- Section header rows ---------- */
.sect-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.sect-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin: 0;
}

.sect-link {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 3px solid var(--yellow);
  padding-bottom: 2px;
}

.sect-link:hover {
  background: var(--yellow);
}

/* ---------- Store buttons ---------- */
.store-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: var(--line);
  background: var(--paper);
  padding: 9px 16px;
  box-shadow: 3px 3px 0 var(--ink);
}

.store:hover {
  background: var(--yellow);
}

/* ---------- Detail page (game.html) ---------- */
.detail-hero {
  border-bottom: var(--line);
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, var(--yellow), var(--paper-2));
  overflow: hidden;
}

.detail-hero img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(22, 20, 15, 0.82),
    rgba(22, 20, 15, 0.08) 60%
  );
}

.detail-hero .inner {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 90px 24px 40px;
  color: var(--paper);
}

.detail-hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  text-shadow: 4px 4px 0 rgba(22, 20, 15, 0.55);
  margin: 14px 0 8px;
}

.detail-body {
  padding: 60px 0 90px;
}

.detail-body .desc p {
  font-size: 18px;
  max-width: 720px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 40px 0;
}

.gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: var(--line);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  background: var(--paper-2);
}

/* ---------- Jobs ---------- */
.job {
  border: var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.job .job-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  flex-wrap: wrap;
}

.job .job-head h3 {
  margin: 0;
  font-size: 22px;
  flex: 1;
  min-width: 200px;
}

.job .job-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.job .job-body {
  border-top: var(--line);
  padding: 22px 24px;
  background: var(--paper);
}

.job .job-body p {
  max-width: 720px;
}

.chip {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  background: var(--paper-2);
  padding: 3px 10px;
}

.chip.yellow {
  background: var(--yellow);
}

.job .toggle-arrow {
  font-family: var(--display);
  transition: transform 0.15s;
}

.job.open .toggle-arrow {
  transform: rotate(90deg);
}

/* ---------- Forms ---------- */
.form-card {
  background: #fff;
  border: var(--line);
  box-shadow: var(--shadow);
  padding: 34px;
  max-width: 680px;
}

.form-card.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.form-card.centered .btn {
  display: inline-block;
}

.form-card.centered .form-status {
  margin-top: 16px;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field span {
  display: block;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: var(--line);
  padding: 11px 14px;
  outline: none;
}

.field input:focus,
.field textarea:focus {
  background: #fffef7;
  box-shadow: 3px 3px 0 var(--yellow);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 6px 0 22px;
  cursor: pointer;
  font-weight: 500;
}

.check input {
  width: 22px;
  height: 22px;
  accent-color: var(--ink);
  margin-top: 2px;
  flex: none;
  cursor: pointer;
}

.form-note {
  font-size: 13px;
  color: var(--ink-soft);
}

.form-status {
  margin-top: 16px;
  font-weight: 700;
}

.form-status.ok {
  color: #1a7f45;
}

.form-status.err {
  color: var(--red);
}

/* Success splash */
.sent {
  text-align: center;
  padding: 40px 20px;
}

.sent .big {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  text-transform: uppercase;
}

/* ---------- Unsubscribe ---------- */
.center-stage {
  min-height: calc(100vh - 64px - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 24px;
}

.center-stage .narrow {
  text-align: center;
}

/* ---------- Strip CTA ---------- */
.cta-strip {
  background: var(--ink);
  color: var(--paper);
  padding: 90px 0;
  text-align: center;
}

.cta-strip h2 {
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  margin-bottom: 20px;
}

.cta-strip h2 em {
  font-style: normal;
  color: var(--yellow);
}

.cta-strip p {
  max-width: 560px;
  margin: 0 auto 34px;
  font-size: 18px;
  color: rgba(244, 241, 232, 0.8);
}

/* ---------- Footer ---------- */
#site-footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 3px solid var(--yellow);
}

#site-footer .foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 24px 30px;
}

#site-footer .motto {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 4rem);
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 34px;
}

#site-footer .motto span {
  color: var(--yellow);
}

#site-footer .foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(244, 241, 232, 0.2);
  padding-top: 26px;
  font-size: 14px;
}

#site-footer .foot-grid a {
  color: var(--paper);
  text-decoration: none;
  margin-right: 18px;
}

#site-footer .foot-grid a:hover {
  color: var(--yellow);
}

#site-footer .fineprint {
  margin-top: 22px;
  font-size: 12px;
  color: rgba(244, 241, 232, 0.55);
}

/* ---------- Reveal animation ----------
   Content is visible by default; JS "arms" the animation only at
   the moment it starts observing, and a safety timer un-hides
   anything the observer misses. No blank content, ever. */
.reveal.armed {
  opacity: 0;
  transform: translateY(26px);
}

.reveal.armed,
.reveal.armed.in {
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.reveal.armed.in {
  opacity: 1;
  transform: none;
}

/* ---------- Loading / empty ---------- */
.loading-line {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 40px 0;
  animation: blink 1.1s steps(2, start) infinite;
}

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

.empty-hint {
  border: 2px dashed var(--ink);
  padding: 40px 30px;
  text-align: center;
  font-weight: 500;
  color: var(--ink-soft);
  grid-column: 1 / -1;
}

/* Lightbox */
dialog.lightbox {
  border: var(--line);
  box-shadow: var(--shadow);
  padding: 0;
  background: var(--ink);
  max-width: min(1100px, 94vw);
}

dialog.lightbox img {
  max-height: 82vh;
  width: 100%;
  object-fit: contain;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .form-card {
    padding: 24px 20px;
  }
  .page-head,
  .feature {
    padding-top: 56px;
  }
}
