:root {
  --bg: #020304;
  --panel: rgba(9, 11, 15, 0.82);
  --panel-strong: rgba(5, 7, 10, 0.94);
  --line: rgba(176, 198, 231, 0.12);
  --text: #f3f7ff;
  --muted: #919baa;
  --accent: #c8d4e8;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(125, 199, 255, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 22%),
    linear-gradient(180deg, #010203 0%, #020304 52%, #05080c 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.52), transparent 85%);
}

.site-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero,
.detail-page,
.content-card,
.content-image-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  border-radius: 28px;
  overflow: hidden;
  padding: 24px;
}

.hero-compact {
  margin-bottom: 24px;
}

.topbar,
.content-layout,
.detail-layout,
.hero-content {
  display: flex;
  gap: 24px;
}

.topbar {
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(159, 199, 255, 0.14), rgba(255, 255, 255, 0.04));
}

.brand-mark img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 138px;
  object-fit: contain;
}

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

.brand-copy strong,
.hero h1,
.detail-copy h1,
.content-card h1 {
  font-family: "Space Grotesk", sans-serif;
}

.brand-copy small,
.detail-copy p,
.prose-card p {
  color: var(--muted);
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-right,
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
}

.topbar-links a,
.detail-back,
.lang-switcher button {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(176, 198, 231, 0.14);
  background: linear-gradient(180deg, rgba(14, 16, 21, 0.92), rgba(8, 10, 14, 0.92));
  font: inherit;
  cursor: pointer;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
}

.lang-switcher button[data-lang="it"] {
  background: linear-gradient(
    90deg,
    rgba(0, 146, 70, 0.16) 0%,
    rgba(244, 245, 240, 0.08) 52%,
    rgba(191, 10, 48, 0.14) 100%
  );
}

.lang-switcher button[data-lang="en"] {
  background: linear-gradient(
    135deg,
    rgba(1, 33, 105, 0.18) 0%,
    rgba(255, 255, 255, 0.08) 52%,
    rgba(200, 16, 46, 0.14) 100%
  );
}

.lang-switcher button[data-lang="zh"] {
  background: linear-gradient(
    135deg,
    rgba(222, 41, 16, 0.18) 0%,
    rgba(255, 222, 0, 0.1) 100%
  );
}

.topbar-links a:hover,
.topbar-links a.is-current,
.lang-switcher button:hover,
.detail-back:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 212, 232, 0.28);
  background: linear-gradient(180deg, rgba(22, 25, 32, 0.96), rgba(12, 14, 19, 0.96));
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.lang-switcher button.is-active {
  border-color: rgba(227, 236, 255, 0.24);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.lang-switcher button[data-lang="it"].is-active {
  background: linear-gradient(
    90deg,
    rgba(0, 146, 70, 0.3) 0%,
    rgba(244, 245, 240, 0.16) 52%,
    rgba(191, 10, 48, 0.28) 100%
  );
}

.lang-switcher button[data-lang="en"].is-active {
  background: linear-gradient(
    135deg,
    rgba(1, 33, 105, 0.32) 0%,
    rgba(255, 255, 255, 0.16) 52%,
    rgba(200, 16, 46, 0.28) 100%
  );
}

.lang-switcher button[data-lang="zh"].is-active {
  background: linear-gradient(
    135deg,
    rgba(222, 41, 16, 0.32) 0%,
    rgba(255, 222, 0, 0.2) 100%
  );
}

.detail-topbar {
  margin-bottom: 18px;
}

.hero-simple,
.hero-copy {
  padding-top: 24px;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 520px);
  align-items: start;
}

.hero-copy {
  min-width: 0;
  padding-top: 10px;
  max-width: 700px;
}

.hero-panel img {
  display: block;
  width: 100%;
  height: clamp(320px, 38vw, 460px);
  border-radius: 18px;
  object-fit: cover;
}

.hero-panel {
  display: grid;
  gap: 14px;
  align-self: start;
  padding: 18px;
  margin-top: 18px;
  border: 1px solid rgba(176, 198, 231, 0.16);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(9, 11, 15, 0.98), rgba(5, 7, 10, 0.98));
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 36px rgba(159, 199, 255, 0.06);
  text-decoration: none;
  color: var(--text);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.hero-panel:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(159, 199, 255, 0.28);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 42px rgba(159, 199, 255, 0.08);
}

.hero-panel-copy {
  display: grid;
  gap: 6px;
}

.hero-panel-copy strong {
  font-size: 1.18rem;
  line-height: 1.15;
}

.hero-panel-copy span {
  color: var(--muted);
}

.hero-panel-eyebrow {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.detail-copy h1,
.content-card h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 0.98;
}

.hero-lead {
  max-width: 38rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.filter-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  transform: translateY(-1px);
  border-color: rgba(200, 212, 232, 0.28);
  background: linear-gradient(180deg, rgba(22, 25, 32, 0.96), rgba(12, 14, 19, 0.96));
}

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

.gallery-card {
  position: relative;
  grid-column: span 4;
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: var(--panel-strong);
  isolation: isolate;
}

.gallery-card.gallery-card--half {
  grid-column: span 6;
}

.gallery-card.gallery-card--single {
  grid-column: 5 / span 4;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 16, 0.05) 30%, rgba(3, 7, 16, 0.88) 100%);
}

