:root {
  --ash: #090806;
  --charcoal: #15120e;
  --charcoal-soft: rgba(21, 18, 14, 0.82);
  --umber: #241a14;
  --bone: #f0e4cf;
  --smoke: #cfc1ab;
  --mist: #9e917d;
  --gold: #c79a51;
  --gold-soft: rgba(199, 154, 81, 0.26);
  --ember: #bf4d23;
  --ember-bright: #f08b42;
  --ice: #7fa4aa;
  --line: rgba(240, 228, 207, 0.14);
  --shadow: rgba(0, 0, 0, 0.58);
  --max: 1200px;
  --header-h: 122px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ash);
  color: var(--bone);
  font-family: Georgia, "Times New Roman", serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(9, 8, 6, 0.18), rgba(9, 8, 6, 0.88) 74%, var(--ash)),
    url("../IMG/background/background_desktop_site.png") center top / cover no-repeat;
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(240, 139, 66, 0.12), transparent 34%),
    linear-gradient(90deg, rgba(9, 8, 6, 0.82), rgba(9, 8, 6, 0.2) 48%, rgba(9, 8, 6, 0.82)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px);
  mix-blend-mode: multiply;
}

.ember-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.52;
}

.site-header {
  position: relative;
  min-height: auto;
  width: min(calc(100% - 28px), 880px);
  margin: 18px auto 0;
  padding: 8px 0 0;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  isolation: auto;
  animation: headerReveal 500ms ease-out;
}

.site-header::before,
.site-header::after {
  content: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.brand-link {
  width: min(100%, 920px);
  min-height: 0;
  height: auto;
  display: grid;
  place-items: center;
  padding: 10px 18px;
  position: relative;
  transition: transform 220ms ease, filter 220ms ease;
  opacity: 0;
  filter: saturate(1.02);
  animation: logoReveal 1020ms cubic-bezier(0.18, 0.78, 0.18, 1) 140ms forwards;
}

.brand-link::before {
  content: "";
  position: absolute;
  inset: 10px -38px 8px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 206, 130, 0.18), transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(199, 154, 81, 0.16), transparent 56%),
    radial-gradient(circle at 50% 50%, rgba(191, 77, 35, 0.12), transparent 74%);
  opacity: 0;
  pointer-events: none;
  filter: blur(12px);
  animation: logoHalo 1040ms cubic-bezier(0.22, 0.7, 0.2, 1) 160ms forwards;
}

.brand-link img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter:
    drop-shadow(0 14px 28px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 10px rgba(199, 154, 81, 0.08));
  transition: transform 220ms ease, filter 220ms ease;
}

.brand-link:hover,
.brand-link:focus-visible {
  transform: translateY(-1px);
}

