/* Root design tokens */
:root {
  --bg: #2e2e2e;
  --bg-alt: #363636;
  --card: #353535;
  --card-alt: #3d3d3d;
  --border-soft: rgba(217, 217, 217, 0.24);
  --border-strong: rgba(217, 217, 217, 0.5);
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.78);
  --heading: #ffffff;
  --accent: #3a6ea5;
  --accent-2: #e27d60;
  --accent-warm: #e27d60;
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --radius-sm: 14px;
  --container: 1180px;
  --blur: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -160px;
  pointer-events: none;
  background: radial-gradient(60% 80% at 10% 10%, rgba(255, 255, 255, 0.04) 0%, transparent 60%),
              radial-gradient(50% 60% at 80% 20%, rgba(58, 110, 165, 0.15) 0%, transparent 65%);
  z-index: 0;
  filter: blur(0);
  transform: translateZ(0);
}

main,
header,
footer {
  position: relative;
  z-index: 2;
}

/* Typography */
h1,
h2,
h3,
.brand {
  font-family: "DM Sans", Inter, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--heading);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 0.7rem;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

h3,
.h3 {
  font-size: 1.38rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

p {
  margin: 0 0 1.2rem;
  color: var(--text-soft);
  max-width: 72ch;
}

.lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.82);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

a:focus,
button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.muted {
  color: var(--text-soft);
}

