:root {
  --font-display: "Baskerville", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-ui: "Avenir Next Condensed", "Helvetica Neue", "Arial Narrow", sans-serif;
  --font-micro: "SF Mono", "Menlo", "Consolas", monospace;
  --ink: #08090b;
  --paper: #e8dccd;
  --sand: rgba(228, 186, 111, 0.84);
  --line: rgba(255, 255, 255, 0.1);
  --noise: 0.07;
  --frame-inset: 24px;
  --status-color: rgba(240, 206, 150, 0.72);
  --landing-glow: rgba(196, 139, 62, 0.12);
  --g1-primary: #e6d7c5;
  --g1-accent: rgba(190, 114, 55, 0.32);
  --g2-primary: #87566c;
  --g2-accent: rgba(160, 148, 116, 0.18);
  --g3-primary: #ff7a53;
  --g3-accent: rgba(255, 102, 54, 0.35);
}

* {
  box-sizing: border-box;
}

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

body {
  background: #060708;
  color: var(--paper);
}

.screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.04), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    #060708;
}

.noise,
.ambient,
.frame,
.portal-ring,
.slab,
.plane,
.traces,
.shaft,
.heat-column,
.progress-rail,
.marker {
  pointer-events: none;
}

.noise {
  position: absolute;
  inset: 0;
  opacity: var(--noise);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
}

.frame {
  position: absolute;
  inset: var(--frame-inset);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.frame-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(231, 191, 116, 0.25);
  border-style: solid;
}

.frame-corner-tl {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.frame-corner-tr {
  top: -1px;
  right: -1px;
  border-width: 1px 1px 0 0;
}

.frame-corner-bl {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 1px 1px;
}

.frame-corner-br {
  right: -1px;
  bottom: -1px;
  border-width: 0 1px 1px 0;
}

.micro {
  position: absolute;
  z-index: 2;
  font-family: var(--font-micro);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(236, 221, 196, 0.3);
}

.micro-top {
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
}

.micro-bottom {
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.micro-left {
  left: 20px;
  top: 50%;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
}

.micro-right {
  right: 20px;
  top: 50%;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.cluster {
  top: 24%;
  color: rgba(220, 201, 173, 0.46);
}

.cluster-left {
  left: calc(50% - 250px);
}

.cluster-right {
  right: calc(50% - 250px);
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 64px 28px;
}

.portal-shell,
.group-shell {
  position: relative;
  width: min(100%, 1024px);
  min-height: min(80vh, 760px);
  display: grid;
  place-items: center;
}

.screen-landing {
  background:
    radial-gradient(circle at 50% 50%, rgba(152, 114, 47, 0.08), transparent 33%),
    radial-gradient(circle at 50% 50%, rgba(255, 180, 74, 0.05), transparent 55%),
    linear-gradient(180deg, #0a0a0d, #07080a 38%, #050608);
}

.ambient-landing {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 52%, var(--landing-glow), transparent 28%),
    linear-gradient(90deg, transparent 18%, rgba(231, 191, 116, 0.03) 50%, transparent 82%);
}

.portal-ring {
  position: absolute;
  width: min(82vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(230, 183, 98, 0.06);
  box-shadow:
    0 0 0 64px rgba(255, 197, 104, 0.015),
    0 0 180px rgba(255, 191, 86, 0.035);
}

.gate {
  position: relative;
  z-index: 3;
  width: min(100%, 420px);
  pointer-events: auto;
}

.input-well {
  position: relative;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.84)),
    rgba(5, 5, 7, 0.96);
  border: 1px solid rgba(255, 215, 162, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 30px 60px rgba(0, 0, 0, 0.35);
  cursor: text;
  pointer-events: auto;
}

.input-well::before,
.input-well::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 213, 145, 0.04);
}

.input-well::after {
  inset: auto 18px -12px;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 199, 101, 0.4), transparent);
}

input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: rgba(244, 235, 220, 0.92);
  font-family: var(--font-ui);
  font-size: clamp(22px, 4vw, 28px);
  letter-spacing: 0.36em;
  text-transform: uppercase;
  text-align: center;
  caret-color: rgba(241, 181, 87, 0.9);
  position: relative;
  z-index: 4;
  pointer-events: auto;
}

