:root {
  --ui-scale: 1;
  --font-body: "Barlow Condensed", "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  --font-display: "Bebas Neue", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --bg: rgb(5, 6, 7);
  --bg-soft: #000000;
  --card: #111419;
  --line: #1d2430;
  --line-soft: rgba(255, 255, 255, 0.05);
  --line-softer: rgba(255, 255, 255, 0.04);
  --text: #f4f6fa;
  --muted: #a6afbf;
  --accent: #f01414;
  --accent-2: #ff3c3c;
  --good: #23d18b;
  --red-main: rgba(220, 30, 40, 1);
  --red-main-light: rgba(220, 30, 40, 0.35);
  --red-main-bg: rgba(220, 30, 40, 0.18);
  --red-main-bg-hover: rgba(220, 30, 40, 0.22);
  --red-main-bg-light: rgba(220, 30, 40, 0.07);
  --red-main-bg-lighter: rgba(220, 30, 40, 0.16);
  --red-main-focus: rgba(220, 30, 40, 0.2);
  --red-main-border: rgba(220, 30, 40, 0.48);
  --red-accent: rgb(255, 51, 51);
  --red-accent-light: rgb(255, 68, 68);
  --red-accent-lighter: rgb(255, 85, 85);
  --surface-1: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  --surface-2: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  --overlay-media: linear-gradient(0deg, rgba(5, 6, 7, 0.6), rgba(5, 6, 7, 0.08));
  --max: calc(1180px * var(--ui-scale));
  --radius: calc(18px * var(--ui-scale));
  --shadow: 0 calc(20px * var(--ui-scale)) calc(40px * var(--ui-scale)) rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background: radial-gradient(circle at 20% -10%, var(--red-main-bg), transparent 45%),
    radial-gradient(circle at 90% 35%, rgba(41, 118, 255, 0.12), transparent 42%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: 0.2px;
  scroll-behavior: smooth;
}

html {
  font-size: calc(16px * var(--ui-scale));
}

@media (max-width: 1280px) {
  :root {
    --ui-scale: 1;
  }
}

@media (max-width: 1000px) {
  :root {
    --ui-scale: 0.9;
  }
}

@media (max-width: 800px) {
  :root {
    --ui-scale: 0.85;
  }
}

@media (max-width: 600px) {
  :root {
    --ui-scale: 0.8;
  }
}

@media (max-width: 450px) {
  :root {
    --ui-scale: 0.75;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--max), calc(100% - 2.2rem));
  margin-inline: auto;
}

.section {
  padding: calc(70px * var(--ui-scale)) 0;
}

.section-compact {
  padding: calc(34px * var(--ui-scale)) 0 calc(18px * var(--ui-scale));
}

.section-alt {
  background: linear-gradient(135deg, var(--red-main-bg-light), rgba(15, 18, 26, 0.75) 40%, rgba(8, 10, 14, 0.95));
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.eyebrow {
  display: inline-block;
  padding: calc(6px * var(--ui-scale)) calc(12px * var(--ui-scale));
  border-radius: 999px;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  background: var(--red-main-bg);
  color: var(--red-accent-light);
}

.section-title {
  margin: calc(16px * var(--ui-scale)) 0 calc(12px * var(--ui-scale));
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 1px;
}

.section-title span {
  color: var(--red-accent);
}

.section-sub {
  margin: 0;
  max-width: calc(760px * var(--ui-scale));
  color: var(--muted);
  font-size: clamp(1.03rem, 2.2vw, 1.2rem);
  line-height: 1.55;
}

.accent {
  color: var(--red-accent);
}

.page-intro {
  padding-top: calc(118px * var(--ui-scale));
}

.text-center {
  text-align: center;
}

.section-sub-centered {
  margin-inline: auto;
}

section[id] {
  scroll-margin-top: calc(96px * var(--ui-scale));
}

.content-grid {
  margin-top: calc(24px * var(--ui-scale));
}

.align-center {
  align-items: center;
}

.align-start {
  align-items: start;
}

.actions-center {
  justify-content: center;
}

.visual-md {
  min-height: calc(360px * var(--ui-scale));
  margin-top: calc(28px * var(--ui-scale));
}

.collaboratori-page {
  background: radial-gradient(circle at 84% 8%, rgba(220, 30, 40, 0.14), transparent 36%),
    radial-gradient(circle at 8% 78%, rgba(35, 209, 139, 0.1), transparent 34%);
}

.ally-card {
  border: 1px solid var(--red-main-border);
  background: linear-gradient(180deg, rgba(220, 30, 40, 0.12), rgba(17, 20, 25, 0.8));
}

.ally-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(12px * var(--ui-scale));
  margin-top: 15px;
}