.brand-link:hover img,
.brand-link:focus-visible img {
  transform: scale(1.02);
  filter:
    drop-shadow(0 12px 24px rgba(0, 0, 0, 0.76))
    drop-shadow(0 0 14px rgba(240, 139, 66, 0.1));
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 31;
  display: block;
  padding: 0;
  background:
    radial-gradient(circle at 88% 100%, rgba(199, 154, 81, 0.06), transparent 18%),
    linear-gradient(180deg, rgba(9, 8, 6, 0.06), rgba(9, 8, 6, 0.18));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.content-modal {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(6, 5, 4, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.content-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.content-modal-panel {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 22px 22px 20px;
  overflow-y: auto;
  border: 1px solid rgba(199, 154, 81, 0.22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 85% 0%, rgba(240, 139, 66, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(22, 18, 14, 0.98), rgba(10, 9, 8, 0.96));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.content-modal-close {
  position: sticky;
  top: 0;
  width: 40px;
  height: 40px;
  margin-left: auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(240, 228, 207, 0.12);
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.72);
  color: var(--bone);
  cursor: pointer;
}

.content-modal-close span {
  position: absolute;
  width: 16px;
  height: 1px;
  background: currentColor;
}

.content-modal-close span:first-child {
  transform: rotate(45deg);
}

.content-modal-close span:last-child {
  transform: rotate(-45deg);
}

.content-modal-body {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.content-modal-body p {
  margin-bottom: 0;
}

.content-modal-facts {
  margin: 4px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: rgba(240, 228, 207, 0.84);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.96rem;
  line-height: 1.55;
}

.card-detail-button {
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(199, 154, 81, 0.28);
  border-radius: 999px;
  background: rgba(9, 8, 6, 0.34);
  color: var(--bone);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card-detail-button:hover,
.card-detail-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(240, 139, 66, 0.42);
  background: rgba(240, 139, 66, 0.06);
}

.menu-panel {
  position: fixed;
  right: clamp(14px, 3vw, 38px);
  bottom: calc(clamp(14px, 3vw, 34px) + 70px);
  width: min(280px, calc(100vw - 28px));
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  border-radius: 28px;
  padding: 1px;
  overflow: hidden;
  background: transparent;
  box-shadow:
    0 0 24px rgba(240, 139, 66, 0.08),
    0 24px 54px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: opacity 260ms ease, transform 260ms ease;
}

.menu-overlay.is-open .menu-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.menu-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    rgba(191, 77, 35, 0.08),
    rgba(191, 77, 35, 0.12),
    rgba(240, 139, 66, 0.92),
    rgba(199, 154, 81, 0.72),
    rgba(255, 194, 111, 0.94),
    rgba(191, 77, 35, 0.14),
    rgba(191, 77, 35, 0.08)
  );
  animation: emberBorderSpin 6s linear infinite;
  opacity: 0;
  transform-origin: 50% 50%;
  z-index: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.menu-panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  border-radius: calc(28px - 1px);
  background:
    radial-gradient(circle at 92% 0%, rgba(240, 139, 66, 0.12), transparent 34%),
    radial-gradient(circle at 24% 12%, rgba(199, 154, 81, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(19, 16, 13, 0.9), rgba(9, 8, 6, 0.88));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
}

.menu-overlay.is-open .menu-panel::before {
  opacity: 1;
}

.menu-panel-inner {
  position: relative;
  z-index: 2;
  max-height: calc(100vh - 122px);
  max-height: calc(100dvh - 122px);
  padding: 12px 12px 11px;
  border-radius: calc(28px - 1px);
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.menu-panel-inner .section-kicker {
  margin-bottom: 6px;
  font-size: 0.7rem;
}

.menu-panel-inner h2 {
  max-width: none;
  margin-bottom: 2px;
  font-size: clamp(1.1rem, 1.4vw, 1.45rem);
  line-height: 1.02;
}

.menu-close {
  position: relative;
  width: 40px;
  height: 40px;
  margin-left: auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(240, 228, 207, 0.12);
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.62);
  color: var(--bone);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.menu-close span {
  position: absolute;
  width: 16px;
  height: 1px;
  background: currentColor;
}

.menu-close span:first-child {
  transform: rotate(45deg);
}

.menu-close span:last-child {
  transform: rotate(-45deg);
}

.menu-close:hover,
.menu-close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(240, 139, 66, 0.42);
  box-shadow: 0 0 18px rgba(240, 139, 66, 0.12);
}

.overlay-nav {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.overlay-nav a {
  min-height: 42px;
  padding: 9px 12px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(240, 228, 207, 0.07);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
  color: rgba(240, 228, 207, 0.88);
  font-size: clamp(0.78rem, 0.86vw, 0.86rem);
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.overlay-nav a:hover,
.overlay-nav a:focus-visible {
  transform: translateX(3px);
  border-color: rgba(240, 139, 66, 0.34);
  color: #efc98f;
  background: rgba(240, 139, 66, 0.04);
  box-shadow: 0 0 18px rgba(240, 139, 66, 0.08);
}

.overlay-link-badge {
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
  color: rgba(240, 228, 207, 0.62);
}

.brand-link:focus-visible,
.menu-orb:focus-visible,
.menu-close:focus-visible,
.overlay-nav a:focus-visible,
.content-modal-close:focus-visible,
.card-detail-button:focus-visible {
  outline: 2px solid rgba(255, 196, 112, 0.72);
  outline-offset: 3px;
}

.section-shell {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.eyebrow,
.section-kicker,
.diary-badge {
  margin: 0 0 14px;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 0.98;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(3.8rem, 10vw, 8.2rem);
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.72);
}

.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;
}

h2 {
  max-width: 840px;
  margin-bottom: 20px;
  font-size: clamp(2.25rem, 5vw, 5.2rem);
}

h3 {
  margin-bottom: 10px;
  font-size: clamp(1.28rem, 2.1vw, 2rem);
}

p {
  color: var(--smoke);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.72;
}

.hero-copy p,
.intro-copy p:not(.section-kicker),
.mission-copy p,
.power-copy p,
.closing-copy p,
.section-heading p:not(.section-kicker),
.finale p {
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

.hero,
.intro-band,
.manifesto-section,
.missions-section,
.power-section,
.threats-section,
.dev-diary-section,
.closing-section,
.finale {
  position: relative;
}

.hero {
  min-height: calc(100svh - var(--header-h));
  padding: 34px clamp(18px, 5vw, 72px) 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  grid-template-areas:
    "copy frame"
    "quote frame";
  align-items: center;
  gap: clamp(24px, 5vw, 54px);
}

.hero::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 36%;
  background: linear-gradient(180deg, transparent, rgba(9, 8, 6, 0.84) 72%, var(--ash));
}

.hero-copy,
.hero-frame,
.hero-quote {
  position: relative;
  z-index: 1;
}

.hero-copy {
  grid-area: copy;
  text-align: center;
}

.hero-lead {
  max-width: 760px;
  margin-bottom: 18px;
  color: rgba(240, 228, 207, 0.94);
  font-size: clamp(1.08rem, 1.65vw, 1.34rem);
}

.hero-subcopy {
  max-width: 670px;
  margin-bottom: 30px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(199, 154, 81, 0.24);
  border-radius: 999px;
  background: rgba(9, 8, 6, 0.28);
  color: rgba(240, 228, 207, 0.92);
  font-size: clamp(0.92rem, 1vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-led {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #f08b42;
  box-shadow:
    0 0 0 1px rgba(255, 196, 112, 0.2),
    0 0 10px rgba(240, 139, 66, 0.72),
    0 0 18px rgba(191, 77, 35, 0.38);
  animation: statusLedPulse 1.8s ease-in-out infinite;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.button {
  min-height: 48px;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-weight: 700;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--ember), var(--gold));
  color: #140c07;
  box-shadow: 0 18px 42px rgba(191, 77, 35, 0.24);
}

.button-ghost {
  border-color: rgba(240, 228, 207, 0.26);
  background: rgba(9, 8, 6, 0.38);
  color: var(--bone);
  backdrop-filter: blur(8px);
}

.hero-frame {
  grid-area: frame;
  overflow: hidden;
  border: 1px solid rgba(240, 228, 207, 0.16);
  border-radius: 12px;
  background: rgba(16, 13, 10, 0.62);
  box-shadow: 0 28px 72px var(--shadow);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 220ms ease, border-color 220ms ease;
}

.hero-frame:hover {
  border-color: rgba(199, 154, 81, 0.52);
}

.hero-frame img {
  width: 100%;
  aspect-ratio: 10 / 12;
  object-fit: contain;
}

.hero-quote {
  grid-area: quote;
  width: min(100%, 420px);
  padding: 22px 0 22px 26px;
  border-left: 1px solid rgba(199, 154, 81, 0.58);
  margin-inline: auto;
  text-align: center;
}

.hero-quote span,
.hero-quote strong {
  display: block;
  line-height: 1.04;
}

.hero-quote span {
  color: rgba(240, 228, 207, 0.76);
  font-size: clamp(1.5rem, 2.7vw, 2.25rem);
}

.hero-quote strong {
  margin-top: 8px;
  color: var(--ember-bright);
  font-size: clamp(2.3rem, 4.1vw, 4.1rem);
}

.menu-orb {
  position: fixed;
  right: clamp(18px, 5vw, 56px);
  bottom: clamp(18px, 4vw, 42px);
  z-index: 32;
  min-width: 96px;
  padding: 10px 13px 10px 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(199, 154, 81, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(18, 15, 12, 0.8), rgba(9, 8, 6, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 36px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 196, 112, 0.03);
  color: var(--bone);
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  opacity: 0;
  animation: menuOrbReveal 740ms ease-out 420ms forwards;
}

.menu-orb:hover,
.menu-orb:focus-visible,
.menu-orb[aria-expanded="true"] {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(240, 139, 66, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 42px rgba(0, 0, 0, 0.3),
    0 0 18px rgba(240, 139, 66, 0.12);
}

.menu-orb-core {
  width: 42px;
  height: 42px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(199, 154, 81, 0.26);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(199, 154, 81, 0.12), transparent 54%),
    rgba(13, 11, 9, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.menu-orb-core span {
  position: absolute;
  width: 15px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 221, 167, 0.7), rgba(240, 139, 66, 0.8));
}

.menu-orb-core span:nth-child(1) {
  transform: translateY(-5px);
}

.menu-orb-core span:nth-child(3) {
  transform: translateY(5px);
}

.menu-orb-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 228, 207, 0.84);
}

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  z-index: 3;
  width: 28px;
  height: 44px;
  border: 1px solid rgba(240, 228, 207, 0.42);
  border-radius: 18px;
  transform: translateX(-50%);
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--gold);
  transform: translateX(-50%);
  animation: cue 1.7s ease-in-out infinite;
}

.intro-band,
.manifesto-section,
.missions-section,
.power-section,
.threats-section,
.dev-diary-section,
.closing-section,
.finale {
  padding: clamp(76px, 11vw, 136px) 0;
}

.intro-band {
  background:
    linear-gradient(180deg, rgba(9, 8, 6, 0.96), rgba(20, 16, 12, 0.94)),
    linear-gradient(105deg, rgba(199, 154, 81, 0.08), transparent 50%);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: start;
}

.intro-copy,
.mission-copy,
.power-copy,
.closing-copy,
.section-heading {
  text-align: center;
}

.project-scroll-image {
  width: min(100%, 1120px);
  height: auto;
  margin: 10px auto 0;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 38px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 12px rgba(199, 154, 81, 0.06));
}

.vision-stack,
.mission-rail,
.threat-panels {
  display: grid;
  gap: 18px;
}

.vision-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vision-card,
.mission-card,
.threat-card,
.closing-card,
.diary-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(240, 228, 207, 0.04), rgba(9, 8, 6, 0.18)),
    var(--charcoal-soft);
  box-shadow: 0 24px 64px var(--shadow);
}

