/* tailoutgame.com
 *
 * The brand's CRT greens on the basement's dark (Store/Listing/itch/metadata.txt), VT323 for anything the TV would
 * say, Atkinson Hyperlegible Next for reading. The footage brings the warmth (brick, wood, bulbs); the page itself
 * stays phosphor. One opening moment (the logo powers on like the game's boot screen), the trigger demo, and the
 * gameplay loops, which only play while they're on screen. Everything else holds still.
 */

@font-face {
  font-family: "VT323";
  src: url("/assets/VT323-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("/assets/fonts/atkinson-next.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("/assets/fonts/atkinson-next-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --tube: #07110a;        /* the brand's background */
  --tube-deep: #030c06;   /* the game's terminal black (3, 12, 6) */
  --panel: #0c1c11;
  --ink: #d6f5e0;         /* body text */
  --muted: #8fb89c;
  --phosphor: #57f287;    /* links, buttons, the logo */
  --bright: #beffcd;      /* the terminal's lit letters (190, 255, 205) */
  --dim: #165c2c;         /* the terminal's unlit (22, 92, 44) */
  --line: #1e4d2b;
  --pixel: "VT323", ui-monospace, monospace;
  --read: "Atkinson Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --wide: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { background: var(--tube); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--tube);
  font: 400 1.125rem/1.62 var(--read);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; }
a { color: var(--phosphor); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--bright); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--phosphor); color: var(--tube); }

h1, h2, h3 {
  font-family: var(--pixel);
  font-weight: 400;
  color: var(--phosphor);
  line-height: 1;
  letter-spacing: .01em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 50;
  background: var(--phosphor); color: var(--tube); padding: .5rem .9rem; font-family: var(--pixel); font-size: 1.4rem;
}
.skip:focus { top: .75rem; }

/* ------------------------------------------------------------------ the top bar */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem var(--gutter);
  background: color-mix(in srgb, var(--tube) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: block; line-height: 0; }
.brand img { height: 44px; width: auto; }
.top nav { display: flex; gap: clamp(.9rem, 2.4vw, 2rem); }
.top nav a {
  font-family: var(--pixel); font-size: 1.55rem; line-height: 1;
  color: var(--ink); text-decoration: none; padding: .35rem 0;
}
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--phosphor); }
.top nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--phosphor); }
body.home .top {
  position: absolute; inset-inline: 0;
  background: linear-gradient(to bottom, rgba(3, 12, 6, .78), rgba(3, 12, 6, 0));
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom: 0;
}

/* ------------------------------------------------------------------ buttons, in the terminal's style: a frame, lit in reverse when pressed */
.btn, .store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 3.4rem; padding: .5rem 1.1rem .55rem;
  border: 2px solid var(--phosphor);
  border-radius: 3px;
  color: var(--ink); text-decoration: none;
  background: rgba(3, 12, 6, .55);
  transition: background-color .12s, color .12s;
}
.store-name, .btn { font-family: var(--pixel); font-size: 1.75rem; line-height: 1; color: var(--phosphor); }
.store-for { font-size: .82rem; line-height: 1.3; color: var(--muted); margin-top: .2rem; }
a.store:hover, a.btn:hover, a.store:active, a.btn:active { background: var(--phosphor); }
a.store:hover *, a.btn:hover, a.store:active *, a.btn:active { color: var(--tube); }
.store.is-soon { border-color: var(--line); background: rgba(3, 12, 6, .45); }
.store.is-soon .store-name { color: var(--ink); }
.stores { display: flex; flex-wrap: wrap; gap: .75rem; }
.store-tag { display: none; }
button.btn { font-family: var(--pixel); cursor: pointer; }
.btn.small { min-height: 2.6rem; padding: .3rem .95rem .35rem; font-size: 1.4rem; }
button.btn:hover, button.btn:active { background: var(--phosphor); color: var(--tube); }
.demo-under { display: flex; justify-content: flex-end; margin-top: 1rem; }
.btn.quiet { border-color: transparent; background: none; padding-inline: .2rem; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
a.btn.quiet:hover { background: none; color: var(--bright); }

/* ------------------------------------------------------------------ home: the hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 920px);
  display: grid; align-items: end;
  background: var(--tube-deep);
}
.hero-video {
  position: absolute; inset: 0; z-index: -3;
  width: 100%; height: 100%; object-fit: cover;
}
.hero::before {          /* the room dims towards the words */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(to top, var(--tube) 0%, rgba(7, 17, 10, .9) 18%, rgba(7, 17, 10, .35) 52%, rgba(7, 17, 10, .15) 70%, rgba(7, 17, 10, .55) 100%),
    radial-gradient(120% 90% at 0% 100%, rgba(3, 12, 6, .85), rgba(3, 12, 6, 0) 60%);
}
.hero::after {           /* the tube's lines */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
  mix-blend-mode: multiply;
}
.hero-in {
  width: 100%; max-width: var(--wide); margin: 0 auto;
  padding: clamp(7rem, 18vh, 11rem) var(--gutter) clamp(2.5rem, 8vh, 5.5rem);
}
.hero h1 { line-height: 0; margin-left: -1.2%; }
.hero-logo {
  width: clamp(250px, 40vw, 560px); height: auto;
  filter: brightness(1) drop-shadow(0 0 14px rgba(87, 242, 135, .42));
}
.tagline {
  font-family: var(--pixel); color: var(--bright);
  font-size: clamp(1.6rem, 3.1vw, 2.6rem); line-height: 1.05;
  margin: clamp(1rem, 2.4vh, 1.6rem) 0 .9rem;
  max-width: 24em;
  text-shadow: 0 0 18px rgba(87, 242, 135, .35);
}
.hero-lede { max-width: 34em; font-size: clamp(1.06rem, 1.4vw, 1.2rem); color: var(--ink); margin-bottom: 1.8rem; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }

@media (prefers-reduced-motion: no-preference) {
  .js .hero-logo { animation: power-on 1.25s var(--ease) .2s both; transform-origin: 50% 58%; }
  .js .tagline { animation: type-on 1.1s steps(40, end) 1.25s both; }
  .js .hero-lede, .js .hero-actions { animation: come-up .7s var(--ease) 2.1s both; }
  .js .hero-actions { animation-delay: 2.25s; }
}
@keyframes power-on {      /* the boot screen: a line of light, then the picture */
  0%   { opacity: 0; transform: scale(.04, .006); filter: brightness(5) drop-shadow(0 0 30px rgba(190, 255, 205, 1)); }
  12%  { opacity: 1; transform: scale(1.04, .012); filter: brightness(5) drop-shadow(0 0 30px rgba(190, 255, 205, 1)); }
  30%  { transform: scale(1, .012); }
  58%  { transform: scale(1, 1.05); filter: brightness(1.9) drop-shadow(0 0 22px rgba(87, 242, 135, .8)); }
  70%  { transform: scale(1, .985); }
  82%  { filter: brightness(1.15) drop-shadow(0 0 14px rgba(87, 242, 135, .5)); }
  86%  { filter: brightness(.7) drop-shadow(0 0 10px rgba(87, 242, 135, .3)); }
  100% { opacity: 1; transform: none; filter: brightness(1) drop-shadow(0 0 14px rgba(87, 242, 135, .42)); }
}
@keyframes type-on { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes come-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ home: sections */
.wrap { max-width: var(--wide); margin: 0 auto; padding-inline: var(--gutter); }
.sec { padding-block: clamp(4.5rem, 11vw, 9rem); }
.sec h2 { font-size: clamp(2.5rem, 5.2vw, 4.25rem); margin-bottom: 1.2rem; }
.words p { max-width: 33em; }
.words .small { font-size: .95rem; color: var(--muted); }

/* the trigger demo */
.trigger { display: grid; grid-template-columns: minmax(0, 4.6fr) minmax(0, 7.4fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.trigger .how { color: var(--bright); }
.how-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .how-touch { display: block; } .how-mouse { display: none; } }
.crt {
  position: relative;
  padding: clamp(12px, 2vw, 24px) clamp(12px, 2vw, 24px) clamp(30px, 3.6vw, 44px);
  border-radius: clamp(18px, 2.6vw, 30px);
  background: linear-gradient(170deg, #252d27 0%, #141a16 38%, #0b0f0c 100%);
  box-shadow:
    0 40px 90px -40px rgba(0, 0, 0, .9),
    0 0 0 1px rgba(255, 255, 255, .04),
    inset 0 1px 0 rgba(255, 255, 255, .07),
    inset 0 -3px 0 rgba(0, 0, 0, .55);
}
.crt-screen {
  position: relative; overflow: hidden;
  border-radius: clamp(12px, 1.8vw, 20px) / clamp(14px, 2.1vw, 24px);
  background: var(--tube-deep);
  box-shadow: inset 0 0 0 2px #000;
}
.crt canvas {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  image-rendering: pixelated; image-rendering: crisp-edges;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  cursor: grab; outline: none;
}
.crt canvas:active { cursor: grabbing; }
.crt-screen::after {       /* glass: the tube's lines, a curve of light, darker corners */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(140% 100% at 30% 0%, rgba(190, 255, 205, .07), rgba(190, 255, 205, 0) 45%),
    radial-gradient(120% 120% at 50% 50%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, .55) 100%),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .18) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
}
.crt:focus-within .crt-screen { box-shadow: inset 0 0 0 2px #000, 0 0 0 3px var(--bright); }
.crt-badge {
  position: absolute; left: 0; right: 0; bottom: clamp(7px, 1vw, 12px);
  text-align: center; font-family: var(--pixel); font-size: 1rem; letter-spacing: .08em; color: #5d6b61;
}
.crt-lamp {
  position: absolute; right: clamp(16px, 2.4vw, 30px); bottom: clamp(12px, 1.5vw, 18px);
  width: 7px; height: 7px; border-radius: 50%; background: var(--phosphor);
  box-shadow: 0 0 8px var(--phosphor);
}
@media (max-width: 820px) {
  .trigger { grid-template-columns: minmax(0, 1fr); }
  .crt canvas { aspect-ratio: 3 / 4; }
  .trigger .crt { margin-inline: calc(var(--gutter) * -.5); }
}

/* the arcade: NIGHT LINE on the cabinet's screen, with the phone's squeeze pad and PUSH button under it */
.arcade { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.arcade .demo-col { grid-row: 1; grid-column: 1; }
.arcade .words { grid-row: 1; grid-column: 2; }
.arcade .how { color: var(--bright); }
.arcade .crt canvas { aspect-ratio: 4 / 3; }
.deck { display: flex; gap: 1rem; align-items: stretch; margin-top: 1rem; }
.squeeze {
  --squeeze: 0;
  position: relative; flex: 1; min-height: 4.2rem; overflow: hidden;
  border: 2px solid var(--line); border-radius: 10px; background: rgba(3, 12, 6, .6);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab;
  display: flex; align-items: center; padding-inline: 1rem;
  font-family: var(--pixel); font-size: 1.5rem; color: var(--muted);
}
.squeeze::before {
  content: ""; position: absolute; inset: 0; transform-origin: left center; transform: scaleX(var(--squeeze));
  background: linear-gradient(90deg, rgba(87, 242, 135, .18), rgba(87, 242, 135, .55));
}
.squeeze span { position: relative; }
.push {
  flex: none; width: 4.6rem; min-height: 4.2rem; border-radius: 10px; cursor: pointer;
  border: 2px solid var(--phosphor); background: rgba(3, 12, 6, .6); color: var(--phosphor);
  font-family: var(--pixel); font-size: 1.6rem; touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.push:hover, .push.is-down { background: var(--phosphor); color: var(--tube); }
@media (hover: hover) and (pointer: fine) { .squeeze { min-height: 3.2rem; } .push { min-height: 3.2rem; } }
@media (max-width: 820px) {
  .arcade { grid-template-columns: minmax(0, 1fr); }
  .arcade .demo-col, .arcade .words { grid-column: 1; grid-row: auto; }
  .arcade .crt { margin-inline: calc(var(--gutter) * -.5); }
}

/* the basement, room by room */
.tour { display: grid; gap: clamp(5rem, 12vw, 10rem); }
.room {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 4.5rem); align-items: center;
}
.room .shot { grid-column: 1 / span 7; margin: 0; }
.room .words { grid-column: 8 / span 5; }
.room.flip .shot { grid-column: 6 / span 7; grid-row: 1; }
.room.flip .words { grid-column: 1 / span 5; grid-row: 1; }
.shot video, .shot img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 6px; background: var(--tube-deep);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(87, 242, 135, .12);
}
.shot figcaption { margin-top: .7rem; font-family: var(--pixel); font-size: 1.2rem; color: var(--muted); }
.room h2 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); }
@media (max-width: 820px) {
  .room, .room.flip { grid-template-columns: minmax(0, 1fr); }
  .room .shot, .room .words, .room.flip .shot, .room.flip .words { grid-column: 1; grid-row: auto; }
}