.ally-card-grid > * {
  min-width: 0;
  min-height: 0;
}

.ally-cell {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ally-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(calc(18px * var(--ui-scale)), 2vw, calc(28px * var(--ui-scale)));
  aspect-ratio: auto;
  height: auto;
}

.ally-card-copy .section-sub {
  margin-bottom: 0;
}

.ally-title-row {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
  margin-bottom: clamp(12px, 1.4vw, 18px);
}

.ally-title-row .section-title {
  margin: 0;
}

.ally-logo {
  display: block;
  width: clamp(200px, 50vw, 400px);
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25));
}

.ally-logo-blaster {
  width: clamp(200px, 30vw, 360px);
}

.ally-logo-shadow {
  width: clamp(70px, 10vw, 120px);
}

.ally-logo-banditi {
  width: clamp(100px, 15vw, 150px);
}

.ally-photo,
.photo-card,
.member-card {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.ally-photo,
.photo-card {
  position: relative;
}

.ally-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.ally-photo:hover img {
  transform: scale(1.04);
}

@media (max-width: 450px) {
  .ally-card-grid {
    grid-template-columns: 1fr;
  }

  .ally-cell {
    height: auto;
  }

  .ally-card-copy {
    aspect-ratio: auto;
    overflow: visible;
  }

}

/* Primitive condivise: stessi comportamenti, dettagli nei singoli componenti */
:is(.section-title, .hero h1) {
  font-family: var(--font-display);
}

:is(.card, .stat) {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.visual {
  overflow: hidden;
  border: 1px solid var(--line);
}

.visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(8px * var(--ui-scale));
  border-radius: calc(11px * var(--ui-scale));
  padding: calc(12px * var(--ui-scale)) calc(20px * var(--ui-scale));
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  transition: 0.22s ease;
}

.btn {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 calc(12px * var(--ui-scale)) calc(24px * var(--ui-scale)) var(--red-main-light);
}

.btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.15);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
  filter: none;
}

.btn-ghost {
  border-color: var(--red-main-border);
  color: var(--red-accent-lighter);
  background: var(--red-main-bg-light);
}

.btn-ghost:hover {
  background: var(--red-main-bg-lighter);
}

:is(.btn, .btn-ghost):focus-visible {
  outline: 3px solid var(--red-accent-light);
  outline-offset: 3px;
}

.hero {
  min-height: calc(100vh - calc(79px * var(--ui-scale)));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 6, 7, 0.94), rgba(5, 6, 7, 0.3));
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero h1 {
  margin: calc(14px * var(--ui-scale)) 0 calc(12px * var(--ui-scale));
  font-size: clamp(2.9rem, 8vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: 1.8px;
}

.hero p {
  margin: 0;
  font-size: clamp(1.06rem, 2.1vw, 1.33rem);
  color: #dbe1ef;
  max-width: calc(620px * var(--ui-scale));
  line-height: 1.5;
}

.video-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-1);
  box-shadow: var(--shadow);
}

.video-card video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(12px * var(--ui-scale));
  margin-top: calc(30px * var(--ui-scale));
}

