/* ================================================================
   CyberDiag — Styles
   ================================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Neue Montreal';
  src: url('assets/fonts/neue-montreal-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Supply Mono';
  src: url('assets/fonts/Supply-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --white: #ffffff;
  --black: #000000;
  --dark: #0a0a0f;
  --gray-100: #f5f5f7;
  --gray-200: #e5e5ea;
  --gray-400: #aeaeb2;
  --gray-600: #636366;
  --accent: #4f8cff;
  --accent-dark: #3a6fdb;
  --radius: 18px;
  --font: 'Neue Montreal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Supply Mono';
  --hero-frame-inset: 1vw;
}

html {
  scroll-behavior: auto;
  /* Lenis handles smooth scroll */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE / Edge */
}

body::-webkit-scrollbar {
  display: none;
  /* Chrome / Safari / Opera */
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.preloader-content {
  display: flex;
  align-items: center;
  position: relative;
}

#preloader-logo {
  width: 144px;
  height: 144px;
  object-fit: contain;
  opacity: 0;
  position: relative;
  z-index: 2;
  will-change: transform, opacity;
}

#preloader-name {
  font-family: var(--font);
  font-size: 6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  opacity: 0;
  white-space: nowrap;
  position: absolute;
  left: 100%;
  top: 50%;
  /* no CSS transform — GSAP handles yPercent + y */
  padding-left: 28px;
  will-change: transform, opacity;
}

/* ---------- Headbar ---------- */
#headbar {
  position: fixed;
  top: calc(var(--hero-frame-inset) + 16px);
  left: calc(var(--hero-frame-inset) + 16px);
  right: calc(var(--hero-frame-inset) + 16px);
  z-index: 1000;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(63, 63, 63, 0.637);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#headbar.hidden {
  transform: translateY(calc(-100% - var(--hero-frame-inset) - 10px - 8px));
  pointer-events: none;
}

.headbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.headbar-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.headbar-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}

.headbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-lang {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--dark);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  padding: 7px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-lang::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--dark);
  transform: translateY(102%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.btn-lang:hover {
  color: var(--white);
}

.btn-lang:hover::before {
  transform: translateY(0);
}

.btn-lang .lang-label {
  position: relative;
  z-index: 1;
}

.btn-download-nav {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--dark);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  padding: 7px 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  transition: color 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-download-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--dark);
  transform: translateY(102%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.btn-download-nav:hover {
  color: var(--white);
}

.btn-download-nav:hover::before {
  transform: translateY(0);
}

.btn-download-nav [data-i18n],
.btn-download-nav span {
  position: relative;
  z-index: 1;
}

/* ---------- Hero / Header Section ---------- */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--hero-frame-inset);
}

.hero-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
}

/* Background image clipped to rounded corners via pseudo-element */
.hero-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url('assets/header background.avif');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* 3D logo – inside .hero-frame, overflows bottom (covered by white sections below).
   Height = 200% of the frame, centre anchored at 2/3 frame height.
   Frame has no overflow:hidden so logo extends past the bottom freely. */
.hero-logo-wrapper {
  position: absolute;
  left: 60%;
  top: 72.66%;
  transform: translate(-50%, -50%);
  height: 200%;
  pointer-events: none;
  z-index: 1;
  /* above ::before bg, below text */
  will-change: transform;
}

.hero-3d-logo {
  height: 100%;
  width: auto;
  object-fit: contain;
  opacity: 100%;
  transform: scale(2);
  transform-origin: center center;
}

/* Hero text block – left side */
.hero-text {
  position: relative;
  z-index: 2;
  margin-left: 32px;
  max-width: 520px;
}

.hero-overtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(4.4rem, 10vw, 8rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 6px;
}