/* the fair deal */
.deal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.deal > div { padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1rem, 2.4vw, 2.4rem) clamp(1.8rem, 3vw, 2.6rem) 0; }
.deal > div + div { border-left: 1px solid var(--line); padding-left: clamp(1rem, 2.4vw, 2.4rem); }
.deal h3 { font-size: clamp(1.9rem, 2.8vw, 2.4rem); color: var(--bright); margin-bottom: .6rem; }
.deal p { color: var(--muted); max-width: 22em; }
.deal-note { color: var(--muted); font-size: .95rem; padding-block: 1.1rem 0; max-width: 46em; }
@media (max-width: 820px) {
  .deal { grid-template-columns: minmax(0, 1fr); }
  .deal > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
}

/* last call: pull up a stool */
.last-call {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(6rem, 16vw, 12rem);
}
.last-call img {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .55;
}
.last-call::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--tube) 0%, rgba(7, 17, 10, .55) 35%, rgba(7, 17, 10, .7) 70%, var(--tube) 100%);
}
.last-call h2 { font-size: clamp(3rem, 8vw, 6.5rem); color: var(--bright); text-shadow: 0 0 30px rgba(87, 242, 135, .3); margin-bottom: 1rem; }
.last-call p { max-width: 30em; font-size: 1.2rem; margin-bottom: 2rem; }