/* Layout */
.container {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow {
  width: min(100%, 900px);
}

.section {
  position: relative;
  padding: clamp(104px, 14vw, 168px) 0;
  overflow: hidden;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.02) 100%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.section + .section {
  margin-top: clamp(36px, 6vw, 80px);
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section-top {
  padding-top: clamp(160px, 18vw, 200px);
  padding-bottom: clamp(72px, 10vw, 96px);
}

.grid {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}

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

.resum-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: stretch;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 4vw, 40px);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.module-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.module-card h3 {
  margin: 0;
}

.module-card .btn {
  margin-top: auto;
  width: fit-content;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(24px, 4vw, 40px);
}

.video-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.video-thumb {
  width: 100%;
  padding-top: 56%;
  background: radial-gradient(80% 80% at 50% 30%, rgba(226, 125, 96, 0.4), rgba(58, 110, 165, 0.25));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.video-meta {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-card--pending button {
  opacity: 0.6;
  cursor: not-allowed;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

@media (max-width: 960px) {
  .grid.two,
  .gallery {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1200px) {
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .grid.three {
    grid-template-columns: 1fr;
  }
}

/* Navbar */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 68px;
  z-index: 60;
  background: rgba(46, 46, 46, 0.95);
  border-bottom: 1px solid rgba(217, 217, 217, 0.15);
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(217, 217, 217, 0.3);
  background: var(--bg-alt);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-soft);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-links a:hover {
  color: var(--heading);
  background: rgba(58, 110, 165, 0.2);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: var(--heading);
  background: rgba(58, 110, 165, 0.28);
  box-shadow: inset 0 0 0 1px rgba(58, 110, 165, 0.5);
}

@media (max-width: 720px) {
  .nav-inner {
    flex-direction: column;
    justify-content: center;
    padding-top: 12px;
  }

  .navbar {
    height: auto;
    padding-bottom: 12px;
  }

  main {
    padding-top: 108px;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  padding-top: clamp(190px, 20vw, 240px);
  padding-bottom: clamp(120px, 12vw, 160px);
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 70% at 15% 15%, rgba(226, 125, 96, 0.22) 0%, transparent 70%),
              radial-gradient(60% 60% at 80% 30%, rgba(58, 110, 165, 0.24) 0%, transparent 70%);
  opacity: 1;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 78px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-eyebrow {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(58, 110, 165, 0.18);
  border: 1px solid rgba(226, 125, 96, 0.4);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  width: fit-content;
  backdrop-filter: blur(14px);
}

.hero-sub {
  font-size: 1.05rem;
  margin-bottom: 0;
  color: var(--text-soft);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-soft);
}

.tag::before {
  content: "\2022";
  color: var(--accent-2);
  font-size: 1.1rem;
  line-height: 1;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px;
}

.hero-visual {
  position: relative;
}

.hero-card {
  position: relative;
  padding: clamp(32px, 4.6vw, 40px);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(53, 53, 53, 0.95) 0%, rgba(41, 41, 41, 0.85) 100%);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  display: grid;
  gap: 24px;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  inset: -30% -40%;
  background: radial-gradient(60% 60% at 50% 30%, rgba(58, 110, 165, 0.35) 0%, transparent 70%);
  transform: rotate(8deg);
  opacity: 0.6;
  pointer-events: none;
}

.hero-card::after {
  inset: -40% -20%;
  background: radial-gradient(50% 50% at 40% 70%, rgba(226, 125, 96, 0.25) 0%, transparent 70%);
  transform: rotate(-12deg);
}

.hero-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.hero-card p {
  margin: 0;
  color: var(--text-soft);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.hero-stat {
  position: relative;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.2);
}

.hero-stat span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 8px;
}

.hero-stat strong {
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.2rem;
  color: var(--accent);
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: clamp(170px, 24vw, 220px);
    padding-bottom: clamp(120px, 18vw, 180px);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 180px;
    padding-bottom: 140px;
  }

  .hero-card {
    gap: 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

.hero--case .hero-visual picture {
  display: block;
  padding: 32px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 18px;
}

.hero--case .hero-visual img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.quick-stats div {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

.quick-stats span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
}

.quick-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: var(--heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--bg-alt);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
  border-color: rgba(217, 217, 217, 0.5);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), #d56b4f);
  border-color: transparent;
  box-shadow: 0 18px 36px rgba(226, 125, 96, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 26px 42px rgba(226, 125, 96, 0.45);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(58, 110, 165, 0.45);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(58, 110, 165, 0.18);
}

.btn.bright {
  background: rgba(58, 110, 165, 0.12);
  border-color: rgba(58, 110, 165, 0.45);
  color: var(--text);
}

.btn.bright:hover {
  background: rgba(58, 110, 165, 0.22);
}

/* Cards */
.card {
  position: relative;
  padding: clamp(32px, 3.8vw, 44px);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(53, 53, 53, 0.95) 0%, rgba(41, 41, 41, 0.85) 100%);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  margin-bottom: clamp(24px, 3vw, 32px);
}

.card::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(55% 55% at 40% 20%, rgba(58, 110, 165, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(58, 110, 165, 0.5);
}

.card:hover::before {
  opacity: 0.9;
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child {
  margin-bottom: 0;
}

.grid .card,
.grid.two .card {
  margin-bottom: 0;
}

.media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
  transition: transform 300ms ease;
}

.media:hover img {
  transform: scale(1.02);
}

/* Stats & badges */
.kpis {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.kpi {
  position: relative;
  padding: 26px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.kpi-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 8px;
}

.kpi-value {
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.1rem;
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(226, 125, 96, 0.18);
  border: 1px solid rgba(226, 125, 96, 0.45);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f4b28f, var(--accent-2));
  box-shadow: 0 0 10px rgba(226, 125, 96, 0.5);
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card .btn-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 720px) {
  .info-card .btn-column {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }
}

.highlight-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 10px;
}

.highlight-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--text-soft);
}

.highlight-list li::before {
  content: "•";
  color: var(--accent-2);
  font-size: 1.1rem;
  line-height: 1;
}

.info-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.info-grid .label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}

.info-grid .value {
  display: block;
  font-weight: 600;
  color: var(--heading);
}

/* Lists */
ul,
ol {
  margin: 0 0 1.2rem;
  padding-left: 1.25rem;
  color: var(--text-soft);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(217, 217, 217, 0.18);
}

.feature-list li::before {
  content: "\2713";
  color: var(--accent-2);
  font-size: 0.9rem;
  margin-top: 2px;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.checklist li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
}

.checklist li::before {
  content: "";
  width: 24px;
  height: 24px;
  margin-top: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(58, 110, 165, 0.85) 0%, rgba(226, 125, 96, 0.7) 80%);
  box-shadow: 0 0 16px rgba(58, 110, 165, 0.4);
}

