/* DISLIX — page structure: header, footer, section rhythm, grids, responsive rules */

/* ---------- Header ---------- */
:root {
  --header-height: 72px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: color-mix(in srgb, var(--color-chrome) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* Every page's first element sits right below the fixed header instead of
   underneath it — hero included, since .hero itself is the first section on
   the homepage. */
body {
  padding-top: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  height: 100%;
}

.site-logo {
  display: block;
  width: 140px;
  aspect-ratio: var(--logo-aspect-ratio);
  background-image: var(--logo-src);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.main-nav a {
  font-family: var(--font-medium);
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  transition: color .2s ease;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Specificity bumped with the button tag (not just .nav-toggle) so this
   reliably beats .icon-btn's own `display: inline-flex` regardless of
   stylesheet load order — both are single-class selectors otherwise, and
   dislix-components.css (which defines .icon-btn) loads after this file. */
button.nav-toggle {
  display: none;
}

@media (max-width: 480px) {
  .site-header .container {
    gap: var(--space-sm);
    padding-inline: var(--space-sm);
  }
  .site-logo {
    width: 120px;
  }
  .header-actions {
    gap: 6px;
  }
  .lang-toggle {
    min-width: 40px;
    padding: 0 6px;
    font-size: 0.72rem;
  }
  .icon-btn:not(.lang-toggle) {
    width: 34px;
    height: 34px;
  }
  .btn.btn-sm {
    padding: 10px 14px;
    font-size: 0.82rem;
  }
}

@media (max-width: 1024px) {
  .main-nav { display: none; }
  button.nav-toggle { display: inline-flex; }
}

/* ---------- Section rhythm ---------- */
.section {
  padding-block: var(--space-xxl);
}

.section-header {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-bold);
  font-size: 0.8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-family: var(--font-light);
  font-size: 1.05rem;
  color: var(--color-text-secondary);
}

.section-alt {
  background: var(--color-bg-secondary);
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
}

/* ---------- Two-column banner (image + copy) ---------- */
/* Uses `order` (not `direction:` toggling, which fights itself under RTL) so
   column order is explicit and correct in both LTR and RTL: default renders
   text-start/image-end in reading order; .reverse swaps that, in EITHER
   direction, via order alone — no direction hacks needed. */
.split-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.split-banner > *:first-child { order: 1; }
.split-banner > *:last-child { order: 2; }
.split-banner.reverse > *:first-child { order: 2; }
.split-banner.reverse > *:last-child { order: 1; }

@media (max-width: 900px) {
  .split-banner {
    grid-template-columns: 1fr;
  }
  .split-banner > *:first-child,
  .split-banner.reverse > *:first-child { order: 1; }
  .split-banner > *:last-child,
  .split-banner.reverse > *:last-child { order: 2; }
}

.split-banner img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-subtle);
  padding-block: var(--space-xxl) var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h4 {
  font-family: var(--font-bold);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.footer-col a,
.footer-col p {
  display: block;
  font-family: var(--font-light);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

.footer-col a:hover { color: var(--color-primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-subtle);
  font-size: 0.85rem;
  color: var(--color-text-disabled);
  flex-wrap: wrap;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-hero-video-scrim);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  padding-inline: var(--space-md);
  margin-inline: auto;
  text-align: center;
}

.hero-content-ctas-only {
  padding-bottom: var(--space-xxl);
}

.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;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-semibold);
  font-size: 0.85rem;
  color: var(--color-primary-light);
  background: var(--color-accent-tint);
  border: 1px solid var(--color-border-strong);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.hero-title {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
  text-shadow: 0 4px 24px rgba(0,0,0,.5);
}

.hero-title .accent { color: var(--color-primary); }

.hero-subtitle {
  font-family: var(--font-light);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.hero-trust {
  font-family: var(--font-light);
  font-size: 0.85rem;
  color: var(--color-text-disabled);
}

/* Mobile: the video is a normal-flow card sized to its own real aspect ratio
   (9:16, the portrait mobile source) instead of a full-viewport absolute
   background — this removes the letterboxing gap `contain` produced inside
   a taller min-height:100vh box. The CTA content flows right below it in
   normal document flow instead of being pinned to the bottom of a tall box
   with empty space above the video. */
@media (max-width: 640px) {
  .hero {
    display: block;
    min-height: 0;
    padding-top: var(--space-lg);
  }
  .hero-video-wrap {
    position: relative;
    inset: auto;
    margin-inline: var(--space-md);
    aspect-ratio: 9 / 16;
    max-height: 70vh;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #000;
  }
  .hero-video {
    position: absolute;
    inset: 0;
    object-fit: cover;
  }
  .hero-content-ctas-only {
    padding-bottom: var(--space-xl);
    padding-top: var(--space-lg);
  }
}