.gallery-card img,
.content-image-card img,
.brochure-card img,
.detail-card img {
  display: block;
  width: 100%;
}

.gallery-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
  transform: scale(1.08);
}

.gallery-card-copy {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 24px;
}

.card-topline,
.detail-meta strong {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.gallery-card-copy h3 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.15;
}

.gallery-card-copy p {
  margin: 0;
  color: #d5e5f7;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.content-page {
  display: grid;
  gap: 24px;
}

.content-layout {
  align-items: flex-start;
}

.content-image-card,
.content-card,
.detail-card {
  border-radius: 28px;
  overflow: hidden;
}

.content-image-card {
  margin: 0;
  flex: 1.1 1 0;
  padding: 16px;
}

.content-image-card img {
  height: auto;
  object-fit: contain;
}

.content-card {
  flex: 1 1 0;
  padding: 28px;
}

.prose-card p {
  margin: 0 0 16px;
  line-height: 1.8;
}

.stacked-cards {
  flex: 1 1 0;
  display: grid;
  gap: 24px;
}

.stacked-cards-horizontal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.spec-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
  color: var(--muted);
}

.single-card-page {
  display: block;
}

.brochure-card {
  padding: 18px;
}

.brochure-frame {
  position: relative;
}

.brochure-replace-label {
  position: absolute;
  left: 58.7%;
  top: 67.8%;
  transform: translate(-50%, -50%);
  min-width: 34%;
  padding: 0.3em 0.7em 0.36em;
  border-radius: 18px;
  background: rgba(3, 7, 16, 0.96);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.9rem, 1.28vw, 1.82rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.bio-gallery {
  display: grid;
  gap: 24px;
}

.bio-portrait-stack {
  flex: 1.1 1 0;
  align-self: stretch;
}

.bio-observatory-photo {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
}

.bio-gallery-intro h2 {
  margin: 0 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.08;
}

.bio-gallery-intro p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.bio-shot {
  grid-column: span 3;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.bio-shot-large {
  grid-column: span 6;
}

.bio-shot-tall {
  grid-column: span 3;
  grid-row: span 2;
}

.bio-shot-wide {
  grid-column: span 6;
}

.bio-shot img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.detail-page {
  padding: 28px;
  border-radius: 28px;
  overflow: hidden;
}

.detail-layout {
  align-items: flex-start;
}

.detail-card {
  margin: 0;
  flex: 1.1 1 0;
  padding: 16px;
  background: var(--panel-strong);
}

.detail-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.detail-copy {
  flex: 1 1 0;
  padding-top: 8px;
}

.detail-copy p {
  font-size: 1rem;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}

.detail-meta div {
  min-width: 160px;
}

.detail-meta strong {
  display: block;
  margin-bottom: 8px;
}

.detail-description {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.detail-description p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.detail-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.detail-actions a:first-child {
  color: var(--text);
  border: 1px solid rgba(200, 212, 232, 0.24);
  background: linear-gradient(135deg, rgba(31, 38, 50, 0.98), rgba(14, 17, 23, 0.98));
}

.detail-actions a:last-child {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-empty {
  display: grid;
  gap: 18px;
  max-width: 640px;
}

@media (max-width: 1080px) {
  .content-layout,
  .topbar,
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-right {
    justify-content: space-between;
  }

  .lang-switcher {
    margin-left: 0;
  }

  .detail-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-panel {
    width: 100%;
    max-width: 560px;
    margin-top: 8px;
  }

  .detail-card,
  .content-image-card,
  .content-card,
  .stacked-cards,
  .detail-copy {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: none;
  }

  .gallery-card,
  .gallery-card.gallery-card--half,
  .gallery-card.gallery-card--single {
    grid-column: span 6;
  }

  .bio-shot,
  .bio-shot-large,
  .bio-shot-tall,
  .bio-shot-wide {
    grid-column: span 6;
    grid-row: auto;
  }

  .stacked-cards-horizontal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.page-detail {
    overflow-x: hidden;
  }

  .site-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 10px;
  }

  .hero,
  .detail-page,
  .content-card,
  .content-image-card {
    border-radius: 22px;
  }

  .hero,
  .content-card {
    padding: 18px;
  }

  .detail-page {
    padding: 14px;
    overflow-x: hidden;
  }

  .content-image-card {
    width: 100%;
    padding: 12px;
  }

  .content-image-card img,
  .bio-observatory-photo {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 16px;
  }

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

  .gallery-card,
  .gallery-card.gallery-card--half,
  .gallery-card.gallery-card--single {
    grid-column: auto;
    max-width: 100%;
    min-height: 300px;
  }

  .bio-collage {
    width: 100%;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .bio-shot,
  .bio-shot-large,
  .bio-shot-tall,
  .bio-shot-wide {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    grid-column: auto;
  }

  .bio-shot img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
  }

  .detail-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    overflow: hidden;
  }

  .detail-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    border-radius: 0;
  }

  .detail-copy,
  .detail-layout,
  .detail-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .detail-layout {
    gap: 18px;
    margin-top: 20px;
  }

  .gallery-card-copy {
    padding: 18px;
  }

  .gallery-card-copy h3 {
    font-size: 1.08rem;
  }
}