.hero-frame,
.vision-card,
.mission-card,
.portrait-frame,
.interface-frame,
.threat-card,
.closing-card,
.diary-media {
  background:
    radial-gradient(circle at 50% 30%, rgba(199, 154, 81, 0.08), transparent 48%),
    rgba(11, 10, 8, 0.9);
}

.vision-card img,
.mission-card img,
.threat-card img,
.closing-card img,
.diary-media img {
  width: 100%;
  display: block;
  object-position: center;
}

.vision-card img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.vision-card div,
.mission-card div,
.threat-card div,
.closing-card div,
.diary-content,
.media-content {
  padding: 22px;
  text-align: center;
}

.manifesto-section {
  background:
    linear-gradient(180deg, rgba(15, 12, 9, 0.94), rgba(9, 8, 6, 0.88)),
    linear-gradient(90deg, rgba(127, 164, 170, 0.08), transparent 44%);
}

.section-heading {
  max-width: 860px;
  margin-bottom: clamp(28px, 5vw, 54px);
  margin-left: auto;
  margin-right: auto;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pillar-card {
  min-height: 310px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(240, 228, 207, 0.05), rgba(9, 8, 6, 0.68)),
    rgba(21, 18, 14, 0.82);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
  transition: transform 220ms ease, border-color 220ms ease;
  text-align: center;
}