.status {
  min-height: 1.2rem;
  margin: 16px 0 0;
  text-align: center;
  font-family: var(--font-micro);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--status-color);
}

.screen-group {
  isolation: isolate;
}

.group-mark {
  position: relative;
  z-index: 2;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  line-height: 0.9;
}

.screen-group-1 {
  background:
    radial-gradient(circle at 80% 22%, rgba(181, 124, 58, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(135, 90, 68, 0.32), transparent 38%),
    linear-gradient(135deg, #4b2f2d 0%, #61403a 28%, #3b2826 57%, #1b1617 100%);
}

.ambient-group-1 {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 58%, rgba(71, 40, 52, 0.5) 58.5%, rgba(71, 40, 52, 0.62) 100%),
    radial-gradient(circle at 76% 14%, rgba(215, 155, 76, 0.16), transparent 20%);
}

.screen-group-1 .group-mark {
  color: var(--g1-primary);
  font-family: var(--font-ui);
  font-size: clamp(64px, 12vw, 126px);
  letter-spacing: 0.34em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
}

.slab-major {
  position: absolute;
  right: 19%;
  top: 19%;
  width: min(28vw, 220px);
  height: min(38vh, 310px);
  background: linear-gradient(180deg, rgba(200, 150, 90, 0.08), rgba(91, 56, 31, 0.18));
  transform: skewY(4deg);
  border: 1px solid rgba(243, 201, 137, 0.03);
}

.slab-minor {
  position: absolute;
  left: 6%;
  bottom: 8%;
  width: min(46vw, 280px);
  height: 40px;
  background: linear-gradient(90deg, rgba(168, 109, 72, 0.14), rgba(120, 73, 64, 0.04));
  transform: skewX(-18deg);
}

.marker-center {
  position: absolute;
  bottom: 30%;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(225, 195, 153, 0.4), transparent);
}

.screen-group-2 {
  background:
    radial-gradient(circle at 34% 52%, rgba(78, 96, 70, 0.16), transparent 24%),
    radial-gradient(circle at 76% 40%, rgba(134, 92, 112, 0.15), transparent 20%),
    linear-gradient(135deg, #111613 0%, #1a201b 37%, #101211 70%, #070909 100%);
}

.ambient-group-2 {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015), transparent 22%, transparent 76%, rgba(255, 255, 255, 0.015));
}

.screen-group-2 .group-mark {
  color: color-mix(in srgb, var(--g2-primary) 86%, #c193a9 14%);
  font-family: var(--font-display);
  font-size: clamp(88px, 14vw, 182px);
  font-style: italic;
  letter-spacing: 0.01em;
  text-shadow: 0 6px 20px rgba(6, 7, 7, 0.28);
}

.plane {
  position: absolute;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.plane-a {
  left: 11%;
  top: 7%;
  width: 34%;
  height: 78%;
  background: rgba(255, 255, 255, 0.03);
}

.plane-b {
  left: 33%;
  top: 44%;
  width: 26%;
  height: 38%;
  background: rgba(255, 255, 255, 0.025);
}

.plane-c {
  right: 10%;
  top: 18%;
  width: 31%;
  height: 64%;
  background: rgba(183, 199, 155, 0.08);
}

.traces {
  position: absolute;
  inset: 13% 13% 11%;
  opacity: 0.18;
  background:
    radial-gradient(circle at 38% 41%, rgba(255, 230, 204, 0.12), transparent 22%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 560'%3E%3Cg fill='none' stroke='%23d7c4ab' stroke-width='1.5' stroke-opacity='0.55'%3E%3Cpath d='M92 281c49-41 93-57 149-62 41-4 57-29 87-43 55-25 123-17 158 7 31 22 58 27 87 16 38-14 54-34 95-33 65 1 111 51 139 105'/%3E%3Cpath d='M100 313c53-32 104-44 160-45 47-1 68-20 93-31 66-31 138-23 180 1 33 19 61 19 104 5 43-14 77-11 116 16 39 27 65 59 91 116'/%3E%3Cpath d='M116 348c45-20 95-25 145-22 49 2 83-12 120-28 76-31 143-27 194 1 34 19 71 23 111 10 49-16 97 0 142 41'/%3E%3Cpath d='M145 386c59-16 117-18 175-10 43 6 67-2 111-20 65-27 130-28 177-9 46 19 93 30 144 24 55-6 93 9 122 39'/%3E%3C/g%3E%3C/svg%3E")
      center/cover no-repeat;
  filter: blur(0.6px);
}

.screen-group-3 {
  background:
    radial-gradient(circle at 50% 70%, rgba(255, 119, 62, 0.34), transparent 15%),
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.05), transparent 18%),
    linear-gradient(180deg, #0b0b0c 0%, #111010 12%, #090809 56%, #050506 100%);
}

.ambient-group-3 {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 8%),
    linear-gradient(90deg, rgba(255, 120, 64, 0.04), transparent 10%, transparent 90%, rgba(255, 120, 64, 0.04));
}

.furnace-shell {
  width: min(100%, 1180px);
}

.shaft {
  position: absolute;
  inset: 7% 12% 8%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 7%),
    linear-gradient(270deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 7%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 10%, transparent 88%, rgba(255, 255, 255, 0.02));
  mask:
    linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.shaft::before,
.shaft::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 5.2%,
      rgba(255, 255, 255, 0.02) 5.2% 5.5%,
      transparent 5.5% 10.4%
    );
  filter: blur(0.2px);
}