.hero-description {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 1);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 460px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 26px;
  background: var(--white);
  color: var(--dark);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  transition: color 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--dark);
  transform: translateY(102%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.btn-primary:hover {
  color: var(--white);
}

.btn-primary:hover::before {
  transform: translateY(0);
}

.btn-secondary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 26px;
  background: transparent;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  transition: color 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: translateY(102%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.btn-secondary:hover {
  color: var(--dark);
}

.btn-secondary:hover::before {
  transform: translateY(0);
}

.btn-primary span,
.btn-secondary span {
  position: relative;
  z-index: 1;
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary:hover .btn-arrow,
.btn-secondary:hover .btn-arrow {
  transform: translate(4px, -3px);
}

/* Bottom indicators */
.hero-scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  z-index: 2;
}

.hero-scroll-arrow {
  font-size: 1.1rem;
  line-height: 1;
}

.hero-year {
  position: absolute;
  bottom: 28px;
  right: 32px;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-ubs-logo {
  height: 28px;
  width: auto;
  opacity: 0.78;
  display: block;
  filter: brightness(0) invert(1);
}

/* ---------- General Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--dark);
}

/* ---------- Marquee Band ---------- */
.marquee-band {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--white);
  padding: 160px 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  animation: marquee 25s linear infinite;
}

.marquee-text {
  font-family: var(--font);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1;
}

.marquee-dot {
  color: #ff0053;
  font-style: normal;
  margin: 0 0.4em;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ---------- Discover Section ---------- */
.discover-section {
  background: var(--white);
  padding: 100px 0 120px;
}

.discover-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  text-align: center;
  margin-bottom: 56px;
  padding: 0 var(--hero-frame-inset);
}

.discover-grid {
  display: flex;
  gap: 16px;
  max-width: none;
  margin: 0;
  padding: 0 var(--hero-frame-inset);
  /* Height = width of right column (flex:1 of 3 total) so it stays a square */
  height: calc((100vw - 2 * var(--hero-frame-inset) - 16px) / 3);
  align-items: stretch;
}

/* Left column - 2/3 */
.discover-left {
  flex: 2;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark);
}

.discover-mockup {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.discover-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 36px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 3;
}

.discover-name {
  font-family: var(--font);
  font-size: clamp(4rem, 7vw, 6rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
}

.discover-desc {
  font-family: var(--font);
  font-size: clamp(1.7rem, 2vw, 2rem);
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  max-width: 520px;
}

.discover-accent {
  color: #ff0053;
  font-style: normal;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

/* Right column - square, height driven by grid */
.discover-right {
  flex: 1;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark);
}

/* Dark dim over video */
.video-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
  pointer-events: none;
}

/* Animated film grain over video */
.video-grain-layer {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.13;
  animation: grain 0.35s steps(1) infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes grain {
  0% {
    transform: translate(0, 0);
  }

  20% {
    transform: translate(-4%, -4%);
  }

  40% {
    transform: translate(4%, -4%);
  }

  60% {
    transform: translate(-4%, 4%);
  }

  80% {
    transform: translate(4%, 4%);
  }

  100% {
    transform: translate(0, 0);
  }
}

.discover-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.discover-caption {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 28px 32px;
  z-index: 3;
}

.discover-caption-text {
  font-family: var(--font);
  font-size: clamp(3.2rem, 5.5vw, 5.5rem);
  font-weight: 600;
  color: var(--white);
  text-align: right;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.discover-animation {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  pointer-events: none;
}

/* ── Window chrome (neutral app frame) ── */
.window-chrome {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #131318;
  border-radius: var(--radius);
  overflow: hidden;
}

.window-titlebar {
  flex-shrink: 0;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #1a1a21;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 10px;
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dot:nth-child(1) {
  background: #ff5f57;
}

.window-dot:nth-child(2) {
  background: #febc2e;
}

.window-dot:nth-child(3) {
  background: #28c840;
}

.window-title {
  flex: 1;
  text-align: center;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.01em;
  padding-right: 42px;
  /* compensate dots to visually center */
}

.window-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- Hero Tagline (between hero and marquee) ---------- */
.hero-tagline {
  position: relative;
  z-index: 1;
  background: var(--white);
  padding: 28px var(--hero-frame-inset) 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.06em;
}

/* ---------- Features / Fonctionnalités ---------- */
.features-section {
  background: var(--white);
  padding-bottom: 100px;
}

.features-title {
  text-align: center;
  width: 100%;
  font-size: clamp(3.6rem, 7vw, 5.2rem);
}

.features-subtitle {
  text-align: center;
  font-family: var(--font);
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  color: var(--gray-600);
  margin-top: 12px;
}

/* Selector tabs */
.features-selector {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  padding: 0 var(--hero-frame-inset);
  flex-wrap: wrap;
}

.feature-tab {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 22px;
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  background: transparent;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.3s ease;
}

.feature-tab:hover {
  border-color: var(--dark);
  color: var(--dark);
}

.feature-tab.active {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

/* Carousel */
.features-carousel {
  position: relative;
  width: 100%;
  height: clamp(540px, 65vw, 820px);
  margin-top: 48px;
  overflow: hidden;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.features-carousel:active {
  cursor: grabbing;
}

.features-track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Individual card */
.feature-card {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(320px, 30vw, 460px);
  aspect-ratio: 63 / 88;
  background: #111114;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 28px 0;
  overflow: hidden;
  will-change: transform;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.feature-card-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 4px;
}

.feature-card-title {
  font-family: var(--font);
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  font-weight: 500;
  color: var(--white);
  text-align: center;
  letter-spacing: -0.01em;
  margin-top: 4px;
}

.feature-card-dot {
  color: #ff0053;
  font-size: 1.6rem;
  margin: 20px 0 10px;
  display: block;
  text-align: center;
}

.feature-card-desc {
  font-family: var(--font);
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  color: var(--gray-400);
  text-align: center;
  line-height: 1.55;
  padding: 0 8px;
  margin-top: 10px;
}

.feature-card-img-wrap {
  margin-top: auto;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}

.feature-card-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top center;
}

/* ---------- Download / Téléchargement Section ---------- */
.download-section {
  background: var(--white);
  padding: 0 var(--hero-frame-inset) 0;
}

.dl-frame {
  background: #0A0A0A;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

/* Shared sub-frame style — 1px gradient border fading to black toward bottom-right */
.dl-subframe {
  position: relative;
  background: #0A0A0A;
  border-radius: 14px;
  overflow: hidden;
}

.dl-subframe::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.08) 40%,
      rgba(0, 0, 0, 0.0) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* ── Top area: left + right split ── */
.dl-top {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 520px;
}

/* Left 2/3 */
.dl-left {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dl-left-top {
  display: flex;
  gap: 16px;
  flex: 1;
}

.dl-left-bottom {
  flex: 1.4;
  display: flex;
}

/* Right 1/3 — image */
.dl-right {
  flex: 1;
  display: flex;
}

.dl-img-box {
  flex: 1;
  display: flex;
  border-radius: 0 14px 14px 0 !important;
}

.dl-img-box::before {
  border-radius: 0 14px 14px 0 !important;
}

.dl-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0 14px 14px 0;
}

/* ── CTA encouragement box ── */
.dl-cta-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 24px;
  gap: 14px;
}

.dl-cta-icon {
  color: #ff0053;
  font-size: 1.6rem;
}

.dl-cta-text {
  font-family: var(--font);
  font-size: clamp(0.92rem, 1.1vw, 1.08rem);
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

/* ── Distro animated box ── */
.dl-distro-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 24px;
  gap: 8px;
}

.dl-distro-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}

/* Ticker — overflow hidden shows only one line at a time */
.dl-distro-ticker {
  position: relative;
  width: 100%;
  height: clamp(2.2rem, 3.5vw, 3.4rem);
  overflow: hidden;
}

.dl-distro-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.dl-distro-name {
  font-family: var(--font);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.2;
  height: clamp(2.2rem, 3.5vw, 3.4rem);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Install box (download + terminal) ── */
.dl-install-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 20px;
}

.dl-download-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dl-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--dark);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.dl-download-btn:hover {
  background: #ff0053;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 0, 83, 0.3);
}

.dl-version {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
}

/* ── Faux Terminal ── */
.dl-terminal {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #111114;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dl-terminal-bar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #1a1a21;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 10px;
}

.dl-terminal-dots {
  display: flex;
  gap: 6px;
}

.dl-tdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dl-tdot-r {
  background: #ff5f57;
}

.dl-tdot-y {
  background: #febc2e;
}

.dl-tdot-g {
  background: #28c840;
}

.dl-terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.3);
  padding-right: 42px;
}

