/* ===========================================
   ROUTZ BELGIUM — GLOBAL STYLES
   Dark editorial-technical aesthetic
   =========================================== */

@import url("colors_and_type.css");

/* ---- Font faces (files uploaded to /fonts/) ---- */
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-VariableFont_wdth_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-Italic-VariableFont_wdth_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/IBMPlexSans-VariableFont_wdth_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/IBMPlexSans-Italic-VariableFont_wdth_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Tokens: single source of truth lives in /colors_and_type.css (imported above). */

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 16px;
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Typography (.eyebrow, .h-*, h1–h4) lives in /colors_and_type.css */

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease-out);
}

.site-header.transparent {
  background: transparent;
  border-bottom-color: transparent;
}

.site-header.transparent.scrolled {
  background: rgba(10, 10, 10, 0.85);
  border-bottom-color: var(--border);
}

.nav-wrapper {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
}

.nav-logo img {
  height: 34px;
  width: auto;
  display: block;
}

.footer-brand .nav-logo img {
  height: 40px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-menu a {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.2s var(--ease-out);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text-primary);
}

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

.nav-cta {
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  transition: all 0.25s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-cta::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.nav-cta:hover::before {
  background: var(--bg-primary);
}

/* ---------- Language switcher ---------- */
.lang-switch {
  position: relative;
  margin-left: 1.25rem;
  flex-shrink: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}

.lang-btn:hover { color: var(--text-primary); border-color: var(--accent-border); }

.lang-current { line-height: 1; }

.lang-caret {
  width: 9px;
  height: 9px;
  transition: transform 0.3s var(--ease-out);
}
.lang-switch.open .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 160px;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 200;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-option::after {
  content: attr(data-lang);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lang-option:hover { background: var(--bg-card); color: var(--text-primary); }

.lang-option.active {
  color: var(--accent);
}
.lang-option.active::after { color: var(--accent); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s var(--ease-out);
}

.nav-toggle span:nth-child(1) { top: 10px; }
.nav-toggle span:nth-child(2) { top: 20px; }

.nav-cta-mobile { display: none; }

@media (max-width: 900px) {
  .nav-menu {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
  .nav-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-menu li { width: 100%; }
  .nav-menu a {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu a::after { display: none; }
  .nav-menu .nav-cta-mobile { display: block; color: var(--accent); font-weight: 600; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav-toggle.open span:nth-child(1) { top: 15px; transform: rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { top: 15px; transform: rotate(-45deg); }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.75rem 0;
}

.btn-ghost:hover {
  color: var(--accent);
  gap: 1rem;
}

.btn .arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease-out);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ===========================================
   SECTIONS
   =========================================== */

.section {
  padding: clamp(4rem, 10vh, 7rem) 0;
  position: relative;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 820px;
  margin-bottom: 4rem;
}

.section-header.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  align-items: center;
}

/* .section-number lives in /colors_and_type.css */

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

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 340px;
}

.footer-brand .nav-logo {
  margin-bottom: 1.25rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-office address {
  font-style: normal;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-office strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-legal a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: all 0.25s;
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   UTILITY — scroll reveal
   =========================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Grain texture overlay — subtle */
.grain::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===========================================
   RESPONSIVE HELPERS
   =========================================== */

@media (max-width: 700px) {
  .section {
    padding: 4rem 0;
  }
  .section-header {
    margin-bottom: 2.5rem;
  }
}

/* Mobile tap targets */
@media (max-width: 900px) {
  .lang-btn { min-height: 44px; min-width: 44px; justify-content: center; }
}

/* Desktop: page names centred in the header, independent of logo / CTA widths */
@media (min-width: 901px) {
  .nav-wrapper { position: relative; }
  .site-header nav { position: absolute; left: 50%; transform: translateX(-50%); }
  .nav-cta { margin-left: auto; }
}