.shaft::after {
  transform: scaleX(-1);
  opacity: 0.7;
}

.heat-column {
  position: absolute;
  left: 50%;
  bottom: 14%;
  width: min(32vw, 320px);
  height: 38%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 247, 226, 0.8), rgba(255, 132, 76, 0.54) 42%, transparent 76%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 40%);
  filter: blur(12px);
  opacity: 0.72;
}

.screen-group-3 .group-mark {
  color: var(--g3-primary);
  font-family: var(--font-ui);
  font-size: clamp(86px, 14vw, 188px);
  letter-spacing: 0.08em;
  text-shadow:
    0 0 8px rgba(255, 114, 64, 0.8),
    0 0 18px rgba(255, 114, 64, 0.7),
    0 0 42px rgba(255, 114, 64, 0.5),
    0 0 88px rgba(255, 114, 64, 0.18);
  filter: blur(0.3px);
}

.progress-rail {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 12%;
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
}

.progress-rail span {
  display: block;
  width: 88%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 117, 78, 0.65), rgba(255, 208, 170, 0.9));
  box-shadow: 0 0 16px rgba(255, 124, 70, 0.4);
}

.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 (max-width: 900px) {
  .cluster-left,
  .cluster-right {
    display: none;
  }

  .frame {
    inset: 14px;
  }

  .micro-top,
  .micro-bottom {
    font-size: 9px;
    letter-spacing: 0.22em;
  }

  .micro-left,
  .micro-right {
    opacity: 0.72;
  }

  .portal-shell,
  .group-shell {
    min-height: 72vh;
  }

  .screen-group-1 .group-mark {
    letter-spacing: 0.2em;
  }

  .screen-group-3 .group-mark {
    letter-spacing: 0.04em;
  }
}

@media (max-width: 640px) {
  :root {
    --frame-inset: 10px;
    --noise: 0.05;
  }

  .stage {
    padding: 44px 18px;
  }

  .micro {
    font-size: 8px;
  }

  .micro-top {
    top: 18px;
  }

  .micro-bottom {
    bottom: 18px;
    width: calc(100vw - 40px);
    text-align: center;
  }

  .micro-left,
  .micro-right {
    display: none;
  }

  input {
    font-size: 20px;
    letter-spacing: 0.28em;
  }

  .screen-group-1 .group-mark {
    font-size: clamp(54px, 18vw, 88px);
    line-height: 1;
  }

  .screen-group-2 .group-mark,
  .screen-group-3 .group-mark {
    font-size: clamp(62px, 19vw, 110px);
  }

  .plane-a {
    width: 40%;
  }

  .plane-c {
    width: 38%;
  }

  .shaft {
    inset: 8% 5% 12%;
  }

  .progress-rail {
    left: 10%;
    right: 10%;
  }
}