.riga-statistiche {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(14px * var(--ui-scale));
  margin-top: calc(20px * var(--ui-scale));
  margin-bottom: calc(36px * var(--ui-scale));
  position: relative;
  z-index: 3;
}

.stat {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  padding: calc(24px * var(--ui-scale)) calc(20px * var(--ui-scale));
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--red-accent-light);
}

.stat span {
  color: var(--muted);
}

.grid-5,
.grid-4,
.grid-2,
.grid-1 {
  display: grid;
  gap: calc(16px * var(--ui-scale));
}

.grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-1 {
  grid-template-columns: 1fr;
}

@media (max-width: 600px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-1);
  border: 1px solid var(--line);
  padding: calc(20px * var(--ui-scale));
  text-align: center;
}

.card h3 {
  margin: calc(10px * var(--ui-scale)) 0 calc(8px * var(--ui-scale));
  font-size: 1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.form-grid,
.legal-block,
.ally-card {
  align-items: stretch;
  text-align: left;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(16px * var(--ui-scale));
}

.icon {
  width: calc(40px * var(--ui-scale));
  height: calc(40px * var(--ui-scale));
  border-radius: calc(10px * var(--ui-scale));
  display: grid;
  place-items: center;
  color: var(--red-accent-light);
  background: rgba(220, 30, 40, 0.16);
  font-size: 1.2rem;
}

.visual {
  position: relative;
  border-radius: calc(24px * var(--ui-scale));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  min-height: calc(320px * var(--ui-scale));
}

.visual img {
  position: absolute;
  inset: 0;
}

.visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* background: var(--overlay-media); */
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: calc(18px * var(--ui-scale));
  align-items: start;
}

.instagram-logo-link {
  display: inline-flex;
}

.instagram-logo {
  width: calc(32px * var(--ui-scale));
  height: calc(32px * var(--ui-scale));
  object-fit: contain;
  vertical-align: middle;
}

.form-grid {
  display: grid;
  gap: calc(14px * var(--ui-scale));
}

.field label {
  display: block;
  margin-bottom: calc(6px * var(--ui-scale));
  color: #dce2ef;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #2b3445;
  border-radius: calc(12px * var(--ui-scale));
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: calc(11px * var(--ui-scale)) calc(12px * var(--ui-scale));
  font-family: inherit;
  font-size: 1rem;
}

.field select option {
  color: #000;
}

.field textarea {
  min-height: calc(145px * var(--ui-scale));
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red-accent-light);
  box-shadow: 0 0 0 calc(3px * var(--ui-scale)) var(--red-main-focus);
}

.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: calc(9px * var(--ui-scale));
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-consent input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
  accent-color: var(--red-accent-light);
}

.form-consent input:focus-visible {
  outline: 2px solid var(--red-accent-light);
  outline-offset: 3px;
}

.form-consent a {
  color: #eef2fb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-status {
  margin: 0;
  padding: calc(12px * var(--ui-scale)) calc(14px * var(--ui-scale));
  border: 1px solid transparent;
  border-radius: calc(8px * var(--ui-scale));
  font-weight: 600;
  line-height: 1.35;
}

.form-status.is-success {
  background: #123d2d;
  border-color: #21845c;
  color: #e4fff3;
}

.form-status.is-error {
  background: #4b2910;
  border-color: #a85416;
  color: #fff0df;
}

.char-counter {
  margin: calc(-6px * var(--ui-scale)) 0 0;
  text-align: right;
  color: var(--muted);
  font-size: 0.85rem;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(16px * var(--ui-scale));
}

.doc-card {
  justify-content: flex-start;
}

.doc-card .actions {
  margin-top: auto;
  padding-top: calc(16px * var(--ui-scale));
}

.doc-card-featured {
  grid-column: 1 / -1;
  border-color: rgba(255, 85, 85, 0.52);
  background: linear-gradient(155deg, rgba(220, 30, 40, 0.23), rgba(17, 20, 25, 0.9));
}

