@charset "UTF-8";

:root {
  --ink: #080706;
  --paper: #e8dfcf;
  --muted: #a69a86;
  --gold: #b99045;
  --gold-bright: #e4c173;
  --red: #7a1d12;
  --line: rgba(219, 186, 112, 0.28);
  --mouse-x: 50vw;
  --mouse-y: 50vh;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 1100px;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  text-rendering: geometricPrecision;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  animation: grain 0.22s steps(2) infinite;
}

.cursor-light {
  position: fixed;
  left: var(--mouse-x);
  top: var(--mouse-y);
  width: 460px;
  height: 460px;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 142, 64, 0.11), transparent 67%);
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease;
  mix-blend-mode: screen;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  height: 82px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 4.5vw;
  border-bottom: 1px solid rgba(218, 185, 111, 0.18);
  background: linear-gradient(to bottom, rgba(4, 4, 3, 0.9), rgba(4, 4, 3, 0.42));
  backdrop-filter: blur(10px);
}

.insignia {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: max-content;
}

.insignia-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.insignia-mark::first-line {
  transform: rotate(-45deg);
}

.insignia-copy {
  display: grid;
  gap: 4px;
}

.insignia-copy strong,
.insignia-copy small {
  letter-spacing: 0.18em;
}

.insignia-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 500;
}

.insignia-copy small {
  color: var(--muted);
  font-size: 8px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 38px;
}

.main-nav a {
  position: relative;
  padding: 31px 0 28px;
  color: #bfb6a6;
  font-size: 10px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 1px;
  background: var(--gold-bright);
  transition: right 0.35s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--paper);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  right: 0;
}

.ticker-seal {
  justify-self: end;
  padding: 9px 14px;
  border: 1px solid rgba(222, 185, 103, 0.46);
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.scene {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.scene-bg,
.scene-shade,
.rule-lines {
  position: absolute;
  inset: -4%;
}

.scene-bg {
  z-index: -4;
  background-position: center;
  background-size: cover;
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0) scale(1.06);
  transition: transform 0.18s ease-out;
}

.scene-shade {
  z-index: -3;
  pointer-events: none;
}

.hero .scene-bg {
  background-image: url("../assets/background/throne-hall.png");
}

.hero .scene-shade {
  background:
    linear-gradient(90deg, rgba(4, 4, 3, 0.88) 0%, rgba(4, 4, 3, 0.28) 42%, rgba(4, 4, 3, 0.18) 70%, rgba(4, 4, 3, 0.58) 100%),
    linear-gradient(0deg, rgba(5, 4, 3, 0.82), transparent 42%);
}

.rule-lines {
  z-index: -1;
  inset: 82px 4.5vw 4.5vh;
  border-left: 1px solid rgba(218, 185, 111, 0.15);
  border-right: 1px solid rgba(218, 185, 111, 0.15);
}

.rule-lines::before {
  content: "";
  position: absolute;
  left: 52.7%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(218, 185, 111, 0.08);
}

.hero-copy {
  position: absolute;
  z-index: 6;
  left: 8vw;
  top: 20.5vh;
  width: 47vw;
}

.eyebrow,
.chapter {
  margin: 0 0 22px;
  color: var(--gold-bright);
  font-size: clamp(9px, 0.65vw, 12px);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow span {
  display: block;
  width: 38px;
  height: 1px;
  background: var(--gold-bright);
}

.hero h1,
.scene h2,
.final-command h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  text-wrap: balance;
}

.hero h1 {
  max-width: 760px;
  color: #f0e7d7;
  font-size: clamp(72px, 7.1vw, 138px);
  line-height: 0.77;
  letter-spacing: -0.06em;
  text-shadow: 0 6px 38px rgba(0, 0, 0, 0.72);
}

.hero h1 span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(233, 217, 183, 0.62);
  font-style: italic;
  letter-spacing: 0.01em;
}