.dl-terminal-body {
  padding: 18px 20px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', var(--font-mono), monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  flex: 1;
}

.dl-term-line {
  white-space: nowrap;
}

.dl-term-blank {
  height: 1.2em;
}

.dl-term-comment {
  color: rgba(255, 255, 255, 0.28);
}

.dl-term-prompt {
  color: #28c840;
  font-weight: 600;
  margin-right: 6px;
}

.dl-term-cmd {
  color: rgba(255, 255, 255, 0.85);
}

.dl-term-blink {
  color: rgba(255, 255, 255, 0.7);
  animation: dl-cursor-blink 1s step-end infinite;
}

@keyframes dl-cursor-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ── Bottom tools band ── */
.dl-tools-band {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  gap: 32px;
}

.dl-tools-label {
  flex-shrink: 0;
  max-width: 160px;
}

.dl-tools-title {
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

.dl-tools-list {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.dl-tool-item {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Gradient border on tool items */
.dl-tool-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.06) 40%,
      rgba(0, 0, 0, 0) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.dl-tool-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.06);
}

.dl-tool-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.dl-tool-invert {
  filter: brightness(0) invert(1);
}

.dl-tool-icon-small {
  width: 22px !important;
  height: 22px !important;
}

.dl-tool-rounded {
  border-radius: 6px;
}

