/* Content-driven sizing: phones, landscape phones, tablets and wide screens. */
:root { --gutter: clamp(20px, 6vw, 108px); }
body { min-width: 280px; }
img, video { max-width: 100%; }
.section { padding-inline: max(var(--gutter), calc((100% - 1290px) / 2)); }
.header { padding-inline: max(20px, calc((100% - 1440px) / 2)); }
.header nav, .header-actions { flex-shrink: 0; }
.header nav a, .header-actions a { white-space: nowrap; }
.header-actions button, .scroll-link, .hero-bottom button, #close-demo {
  min-width: 44px; min-height: 44px;
}
.about, .project-grid, .future { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.about > *, .project-grid > *, .future > *, .section-heading > *, .steps > li {
  min-width: 0;
}
.team-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-list span, .channel, .tech-line span { overflow-wrap: anywhere; }
.track-checks { flex-shrink: 0; }
.hero { height: auto; min-height: 650px; padding-block: 70px 110px; }
.hero-copy {
  position: relative; left: auto; right: auto; top: auto; bottom: auto;
  width: 41%; max-width: 590px;
  margin-left: auto; margin-right: max(var(--gutter), calc((100% - 1290px) / 2));
}
h1 { font-size: clamp(56px, 5.7vw, 94px); }
html[dir=ltr] h1 { font-size: clamp(62px, 6.5vw, 102px); }
.hero-bottom { left: var(--gutter); right: var(--gutter); }
.hero-bottom > * { min-width: 0; }
.hero-bottom button { flex-shrink: 0; }
.hero-label { max-width: 45%; }
.evolution { grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr); }
dialog { width: min(1000px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
dialog video { max-height: 68dvh; }

/* Collapse navigation before the bilingual links become cramped. */
@media (max-width: 1100px) {
  .header { height: 80px; padding-inline: var(--gutter); gap: 16px; }
  .header .brand { width: clamp(135px, 21vw, 185px); }
  .header #menu { display: block; font-size: 24px; }
  .header nav {
    display: none; position: absolute; top: 80px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 18px var(--gutter); gap: 4px; flex-direction: column;
  }
  .header nav.open { display: flex; }
  .header nav a { padding-block: 12px; }
  .header-actions { gap: 14px; }
  .header-actions #language { padding-inline: 10px; }
  .hero-copy { width: 44%; }
  .hero { min-height: 610px; padding-block: 55px 100px; }
  .buttons .button { padding-inline: 16px; }
  .section-heading { align-items: flex-start; }
  .about, .project-grid, .future { column-gap: 40px; }
  .tech-line { flex-wrap: wrap; }
}

/* Stacked hero and editorial content for tablets in portrait and phones. */
@media (max-width: 850px) {
  .hero { padding: 0; min-height: 0; max-height: none; }
  .hero video { width: 100%; height: 390px; top: 0; object-position: 35% center; }
  .hero-shade { height: 400px; bottom: auto; background: linear-gradient(0deg, var(--bg), transparent 70%); }
  .hero-copy {
    width: auto; max-width: 650px; margin: 0; margin-inline: var(--gutter);
    padding-top: 325px; padding-bottom: 32px;
  }
  .hero-description { max-width: 570px; }
  .hero-bottom { position: relative; bottom: auto; left: auto; right: auto; margin-inline: var(--gutter); padding-bottom: 24px; }
  .hero-label { max-width: 55%; }
  .identity-strip { padding-inline: var(--gutter); flex-wrap: wrap; }
  .identity-strip p { order: 3; width: 100%; }
  .about, .project-grid, .future { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .future-note { grid-column: 1; margin: 0; }
  .section-heading { display: block; }
  .section-heading > p { max-width: 570px; margin-top: 20px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li, .steps li:first-child, .steps li:last-child {
    padding: 28px 0; border: 0; border-bottom: 1px solid var(--line);
    display: grid; grid-template-columns: 55px minmax(0, 1fr); gap: 10px 18px;
  }
  .steps h3 { margin: 0; }
  .steps p { grid-column: 2; max-width: 600px; }
  .step-symbol { display: none; }
  .tech-line { margin-top: 24px; }
  .evolution { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .evolution-arrow { transform: rotate(-90deg); justify-self: start; font-size: 26px; }
  html[dir=ltr] .evolution-arrow { transform: rotate(-90deg); }
  footer { padding-inline: var(--gutter); }
}

@media (max-width: 480px) {
  .header .brand { width: 140px; }
  .header-actions { gap: 6px; }
  .contact-link { display: none; }
  .hero video { height: 330px; }
  .hero-shade { height: 340px; }
  .hero-copy { padding-top: 280px; }
  h1 { font-size: clamp(42px, 12vw, 57px); }
  html[dir=ltr] h1 { font-size: clamp(48px, 14vw, 67px); }
  .hero-description { font-size: 15px; }
  .buttons { gap: 10px; }
  .buttons .button { flex: 1 1 145px; padding-inline: 12px; font-size: 13px; }
  .hero-bottom { gap: 12px; flex-wrap: wrap; }
  .hero-label { max-width: none; flex: 1 1 150px; font-size: 11px; }
  .hero-bottom button { font-size: 11px; }
  .scroll-link { display: inline-flex; justify-content: center; align-items: center; }
  .section { padding-block: 52px; }
  h2 { font-size: clamp(28px, 8vw, 36px); }
  .mission h2 { font-size: clamp(31px, 9vw, 42px); }
  .team-list { grid-template-columns: minmax(0, 1fr); }
  .team-list span { font-size: 28px; padding-block: 20px; }
  .result strong { font-size: 56px; }
  .result > span { max-width: 48%; }
  .channel { width: 100%; margin-inline: 0; padding: 14px; }
  .contact h2 { font-size: 44px; }
  footer { gap: 18px; }
}

/* Keep landscape phones usable instead of forcing a viewport-height hero. */
@media (max-height: 500px) and (min-width: 601px) and (max-width: 1000px) {
  .hero { padding: 40px var(--gutter) 85px; min-height: 460px; }
  .hero video { width: 55%; height: 100%; }
  .hero-shade { height: 100%; background: linear-gradient(270deg, var(--bg) 35%, transparent 80%); }
  .hero-copy { width: 46%; margin: 0 0 0 auto; padding: 0; }
  .hero-bottom { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 18px; margin: 0; padding: 0; }
  h1, html[dir=ltr] h1 { font-size: 52px; }
}

/* Symbol-only header logo. */
.header .brand { width: 64px; }
.header .brand img { width: 100%; aspect-ratio: 1; object-fit: contain; }
@media (max-width: 1100px) { .header .brand { width: 56px; } }