.doc-card-legal {
  border-color: rgba(255, 85, 85, 0.4);
  background: linear-gradient(160deg, rgba(220, 30, 40, 0.12), rgba(17, 20, 25, 0.88));
}

.legal-layout {
  display: grid;
  gap: calc(16px * var(--ui-scale));
}

.legal-block h2 {
  margin: 0 0 calc(10px * var(--ui-scale));
  font-family: var(--font-display);
  letter-spacing: 0.7px;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
}

.legal-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.legal-list {
  margin: 0;
  padding-left: calc(20px * var(--ui-scale));
  color: var(--muted);
  display: grid;
  gap: calc(8px * var(--ui-scale));
}

.legal-list li {
  line-height: 1.5;
}

.legal-meta {
  border-color: var(--red-main-border);
  background: linear-gradient(180deg, rgba(220, 30, 40, 0.1), rgba(17, 20, 25, 0.9));
}

.faq-list {
  margin-top: calc(26px * var(--ui-scale));
  display: grid;
  gap: calc(12px * var(--ui-scale));
}

.faq-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: calc(14px * var(--ui-scale));
  background: var(--surface-1);
  padding: calc(12px * var(--ui-scale)) calc(14px * var(--ui-scale));
  text-align: center;
}

.faq-item summary {
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 700;
  color: #eef2fb;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: calc(14px * var(--ui-scale));
  top: calc(12px * var(--ui-scale));
  color: var(--red-accent-light);
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  margin: calc(12px * var(--ui-scale)) 0 calc(4px * var(--ui-scale));
  color: var(--muted);
  line-height: 1.5;
}

.photo-wall {
  --photo-gap: calc(12px * var(--ui-scale));
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: clamp(calc(4px * var(--ui-scale)), 0.80vw, calc(10px * var(--ui-scale)));
  gap: var(--photo-gap);
}

.photo-card {
  grid-column: span 3;
  grid-row: span 10;
}

.photo-card-ultrawide {
  grid-column: span 12;
  grid-row: span 20;
}

.photo-card-ultraalta {
  grid-column: span 6;
  grid-row: span 30;
}
.photo-card-wide {
  grid-column: span 6;
  grid-row: span 10;
}

.photo-card-quadrata {
  grid-column: span 6;
  grid-row: span 20;
}

.photo-card-alta {
  grid-column: span 3;
  grid-row: span 20;
}

.photo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.photo-card:hover img {
  transform: scale(1.04);
}

.section-membri {
  padding-top: calc(52px * var(--ui-scale));
}

.membri-head {
  margin-bottom: calc(34px * var(--ui-scale));
}

.members-row-block + .members-row-block {
  margin-top: calc(26px * var(--ui-scale));
}

.members-row-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  letter-spacing: 0.8px;
}

.members-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: calc(12px * var(--ui-scale));
  margin-bottom: 12px;
}

.carousel-pause-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.carousel-pause-control input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--red-accent);
}

.members-carousel {
  --member-card-width: clamp(calc(156px * var(--ui-scale)), 21vw, calc(210px * var(--ui-scale)));
  --member-text-min-height: calc(var(--member-card-width) * 2.05);
  --member-divider-width: clamp(calc(42px * var(--ui-scale)), 5.4vw, calc(56px * var(--ui-scale)));
  display: flex;
  gap: calc(12px * var(--ui-scale));
  overflow-x: auto;
  padding: calc(4px * var(--ui-scale)) calc(2px * var(--ui-scale)) calc(14px * var(--ui-scale));
  scroll-snap-type: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  touch-action: pan-x pan-y;
}

.members-carousel::-webkit-scrollbar {
  display: none;
}

.members-carousel.is-dragging {
  cursor: grabbing;
}

.member-card {
  flex: 0 0 var(--member-card-width);
  background: var(--card);
  scroll-snap-align: start;
}

.member-card figure {
  margin: 0;
  aspect-ratio: 9 / 16;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(220, 30, 40, 0.16));
}