.hero-line {
  margin: 30px 0 28px 4px;
  padding-left: 17px;
  border-left: 2px solid var(--red);
  color: #d8cfc0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 1.25vw, 24px);
  line-height: 1.45;
}

.hero-actions,
.final-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.copy-button {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 21px;
  cursor: pointer;
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: transform 0.2s ease, color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.button::before,
.copy-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 15%, rgba(255, 255, 255, 0.2), transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.5s ease;
}

.button:hover::before,
.copy-button:hover::before {
  transform: translateX(120%);
}

.button:hover,
.copy-button:hover {
  transform: translateY(-2px);
}

.button:active,
.copy-button:active {
  transform: translateY(1px);
}

.button-gold {
  border: 1px solid var(--gold-bright);
  background: linear-gradient(135deg, #c29a4d, #8f682c);
  color: #100d08;
}

.button-ghost,
.button-copy {
  border: 1px solid rgba(226, 205, 160, 0.45);
  background: rgba(9, 8, 6, 0.56);
  color: var(--paper);
  backdrop-filter: blur(8px);
}

.character-wrap {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0);
  transition: transform 0.18s ease-out;
}

.character-wrap img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.68));
  animation: breathe 6s ease-in-out infinite;
  transform-origin: 50% 92%;
}

.hero-general {
  right: 6vw;
  bottom: -4vh;
  width: min(48vw, 840px);
  height: 92vh;
}

.character-aura {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 45%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(177, 115, 36, 0.22), transparent 69%);
  transform: translate(-50%, -50%);
  animation: aura 5s ease-in-out infinite;
}

.hero-ca {
  position: absolute;
  z-index: 8;
  left: 8vw;
  bottom: 6vh;
  display: grid;
  grid-template-columns: auto minmax(200px, 27vw) auto;
  align-items: center;
  min-height: 58px;
  border: 1px solid rgba(214, 179, 101, 0.32);
  background: rgba(5, 5, 4, 0.66);
  backdrop-filter: blur(12px);
}

.ca-label {
  align-self: stretch;
  display: grid;
  place-items: center;
  padding: 0 17px;
  border-right: 1px solid rgba(214, 179, 101, 0.24);
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.17em;
}

.hero-ca code {
  padding: 0 18px;
  overflow: hidden;
  color: #ded4c3;
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  align-self: stretch;
  min-height: 56px;
  border-left: 1px solid rgba(214, 179, 101, 0.32);
  background: var(--red);
  color: #fff3df;
}

.copy-button.copied,
.button-copy.copied {
  background: #735e32;
}

.scroll-mark {
  position: absolute;
  z-index: 6;
  right: 4.5vw;
  bottom: 6.5vh;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8e8576;
  font-size: 8px;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
}

.scroll-mark span {
  width: 1px;
  height: 45px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}

.marquee {
  position: relative;
  z-index: 12;
  height: 48px;
  overflow: hidden;
  border-top: 1px solid rgba(218, 185, 111, 0.26);
  border-bottom: 1px solid rgba(218, 185, 111, 0.26);
  background: #0e0b08;
}

.marquee-track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  gap: 28px;
  color: #beaa80;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.27em;
  animation: marquee 26s linear infinite;
}

.marquee-track i {
  color: var(--red);
  font-style: normal;
}

.order .scene-bg {
  background-image: url("../assets/background/command-ridge.png");
}

.order .scene-shade {
  background:
    linear-gradient(90deg, rgba(5, 5, 4, 0.35), rgba(5, 5, 4, 0.1) 48%, rgba(4, 4, 3, 0.8) 100%),
    linear-gradient(0deg, rgba(4, 4, 3, 0.82), transparent 38%);
}

.order-copy {
  position: absolute;
  z-index: 8;
  left: 7vw;
  top: 19vh;
  width: min(37vw, 620px);
  padding: 38px 42px 42px;
  border-left: 1px solid var(--gold);
  background: linear-gradient(90deg, rgba(6, 5, 4, 0.86), rgba(6, 5, 4, 0.54), transparent);
  backdrop-filter: blur(4px);
}