.dl-tool-text-icon {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 680px;
  margin: 36px auto 0;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 18px 0;
}

.faq-item summary {
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--dark);
  transition: color 0.2s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--gray-400);
  transition: transform 0.3s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.65;
}

/* ---------- Footer ---------- */
#footer {
  position: relative;
  z-index: 1;
  height: 100vh;
  padding: var(--hero-frame-inset);
  background: var(--white);
}

.footer-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  padding: 40px 48px 40px 24px;
  gap: 0;
}

/* Background image — replaced by .footer-bg div for GSAP parallax */
.footer-frame::before {
  display: none;
}

.footer-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/header background.avif');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* Left & right sit above background */
.footer-left,
.footer-right {
  position: relative;
  z-index: 1;
}

/* LEFT column — fills height, space-between */
.footer-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer-top-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-studio {
  font-family: var(--font);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.footer-location {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.06em;
}

.footer-ubs {
  height: auto;
  width: 100px;
  max-width: 120px;
  opacity: 1;
  filter: brightness(0) invert(1);
  object-fit: contain;
  margin-top: 4px;
  display: block;
}

.footer-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
}

.footer-wordmark {
  font-family: var(--font);
  font-size: clamp(7rem, 12vw, 19rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.05em;
  padding-bottom: 0.05em;
}

.footer-accent {
  color: #ffffff;
}

/* Hide decorative symbol glyphs when runtime detection marks them unsupported. */
.symbol-fallback-active .marquee-dot,
.symbol-fallback-active .discover-accent,
.symbol-fallback-active .feature-card-dot,
.symbol-fallback-active .dl-cta-icon,
.symbol-fallback-active .footer-accent {
  display: none !important;
}

.arrow-fallback-active .btn-arrow {
  display: none !important;
}

/* RIGHT column — link table, top-aligned */
.footer-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 4px;
  margin-left: -240px;
  position: relative;
  z-index: 2;
}

.footer-links-row {
  display: flex;
  flex-direction: row;
  gap: 160px;
}

.footer-link-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 140px;
}

.footer-col-title {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 8px;
}

.footer-link {
  font-family: var(--font);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  letter-spacing: 0;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--white);
}

/* CTA card — black square, aligned with footer-frame corner with small gap */
.footer-cta {
  background: #000;
  border-radius: calc(var(--radius) + 12px);
  aspect-ratio: 1 / 1;
  width: clamp(260px, 28vw, 400px);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  margin-bottom: -28px;
  margin-right: -36px;
}

.footer-cta-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.footer-cta-text {
  font-family: var(--font);
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--dark);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  align-self: flex-start;
}

.footer-cta-btn:hover {
  background: var(--dark);
  color: var(--white);
  outline: 1px solid rgba(255, 255, 255, 0.3);
}

/* ---------- Responsive ---------- */