.pillar-card:hover {
  transform: translateY(-6px);
  border-color: rgba(199, 154, 81, 0.44);
}

.pillar-number {
  margin-bottom: auto;
  margin-left: auto;
  margin-right: auto;
  color: rgba(199, 154, 81, 0.4);
  font-size: 4.2rem;
  line-height: 0.9;
}

.pillar-card p {
  margin-bottom: 0;
  font-size: 0.98rem;
}

.missions-section {
  background:
    linear-gradient(180deg, rgba(9, 8, 6, 0.9), rgba(20, 16, 12, 0.94)),
    linear-gradient(100deg, rgba(191, 77, 35, 0.12), transparent 48%);
}

.mission-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: start;
}

.mission-rail {
  grid-template-columns: 1.2fr 0.8fr;
}

.mission-card-featured {
  grid-column: 1 / -1;
}

.mission-card img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.power-section {
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.94), rgba(9, 8, 6, 0.96)),
    linear-gradient(120deg, rgba(199, 154, 81, 0.12), transparent 54%);
}

.power-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(300px, 0.88fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: center;
}

.portrait-frame,
.interface-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--charcoal-soft);
  box-shadow: 0 24px 64px var(--shadow);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 220ms ease, border-color 220ms ease;
}

.portrait-frame:hover,
.interface-frame:hover {
  border-color: rgba(199, 154, 81, 0.52);
}