.steps {
  display: grid;
  gap: 18px;
}

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: start;
}

.step-index {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--heading);
  background: rgba(58, 110, 165, 0.18);
  border: 1px solid rgba(58, 110, 165, 0.35);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
}

.step h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--text-soft);
}

.timeline {
  position: relative;
  margin-top: 24px;
  display: grid;
  gap: 20px;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 3px;
  width: 2px;
  background: linear-gradient(180deg, rgba(58, 110, 165, 0.4), rgba(226, 125, 96, 0.6));
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 6px;
  padding-left: 16px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -19px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(58, 110, 165, 0.5);
}

.timeline-year {
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.timeline-item h3 {
  margin: 0;
  font-size: 1.05rem;
}

.timeline-item p {
  margin: 0;
  color: var(--text-soft);
}

.typology-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.typology-grid .card {
  min-height: 100%;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-soft);
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(217, 217, 217, 0.18);
}

thead {
  background: rgba(53, 53, 53, 0.9);
  color: var(--heading);
}

thead th {
  font-weight: 700;
  color: var(--heading);
}

tbody tr:hover {
  background: rgba(217, 217, 217, 0.08);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease-out, transform 700ms ease-out;
}

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

/* Viewer */
.viewer {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--bg-alt);
  box-shadow: var(--shadow);
}

#stl-canvas {
  width: 100%;
  height: clamp(360px, 60vh, 680px);
  display: block;
  background: radial-gradient(120% 120% at 30% 20%, rgba(58, 110, 165, 0.35) 0%, rgba(40, 40, 40, 0.9) 60%, rgba(30, 30, 30, 0.95) 100%);
  border: none;
  border-radius: calc(var(--radius) - 6px);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4);
}

.viewer-status {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  background: rgba(53, 53, 53, 0.9);
  border: 1px solid var(--border-soft);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  transition: opacity 260ms ease, transform 260ms ease;
  pointer-events: none;
  z-index: 2;
}

.viewer-status--hidden {
  opacity: 0;
  transform: translateY(-8px);
}

.viewer-status--error {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  background: rgba(63, 12, 25, 0.82);
  box-shadow: 0 12px 28px rgba(63, 12, 25, 0.55);
}

.viewer-controls {
  margin-bottom: 32px;
  padding: clamp(28px, 3.6vw, 40px);
}

.controls-section + .controls-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(217, 217, 217, 0.18);
}

.controls-label {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-soft);
}

.model-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.model-chip {
  border: 1px solid rgba(217, 217, 217, 0.35);
  border-radius: 999px;
  background: rgba(53, 53, 53, 0.85);
  color: var(--text);
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.model-chip:hover {
  border-color: rgba(58, 110, 165, 0.5);
  color: var(--accent);
}

.model-chip.active {
  background: rgba(58, 110, 165, 0.18);
  border-color: rgba(58, 110, 165, 0.65);
  color: var(--text);
  box-shadow: 0 0 14px rgba(58, 110, 165, 0.25);
}

.model-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.model-library ul {
  padding-left: 18px;
  margin: 0 0 12px;
  opacity: 0.9;
}

.model-library li {
  margin-bottom: 4px;
}

@media (max-width: 720px) {
  .controls-section + .controls-section {
    margin-top: 20px;
    padding-top: 20px;
  }

  .model-card-actions {
    flex-direction: column;
  }
}

/* Progress bar */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  z-index: 80;
  background: #e27d60;
  box-shadow: 0 0 12px rgba(226, 125, 96, 0.4);
}

/* Page overlay transitions */
#page-overlay {
  position: fixed;
  inset: 0;
  background: rgba(46, 46, 46, 0.9);
  backdrop-filter: blur(18px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

#page-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Utilities */
.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;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(226, 125, 96, 0.45);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 6px rgba(226, 125, 96, 0.5);
}

.section .pill {
  margin-bottom: clamp(18px, 3.4vw, 36px);
}

@media (max-width: 540px) {
  .container {
    padding: 0 18px;
  }

  .cta-row {
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
