:root {
  --rose: #a98b98;
  --ink: #241b26;
  --paper: #d4b5c2;
  --black: #0d090e;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--ink); }

body {
  color: var(--paper);
  font-family: "Space Mono", monospace;
  overflow: clip;
}

button, a { color: inherit; font: inherit; }
button { border: 0; }

.experience {
  isolation: isolate;
  min-height: 100svh;
  overflow: clip;
  position: relative;
  background: var(--ink);
}

.room {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: linear-gradient(rgba(36,27,38,.22), rgba(18,11,19,.42)), url("assets/cvshda-room.png") center / cover no-repeat;
  filter: saturate(.7) contrast(1.12);
}

.grain {
  position: absolute;
  inset: -50%;
  z-index: 10;
  pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  animation: grain .22s steps(2) infinite;
}

.masthead {
  position: absolute;
  inset: 2.3rem 3rem auto;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: .45em;
}

.wordmark { font: 700 1.15rem "Antonio", sans-serif; letter-spacing: .42em; text-decoration: none; }
.masthead p { margin: 0; font-size: .62rem; }

.manifesto, .side-notes {
  position: absolute;
  left: 3rem;
  top: 50%;
  z-index: 5;
  display: grid;
  gap: .55rem;
  transform: translateY(-50%);
  font-size: .55rem;
  letter-spacing: .36em;
}

.side-notes { top: auto; bottom: 6rem; color: rgba(212,181,194,.72); }

.television {
  position: absolute;
  left: 49.75%;
  top: 51.3%;
  width: min(45.25vw, 760px);
  aspect-ratio: 1.24;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.screen {
  position: absolute;
  left: 9.2%;
  right: 5.3%;
  top: 9.2%;
  height: 67.2%;
  overflow: clip;
  border-radius: 14% / 11%;
  background: #100d11;
  box-shadow: inset 0 0 45px #000, 0 0 12px rgba(169,139,152,.08);
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(169,139,152,.07) 4px);
  mix-blend-mode: screen;
}

.static {
  position: absolute;
  inset: -30%;
  opacity: .62;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  filter: contrast(1.9) grayscale(1);
  animation: static .12s steps(2) infinite;
}

.intro-screen, .tv-menu, .channel, .boot {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow, .hint { margin: 0; font-size: clamp(.45rem,.65vw,.7rem); letter-spacing: .35em; }
.intro-screen h1 { margin: .55rem 0; font: 700 italic clamp(2rem,4.1vw,4rem)/.78 "Antonio", sans-serif; transform: skew(-8deg); text-shadow: 3px 3px 0 rgba(36,27,38,.8); }
.hint { opacity: .75; animation: blink 1.4s infinite; }

.vcr-slot {
  position: absolute;
  left: 34.2%;
  top: 84.2%;
  width: 39%;
  height: 5.5%;
  background: #070507;
  border: 1px solid rgba(169,139,152,.15);
}

.vhs {
  position: absolute;
  left: 27%;
  top: 90%;
  width: 53%;
  height: 8.5%;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .35rem 1.2rem;
  color: var(--ink);
  background: #171016;
  border: 2px solid #0a070b;
  box-shadow: 0 8px 18px rgba(0,0,0,.55);
  transform: perspective(300px) rotateX(3deg);
  transition: transform .6s cubic-bezier(.55,.05,.25,1), opacity .4s;
}

.vhs:hover, .vhs:focus-visible { transform: perspective(300px) rotateX(3deg) translateY(-7px); outline: 2px solid var(--paper); }
.tape-edge { width: 8%; align-self: stretch; background: repeating-linear-gradient(90deg,#211720 0 5px,#0c090d 6px 9px); }
.tape-label { flex: 1; padding: .15rem .4rem; background: var(--paper); font: italic 700 clamp(.6rem,1.15vw,1rem) "Antonio",sans-serif; letter-spacing: .12em; }
.play-icon { color: var(--paper); }

.experience[data-state="loading"] .vhs,
.experience[data-state="menu"] .vhs,
.experience[data-state="channel"] .vhs { transform: translateY(-82%) scale(.68); opacity: 0; pointer-events: none; }
.experience[data-state="loading"] .intro-screen,
.experience[data-state="menu"] .intro-screen,
.experience[data-state="channel"] .intro-screen { opacity: 0; }

.boot { display: none; left: 9.2%; right: 5.3%; top: 9.2%; height: 67.2%; inset-inline: 9.2% 5.3%; inset-block: 9.2% auto; z-index: 7; }
.experience[data-state="loading"] .boot { display: flex; }
.boot p { font-size: .72rem; letter-spacing: .32em; line-height: 2; }
.boot p span { font-size: .58rem; }
.progress { width: 42%; height: 5px; background: rgba(169,139,152,.25); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--rose); animation: load 1.65s ease forwards; }

.tv-menu { inset: 8% 0 24%; display: grid; grid-template-columns: 100%; grid-template-rows: repeat(5, minmax(0, 1fr)); justify-items: center; align-items: stretch; gap: 2px; padding: 0; overflow-y: auto; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .5s ease; }
.experience[data-state="menu"] .tv-menu { opacity: 1; pointer-events: auto; transform: none; }
.tv-menu button { width: 76%; min-height: 0; cursor: pointer; padding: 0 .4rem; line-height: 1.15; background: transparent; text-transform: uppercase; letter-spacing: .18em; font-size: clamp(.58rem,1vw,.9rem); transition: .18s; }
.tv-menu button:hover, .tv-menu button:focus-visible { color: var(--ink); background: var(--paper); outline: 0; transform: translateX(4px); }

.tv-socials {
  position: absolute;
  left: 50%;
  bottom: 7.5%;
  z-index: 9;
  display: flex;
  justify-content: center;
  gap: 1rem;
  transform: translateX(-50%);
}

.tv-socials a {
  display: flex;
  align-items: center;
  gap: .32rem;
  padding: .24rem .32rem;
  color: var(--paper);
  font-size: .44rem;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  opacity: .82;
  transition: opacity .2s ease, transform .2s ease;
}

.tv-socials img { display: block; width: .9rem; height: .9rem; }
.tv-socials a:hover, .tv-socials a:focus-visible { opacity: 1; outline: 1px solid var(--paper); transform: translateY(-2px); }

.eject {
  position: absolute;
  top: 84.1%;
  left: 77.6%;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: .25rem;
  cursor: pointer;
  padding: .32rem .42rem;
  color: rgba(212,181,194,.72);
  background: rgba(10,7,11,.78);
  border: 1px solid rgba(169,139,152,.22);
  border-radius: 2px;
  font-size: .42rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: color .2s ease, border-color .2s ease, opacity .35s ease;
}

.experience[data-state="menu"] .eject,
.experience[data-state="channel"] .eject {
  opacity: 1;
  pointer-events: auto;
}

.eject:hover,
.eject:focus-visible {
  color: var(--paper);
  border-color: var(--paper);
  outline: none;
}

.channel { padding: 2rem 2.5rem; align-items: flex-start; justify-content: flex-start; text-align: left; opacity: 0; pointer-events: none; overflow-y: auto; }
.experience[data-state="channel"] .channel { opacity: 1; pointer-events: auto; }
.channel .back { cursor: pointer; position: absolute; top: 1rem; left: 1.2rem; color: var(--paper); background: transparent; font-size: .52rem; letter-spacing: .2em; text-transform: uppercase; }
.channel-number { margin: 0 0 .2rem; opacity: .55; font-size: .52rem; letter-spacing: .35em; }
.channel h2 { margin: 0; font: 500 clamp(1.4rem,3vw,2.8rem) "Antonio",sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.channel-copy { max-width: 96%; margin-top: .7rem; padding-bottom: 1rem; font-size: clamp(.48rem,.68vw,.64rem); line-height: 1.6; }
.channel-copy p { margin: 0 0 .7rem; }
.channel-copy .coming-soon { letter-spacing: .18em; text-transform: uppercase; opacity: .78; }
.channel-copy a { text-decoration: none; border-bottom: 1px solid currentColor; }

.experience[data-channel="exclusive"] .channel { padding: 8px; justify-content: center; overflow: hidden; }
.experience[data-channel="exclusive"] .channel > .channel-number,
.experience[data-channel="exclusive"] .channel > h2,
.experience[data-channel="exclusive"] .channel > .back { display: none; }
.experience[data-channel="exclusive"] .channel .channel-copy { display: flex; width: 100%; max-width: none; height: 100%; margin: 0; padding: 0; align-items: center; justify-content: center; }
.experience[data-state="channel"][data-channel="exclusive"] .tv-socials { opacity: 0; pointer-events: none; }

.guide { position: relative; display: flex; width: 100%; height: 100%; flex-direction: column; justify-content: center; }
.guide-status { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 3px; padding: .25rem 2rem; color: var(--ink); background: var(--paper); border-radius: 1.1rem 1.1rem 0 0; font-size: .44rem; font-weight: 700; letter-spacing: .12em; }
.guide-status time { justify-self: end; }
.guide-back { justify-self: start; cursor: pointer; padding: .1rem .2rem; color: var(--ink); background: transparent; font-size: .4rem; font-weight: 700; letter-spacing: .08em; }
.guide-back:hover, .guide-back:focus-visible { color: var(--paper); background: var(--ink); outline: none; }
.guide-grid { display: grid; min-height: 0; flex: 1; grid-template-columns: 17% repeat(3, 1fr); grid-template-rows: 1.25rem repeat(4, 1fr); gap: 2px; background: rgba(169,139,152,.32); border: 2px solid rgba(169,139,152,.38); }
.guide-grid > * { min-width: 0; }
.guide-corner, .guide-time, .guide-channel { display: flex; align-items: center; justify-content: center; background: #1c141d; }
.guide-corner, .guide-time { min-height: 1.35rem; font-size: .42rem; letter-spacing: .1em; }
.guide-channel { flex-direction: column; padding: .2rem; color: var(--paper); }
.guide-channel b { font-size: .5rem; }
.guide-channel span { font-size: .32rem; letter-spacing: .1em; opacity: .7; }
.guide-program { cursor: pointer; overflow: hidden; padding: .3rem .4rem; color: var(--paper); background: #332633; text-align: left; font-size: .43rem; line-height: 1.2; letter-spacing: .04em; transition: color .18s ease, background .18s ease; }
.guide-program small { display: block; margin-top: .2rem; font-size: .32rem; font-weight: 400; opacity: .65; }
.guide-program:hover, .guide-program:focus-visible { color: var(--ink); background: var(--paper); outline: none; }
.guide-program.span-two { grid-column: span 2; }
.guide-mail { grid-column: span 3; text-align: center; background: #493748; }
.guide-help { margin: 3px 0 0 !important; font-size: .36rem; letter-spacing: .06em; opacity: .65; text-align: center; }
.guide-detail { position: absolute; inset: 0; z-index: 12; min-height: 100%; padding: 1rem; color: var(--paper); background: rgba(13,9,14,.96); border: 1px solid var(--rose); }
.guide-detail[hidden] { display: none; }
.guide-detail-type { margin: 0 0 .3rem !important; font-size: .4rem; letter-spacing: .18em; text-transform: uppercase; opacity: .65; }
.guide-detail-title { margin: 0 0 .55rem; font: 500 1.15rem "Antonio", sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.guide-close { position: absolute; top: .35rem; right: .5rem; cursor: pointer; color: var(--paper); background: transparent; font-size: 1rem; }
.guide-email-form { width: 100%; margin-top: .45rem; }
.guide-email-form[hidden] { display: none; }
.guide-email-form label { display: block; margin-bottom: .28rem; font-size: .38rem; letter-spacing: .14em; }
.guide-email-form > div { display: flex; gap: .3rem; }
.guide-email-form input { min-width: 0; flex: 1; padding: .42rem; color: var(--paper); background: #211821; border: 1px solid rgba(212,181,194,.5); font: .48rem "Space Mono", monospace; }
.guide-email-form button { cursor: pointer; padding: .42rem .55rem; color: var(--ink); background: var(--paper); font-size: .4rem; font-weight: 700; letter-spacing: .08em; }
.guide-email-form button:disabled { cursor: wait; opacity: .55; }
.guide-email-form .form-note { margin: .3rem 0 0 !important; font-size: .34rem; opacity: .65; }

footer { position: absolute; inset: auto 3rem 1.7rem; z-index: 5; display: flex; align-items: center; gap: 2rem; font-size: .5rem; letter-spacing: .35em; }
footer span { height: 1px; flex: 1; background: rgba(212,181,194,.45); }

@keyframes static { 0%{transform:translate(0)} 25%{transform:translate(3%,-2%)} 50%{transform:translate(-2%,3%)} 75%{transform:translate(2%,2%)} }
@keyframes grain { 0%{transform:translate(0)} 25%{transform:translate(2%,-3%)} 50%{transform:translate(-3%,2%)} 75%{transform:translate(3%,3%)} }
@keyframes blink { 50%{opacity:.25} }
@keyframes load { to{width:100%} }

@media (max-width: 800px) {
  .masthead { inset: 1.5rem 1.3rem auto; }
  .masthead p, .manifesto, .side-notes { display: none; }
  .television { width: 94vw; left: 50%; top: 50%; }
  .room {
    overflow: hidden;
    background-color: var(--black);
    background-image: none;
    filter: none;
  }
  .room::before,
  .room::after {
    content: "";
    position: absolute;
    inset: 0;
  }
  .room::before {
    inset: -3%;
    background: linear-gradient(rgba(18,11,19,.35), rgba(18,11,19,.5)), url("assets/cvshda-room.png") center / cover no-repeat;
    filter: blur(8px) saturate(.55) contrast(1.12);
    transform: scale(1.05);
  }
  .room::after {
    background: linear-gradient(rgba(36,27,38,.17), rgba(18,11,19,.28)), url("assets/cvshda-room.png") center / auto 55% no-repeat;
    filter: saturate(.7) contrast(1.12);
    box-shadow: inset 0 0 110px 35px rgba(13,9,14,.66);
  }
  .screen { left: 9.2%; right: 5.3%; top: 9.2%; height: 67.2%; }
  .vcr-slot { left: 34.2%; top: 84.2%; width: 39%; }
  .vhs { left: 27%; top: 90%; width: 53%; }
  footer { inset: auto 1.3rem 1.2rem; gap: .8rem; font-size: .42rem; }
  .tv-socials { bottom: 6%; gap: .7rem; }
  .eject { left: 76.5%; }
  .guide-grid { grid-auto-rows: minmax(1.9rem, auto); }
  .guide-status { padding-inline: 1.25rem; }
  .guide-program { padding: .22rem; font-size: .36rem; }
  .guide-program small { font-size: .28rem; }
  .vhs { padding-inline: .6rem; gap: .45rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

.channel { inset: 0 0 19%; padding-top: 2.5rem; }
.experience[data-channel="exclusive"] .channel { inset: 0; }
.guide-detail { overflow-y: auto; }
.guide-detail-title { padding-right: 1rem; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
