/* ==========================================================================
   Home page layout (home.css). Shared pieces live in site.css.
   ========================================================================== */

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(100svh, 1000px); display: flex; flex-direction: column; padding-top: var(--head-h); isolation: isolate; }
.hero-ink { z-index: -1; -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent); mask-image: linear-gradient(to bottom, #000 72%, transparent); }
.hero-in {
  flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: clamp(32px, 6vh, 72px) var(--g) 32px;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(24px, 4vw, 72px);
}
.hero h1 { margin: 22px 0 28px; max-width: 13ch; }
.hero .lede { max-width: 34em; }
.hero .actions { margin-top: 36px; }
.hero-seal { position: relative; justify-self: center; width: min(100%, 470px); }
.seal-wrap { position: relative; will-change: transform; }
.seal { width: 100%; height: auto; aspect-ratio: 512 / 502; }
.seal-v {
  position: absolute; top: 4%; right: -34px; writing-mode: vertical-rl; font-family: var(--fj);
  font-size: 13px; letter-spacing: 0.5em; color: var(--mute); white-space: nowrap;
}
.hero-foot {
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--g) 28px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; font-size: var(--t-small); color: var(--mute);
}
.hero-foot b { color: var(--paper); font-weight: 500; }
.cue { display: flex; align-items: center; gap: 14px; }
.cue i { position: relative; display: block; width: 1px; height: 56px; background: var(--line-2); overflow: hidden; }
.cue i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 22px; background: var(--red); transform: translateY(-100%); }
.fx .cue i::after { animation: drip 2.6s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 70%, 100% { transform: translateY(260%); } }
/* hidden until home.js plays the intro (the boot failsafe removes .fx if it never does) */
.fx .hero h1, .fx .hero .h-fade, .fx .seal, .fx-rm .hero h1, .fx-rm .hero .h-fade, .fx-rm .seal { opacity: 0; }