.portrait-frame img {
  width: 100%;
  min-height: 480px;
  object-fit: contain;
}

.interface-frame {
  grid-column: 2;
}

.interface-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.stat-line {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.stat-line span {
  padding: 9px 12px;
  border: 1px solid rgba(199, 154, 81, 0.32);
  border-radius: 999px;
  background: rgba(9, 8, 6, 0.34);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
}

.threats-section {
  background:
    linear-gradient(180deg, rgba(9, 8, 6, 0.96), rgba(18, 15, 12, 0.94)),
    linear-gradient(105deg, rgba(127, 164, 170, 0.1), rgba(191, 77, 35, 0.08));
}

.threats-grid {
  display: grid;
  gap: 24px;
}

.threat-panels {
  grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
  align-items: stretch;
}

.threat-card img {
  aspect-ratio: 4 / 5;
  object-fit: contain;
}

.threat-card-large {
  grid-column: span 2;
}

.threat-card-large img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.dev-diary-section {
  background:
    linear-gradient(180deg, rgba(18, 15, 12, 0.94), rgba(9, 8, 6, 0.97)),
    linear-gradient(90deg, rgba(199, 154, 81, 0.08), transparent 46%);
}

.diary-filters {
  margin-bottom: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.diary-filter {
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid rgba(199, 154, 81, 0.22);
  border-radius: 999px;
  background: rgba(9, 8, 6, 0.34);
  color: rgba(240, 228, 207, 0.86);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.diary-filter:hover,
.diary-filter:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(199, 154, 81, 0.5);
}

.diary-filter.is-active {
  background: linear-gradient(135deg, rgba(191, 77, 35, 0.26), rgba(199, 154, 81, 0.16));
  border-color: rgba(199, 154, 81, 0.6);
  color: var(--bone);
}

.diary-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.media-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(240, 228, 207, 0.04), rgba(9, 8, 6, 0.18)),
    var(--charcoal-soft);
  box-shadow: 0 24px 64px var(--shadow);
  transition: transform 220ms ease, border-color 220ms ease;
}