.member-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.member-card:hover img {
  transform: scale(1.04);
}

.member-card p {
  margin: 0;
  padding: calc(10px * var(--ui-scale)) calc(12px * var(--ui-scale)) calc(12px * var(--ui-scale));
  font-size: 0.96rem;
  color: #d5dceb;
  line-height: 1.35;
}

.member-card-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: calc(10px * var(--ui-scale));
  padding: calc(12px * var(--ui-scale));
  background: linear-gradient(180deg, rgba(220, 30, 40, 0.22), rgba(17, 20, 25, 0.92));
  text-align: center;
  min-height: var(--member-text-min-height);
}

.member-card-text .member-badge {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.28);
  padding: calc(5px * var(--ui-scale)) calc(10px * var(--ui-scale));
  font-size: 0.73rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #f8f9fc;
}

.member-card-text p {
  padding: 0;
  white-space: normal;
  text-align: center;
}

.member-divider {
  flex: 0 0 var(--member-divider-width);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: calc(18px * var(--ui-scale));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.member-divider span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.77rem;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #b9c2d3;
}

.member-divider-endstart span {
  color: #ff8d8d;
}

.cta-band {
  text-align: center;
  padding: calc(78px * var(--ui-scale)) 0;
  background: linear-gradient(130deg, rgba(220, 30, 40, 0.15), rgba(0, 42, 58, 0.36));
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.reveal {
  opacity: 0;
  transform: translateY(calc(18px * var(--ui-scale)));
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.viewer-open {
  overflow: hidden;
}

.zoomable-image {
  cursor: zoom-in;
}

.zoomable-image:focus-visible,
.fullscreen-viewer-close:focus-visible {
  outline: 3px solid var(--red-accent-light);
  outline-offset: 3px;
}

.fullscreen-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(calc(16px * var(--ui-scale)), 3vw, calc(32px * var(--ui-scale)));
  background: rgba(4, 6, 9, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.fullscreen-viewer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.fullscreen-viewer-image {
  max-width: min(95vw, 1800px);
  max-height: 92vh;
  border-radius: calc(14px * var(--ui-scale));
  box-shadow: 0 calc(24px * var(--ui-scale)) calc(60px * var(--ui-scale)) rgba(0, 0, 0, 0.65);
  object-fit: contain;
  transform: scale(0.94);
  transition: transform 0.24s ease;
}

.fullscreen-viewer.is-open .fullscreen-viewer-image {
  transform: scale(1);
}

.fullscreen-viewer-close {
  position: absolute;
  top: calc(16px * var(--ui-scale));
  right: calc(16px * var(--ui-scale));
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border-radius: 999px;
  padding: calc(9px * var(--ui-scale)) calc(14px * var(--ui-scale));
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.fullscreen-viewer-close:hover {
  background: rgba(220, 30, 40, 0.42);
}

.doc-viewer {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: clamp(calc(12px * var(--ui-scale)), 2.6vw, calc(26px * var(--ui-scale)));
  background: rgba(4, 6, 9, 0.94);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.doc-viewer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.doc-viewer-shell {
  width: min(calc(980px * var(--ui-scale)), 98vw);
  height: min(90vh, calc(900px * var(--ui-scale)));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(16px * var(--ui-scale));
  background: #0b1118;
  box-shadow: 0 calc(28px * var(--ui-scale)) calc(66px * var(--ui-scale)) rgba(0, 0, 0, 0.65);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.doc-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(12px * var(--ui-scale));
  flex-wrap: wrap;
  padding: calc(12px * var(--ui-scale));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(220, 30, 40, 0.16), rgba(12, 17, 24, 0.96));
}

.doc-viewer-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  letter-spacing: 0.7px;
}

.doc-viewer-actions {
  display: flex;
  align-items: center;
  gap: calc(8px * var(--ui-scale));
  flex-wrap: wrap;
}

.doc-viewer-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}