/* ---------- Games ---------- */
.games { position: relative; padding: var(--section) 0 clamp(40px, 6vw, 72px); }
.games-track { display: flex; flex-direction: column; gap: clamp(72px, 9vw, 120px); }
.g-intro { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--g); }
.g-intro h2 { margin-top: 22px; max-width: 14ch; }
.g-intro .sub { margin-top: 22px; max-width: 30em; }
.g { position: relative; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--g); }
.g-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: center; }
.media { position: relative; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.thumbs .frame { aspect-ratio: 16 / 9; }
.g-text .eyebrow { margin-bottom: 18px; }
.g-text .desc { margin-top: 20px; color: var(--paper-2); font-size: 1.125rem; max-width: 30em; text-wrap: pretty; }
.g-text .desc b { color: var(--paper); font-weight: 600; }
.g-text .stats { margin-top: 32px; }
.g-text .tags { margin-top: 22px; }
.g-text .actions { margin-top: 30px; }
.capsule { display: block; width: min(100%, 300px); margin-bottom: 26px; }
.capsule img { width: 100%; height: auto; aspect-ratio: 616 / 353; }

/* Dirty Dispatch: a sealed envelope whose ink never resolves */
.envelope { container-type: inline-size; position: relative; aspect-ratio: 16 / 10; background: #0c0809; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; isolation: isolate; }
.envelope .ink-canvas { z-index: -1; }
.dd-title { position: relative; font-family: var(--fd); font-weight: 600; font-size: clamp(2rem, 5vw, 5rem); font-size: 10.5cqw; white-space: nowrap; letter-spacing: -0.03em; line-height: 1; text-align: center; padding: 0 6%; color: var(--paper); }
.dd-title span { display: block; }
.dd-title .b1 { filter: blur(18px); opacity: 0.9; }
.dd-title .b2 { position: absolute; inset: 0; padding: 0 6%; filter: blur(7px); opacity: 0.5; }
.stamp { position: absolute; right: 4.5%; bottom: 7%; width: clamp(64px, 13cqw, 104px); padding: 10px; background: #0c0809; border-radius: 50%; }
.stamp img { width: 100%; height: auto; aspect-ratio: 192 / 188; }
.dd-date { font-family: var(--fd); font-size: clamp(2.4rem, 4.4vw, 4.4rem); line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.redact { display: grid; gap: 10px; margin-top: 28px; }
.redact span { display: block; height: 12px; background: var(--ink-3); transform-origin: 0 50%; }
.redact span:nth-child(1) { width: 92%; }
.redact span:nth-child(2) { width: 78%; }
.redact span:nth-child(3) { width: 54%; }

/* no JS: the room tones become soft bands */
html:not(.js) .g-ic, html:not(.js) .g-pp { max-width: none; padding-top: 56px; padding-bottom: 56px; }
html:not(.js) .g-ic { background: var(--tone-ic); }
html:not(.js) .g-pp { background: var(--tone-pp); }
html:not(.js) .g-ic > .g-grid, html:not(.js) .g-pp > .g-grid { max-width: calc(var(--max) - 2 * var(--g)); margin: 0 auto; }

/* Horizontal mode: wide landscape screens with motion. home.js adds .is-h. */
.games.is-h { height: 100vh; padding: 0; overflow: hidden; }
.is-h .games-track { flex-direction: row; gap: 7vw; height: 100%; width: max-content; padding: 0 max(var(--g), calc((100vw - var(--max)) / 2 + var(--g))); will-change: transform; }
.is-h .g-intro, .is-h .g { flex: none; margin: 0; padding: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.is-h .g-intro { width: min(46vw, 760px); padding-top: var(--head-h); }
.is-h .g { width: min(84vw, 1440px); padding-top: calc(var(--head-h) + 16px); padding-bottom: 40px; }
.is-h .g-dd { width: min(80vw, 1320px); }
.is-h .g .media { max-width: calc((100vh - 200px) * 1.32); }
.is-h .g-pp .media, .is-h .g-dd .media { max-width: calc((100vh - 200px) * 1.6); }
.is-h .g-text .desc { font-size: 1.0625rem; }
.is-h .dd-date { font-size: clamp(2.2rem, 3.4vw, 4.2rem); }

/* ---------- Studio ---------- */
.studio { overflow: hidden; }
.studio h2 { max-width: 17ch; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); margin-top: clamp(48px, 6vw, 88px); align-items: start; }
.story p { font-size: clamp(1.125rem, 1.45vw, 1.3rem); color: var(--paper-2); text-wrap: pretty; max-width: 32em; }
.story p + p { margin-top: 1.1em; }
.label-list { margin-top: 14px; border-top: 1px solid var(--line); }
.label-list .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline; padding: 18px 0 16px; border-bottom: 1px solid var(--line); }
.label-list dt { font-family: var(--fd); font-size: clamp(1.6rem, 2.7vw, 2.6rem); line-height: 1.08; letter-spacing: -0.025em; }
.label-list dd { color: var(--mute); font-size: 15px; text-align: right; white-space: nowrap; }
@media (max-width: 520px) {
  .label-list .row { grid-template-columns: minmax(0, 1fr); }
  .label-list dd { text-align: left; }
}
.ghost-seal { position: absolute; right: -8vw; top: 6%; width: min(56vw, 720px); opacity: 0.045; pointer-events: none; z-index: -1; }

/* ---------- Careers ---------- */
.careers-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.careers h2 { margin-top: 22px; max-width: 14ch; }
.careers-copy .when { font-family: var(--fd); color: var(--paper); font-size: clamp(1.5rem, 2vw, 2rem); letter-spacing: -0.02em; line-height: 1.2; }
.careers-copy .t-lede { margin-top: 1em; max-width: 26em; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 6vw, 96px); margin-top: clamp(40px, 5vw, 72px); align-items: start; }
.contact-grid h3 { margin-bottom: 16px; }
.c-block + .c-block { margin-top: clamp(36px, 4vw, 56px); padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--line); }
.c-kit { margin-top: 18px; }
.c-list li + li { margin-top: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 999px) {
  .g-grid, .studio-grid, .careers-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .careers-grid { align-items: start; }
}
@media (max-width: 860px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); align-content: center; padding-top: 24px; }
  .hero-seal { order: -1; justify-self: start; width: clamp(150px, 34vw, 260px); }
  .seal-v { right: auto; left: calc(100% + 18px); }
  .hero h1 { margin-top: 18px; max-width: 12ch; }
}
@media (max-width: 640px) {
  .hero { min-height: 0; }
  .hero-in { padding-bottom: 36px; }
  .hero-foot .cue { display: none; }
  .stats { gap: 18px 20px; }
  .stamp { padding: 8px; }
  .ghost-seal { width: 90vw; right: -30vw; top: 2%; }
  .thumbs { gap: 8px; margin-top: 8px; }
}
@media (max-width: 760px) {
  /* no JS: the header wraps to two rows and scrolls with the page */
  html:not(.js) .hero { padding-top: 104px; }
}