/* ------------------------------------------------------------------ the other pages */
main.page, main.legal { max-width: calc(46rem + 2 * var(--gutter)); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(4rem, 9vw, 7rem); }
main.page h1, main.legal h1 { font-size: clamp(3rem, 8vw, 5rem); margin-bottom: 1.2rem; }
main.page h2, main.legal h2 { font-size: clamp(2rem, 4vw, 2.6rem); margin: 3.2rem 0 1rem; }
main.page h3, main.legal h3 { font-family: var(--read); font-weight: 700; font-size: 1.15rem; color: var(--bright); line-height: 1.35; margin: 2rem 0 .4rem; letter-spacing: 0; }
.lede { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.5; color: var(--ink); margin-bottom: 1.6rem; }
main.page ul, main.legal ul { padding-left: 1.2rem; }
main.page li, main.legal li { margin-bottom: .45rem; }
main.page li::marker, main.legal li::marker { color: var(--phosphor); }
main.legal { font-size: 1.05rem; }
main.legal h1 { font-size: clamp(2.6rem, 6vw, 4rem); }

/* questions that open */
.faq { border-top: 1px solid var(--line); margin-top: 1rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: 1.05rem 0; font-weight: 700; color: var(--bright);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--pixel); font-size: 1.8rem; line-height: .6; color: var(--phosphor); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--phosphor); }
.faq .answer { padding: 0 0 1.2rem; color: var(--ink); max-width: 40em; }

.notice { border-left: 3px solid var(--phosphor); padding: .2rem 0 .2rem 1.1rem; margin: 1.5rem 0; }
.notice h3 { margin-top: 0 !important; }

/* press kit */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .55rem 1.6rem; margin: 1rem 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.trailer { position: relative; aspect-ratio: 16 / 9; }
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }
.soon-note { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.gallery a { display: block; line-height: 0; }
.gallery img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.logos a {
  display: grid; place-items: center; aspect-ratio: 3 / 2; padding: .8rem; border-radius: 4px;
  background: repeating-conic-gradient(#2a332d 0 25%, #1f2722 0 50%) 0 0 / 16px 16px;
  box-shadow: 0 0 0 1px var(--line);
}
.logos img { max-height: 100%; width: auto; }
.kit { margin: 1.4rem 0 .4rem; }

/* ------------------------------------------------------------------ the foot of every page */
.foot { border-top: 1px solid var(--line); padding: 2.6rem var(--gutter) 3rem; color: var(--muted); font-size: .95rem; }
.foot-in { max-width: var(--wide); margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem 2.5rem; align-items: center; }
.foot-logo { height: 40px; width: auto; display: block; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { color: var(--phosphor); text-decoration: underline; }
.foot-legal { grid-column: 1 / -1; margin: 0; font-size: .85rem; }
@media (max-width: 760px) { .foot-in { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 560px) {
  body { font-size: 1.0625rem; }
  .top { padding-block: .55rem; }
  .brand img { height: 36px; }
  .top nav { gap: .9rem; }
  .top nav a { font-size: 1.35rem; }
  .nav-extra { display: none; }
  .stores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; width: 100%; }
  .store { min-height: 0; padding: .45rem .55rem .5rem; }
  .store-name { font-size: 1.35rem; }
  .store .store-for { display: none; }
  .store-tag { display: block; font-size: .75rem; color: var(--muted); }
  body.home .brand { visibility: hidden; }
  .hero::before {
    background:
      linear-gradient(to top, var(--tube) 0%, rgba(7, 17, 10, .92) 30%, rgba(7, 17, 10, .5) 62%, rgba(7, 17, 10, .6) 100%);
  }
}

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