/* =============================================================
   noth · end — festival intro page
   ============================================================= */

:root {
  --ink: #0d0d0d;
  --paper: #ffffff;
  --blue-1: #000d5c;
  --blue-2: #123fd6;
  --blue-3: #2a8dff;
  --font-mono: "Cascadia Mono", "Cascadia Code", "JetBrains Mono", ui-monospace, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-mono);
  background: var(--paper) url("assets/bg.png") center / cover no-repeat fixed;
  color: var(--ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- top bar ---------- */
.topbar {
  margin: 14px clamp(24px, 6vw, 96px) 22px;
  padding: 10px 18px;
  background: linear-gradient(90deg,
    var(--blue-1)  0%,
    var(--blue-2) 55%,
    var(--blue-3) 100%);
  text-align: center;
  flex: 0 0 auto;
}

.brand {
  font-family: var(--font-mono);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: clamp(20px, 3.4vw, 38px);
  line-height: 1;
}

.brand-dot {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  background: #fff;
  border-radius: 50%;
  vertical-align: 0.02em;   /* aligns dot centre with lowercase x-height centre */
}

/* ---------- stage ---------- */
.stage {
  flex: 1 1 auto;
  width: 100%;
  padding: 0 clamp(20px, 4vw, 64px);
  overflow: hidden;
}

.stage-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* creature at bottom center */
.creature {
  position: absolute;
  bottom: -2cm;                 /* sink below viewport — clips PNG's transparent padding + ~1cm of creature */
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  min-width: 340px;
  max-width: 860px;
  display: block;
  pointer-events: none;
  z-index: 1;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* canvas draws pixelated cloud borders on top of creature */
.clouds-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ---------- clouds (text containers) ---------- */
.cloud {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 18px 20px;
  text-align: center;
  z-index: 3;
  pointer-events: auto;
}

.cloud-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(15px, 1.4vw, 22px);
  margin-bottom: 10px;
  color: var(--ink);
}

.cloud-body {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(12px, 1.05vw, 16px);
  line-height: 1.35;
  color: var(--ink);
  margin: 0 auto;
}

.cloud-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease;
  transform-origin: center center;
}
.cloud-link:hover { transform: scale(1.08); }
.cloud-link:focus-visible { outline: 2px dashed var(--blue-2); outline-offset: 4px; }

.cloud-right .cloud-title { margin-bottom: -14px; }

/* ---------- entity read-more CTA (left cloud) ---------- */
.cloud-cta {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(12px, 1.05vw, 16px);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(90deg,
    var(--blue-1)  0%,
    var(--blue-2) 55%,
    var(--blue-3) 100%);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  animation: cloud-cta-pulse 1.8s ease-in-out infinite;
}

.cloud-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
  animation-play-state: paused;
}

.cloud-cta:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.cloud-cta:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
}

.cloud-cta-label { display: inline-block; }

@keyframes cloud-cta-pulse {
  0%, 100% { box-shadow: 3px 3px 0 var(--ink); }
  50%      { box-shadow: 3px 3px 0 var(--ink), 0 0 0 4px rgba(42, 141, 255, 0.35); }
}

@media (prefers-reduced-motion: reduce) {
  .cloud-cta { animation: none; }
}

.ig-icon {
  width: 150px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.ig-handle {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 700;
  color: var(--ink);
  margin-top: -22px;
  letter-spacing: 0.02em;
}

/* ---------- desktop cloud positions ---------- */
/* positions are set from JS layout config; these are fallbacks / smooth defaults */
.cloud-left  { left: 18%; top: 50%; }
.cloud-mid   { left: 48%; top: 32%; }
.cloud-right { left: 80%; top: 45%; }

/* ---------- nav arrows (mobile only) ---------- */
.nav-arrow {
  display: none;
  position: absolute;
  top: 60%;
  transform: translateY(-50%);
  z-index: 20;
  width: 56px;
  height: 56px;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.nav-arrow:focus-visible { outline: 2px dashed var(--ink); outline-offset: 2px; }
.nav-arrow:active { transform: translateY(-50%) scale(0.88); }
.nav-prev { left: 6px; }
.nav-next { right: 6px; }

.arrow-svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  image-rendering: pixelated;
}

/* ---------- mobile / narrow ---------- */
@media (max-aspect-ratio: 1/1) {
  .creature { width: 95%; min-width: 340px; max-width: 780px; bottom: -1cm; }
  .cloud-body { max-width: 78vw; }
  .nav-arrow { display: flex; align-items: center; justify-content: center; }
  .ig-icon { width: 110px; }
  .cloud { display: none; }
  .cloud.active { display: block; }
}

@media (max-width: 520px) {
  .topbar { padding: 14px 12px; border-bottom-width: 2px; }
  .cloud { padding: 12px 14px; }
}
