/* askNilsPartTwo — second.asknils.ch */

:root {
  --bg-1: #1a1410;
  --bg-2: #0b0908;
  --chrome: #e9e6e2;
  --chrome-line: #cfc9c1;
  --url-bg: #ffffff;
  --url-text: #4a4a4a;
  --content-w: 560px;
  --content-h: 380px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 50% 30%, #2a1c12 0%, var(--bg-1) 45%, var(--bg-2) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* ---------- Browser window chrome ---------- */
.browser {
  width: min(90vw, var(--content-w));
  border-radius: 12px;
  background: var(--chrome);
  box-shadow:
    0 30px 70px -20px rgba(0, 0, 0, 0.75),
    0 8px 20px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  will-change: transform, filter;
}

.browser__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(#f3f1ee, var(--chrome));
  border-bottom: 1px solid var(--chrome-line);
}

.browser__lights {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}
.dot--red    { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green  { background: #28c840; }

.browser__url {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px 12px;
  background: var(--url-bg);
  border: 1px solid var(--chrome-line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--url-text);
}

.browser__lock { fill: #6b8f6b; flex: 0 0 auto; }

.browser__host {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.browser__spacer { flex: 0 0 40px; }

/* ---------- Content area (where it all happens) ---------- */
.browser__content {
  position: relative;
  width: 100%;
  height: min(70vh, var(--content-h));
  background: #ffffff;
  overflow: hidden;
}

/* The truth revealed underneath the burnt page */
.reveal {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}
.reveal span {
  font-family: Times, "Times New Roman", Georgia, serif;
  font-size: clamp(48px, 14vw, 120px);
  color: #111;
  letter-spacing: 1px;
}

/* The framed site that says "Ja" */
.site {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
  /* mask is injected by JS as the page burns away */
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}

/* Glowing burn front + char */
.embers {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: auto;
}

/* Rising smoke, on top of everything */
.smoke {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ---------- Caption / a11y ---------- */
.caption {
  margin: 0;
  min-height: 1em;
  color: rgba(255, 240, 220, 0.55);
  font-size: 13px;
  letter-spacing: 0.4px;
}

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

@media (prefers-reduced-motion: reduce) {
  .browser { transition: none; }
}