/* ── Tablet breakpoint ── */
@media (max-width: 1024px) {
  .dl-top {
    min-height: 420px;
  }

  .dl-left-top {
    flex-direction: column;
  }

  .dl-tools-band {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .dl-tools-list {
    justify-content: flex-start;
  }

  .footer-links-row {
    gap: 60px;
  }

  .footer-right {
    margin-left: -120px;
  }
}

/* ── Mobile breakpoint ── */
@media (max-width: 768px) {
  :root {
    --hero-frame-inset: 8px;
  }

  #preloader-name {
    display: none;
  }

  /* --- Hero --- */
  .hero-frame {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding-bottom: 80px;
  }

  .hero-logo-wrapper {
    position: absolute;
    left: auto;
    right: -5%;
    top: 40%;
    transform: translateY(-50%);
    height: 120%;
    opacity: 0.18;
  }

  .hero-3d-logo {
    transform: scale(1.6);
  }

  .hero-text {
    margin-left: 20px;
    max-width: 92%;
  }

  .hero-overtitle {
    font-size: 0.7rem;
  }

  .hero-title {
    font-size: clamp(2.6rem, 10vw, 4rem);
  }

  .hero-description {
    font-size: 0.88rem;
    max-width: 320px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.76rem;
  }

  .hero-scroll-indicator {
    bottom: 20px;
    left: 20px;
    font-size: 0.85rem;
  }

  .hero-year {
    bottom: 20px;
    right: 20px;
  }

  .hero-ubs-logo {
    height: 22px;
  }

  /* --- Headbar --- */
  #headbar {
    padding: 0 14px;
    left: 6px;
    right: 6px;
    height: 56px;
  }

  .headbar-name {
    font-size: 0.95rem;
  }

  .btn-download-nav {
    font-size: 0.68rem;
    padding: 6px 14px;
  }

  .btn-lang {
    font-size: 0.68rem;
    padding: 6px 12px;
  }

  /* --- Sections general --- */
  .section {
    position: relative;
    z-index: 1;
    padding: 64px 18px;
  }

  .section-title {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
  }

  /* --- Marquee --- */
  .marquee-band {
    padding: 80px 0;
  }

  .marquee-text {
    font-size: clamp(2.2rem, 8vw, 4rem);
  }

  /* --- Discover --- */
  .discover-grid {
    flex-direction: column;
    padding: 0 18px;
    height: auto;
  }

  .discover-left {
    min-height: 300px;
  }

  .discover-right {
    aspect-ratio: auto;
    min-height: 320px;
  }

  .discover-title {
    font-size: clamp(1.8rem, 6vw, 3rem);
    margin-bottom: 32px;
  }

  .discover-name {
    font-size: clamp(2.4rem, 7vw, 4rem);
  }

  .discover-desc {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  }

  /* --- Features --- */
  .features-title {
    font-size: clamp(1.8rem, 8vw, 3.2rem);
    word-break: break-word;
    hyphens: auto;
    padding: 0 8px;
  }

  .features-subtitle {
    font-size: 0.9rem;
    padding: 0 8px;
  }

  .features-selector {
    gap: 6px;
    margin-top: 32px;
  }

  .feature-tab {
    font-size: 0.68rem;
    padding: 8px 14px;
  }

  .features-carousel {
    height: clamp(320px, 88vw, 460px);
    margin-top: 32px;
  }

  .feature-card {
    width: clamp(150px, 44vw, 210px);
    border-radius: 14px;
    padding: 20px 14px 0;
  }

  .feature-card-badge {
    font-size: 0.5rem;
    padding: 3px 10px;
  }

  .feature-card-title {
    font-size: clamp(1.1rem, 4.8vw, 1.6rem);
  }

  .feature-card-dot {
    font-size: 1.1rem;
    margin: 10px 0 6px;
  }

  .feature-card-desc {
    font-size: clamp(0.72rem, 2.3vw, 0.95rem);
    line-height: 1.4;
    margin-top: 6px;
    padding: 0 4px;
  }

  .feature-card-img-wrap {
    border-radius: 10px 10px 0 0;
    min-height: clamp(96px, 28vw, 140px);
  }

  .feature-card-img {
    height: 100%;
    object-fit: cover;
  }

  /* --- Download --- */
  .download-section {
    padding: 0 var(--hero-frame-inset);
  }

  .dl-frame {
    padding: 12px;
  }

  .dl-top {
    flex-direction: column-reverse;
    min-height: auto;
  }

  .dl-right {
    min-height: 280px;
  }

  .dl-img-box {
    border-radius: 14px !important;
  }

  .dl-img-box::before {
    border-radius: 14px !important;
  }

  .dl-hero-img {
    border-radius: 14px;
    max-height: 320px;
  }

  .dl-left-top {
    flex-direction: column;
  }

  .dl-download-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .dl-download-btn {
    width: 100%;
    justify-content: center;
  }

  .dl-terminal-body {
    font-size: 0.68rem;
    padding: 14px 12px;
    overflow-x: auto;
  }

  .dl-tools-band {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
  }

  .dl-tools-list {
    justify-content: flex-start;
    gap: 8px;
  }

  .dl-tool-item {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }

  .dl-tool-item img {
    width: 22px;
    height: 22px;
  }

  /* --- FAQ --- */
  .faq-list {
    margin-top: 24px;
  }

  .faq-item summary {
    font-size: 0.92rem;
  }

  .faq-item p {
    font-size: 0.85rem;
  }

  /* --- Footer --- */
  #footer {
    height: auto;
    min-height: 100vh;
  }

  .footer-frame {
    flex-direction: column-reverse;
    justify-content: flex-end;
    padding: 32px 20px;
    gap: 48px;
  }

  .footer-right {
    margin-left: 0;
    align-items: flex-start;
  }

  .footer-links-row {
    flex-direction: column;
    gap: 28px;
  }

  .footer-wordmark {
    font-size: clamp(3.5rem, 15vw, 8rem);
  }

  .footer-cta {
    display: none;
  }
}

/* ── Very small screens ── */
@media (max-width: 420px) {
  .hero-title {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .hero-description {
    font-size: 0.82rem;
    max-width: 260px;
  }

  .features-title {
    font-size: clamp(1.5rem, 7vw, 2.4rem);
  }

  .dl-distro-name {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }

  .dl-cta-text {
    font-size: 0.85rem;
  }
}