/**
 * TeleDNS — shell / layout
 */

.site {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

/* Floating glass nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--space-3) var(--gutter) 0;
}

.nav-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--nav-height);
  padding: 10px 14px 10px 18px;
  max-width: var(--container);
  margin-inline: auto;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--brand) 80%, #fff), var(--brand-strong));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 4px 14px rgba(0, 145, 255, 0.3);
  display: grid;
  place-items: center;
}

.nav-logo svg {
  width: 18px;
  height: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 550;
  color: var(--label-secondary);
  transition: color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--label-primary);
  background: var(--fill-quaternary);
}

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

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  color: var(--label-secondary);
  background: var(--fill-quaternary);
  border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.icon-btn:hover {
  color: var(--label-primary);
  background: var(--fill-tertiary);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--fill-quaternary);
  color: var(--label-primary);
  place-items: center;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

main {
  flex: 1;
}

/* Sections */
.section {
  padding: clamp(56px, 10vw, 96px) 0;
}

.section-head {
  margin-bottom: clamp(28px, 5vw, 40px);
}

.section-head--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-head--center .section-lead {
  text-align: center;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 0 var(--gutter) var(--space-6);
}

.footer-chrome {
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--space-6) var(--space-5);
  display: grid;
  gap: var(--space-5);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-5);
  align-items: flex-start;
}

.footer-brand {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.footer-copy {
  margin-top: var(--space-2);
  color: var(--label-tertiary);
  font-size: 0.875rem;
  max-width: 32ch;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.footer-nav a {
  color: var(--label-secondary);
  font-size: 0.9375rem;
  transition: color var(--duration-fast) var(--ease);
}

.footer-nav a:hover {
  color: var(--brand-soft);
}

.footer-bottom {
  padding-top: var(--space-4);
  border-top: 1px solid var(--separator-transparent);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--label-tertiary);
  font-size: 0.8125rem;
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
}

@media (max-width: 860px) {
  .nav-links,
  .nav-actions .btn {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  .nav-chrome {
    padding: 10px 12px;
  }

  .nav-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease), visibility var(--duration-normal) var(--ease);
  }

  .nav-drawer.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav-drawer-panel {
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 320px);
    padding: var(--space-6) var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transform: translateX(100%);
    transition: transform var(--duration-normal) var(--ease-decel);
  }

  [dir="rtl"] .nav-drawer-panel {
    transform: translateX(-100%);
  }

  .nav-drawer.is-open .nav-drawer-panel {
    transform: translateX(0);
  }

  .nav-drawer-panel a {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--label-secondary);
  }

  .nav-drawer-panel a[aria-current="page"],
  .nav-drawer-panel a:hover {
    color: var(--label-primary);
    background: var(--fill-quaternary);
  }

  .nav-drawer-cta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }
}
