@keyframes cctv-sweep {
  0% { transform: translateY(-130%); }
  46%, 100% { transform: translateY(270%); }
}

@font-face {
  font-family: "Chapbook";
  src: url("assets/chapbook-regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Chapbook";
  src: url("assets/chapbook-italic.otf") format("opentype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --cream: #f1ead3;
  --green: #52e7a3;
  --red: #b6231d;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: #000;
  color: var(--cream);
  font-family: "Share Tech Mono", "Courier New", monospace;
}

.experience {
  min-height: 100svh;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.terminal {
  position: relative;
  isolation: isolate;
  width: min(100%, 590px);
  min-height: calc(100svh - 24px);
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(1, 5, 3, .66), rgba(1, 5, 3, .76)),
    url("assets/haunted-texture.jpg") center / cover no-repeat;
  border: 1px solid rgba(111, 139, 92, .25);
  border-radius: 34px;
  box-shadow: inset 0 0 0 10px rgba(8, 14, 8, .78), inset 0 0 80px #000, 0 0 60px rgba(0, 0, 0, .8);
}

.terminal::before,
.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.terminal::before {
  z-index: 2;
  opacity: .28;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(119, 255, 183, .14) 4px);
}

.terminal::after {
  z-index: 3;
  box-shadow: inset 0 0 110px 34px #000;
}

.sweep {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 34%;
  pointer-events: none;
  opacity: .24;
  background: linear-gradient(to bottom, transparent, rgba(96, 239, 166, .24), transparent);
  animation: cctv-sweep 7s linear infinite;
}

.content {
  position: relative;
  z-index: 4;
  width: min(86%, 470px);
  padding: 48px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  display: block;
  width: min(62%, 280px);
  height: auto;
  margin-bottom: 10px;
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 26px;
  color: var(--green);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 4px;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(60, 255, 158, .35);
}

.rec { letter-spacing: 5px; }

.record-light {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

h1 {
  margin: 0;
  font-family: "Chapbook", Georgia, serif;
  font-size: 55px;
  line-height: .98;
  font-weight: 400;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 2px 0 #14110c, 0 0 14px rgba(240, 233, 209, .13);
}

.tagline {
  margin: 26px 0 36px;
  font-family: "Chapbook", Georgia, serif;
  font-size: 15px;
  line-height: 1.5;
  font-style: italic;
  color: #b9b09a;
}

.primary-action {
  width: 100%;
  min-height: 68px;
  padding: 14px 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff7df;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.055) 0, rgba(255,255,255,.055) 1px, transparent 2px, transparent 4px),
    var(--red);
  border: 1px solid rgba(255, 104, 92, .45);
  border-radius: 5px;
  box-shadow: 0 8px 28px rgba(126, 0, 0, .28), inset 0 0 20px rgba(85, 0, 0, .22);
  font-family: "Oswald", sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 4px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color .15s ease, transform .15s ease;
}

.primary-action:hover { background-color: #cd2a22; }
.primary-action:active { transform: translateY(1px); }
.primary-action:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }

.instruction {
  margin: 28px 0 0;
  color: rgba(82, 231, 163, .92);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(82, 231, 163, .26);
}

.instruction span { margin-right: 10px; }

@media (max-width: 500px) {
  .experience { padding: 0; }
  .terminal { width: 100%; min-height: 100svh; border: 0; border-radius: 0; }
  .content { width: min(84%, 390px); padding: 38px 0 30px; }
  .logo { width: min(66%, 245px); }
  .status { gap: 10px; margin-bottom: 23px; font-size: 10px; letter-spacing: 2.6px; }
  h1 { font-size: 41px; }
  .tagline { margin: 22px 0 31px; font-size: 15px; }
  .primary-action { min-height: 64px; padding-inline: 15px; font-size: 16px; letter-spacing: 3px; }
  .instruction { margin-top: 25px; font-size: 12px; letter-spacing: 1.5px; }
}

@media (max-height: 680px) {
  .content { padding: 25px 0 22px; }
  .logo { width: min(52%, 205px); margin-bottom: 5px; }
  .status { margin-bottom: 16px; }
  h1 { font-size: 36px; }
  .tagline { margin: 16px 0 22px; font-size: 14px; }
  .primary-action { min-height: 58px; }
  .instruction { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .sweep { animation: none; }
  .primary-action { transition: none; }
}