.media-card:hover {
  transform: translateY(-4px);
  border-color: rgba(199, 154, 81, 0.44);
}

.media-card--featured,
.media-card--wide {
  grid-column: span 8;
}

.media-card--vertical {
  grid-column: span 4;
}

.media-frame {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(240, 228, 207, 0.08);
  background:
    radial-gradient(circle at 50% 30%, rgba(199, 154, 81, 0.08), transparent 48%),
    rgba(11, 10, 8, 0.9);
}

.media-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.media-card--featured .media-frame img,
.media-card--wide .media-frame img {
  aspect-ratio: 16 / 9;
}

.media-card--vertical .media-frame img {
  aspect-ratio: 4 / 5;
}

.media-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.media-badge,
.media-layout {
  padding: 6px 8px;
  border: 1px solid rgba(199, 154, 81, 0.18);
  border-radius: 999px;
  background: rgba(9, 8, 6, 0.28);
}

.media-badge {
  margin: 0;
  color: rgba(240, 228, 207, 0.9);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-layout {
  color: var(--mist);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.media-content {
  display: grid;
  gap: 10px;
}

.media-content h3 {
  margin-bottom: 0;
}

.media-content p:last-child {
  margin-bottom: 0;
}

.diary-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 220ms ease, border-color 220ms ease;
}

.diary-card:hover {
  transform: translateY(-4px);
  border-color: rgba(199, 154, 81, 0.44);
}

.diary-card.featured,
.diary-card.wide {
  grid-column: span 8;
}

.diary-card.vertical {
  grid-column: span 4;
}

.diary-card.thin .diary-media {
  background:
    linear-gradient(180deg, rgba(240, 228, 207, 0.02), rgba(9, 8, 6, 0.28)),
    rgba(6, 6, 6, 0.8);
}

.diary-media {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(240, 228, 207, 0.08);
}

.diary-media img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.diary-card.vertical .diary-media img {
  aspect-ratio: 4 / 5;
  object-fit: contain;
}

.diary-card.wide .diary-media img,
.diary-card.featured .diary-media img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.diary-card.thin .diary-media img {
  aspect-ratio: 16 / 4;
  object-fit: contain;
  padding: 10px;
}

.diary-content {
  display: grid;
  gap: 10px;
}

.diary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.diary-badge {
  margin: 0;
  color: rgba(240, 228, 207, 0.9);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.diary-badge,
.diary-layout {
  padding: 6px 8px;
  border: 1px solid rgba(199, 154, 81, 0.18);
  border-radius: 999px;
  background: rgba(9, 8, 6, 0.28);
}

.diary-layout {
  color: var(--mist);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.diary-card h3 {
  margin-bottom: 0;
}

.diary-card p:last-child {
  margin-bottom: 0;
}

.diary-card[hidden] {
  display: none;
}

.closing-section {
  background:
    linear-gradient(180deg, rgba(9, 8, 6, 0.96), rgba(20, 16, 12, 0.92)),
    linear-gradient(100deg, rgba(127, 164, 170, 0.08), transparent 56%);
}

.closing-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(280px, 0.88fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
}

.closing-card img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.finale {
  min-height: 78svh;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(9, 8, 6, 0.94), rgba(9, 8, 6, 0.76)),
    url("../IMG/background/background_desktop_site.png") center / cover no-repeat;
}

.finale-inner {
  display: grid;
  justify-items: center;
}

.finale-logo {
  width: min(100%, 220px);
  height: auto;
  margin-bottom: 18px;
  object-fit: contain;
  filter:
    drop-shadow(0 16px 28px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 14px rgba(240, 139, 66, 0.08));
}

.finale h2,
.finale p {
  margin-right: auto;
  margin-left: auto;
  max-width: 760px;
}

.finale .button {
  margin-top: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@keyframes cue {
  0%,
  100% {
    opacity: 0.35;
    transform: translate(-50%, 0);
  }
  48% {
    opacity: 1;
    transform: translate(-50%, 14px);
  }
}

@keyframes headerReveal {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headerSweep {
  0% {
    opacity: 0;
    transform: translateX(110%) skewX(-18deg);
  }
  18% {
    opacity: 0.95;
  }
  72% {
    opacity: 0.68;
  }
  100% {
    opacity: 0;
    transform: translateX(-135%) skewX(-18deg);
  }
}

@keyframes ashDrift {
  from {
    background-position: 0 0, 40px 12px, -30px -10px;
  }
  to {
    background-position: -180px 0, -140px 12px, -290px -10px;
  }
}

@keyframes logoReveal {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.92);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes logoHalo {
  0% {
    opacity: 0;
    transform: scale(0.86);
  }
  32% {
    opacity: 1;
  }
  100% {
    opacity: 0.88;
    transform: scale(1);
  }
}

@keyframes statusLedPulse {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.92);
    box-shadow:
      0 0 0 1px rgba(255, 196, 112, 0.18),
      0 0 8px rgba(240, 139, 66, 0.56),
      0 0 14px rgba(191, 77, 35, 0.26);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
    box-shadow:
      0 0 0 1px rgba(255, 196, 112, 0.3),
      0 0 14px rgba(240, 139, 66, 0.92),
      0 0 26px rgba(191, 77, 35, 0.5);
  }
}

@keyframes navLinkReveal {
  from {
    opacity: 0;
    transform: translateY(-7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menuOrbReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes emberBorderSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .vision-stack,
  .pillar-grid,
  .threat-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .threat-card-large {
    grid-column: span 2;
  }

  .diary-card,
  .diary-card.vertical,
  .media-card,
  .media-card--vertical {
    grid-column: span 6;
  }

  .diary-card.featured,
  .diary-card.wide,
  .media-card--featured,
  .media-card--wide {
    grid-column: span 12;
  }
}

@media (max-width: 980px) {
  :root {
    --header-h: 108px;
  }

  .brand-link {
    width: min(100%, 760px);
    height: auto;
  }

  .brand-link img {
    max-height: 240px;
  }

  .site-header {
    width: min(calc(100% - 24px), 880px);
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .hero,
  .intro-grid,
  .mission-grid,
  .power-grid,
  .closing-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-areas:
      "copy"
      "frame"
      "quote";
    min-height: calc(100svh - var(--header-h));
    padding-top: 42px;
    padding-bottom: 112px;
  }

  .hero-frame img {
    aspect-ratio: 16 / 11;
    object-fit: contain;
  }

  .menu-orb {
    right: clamp(18px, 4vw, 32px);
    bottom: clamp(18px, 4vw, 28px);
  }

  .mission-rail {
    grid-template-columns: 1fr 1fr;
  }

  .interface-frame {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .site-bg {
    background:
      linear-gradient(180deg, rgba(9, 8, 6, 0.2), rgba(9, 8, 6, 0.9) 82%, var(--ash)),
      url("../IMG/background/background_mobile_site.png") center top / cover no-repeat;
  }

  :root {
    --header-h: 94px;
  }

  .site-header {
    width: calc(100% - 18px);
    margin-top: 10px;
    padding: 10px 18px;
  }

  .brand-link {
    width: min(100%, 520px);
    height: auto;
  }

  .brand-link img {
    max-height: 176px;
  }

  h1 {
    font-size: clamp(3.1rem, 16vw, 5rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .hero-actions,
  .stat-line,
  .diary-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .diary-filter {
    width: 100%;
  }

  .vision-stack,
  .pillar-grid,
  .mission-rail,
  .threat-panels,
  .closing-grid {
    grid-template-columns: 1fr;
  }

  .pillar-card {
    min-height: 240px;
  }

  .threat-card-large {
    grid-column: auto;
  }

  .diary-grid {
    grid-template-columns: 1fr;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .diary-card,
  .diary-card.vertical,
  .diary-card.featured,
  .diary-card.wide,
  .media-card,
  .media-card--vertical,
  .media-card--featured,
  .media-card--wide {
    grid-column: auto;
  }

  .portrait-frame img {
    min-height: 340px;
  }

  .menu-orb {
    right: 16px;
    bottom: 18px;
    min-width: 84px;
    padding-right: 10px;
  }

  .menu-orb-core {
    width: 38px;
    height: 38px;
  }

  .menu-orb-label {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  .menu-panel-inner {
    max-height: calc(100vh - 112px);
    max-height: calc(100dvh - 112px);
    padding: 11px 11px 10px;
  }

  .content-modal {
    padding: 14px;
  }

  .content-modal-panel {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    padding: 18px 16px 16px;
  }

  .content-modal-facts {
    font-size: 0.88rem;
  }

  .overlay-nav a {
    min-height: 42px;
    padding: 9px 11px;
    font-size: 0.82rem;
  }

  .scroll-cue {
    display: none;
  }

  .finale-logo {
    width: min(100%, 180px);
    margin-bottom: 14px;
  }
}

@media (max-height: 900px) {
  .menu-panel {
    bottom: calc(clamp(14px, 3vw, 34px) + 66px);
    max-height: calc(100vh - 108px);
    max-height: calc(100dvh - 108px);
  }

  .menu-panel-inner {
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    padding: 11px 11px 10px;
  }

  .menu-panel-inner .section-kicker {
    font-size: 0.68rem;
    margin-bottom: 5px;
  }

  .menu-panel-inner h2 {
    font-size: clamp(1.02rem, 1.2vw, 1.28rem);
  }

  .overlay-nav {
    margin-top: 8px;
    gap: 6px;
  }

  .overlay-nav a {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 0.8rem;
  }
}

@media (max-height: 820px) {
  .content-modal-panel {
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
  }
}

@media (max-height: 760px) {
  .menu-panel {
    width: min(272px, calc(100vw - 28px));
    bottom: calc(clamp(14px, 3vw, 34px) + 64px);
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
  }

  .menu-panel-inner {
    max-height: calc(100vh - 98px);
    max-height: calc(100dvh - 98px);
    padding: 10px 10px 9px;
  }

  .menu-panel-inner h2 {
    font-size: 1rem;
  }

  .content-modal-panel {
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
  }

  .overlay-nav a {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.78rem;
  }
}

@media (max-height: 680px) {
  .menu-panel {
    width: min(264px, calc(100vw - 24px));
    bottom: calc(clamp(14px, 3vw, 34px) + 60px);
    max-height: calc(100vh - 88px);
    max-height: calc(100dvh - 88px);
  }

  .menu-panel-inner {
    max-height: calc(100vh - 90px);
    max-height: calc(100dvh - 90px);
    padding: 9px 9px 8px;
  }

  .menu-panel-inner .section-kicker {
    font-size: 0.66rem;
  }

  .menu-panel-inner h2 {
    font-size: 0.96rem;
    margin-bottom: 1px;
  }

  .overlay-nav {
    margin-top: 7px;
    gap: 5px;
  }

  .overlay-nav a {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.76rem;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .site-header,
  .site-header::before,
  .site-header::after,
  .brand-link,
  .brand-link::before,
  .brand-link img,
  .menu-orb,
  .menu-panel::before,
  .status-led,
  .content-modal,
  .content-modal-panel {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }

  .brand-link,
  .menu-orb {
    opacity: 1 !important;
  }

  .ember-canvas {
    display: none;
  }
}
