/* ==========================================================================
   layout.css  v4.0  "Friendly Precision"
   Gauss — Header, mobile nav, hamburger, footer, responsive layout.
   Consumes design tokens from brand-tokens.css (via global.css).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HEADER — Fixed glass bar, sky-50 tinted
   -------------------------------------------------------------------------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  height: var(--header-height, 72px);
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  transition: height var(--duration-base, 0.3s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1)),
              box-shadow var(--duration-base, 0.3s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.header--scrolled {
  height: var(--header-height-shrink, 60px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.header__inner {
  max-width: var(--container-max, 1200px);
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo img {
  height: 36px;
  width: auto;
  transition: height var(--duration-fast, 0.15s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.header--scrolled .header__logo img {
  height: 30px;
}

/* --------------------------------------------------------------------------
   1a. Desktop navigation — clean, no ornamental indicators
   -------------------------------------------------------------------------- */

.header__nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.header__nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gauss-ink-500, #6B7280);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color var(--duration-fast, 0.15s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.header__nav a:hover,
.header__nav a:focus-visible {
  color: var(--gauss-ink-900, #0B1220);
}

/* --------------------------------------------------------------------------
   1b. Header actions (lang toggle + CTA)
   -------------------------------------------------------------------------- */

.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gauss-ink-500, #6B7280);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: background var(--duration-fast, 0.15s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1)),
              color var(--duration-fast, 0.15s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  background: rgba(248, 250, 252, 1);
  color: var(--gauss-ink-900, #0B1220);
}

/* --------------------------------------------------------------------------
   2. HAMBURGER — 3-line to X, hidden on desktop
   -------------------------------------------------------------------------- */

.hamburger {
  display: none;
  position: relative;
  width: 22px;
  height: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 251;
}

.hamburger__line {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gauss-ink-900, #0B1220);
  border-radius: 1px;
  transition: transform var(--duration-base, 0.3s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1)),
              opacity var(--duration-fast, 0.15s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.hamburger__line:nth-child(1) { top: 0; }
.hamburger__line:nth-child(2) { top: 7px; }
.hamburger__line:nth-child(3) { top: 14px; }

/* X state */
.hamburger[aria-expanded="true"] .hamburger__line:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger__line:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   3. MOBILE NAV — Full-screen overlay, slide down
   -------------------------------------------------------------------------- */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--gauss-white, #FFFFFF);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 5rem 1.5rem;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: opacity var(--duration-base, 0.3s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1)),
              transform var(--duration-base, 0.3s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.mobile-nav[aria-hidden="false"],
.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav a {
  font-family: "Sora", var(--font-display, sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gauss-ink-900, #0B1220);
  text-decoration: none;
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gauss-line-200, #E2E8F0);
  text-align: center;
  transition: color var(--duration-fast, 0.15s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.mobile-nav a:last-of-type {
  border-bottom: none;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  color: var(--gauss-cyan-500, #3FA4E5);
}

.mobile-nav .btn {
  margin-top: 2rem;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

/* Lock body scroll when nav is open */
body.nav-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. FOOTER — Dark ink-900, gradient crown separator
   -------------------------------------------------------------------------- */

.footer {
  position: relative;
  background: var(--gauss-ink-900, #0B1220);
  padding: 4rem 1.5rem 2rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Gradient crown — Gauss visual signature */
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gauss-gradient-brand, linear-gradient(90deg, #3FA4E5 0%, #1558A0 100%));
}

.footer__inner {
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

/* Brand column */
.footer__brand {
  padding-right: 2rem;
}

.footer__brand img {
  height: 32px;
  width: auto;
  margin-bottom: 1rem;
}

.footer__brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  max-width: 280px;
}

/* Link columns */
.footer__col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__col a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--duration-fast, 0.15s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.footer__col a:hover,
.footer__col a:focus-visible {
  color: #FFFFFF;
}

/* WhatsApp number pill */
.footer__gauss-number {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(37, 211, 102, 0.15);
  color: var(--whatsapp-green, #25D366);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-pill, 999px);
  text-decoration: none;
  transition: background var(--duration-fast, 0.15s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.footer__gauss-number:hover,
.footer__gauss-number:focus-visible {
  background: rgba(37, 211, 102, 0.25);
  color: var(--whatsapp-green, #25D366);
}

.footer__gauss-number svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.footer__support-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 0.5rem;
}

/* Bottom bar */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer__bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer__bottom-links a {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: color var(--duration-fast, 0.15s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.footer__bottom-links a:hover,
.footer__bottom-links a:focus-visible {
  color: #FFFFFF;
}

/* Legal fine print */
.footer__legal {
  width: 100%;
  text-align: center;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 1rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   5. RESPONSIVE — Breakpoints
   -------------------------------------------------------------------------- */

/* ---- 968px: tablet / small desktop ---- */
@media (max-width: 968px) {
  .hamburger {
    display: block;
  }

  .header__nav {
    display: none;
  }

  .header__actions .btn {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
    padding-right: 0;
    max-width: 40ch;
  }
}

/* ---- 480px: mobile ---- */
@media (max-width: 480px) {
  .header__inner {
    padding: 0 1rem;
  }

  .footer {
    padding: 3rem 1rem 2rem;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__brand {
    max-width: none;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .mobile-nav a {
    font-size: 1.125rem;
  }
}
