/* ==========================================================================
   ASRON — Layout
   Containers, grids, sections, header, footer, hero scaffolding.
   ========================================================================== */

/* ----- Containers ----- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: calc(var(--container-wide) + 2 * var(--gutter));
}

.container--narrow {
  max-width: 50rem;
}

/* ----- Sections ----- */
.section {
  position: relative;
  padding-block: var(--section-pad);
}

.section--tight { padding-block: calc(var(--section-pad) * 0.6); }

.section--alt {
  background:
    linear-gradient(180deg, transparent, rgba(13, 19, 38, 0.65) 18%, rgba(13, 19, 38, 0.65) 82%, transparent);
}

.section-head {
  max-width: 46rem;
  margin-bottom: var(--s-8);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .overline { justify-content: center; }
.section-head--center .overline::after {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--grad-aurora);
}

.section-head h2 { margin: var(--s-2) 0; }

.section-head .lead { margin-inline: auto; }

/* Split section head: heading left, action right */
.section-head--split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.section-head--split > div { max-width: 44rem; }

/* ----- Grids ----- */
.grid {
  display: grid;
  gap: var(--s-3);
}

.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--gap-lg { gap: var(--s-4); }

/* Two-column feature split (text + visual) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--s-4), 6vw, var(--s-10));
  align-items: center;
}

.split--rev > :first-child { order: 2; }

/* ==========================================================================
   Header / navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  height: var(--header-h);
  background: rgba(5, 8, 22, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.4s var(--ease-out), background-color 0.3s ease,
              border-color 0.3s ease, backdrop-filter 0.3s ease;
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.header.is-scrolled {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border-bottom-color: var(--border);
}

.header.is-hidden { transform: translateY(-100%); }

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.header__logo svg, .header__logo img { height: 2.25rem; width: auto; object-fit: contain; }

.header__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline: auto;
  flex-wrap: nowrap;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-shrink: 0;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
  border-radius: var(--r-full);
  white-space: nowrap;
  transition: color var(--t-fast), background-color var(--t-fast);
}

.nav-link:hover,
.nav-link[aria-expanded="true"],
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link[aria-expanded="true"],
[data-theme="light"] .nav-link.is-active { background: rgba(54, 87, 255, 0.08); }

.nav-link .chev {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  transition: transform var(--t-fast);
}

.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* ----- Mega menu / dropdown ----- */
.nav-item { position: relative; }

.mega {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  translate: -50% 0;
  z-index: var(--z-dropdown);
  width: min(52rem, calc(100vw - 2 * var(--gutter)));
  padding: var(--s-3);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.625rem) scale(0.98);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out),
              visibility 0.25s;
}

.mega--sm {
  width: 18rem;
  grid-template-columns: 1fr;
}

.nav-item.is-open .mega,
.nav-item:focus-within .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.mega__link {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.625rem 0.75rem;
  border-radius: var(--r-md);
  transition: background-color var(--t-fast);
}

.mega__link > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mega__link:hover { background: rgba(255, 255, 255, 0.05); }
[data-theme="light"] .mega__link:hover { background: rgba(54, 87, 255, 0.07); }

.mega__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: rgba(54, 87, 255, 0.14);
  color: var(--accent);
}

.mega__icon svg { width: 1.125rem; height: 1.125rem; }

.mega__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
}

.mega__desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-3);
  line-height: 1.35;
  margin-top: 0.15rem;
}

.mega__footer {
  grid-column: 1 / -1;
  margin-top: var(--s-1);
  padding-top: var(--s-2);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-small);
}

/* ----- Mobile navigation ----- */
.nav-toggle {
  display: none;
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  padding: 0;
  margin: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 1.125rem;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Page hero (interior pages)
   ========================================================================== */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + var(--s-10)) 0 var(--s-8);
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.page-hero h1 { margin: var(--s-2) 0 var(--s-3); max-width: 18em; }

.page-hero .lead { max-width: 40em; }

.page-hero--center { text-align: center; }
.page-hero--center h1,
.page-hero--center .lead { margin-inline: auto; }
.page-hero--center .breadcrumbs { justify-content: center; }

/* ==========================================================================
   Home hero
   ========================================================================== */
.hero-home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + var(--s-8)) 0 var(--s-10);
  overflow: hidden;
}

.hero-home__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(var(--s-4), 5vw, var(--s-8));
  align-items: center;
  width: 100%;
}

.hero-home h1 {
  font-size: var(--fs-hero);
  margin: var(--s-3) 0;
}

.hero-home .lead { max-width: 34em; }

.hero-home__actions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-top: var(--s-5);
}

.hero-home__proof {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-top: var(--s-6);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  font-size: var(--fs-small);
  color: var(--text-3);
}

.hero-home__proof strong {
  font-family: var(--font-display);
  font-size: 1.375rem;
  display: block;
  color: var(--text);
}

.hero-home__visual { position: relative; }

/* Particle canvas fills the hero */
.particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ----- Breadcrumbs ----- */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--s-3);
  font-size: var(--fs-tiny);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.breadcrumbs a { color: var(--text-3); transition: color var(--t-fast); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs li:not(:first-child)::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--text-3);
  opacity: 0.5;
}
.breadcrumbs [aria-current] { color: var(--text-2); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  margin-top: var(--s-8);
  border-top: 1px solid var(--border);
  background:
    radial-gradient(60rem 24rem at 50% -10rem, rgba(54, 87, 255, 0.12), transparent 65%),
    var(--surface);
  overflow: hidden;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr;
  gap: var(--s-5);
  padding: var(--s-10) 0 var(--s-6);
}

.footer__brand p {
  margin-top: var(--s-2);
  font-size: var(--fs-small);
  max-width: 22rem;
}

.footer__brand svg { height: 2.25rem; width: auto; }

.footer h4 {
  font-size: var(--fs-tiny);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--s-2);
}

.footer__links li { margin-bottom: 0.625rem; }

.footer__links a {
  font-size: var(--fs-small);
  color: var(--text-2);
  transition: color var(--t-fast), padding-left var(--t-fast);
}

.footer__links a:hover { color: var(--accent); padding-left: 0.25rem; }

.footer__social {
  display: flex;
  gap: 0.625rem;
  margin-top: var(--s-3);
}

.footer__social a {
  width: 2.375rem;
  height: 2.375rem;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: color var(--t-fast), border-color var(--t-fast),
              transform var(--t-fast), background-color var(--t-fast);
}

.footer__social a:hover {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  transform: translateY(-3px);
}

.footer__social svg { width: 1rem; height: 1rem; }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--border);
  font-size: var(--fs-small);
  color: var(--text-3);
}

.footer__legal {
  display: flex;
  gap: var(--s-3);
}

.footer__legal a { color: var(--text-3); transition: color var(--t-fast); }
.footer__legal a:hover { color: var(--accent); }

/* Giant watermark wordmark at the very bottom of the footer */
.footer__watermark {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 16vw, 13rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  user-select: none;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(122, 148, 255, 0.14), transparent 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transform: translateY(18%);
}
