@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #efe8d7;
  --muted: #9b8f9d;
  --violet: #1c1229;
  --violet-deep: #0c0710;
  --acid: #d5c382;
  --wood: #75401d;
  --wood-dark: #3f2111;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --serif: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--violet-deep); }
body {
  color: var(--ink);
  font-family: var(--serif);
  overflow-x: hidden;
}
button, a { color: inherit; }
button { font: inherit; }

.stage {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: 30px clamp(22px, 5vw, 82px) 22px;
  background:
    radial-gradient(ellipse at 51% 45%, rgba(108, 61, 119, .25), transparent 34%),
    linear-gradient(120deg, #0c0710 0%, #20102b 44%, #0c0710 100%);
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .34;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(190, 167, 221, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 167, 221, .09) 1px, transparent 1px);
  background-size: 31px 31px;
  mask-image: linear-gradient(to bottom, black, transparent 83%);
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
}
.ambient {
  position: absolute;
  width: 50vw;
  height: 50vw;
  right: -15vw;
  top: 12vh;
  border-radius: 50%;
  background: rgba(87, 38, 91, .24);
  filter: blur(90px);
  pointer-events: none;
}

.topbar, .hero, .footer { position: relative; z-index: 2; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1380px;
  margin: 0 auto;
  animation: fade-in .8s both;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  font: 500 12px/1 var(--mono);
  letter-spacing: .19em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: var(--violet-deep);
  background: var(--acid);
  font-size: 10px;
  letter-spacing: 0;
  border-radius: 50%;
}
.status {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font: 11px/1 var(--mono);
  letter-spacing: .14em;
  color: #aea1ad;
}
.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d6b865;
  box-shadow: 0 0 0 4px rgba(214,184,101,.12);
  animation: blink 2s infinite;
}
.status b { color: #e1d6c4; font-weight: 400; }
.sound-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(236, 225, 204, .24);
  border-radius: 99px;
  background: rgba(12, 7, 16, .34);
  font: 10px/1 var(--mono);
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.sound-toggle:hover, .sound-toggle[aria-pressed="true"] {
  border-color: var(--acid);
  background: rgba(213, 195, 130, .1);
}
.sound-icon {
  position: relative;
  width: 14px;
  height: 12px;
  border: 1px solid currentColor;
  border-right: 0;
}
.sound-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 2px;
  width: 5px;
  height: 6px;
  border: 1px solid currentColor;
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(520px, 1.5fr);
  align-items: center;
  gap: clamp(30px, 7vw, 130px);
  max-width: 1280px;
  min-height: calc(100svh - 160px);
  margin: 0 auto;
  padding: 7vh 0 2vh;
}
.intro {
  position: relative;
  z-index: 3;
  padding-bottom: 2vh;
  animation: rise .9s .14s both;
}
.eyebrow {
  display: flex;
  gap: 17px;
  margin: 0 0 25px;
  color: var(--acid);
  font: 500 10px/1 var(--mono);
  letter-spacing: .17em;
  text-transform: uppercase;
}
.eyebrow span + span::before {
  content: "/";
  margin-right: 17px;
  color: #6c5b70;
}
h1 {
  margin: 0;
  font-size: clamp(57px, 6vw, 102px);
  font-weight: 500;
  line-height: .83;
  letter-spacing: -.07em;
}
h1 em {
  color: #c9b4c9;
  font-weight: 500;
}
.lede {
  margin: 30px 0 34px;
  color: #baaebb;
  font: 15px/1.8 var(--mono);
  letter-spacing: -.035em;
}
.controls { display: flex; align-items: center; gap: 19px; }
.tune-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 204px;
  padding: 15px 16px 15px 20px;
  border: 1px solid var(--acid);
  background: var(--acid);
  color: #19121c;
  font: 500 10px/1 var(--mono);
  letter-spacing: .11em;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.tune-button i {
  font: normal 17px/1 var(--serif);
  transition: transform .2s;
}
.tune-button:hover { transform: translateY(-2px); background: #e2d49a; }
.tune-button:hover i { transform: translate(3px, -3px); }
.hint {
  margin: 0;
  color: #6e6174;
  font: 9px/1.7 var(--mono);
  letter-spacing: .02em;
}

.tv-wrap {
  position: relative;
  width: min(100%, 760px);
  aspect-ratio: 1.42;
  margin: 4vh auto 0;
  perspective: 1100px;
  animation: tv-in 1.15s .25s both;
}
.antenna {
  position: absolute;
  z-index: 1;
  width: 70%;
  height: 43%;
  left: 15%;
  top: -20%;
}
.rod {
  position: absolute;
  bottom: 27%;
  width: 2px;
  height: 84%;
  background: linear-gradient(to top, #a7a0b0, #ede6db);
  box-shadow: 2px 0 rgba(0,0,0,.24);
  transform-origin: bottom center;
}
.rod-left { left: 50%; transform: rotate(-31deg); }
.rod-right { left: 50%; transform: rotate(31deg); }
.tip {
  position: absolute;
  top: 3%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e7e0d3;
  border: 3px solid #6b6573;
  box-shadow: 0 1px 5px #0008;
}
.tip-left { left: 24.5%; }
.tip-right { right: 24.5%; }
.television {
  position: absolute;
  z-index: 2;
  inset: 16% 7% 16% 7%;
  filter: drop-shadow(0 27px 28px #05020880);
  transform-style: preserve-3d;
}
.tv-body {
  position: absolute;
  inset: 0;
  padding: 5.2% 6.3% 5.5% 7%;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06), transparent 12%, transparent 83%, rgba(0,0,0,.18)),
    repeating-linear-gradient(0deg, rgba(245, 187, 91, .045) 0 2px, rgba(43,23,13,.05) 2px 4px),
    linear-gradient(135deg, #905125, #693719 50%, #88471f);
  border: 2px solid #bd7637;
  box-shadow: inset 4px 4px 0 rgba(255, 210, 136, .12), inset -5px -5px 0 rgba(32, 15, 7, .26);
  clip-path: polygon(1% 0, 99% 0, 100% 4%, 100% 96%, 98% 100%, 2% 100%, 0 97%, 0 3%);
}
.screen-bezel {
  position: absolute;
  left: 7%;
  top: 6%;
  width: 72%;
  height: 72%;
  padding: 2.2%;
  background: #29282b;
  border: 3px solid #101012;
  border-radius: 12% 11% 13% 8%;
  box-shadow: 5px 4px 0 #391b0d, -2px -2px 0 #b0713b;
}
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050507;
  border-radius: 10% 9% 10% 7%;
  box-shadow: inset 0 0 34px #000, inset 0 0 10px #000;
}
.screen-content {
  position: absolute;
  inset: 0;
  opacity: .84;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 68%, rgba(229, 225, 211, .23), transparent 25%),
    linear-gradient(104deg, transparent 0 28%, rgba(219,218,207,.16) 29% 30%, transparent 31% 48%, rgba(210,210,197,.1) 49% 54%, transparent 55%),
    linear-gradient(165deg, #171719, #696964 44%, #242426 70%, #0b0b0e);
  transition: filter .45s, opacity .45s;
}
.screen-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(117deg, transparent 0 32%, rgba(245,245,234,.22) 32.2% 32.7%, transparent 33%),
    linear-gradient(63deg, transparent 0 60%, rgba(0,0,0,.4) 60.3% 66%, transparent 66.4%),
    linear-gradient(90deg, #09090c 0 15%, transparent 15% 84%, #09090c 84%);
  opacity: .84;
}
.scanlines {
  position: absolute;
  z-index: 5;
  inset: 0;
  opacity: .45;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.7) 0 1px, transparent 1px 3px);
  animation: scan .18s steps(2) infinite;
}
.signal-title {
  position: absolute;
  z-index: 3;
  left: 9%;
  top: 12%;
  display: flex;
  flex-direction: column;
  color: #f0ebd8;
  text-shadow: 2px 0 #d162b0, -2px 0 #57c0c6;
  mix-blend-mode: screen;
}
.signal-title span {
  font: 500 8px/1 var(--mono);
  letter-spacing: .28em;
}
.signal-title strong {
  margin-top: 1.7em;
  font: 500 clamp(22px, 2.7vw, 44px)/.9 var(--serif);
  letter-spacing: -.04em;
}
.signal-title small {
  margin-top: 1.9em;
  font: 9px/1 var(--mono);
  letter-spacing: .07em;
}
.tv-dog {
  position: absolute;
  z-index: 2;
  right: 9%;
  bottom: 10%;
  width: 42%;
  aspect-ratio: .98;
  opacity: 0;
  transform: translateX(16%) scale(.82);
  transition: opacity .7s, transform .7s, filter .7s;
  filter: grayscale(1) contrast(1.35) brightness(.48);
  mix-blend-mode: multiply;
}
.tv-dog img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.tv-dog span {
  position: absolute;
  right: 0;
  bottom: -12%;
  color: #e6dec9;
  font: 7px/1 var(--mono);
  letter-spacing: .11em;
  text-shadow: 1px 0 #d162b0;
  white-space: nowrap;
}
.screen-flash {
  position: absolute;
  z-index: 8;
  inset: 0;
  background: #ede7d6;
  opacity: 0;
  pointer-events: none;
}
.screen.flash .screen-flash { animation: flash .32s steps(2); }
.glass {
  position: absolute;
  z-index: 9;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 35px 8px #000, inset 5px 5px 2px rgba(255,255,255,.12);
  background: linear-gradient(126deg, rgba(255,255,255,.16), transparent 15%, transparent 81%, rgba(0,0,0,.27));
  pointer-events: none;
}
.snow {
  position: absolute;
  z-index: 6;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  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='.86' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.57'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}
.screen.tuning .screen-content { filter: contrast(1.7) brightness(.55); animation: glitch .18s steps(2) infinite; }
.screen.tuning .snow { opacity: .85; animation: noise .14s steps(2) infinite; }
.no-signal {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  color: #c9c6bd;
  background: rgba(2, 2, 4, .44);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.no-signal.visible { opacity: 1; }
.no-signal p { margin: 12px 0 6px; font: 500 clamp(14px, 1.7vw, 21px)/1 var(--mono); letter-spacing: .17em; }
.no-signal small { font: 8px/1 var(--mono); letter-spacing: .16em; color: #918e88; }
.crosshair { position: relative; width: 25px; height: 25px; border: 1px solid #aaa79e; border-radius: 50%; }
.crosshair::after { content: ""; position: absolute; left: 11px; top: -10px; width: 1px; height: 43px; background: #aaa79e; }
.crosshair::before { content: ""; position: absolute; top: 11px; left: -10px; width: 43px; height: 1px; background: #aaa79e; }
.tv-side {
  position: absolute;
  right: 5.7%;
  top: 8%;
  width: 14%;
  height: 66%;
  display: flex;
  align-items: center;
  flex-direction: column;
}
.dial-label { margin: 2px 0 14px; color: #cca685; font: 8px/1 var(--mono); letter-spacing: .12em; }
.dial {
  position: relative;
  width: min(3.5vw, 39px);
  aspect-ratio: 1;
  margin-bottom: 18px;
  border: 4px solid #2c292a;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f1f0dd, #aaa9a1 46%, #504f50 70%);
  box-shadow: 0 3px 0 #3a1b0c, inset 0 0 0 2px #c6c7b8;
  cursor: pointer;
  transition: transform .4s ease;
}
.dial::after {
  content: "";
  position: absolute;
  top: 9%;
  left: 47%;
  width: 2px;
  height: 42%;
  background: #4c494b;
}
.dial:hover { transform: rotate(17deg); }
.grille {
  width: 55%;
  height: 18%;
  margin-top: 3px;
  background: repeating-linear-gradient(0deg, #3b1c0d 0 2px, transparent 2px 7px);
}
.channel {
  position: absolute;
  right: 5%;
  bottom: 2%;
  color: #d6bc91;
  font: 9px/1 var(--mono);
}
.power-row {
  position: absolute;
  left: 8%;
  bottom: 2%;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #c69c77;
  font: 7px/1 var(--mono);
  letter-spacing: .1em;
}
.power-light {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #cfb766;
  box-shadow: 0 0 7px #d2bd68;
}
.model { color: #7d5238; margin-left: 6px; }
.stand {
  position: absolute;
  z-index: 1;
  left: 10%;
  right: 4%;
  bottom: 1%;
  height: 24%;
  background:
    repeating-linear-gradient(0deg, rgba(220, 140, 73, .06) 0 2px, rgba(35,17,8,.08) 2px 4px),
    linear-gradient(90deg, #653619, #945126 32%, #6b391b 78%, #4f2a14);
  border-top: 6px solid #b8692e;
  border-bottom: 5px solid #32190d;
  box-shadow: 0 15px 20px #0008;
  clip-path: polygon(1% 0, 100% 0, 98% 100%, 0 100%);
}
.stand::before {
  content: "";
  position: absolute;
  left: 19%;
  right: 18%;
  top: 27%;
  height: 43%;
  border: 2px solid #4b2511;
  background: linear-gradient(180deg, #7e4320, #683718);
  box-shadow: inset 0 2px rgba(214,137,72,.18);
}
.stand span {
  position: absolute;
  left: 53%;
  top: 47%;
  width: 16px;
  height: 6px;
  background: #d0b14f;
  border: 1px solid #5c4420;
}
.shadow {
  position: absolute;
  z-index: 0;
  bottom: -1%;
  left: 7%;
  width: 90%;
  height: 6%;
  border-radius: 50%;
  background: #050207;
  filter: blur(6px);
}
.floating-face {
  position: absolute;
  z-index: 4;
  top: 25%;
  right: -4%;
  width: 21%;
  aspect-ratio: .98;
  filter: drop-shadow(7px 10px 9px #09050dc7);
  animation: float 7s ease-in-out infinite;
}
.floating-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1380px;
  margin: 0 auto;
  padding-top: 5px;
  border-top: 1px solid rgba(205, 186, 199, .15);
  color: #6d6071;
  font: 9px/1 var(--mono);
  letter-spacing: .11em;
  animation: fade-in 1s .65s both;
}
.footer p { margin: 0; }
.footer div { display: flex; gap: 30px; }

body.tuned .screen-content { opacity: 1; filter: contrast(1.1) saturate(.8); }
body.tuned .no-signal { opacity: 0; }
body.tuned .floating-face { animation-duration: 4s; }
body.tuned .ambient { background: rgba(123, 52, 99, .37); }
body.tuned .tv-dog { opacity: .6; transform: translateX(0) scale(1); }
body.tuned .tv-dog span { animation: blink 2.8s infinite; }
body.tuned .tv-wrap { animation: tuned-bob 6s ease-in-out infinite; }
body.sound-on .sound-icon::before { content: ""; position: absolute; left: 17px; top: -3px; width: 7px; height: 16px; border: 1px solid var(--acid); border-left: 0; border-radius: 0 9px 9px 0; }

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tv-in { from { opacity: 0; transform: translateY(35px) scale(.94) rotateX(4deg); } to { opacity: 1; transform: translateY(0) scale(1) rotateX(0); } }
@keyframes blink { 0%,100% { opacity: 1; } 48% { opacity: .35; } }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(3px); } }
@keyframes noise { 0% { background-position: 0 0; } 50% { background-position: 44px -31px; } 100% { background-position: -28px 38px; } }
@keyframes glitch { 0% { transform: translate(0); } 40% { transform: translate(3px,-1px); } 70% { transform: translate(-2px,1px); } }
@keyframes flash { 0%,100% { opacity: 0; } 18%,44% { opacity: .75; } 25%,60% { opacity: 0; } }
@keyframes float { 0%,100% { transform: translate(0,0) rotate(7deg); } 50% { transform: translate(7px,-13px) rotate(10deg); } }
@keyframes tuned-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(210px, .7fr) minmax(430px, 1.3fr); gap: 24px; }
  h1 { font-size: clamp(50px, 6.5vw, 78px); }
  .floating-face { right: 0; }
}
@media (max-width: 760px) {
  .stage { min-height: 100svh; padding: 22px 19px 16px; }
  .topbar { position: relative; }
  .status { display: none; }
  .brand { font-size: 10px; }
  .sound-toggle { padding: 9px 11px; }
  .hero { display: flex; flex-direction: column; min-height: 0; padding: 8vh 0 3vh; gap: 2vh; }
  .intro { width: 100%; max-width: 420px; }
  .eyebrow { margin-bottom: 19px; }
  h1 { font-size: clamp(52px, 14vw, 85px); }
  .lede { margin: 23px 0 26px; font-size: 12px; }
  .controls { align-items: flex-end; }
  .tune-button { min-width: 190px; }
  .hint { font-size: 8px; }
  .tv-wrap { width: 114%; max-width: none; margin: 3vh -7% 0; flex-shrink: 0; }
  .footer { flex-direction: column; align-items: flex-start; gap: 11px; padding-top: 10px; }
  .footer div { width: 100%; justify-content: space-between; gap: 10px; font-size: 8px; }
}
@media (max-width: 390px) {
  .stage { padding-left: 15px; padding-right: 15px; }
  .brand { letter-spacing: .1em; }
  .sound-toggle { font-size: 9px; }
  h1 { font-size: 53px; }
  .tune-button { min-width: 170px; padding-left: 15px; }
  .hint { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
