
/* ==========================================
   ALEXANDRE RUSSO
   GLOBAL.CSS — V02
   ========================================== */

/* ==========================================
   VARIABLES
   ========================================== */

:root {
  --bg: #fafaf9;
  --white: #ffffff;
  --black: #101010;
  --dark: #121212;
  --text: #161616;
  --muted: #777777;
  --border: #dedede;
  --accent: #b8ed27;

  --max-width: 1480px;
  --side: clamp(24px, 5.5vw, 86px);
  --header-height: 82px;

  --font: "Inter", Arial, sans-serif;
}

/* ==========================================
   RESET
   ========================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  padding: 0;
  min-width: 320px;

  font-family: var(--font);
  background: var(--bg);
  color: var(--text);

  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  padding-inline: var(--side);
  margin-inline: auto;
}

::selection {
  background: var(--accent);
  color: var(--black);
}

:focus-visible {
  outline: 2px solid #719400;
  outline-offset: 4px;
}

.accent {
  color: #9bc400;
}

/* ==========================================
   PAGE LAYOUT
   FOOTER ALWAYS AT BOTTOM
   ========================================== */

body {
  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  flex-direction: column;
}

/* Shared components */

#header,
#footer {
  flex-shrink: 0;
}

/* Main content fills available height */

main {
  flex: 1 0 auto;
}

/* Footer stays at bottom on short pages */

#footer {
  margin-top: auto;
}

/* ==========================================
   SHARED BUTTONS
   ========================================== */

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;

  gap: 32px;
  min-width: 170px;

  padding: 15px 22px;

  background: #111;
  color: #fff;

  font-size: 13px;
  font-weight: 500;

  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.button-primary:hover {
  transform: translateY(-3px);
  background: #242424;
}

.button-arrow {
  color: var(--accent);
  font-size: 24px;
  line-height: 0.8;

  transition: transform 0.3s ease;
}

.button-primary:hover .button-arrow {
  transform: translateX(5px);
}

/* ==========================================
   HEADER
   ========================================== */

.site-header {
  width: 100%;
  height: var(--header-height);

  position: relative;
  z-index: 100;

  background: var(--bg);
}

.header-inner {
  height: 100%;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.brand {
  width: max-content;

  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.065em;

  white-space: nowrap;
}

/* HEADER LOGO */

.header-logo {
  display: block;
  width: auto;
  height: 34px;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 650px) {
  .header-logo {
    height: 28px;
    max-width: 180px;
  }
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 42px);
}

.nav-link {
  position: relative;

  padding: 12px 0;

  font-size: 12px;
  font-weight: 500;

  transition: color 0.25s ease;
}

.nav-link:hover {
  color: #6e9100;
}

.nav-link::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: 4px;

  width: 0;
  height: 2px;

  background: var(--accent);

  transition: width 0.3s ease;
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ==========================================
   LANGUAGE SWITCH
   ========================================== */

.language-switch {
  display: flex;
  align-items: center;

  gap: 8px;
  padding-left: 28px;

  border-left: 1px solid #bcbcbc;
}

.language-switch button {
  background: none;
  border: none;

  padding: 5px 0;

  color: #999;
  font-size: 11px;
  font-weight: 500;

  transition: color 0.2s;
}

.language-switch button.active,
.language-switch button[aria-pressed="true"] {
  color: var(--black);
  font-weight: 750;
}

.language-switch button:hover {
  color: var(--black);
}

.language-switch > span {
  font-size: 11px;
  color: #aaa;
}

.menu-toggle,
.mobile-nav {
  display: none;
}

/* ==========================================
   FOOTER
   ========================================== */

.site-footer {
  width: 100%;

  background: #111;
  border-top: 1px solid #252525;

  color: #fff;

  padding-block: 22px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 25px;
}

.footer-brand {
  display: flex;
  align-items: center;

  gap: 20px;

  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.footer-brand span {
  padding-left: 20px;

  border-left: 1px solid #444;

  font-size: 11px;
  font-weight: 400;
  letter-spacing: normal;

  color: #777;
}

.footer-right {
  display: flex;
  align-items: center;

  gap: 25px;

  color: #999;
  font-size: 10px;
}

/* ==========================================
   TABLET
   ========================================== */

@media (max-width: 900px) {

  :root {
    --side: 34px;
  }

}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 650px) {

  :root {
    --side: 22px;
    --header-height: 72px;
  }

  /* HEADER */

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .brand {
    font-size: 18px;
  }

  .desktop-nav {
    display: none;
  }

  .header-actions {
    gap: 23px;
  }

  /* LANGUAGE SWITCH */

  .language-switch {
    border-left: 0;
    padding-left: 0;
  }

  /* MOBILE MENU BUTTON */

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;

    gap: 6px;

    width: 30px;
    height: 30px;

    padding: 5px 0;

    border: 0;
    background: transparent;
  }

  .menu-toggle span {
    display: block;

    width: 26px;
    height: 2px;

    background: #111;

    transition:
      transform 0.25s,
      opacity 0.25s;
  }

  .menu-toggle.open span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle.open span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  /* MOBILE NAVIGATION */

  .mobile-nav {
    display: none;

    position: absolute;

    top: var(--header-height);
    left: 0;
    right: 0;

    z-index: 100;

    background: var(--bg);

    padding: 22px var(--side) 35px;

    flex-direction: column;
    gap: 24px;

    box-shadow: 0 20px 30px #00000010;
  }

  .mobile-nav.open {
    display: flex;
  }

  .mobile-nav a {
    font-size: 18px;
    font-weight: 500;
  }

  /* FOOTER */

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-brand span {
    border-left: 0;
    padding-left: 0;
  }

  .footer-right {
    gap: 20px;
  }

}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

}
