/* 05-layout.css · Floating header, mobile menu, containers and section scaffolding
   Part of the Lumen stylesheet, loaded in numeric order (the cascade depends on it). */

/* ══════════ HEADER · floating glass pill (Aura), content still on the grid edges ══════════ */
.site-header {
  position: fixed;
  top: .75rem;
  left: 0;
  right: 0;
  z-index: 60;
  margin-inline: auto;
  width: min(calc(100% - 2 * max(.5rem, var(--gutter) - 1.25rem)), calc(var(--max) - 2 * var(--gutter) + 2.5rem));
  border-radius: var(--pill);
  overflow: hidden;
  background:
    linear-gradient(rgba(6, 10, 24, .62), rgba(6, 10, 24, .62)) padding-box,
    var(--hairline-strong) border-box;
  border: 1px solid transparent;
  /* a fixed pill re-blurs what scrolls under it on every frame: kept light (lite mode drops it, see 14-motion.css) */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .02);
}
/* the pill's inner padding is whatever keeps its content on the page gutter */
.nav {
  --pad: calc(var(--gutter) - max(.5rem, var(--gutter) - 1.25rem));
  height: 3.5rem;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -.02em;
  color: var(--white);
}
.brand::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 12px 2px rgba(56, 189, 248, .6), 0 0 0 4px rgba(56, 189, 248, .12);
}
.nav__group {
  display: flex;
  align-items: center;
  gap: 1.85rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .18em;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-link {
  position: relative;
  padding: .5rem 0;
  transition: color .3s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .05rem;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(253, 186, 116, .8);
  transform: scale(0);
  transition: transform .35s var(--ease);
}
.nav-link:hover, .nav-link[aria-current] { color: var(--white); }
.nav-link:hover::after, .nav-link[aria-current]::after { transform: scale(1); }
.nav__cta {
  padding: .5rem 1.05rem;
  border-radius: var(--pill);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-2);
  transition: border-color .3s, background-color .3s, color .3s, box-shadow .3s;
}
.nav__cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 24px -4px rgba(253, 186, 116, .7);
}
.menu-btn {
  display: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -.75rem;
  color: var(--text-2);
}
.menu-btn .icon {
  width: 22px;
  height: 22px;
}
.progress {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 0;
  height: 1px;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--dawn);
  box-shadow: 0 0 8px rgba(56, 189, 248, .6);
  transform: scaleX(0);
  transform-origin: left;
}
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  padding: 6rem var(--gutter) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .25rem;
  /* opaque, so it needs no backdrop blur and nothing shows through */
  background: radial-gradient(120% 80% at 50% 0%, #0e1633, #04060e);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}
/* the section links (direct children; the language switch keeps its own small style) */
.mobile-menu > a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  font-size: clamp(1.6rem, 8vw, 2.25rem);
  letter-spacing: -.03em;
  color: var(--white);
}
.mobile-menu > a span {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--accent);
}
.mobile-menu__foot {
  margin-top: 2.5rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--meta);
}
@media (max-width: 899px) {
  .nav__group { display: none; }
  .menu-btn { display: grid; }
}

/* ══════════ LAYOUT ══════════ */
main {
  position: relative;
  z-index: 1;
}
.section {
  position: relative;
  padding-block: clamp(5rem, 11vw, 8.5rem);
  border-top: 1px solid var(--line);
}
/* a beam of light runs along each section's top edge as it arrives */
.section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--sky-line) 25%, rgba(255, 255, 255, .7) 50%, var(--sky-line) 75%, transparent);
  transform-origin: center;
  transition: transform 1.8s var(--ease-expo), opacity 1.8s var(--ease);
}
.motion .section:not(.is-lit)::before {
  transform: scaleX(0);
  opacity: 0;
}
.section-head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 1024px) {
  .section-head--split {
    grid-template-columns: 1.3fr 1fr;
    align-items: end;
    gap: 4rem;
  }
}

/* ══════════ LANGUAGE SWITCH (PT / EN, see assets/js/i18n.js) ══════════
   Quiet text in the nav's own voice: the current language is white with the ember dot the section links use, the
   other one is a tap away. Two copies: end of the header pill (desktop, after a hairline divider) and in the bar next
   to the menu button (phones and tablets, where the section links are hidden). */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .1rem;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.lang-switch a {
  position: relative;
  padding: .5rem .35rem .5rem calc(.35rem + .18em);   /* the tracking would leave the label off centre */
  color: var(--meta);
  transition: color .3s;
}
.lang-switch a:hover { color: var(--white); }
.lang-switch a.is-current { color: var(--white); }
.lang-switch a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .05rem;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(253, 186, 116, .8);
  transform: scale(0);
  transition: transform .35s var(--ease);
}
.lang-switch a.is-current::after { transform: scale(1); }
.lang-switch__sep { color: var(--marker); }
/* desktop: a hairline sets it apart from the Contact button */
.nav__group .lang-switch { padding-left: 1.1rem; }
.nav__group .lang-switch::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 1.1rem;
  margin-top: -.55rem;
  background: var(--line-3);
}
/* phones and tablets: in the bar, pushed right next to the menu button */
.lang-switch--bar { display: none; }
@media (max-width: 899px) {
  .nav { gap: .5rem; }
  .lang-switch--bar {
    display: inline-flex;
    margin-left: auto;
    font-size: .74rem;
  }
  .lang-switch--bar a { padding-block: .7rem; }   /* a comfortable tap target */
  .lang-switch--bar a::after { bottom: .3rem; }
}
/* switching language reloads the page: it fades out first instead of blinking */
.lang-leaving body {
  opacity: 0;
  transition: opacity .22s var(--ease);
}