.scene h2 {
  color: #f0e6d3;
  font-size: clamp(48px, 4.15vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.order-copy > p:not(.chapter),
.room-note {
  max-width: 520px;
  margin: 28px 0 0;
  color: #c8beae;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(15px, 1.05vw, 20px);
  line-height: 1.75;
}

.order-copy blockquote {
  margin: 30px 0 0;
  padding: 17px 0 0;
  border-top: 1px solid rgba(215, 179, 99, 0.3);
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.command-general {
  right: 3vw;
  bottom: -3vh;
  width: min(55vw, 980px);
  height: 94vh;
}

.coordinate {
  position: absolute;
  z-index: 7;
  right: 5vw;
  top: 15vh;
  display: grid;
  gap: 7px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.coordinate span,
.coordinate small {
  color: #8d8475;
  font-size: 8px;
  letter-spacing: 0.2em;
}

.coordinate b {
  color: #d2c5ae;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.war-room {
  min-height: 112vh;
}

.war-room .scene-bg {
  background-image: url("../assets/background/war-room.png");
}

.war-room .scene-shade {
  background:
    linear-gradient(90deg, rgba(4, 4, 3, 0.22), rgba(4, 4, 3, 0.02) 47%, rgba(4, 4, 3, 0.84) 78%),
    linear-gradient(0deg, rgba(5, 4, 3, 0.93), transparent 43%);
}

.room-general {
  left: 5vw;
  bottom: 11vh;
  width: min(43vw, 760px);
  height: 87vh;
}

.room-copy {
  position: absolute;
  z-index: 7;
  right: 7vw;
  top: 18vh;
  width: min(38vw, 650px);
  padding-left: 37px;
  border-left: 1px solid var(--gold);
}

.rules {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(219, 186, 112, 0.26);
}

.rules li {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid rgba(219, 186, 112, 0.18);
  color: #e0d5c3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.rules li span {
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.final-command {
  position: absolute;
  z-index: 8;
  left: 6vw;
  right: 6vw;
  bottom: 7vh;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
  padding: 28px 30px 30px;
  border: 1px solid rgba(218, 185, 111, 0.31);
  background: rgba(7, 6, 5, 0.79);
  backdrop-filter: blur(13px);
}

.final-command .eyebrow {
  margin-bottom: 10px;
}

.final-command h3 {
  font-size: clamp(27px, 2vw, 38px);
}

.final-links {
  justify-content: flex-end;
}

.button-copy span {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

footer {
  position: absolute;
  z-index: 9;
  left: 6vw;
  right: 6vw;
  bottom: 2.2vh;
  display: flex;
  justify-content: space-between;
  color: #756c60;
  font-size: 8px;
  letter-spacing: 0.22em;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  padding: 13px 18px;
  border: 1px solid var(--gold);
  background: #120e09;
  color: var(--gold-bright);
  font-size: 9px;
  letter-spacing: 0.2em;
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes breathe {
  0%, 100% { transform: translateY(0) rotate(-0.15deg); }
  50% { transform: translateY(-7px) rotate(0.15deg); }
}

@keyframes aura {
  0%, 100% { opacity: 0.45; transform: translate(-50%, -50%) scale(0.96); }
  50% { opacity: 0.78; transform: translate(-50%, -50%) scale(1.04); }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2%, -3%); }
  50% { transform: translate(-3%, 2%); }
  75% { transform: translate(3%, 4%); }
  100% { transform: translate(-2%, -2%); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 1440px) {
  .hero-copy { left: 6vw; }
  .hero-ca { left: 6vw; }
  .hero-general { right: 2vw; }
  .order-copy { left: 5vw; width: 42vw; }
  .command-general { right: 0; }
  .room-copy { right: 5vw; }
  .room-general { left: 2vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
