:root {
  --bg: #0b0b0d;
  --text: #ededf0;
  --muted: #6c6c74;
  --dim: #8e8e96;
  --accent: #8fb8ff;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-wide: "Michroma", "Inter", sans-serif;
  --logo-w: clamp(170px, 21vw, 320px);
  --pad: clamp(24px, 3.2vw, 48px);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow-x: hidden;
  position: relative;
}

/* ---------- ambient ---------- */
.space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 5s var(--ease-soft);
}
body.space-on .space { opacity: 1; }

.horizon {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 46% at 50% 46%, rgba(255, 255, 255, 0.04), transparent 70%),
    radial-gradient(ellipse 90% 34% at 50% 118%, rgba(160, 175, 200, 0.09), transparent 62%);
  opacity: 0;
  animation: ambient 3.5s var(--ease-soft) 0.8s forwards;
}
.horizon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 46% at 50% 46%, rgba(255, 255, 255, 0.03), transparent 70%);
  animation: breathe 14s ease-in-out infinite;
}
@keyframes ambient { to { opacity: 1; } }
@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ---------- corners ---------- */
.corner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--pad);
  opacity: 0;
  animation: fade 2.2s var(--ease-soft) forwards;
}
.top { animation-delay: 2.6s; }
.bottom { align-items: flex-end; animation-delay: 2.9s; }
@keyframes fade { to { opacity: 1; } }

.tag {
  font-family: var(--font-wide);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.8;
}
.name { font-weight: 400; letter-spacing: 0.01em; }

/* ---------- locus: Iceland, Reykjavík ---------- */
.locus {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map {
  width: 104px;
  height: auto;
  overflow: visible;
  display: block;
}
.map__land {
  fill: none;
  stroke: rgba(255, 255, 255, 0.36);
  stroke-width: 0.75;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 4.5s var(--ease-soft) 3s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.deg {
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.15em;
  line-height: 0;
  vertical-align: 0.05em;
}

.pin {
  opacity: 0;
  animation: fade 1.2s ease 6.4s forwards;
  filter: drop-shadow(0 0 3px rgba(143, 184, 255, 0.9));
}
.pin__dot {
  fill: var(--accent);
  animation: blink 2.6s ease-in-out infinite;
}
.pin__ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.5;
  transform-origin: center;
  transform-box: fill-box;
  animation: ring 2.6s ease-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}
@keyframes ring {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(3.6); opacity: 0; }
}

.col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.right { text-align: right; align-items: flex-end; }

/* links only as wide as their text, so the underline matches */
.col a { align-self: flex-start; }
.right a { align-self: flex-end; }

a {
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}
a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
  opacity: 0.45;
}
.right a::after { transform-origin: right; }
a:hover { color: #fff; }
a:hover::after { transform: scaleX(1); }

/* ---------- stage ---------- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(36px, 5vh, 56px);
  padding: 0 24px;
  z-index: 1;
}

/* ---------- statement ---------- */
.statement {
  margin: 0;
  max-width: 560px;
  min-height: 3.2em;
  text-align: center;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.6;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--dim);
  opacity: 0;
  animation: fade 2.4s var(--ease-soft) 3.6s forwards;
}
.statement span {
  display: block;
  transition: opacity 1.4s var(--ease-soft), transform 1.4s var(--ease-soft);
}
.statement.is-out span {
  opacity: 0;
  transform: translateY(-3px);
}
.stage {
  position: relative;
  width: var(--logo-w);
  display: grid;
  place-items: center;
}

/* a line of light that the logo condenses out of */
.line {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 1px;
  width: 160%;
  transform: translate(-50%, -50%) scaleX(0);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7) 35%, rgba(255,255,255,0.7) 65%, transparent);
  opacity: 0;
  animation: line 3.4s var(--ease-soft) 0.3s forwards;
  pointer-events: none;
}
@keyframes line {
  0%   { transform: translate(-50%, -50%) scaleX(0);    opacity: 0; }
  30%  { transform: translate(-50%, -50%) scaleX(1);    opacity: 0.9; }
  55%  { transform: translate(-50%, -50%) scaleX(1);    opacity: 0.35; filter: blur(0); }
  100% { transform: translate(-50%, -50%) scaleX(1.08); opacity: 0;    filter: blur(4px); }
}

.logo {
  position: relative;
  width: 100%;
  opacity: 0;
  filter: blur(10px) drop-shadow(0 24px 70px rgba(0, 0, 0, 0.7));
  transform: scale(1.02);
  animation: reveal 3.6s var(--ease-soft) 1s forwards;
}
@keyframes reveal {
  0%   { opacity: 0;   filter: blur(10px) drop-shadow(0 24px 70px rgba(0,0,0,0.7)); transform: scale(1.02); }
  45%  { opacity: 0.55; }
  100% { opacity: 1;   filter: blur(0)    drop-shadow(0 24px 70px rgba(0,0,0,0.7)); transform: scale(1); }
}

.tilt {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* WebGL highlight layer, composited over the image */
.chrome {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s var(--ease-soft);
}
body.gl .chrome { opacity: 1; }

/* CSS fallback: light sweeping across the chrome, masked to the logo */
.sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url("/images/logo-tight.png") center / 100% 100% no-repeat;
          mask: url("/images/logo-tight.png") center / 100% 100% no-repeat;
  background: linear-gradient(
    100deg,
    transparent 38%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.08) 55%,
    transparent 62%
  );
  background-size: 280% 100%;
  background-position: 120% 0;
  animation: sweep 12s var(--ease-out) 4.6s infinite;
  mix-blend-mode: screen;
}
body.gl .sheen { display: none; }
@keyframes sweep {
  0%   { background-position: 120% 0; }
  20%  { background-position: -20% 0; }
  100% { background-position: -20% 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  :root { --logo-w: min(54vw, 240px); }
  body { font-size: 12px; }
  .tag { font-size: 8px; }
  .map { width: 84px; }
  .statement { font-size: 12.5px; max-width: 320px; }
  .bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
  .right { text-align: left; align-items: flex-start; }
  .right a::after { transform-origin: left; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .horizon, .corner, .logo, .statement, .pin { animation: none; opacity: 1; transform: none; filter: none; }
  .horizon::after, .sheen, .pin__dot, .pin__ring { animation: none; }
  .pin__ring { display: none; }
  .map__land { animation: none; stroke-dashoffset: 0; }
  .line { display: none; }
  .sheen { background-position: 50% 0; opacity: 0.3; }
}
