/* Inhibition: under construction. Mobile-first: base styles are for phones. */

:root {
  --ink: #0b0a10;
  --paper: #ece6d6;
  --dim: rgba(236, 230, 214, 0.66);
  --rule: rgba(236, 230, 214, 0.22);
  --amber: #f2b632;
  --gutter: 16px;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --type: "Special Elite", "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- Scene (full-screen graphic, also the button) ---------- */
.scene {
  position: fixed;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transition: filter 0.6s ease, transform 8s ease-out;
}
/* Vignette + scanlines */
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 55%, transparent 40%, rgba(5, 4, 10, 0.75) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px);
}
/* Film grain */
.scene::after {
  content: "";
  position: absolute;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -4%); }
  75% { transform: translate(-1%, 3%); }
  100% { transform: translate(0, 0); }
}
.scene:hover img,
.scene:focus-visible img { filter: brightness(1.08) saturate(1.05); transform: scale(1.015); }
.scene:focus-visible { outline: none; }
.scene:focus-visible .hint b { outline: 2px solid var(--amber); outline-offset: 4px; }

.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 64px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(5, 4, 10, 0.85));
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.hint b { color: var(--amber); font-weight: 500; }
.hint b::after {
  content: "_";
  margin-left: 0.15em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hint__mouse { display: none; }
@media (hover: hover) and (pointer: fine) {
  .hint__touch { display: none; }
  .hint__mouse { display: inline; }
}

/* ---------- Logo ---------- */
.logo {
  position: fixed;
  z-index: 3;
  top: calc(var(--gutter) + env(safe-area-inset-top));
  left: calc(var(--gutter) + env(safe-area-inset-left));
  width: 118px;
}
.logo img { width: 100%; height: auto; }
/* The placeholder logo is black on white; invert + screen turns it into light lines with no box. */
.logo--invert img { filter: invert(1); mix-blend-mode: screen; }

/* ---------- Detour (the three options) ---------- */
.detour {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: end center;
  padding: var(--gutter);
  padding-bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  background: rgba(8, 6, 14, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  outline: none;
}
/* No-JS: shown by :target. With JS: shown by .is-open. */
.no-js .detour:target,
.detour.is-open { display: grid; animation: fade 0.35s ease both; }
.detour.is-open .card,
.no-js .detour:target .card { animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 22px 20px 18px;
  background: rgba(14, 12, 20, 0.94);
  border: 1px solid rgba(242, 182, 50, 0.45);
}
.card__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(236, 230, 214, 0.3);
  color: var(--paper);
  font-size: 20px;
  text-decoration: none;
}
.card__close:hover { border-color: var(--amber); color: var(--amber); }
.card__title {
  margin: 0;
  font-family: var(--type);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 0.04em;
}
.card__sub { margin: 6px 0 18px; color: var(--dim); font-size: 12.5px; line-height: 1.65; }
.card__foot { margin: 14px 0 0; color: var(--dim); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; }

.sites { list-style: none; margin: 0; padding: 0; border-bottom: 1px dashed var(--rule); }
.sites a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 2px;
  min-height: 56px;
  border-top: 1px dashed var(--rule);
  color: var(--paper);
  text-decoration: none;
  transition: background 0.2s ease, padding 0.2s ease;
}
.sites a:hover, .sites a:focus-visible { background: rgba(242, 182, 50, 0.08); padding-left: 10px; }
.sites a:hover .sites__name, .sites a:focus-visible .sites__name { color: var(--amber); }
.sites__n { color: var(--amber); font-size: 12px; }
.sites__name { flex: 1; font-family: var(--type); font-size: 22px; }
.sites__status { color: var(--dim); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }

/* ---------- Coming-soon page ---------- */
.scene--dim { cursor: default; }
.soon .detour { place-items: center; }
.soon .logo { z-index: 5; }
.card__kicker { margin: 0 0 4px; color: var(--amber); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; }

/* ---------- Loader (JS only) ---------- */
.loader { display: none; }
.js .loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  background: var(--ink);
  transition: opacity 0.7s ease, visibility 0.7s;
}
.js .loader.is-done { opacity: 0; visibility: hidden; }
.loader__logo {
  width: 120px;
  height: auto;
  animation: flicker 1.3s linear both;
}
@keyframes flicker {
  0% { opacity: 0; }
  8% { opacity: 0.7; }
  10% { opacity: 0.1; }
  18% { opacity: 0.85; }
  21% { opacity: 0.2; }
  30%, 100% { opacity: 1; }
}
.loader__line {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.loader__line span {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  width: 0;
  border-right: 2px solid var(--amber);
  animation: type 0.9s steps(24) 0.35s forwards, caret 0.6s steps(1) infinite;
}
@keyframes type { to { width: calc(24ch + 24 * 0.08em + 2px); } }
@keyframes caret { 50% { border-color: transparent; } }

/* ---------- Larger screens ---------- */
@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .logo { top: 28px; width: 170px; }
  .hint { font-size: 14px; }
  .detour { place-items: center; }
  .card { padding: 30px 30px 24px; }
  .card__title { font-size: 36px; }
  .loader__logo { width: 150px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.2s !important;
  }
  .scene::after { animation: none; }
  .scene:hover img, .scene:focus-visible img { transform: none; }
  .hint b::after { animation: none; }
}
