/* global.css — reset + global utilities and header/footer styles */

/* Reset / base */
:root{
  --bg: #ffffff;
  --text: #111;
  --muted: #8f9aa6;
  --accent: #cbeafc;
  --max-width: 1400px;
}

*,
*::before,*::after { box-sizing:border-box; margin:0; padding:0; }

html,body { height:100%; }
body{
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.4;
}

/* accessible helper */
.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* page container */
.container{
  width:90%;
  max-width:var(--max-width);
  margin:0 auto;
}

/* header */
.cz-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:60;

  background: transparent;
  backdrop-filter: none;

  transition:
    background 0.6s ease,
    backdrop-filter 0.6s ease,
    box-shadow 0.6s ease;
}

.cz-header.scrolled{
  background: linear-gradient(
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.02)
  );
  backdrop-filter: blur(6px);
}

.cz-header-inner{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  width:90%;
  max-width:var(--max-width);
  margin:0 auto;
  padding:18px 0;
}

/* Burger menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #000;
  margin: 4px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Burger OPEN state — vertical bars */
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(90deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(90deg);
}

/* When header is scrolled (dark background) */
.cz-header.scrolled .nav-toggle span {
  background: #fff;
}

/* nav list (left) */
.nav-list{
  display:flex;
  gap:28px;
  list-style:none;
  align-items:center;
}

/* Default non-active link */
.nav-list a{
  text-decoration: none;
  color: rgba(0, 0, 0, 0.75);
  font-size: 14px;
  letter-spacing:0.08em;
  text-transform:lowercase;
  transition: color 0.4s ease;
}

/* Active link default color */
.nav-list a.active{
  color:rgba(100, 100, 100, 0.925);
  border-bottom:1px solid transparent;
}

/* Hover — default state */
.nav-list a:hover {
  color: rgba(150, 157, 163, 0.9);
}
/* When scrolled, regular links remain dark unless hovered */
.cz-header.scrolled .nav-list a {
  color: rgba(255, 255, 255, 0.9);
}

/* Active link becomes accent when scrolled */
.cz-header.scrolled .nav-list a.active {
  color: var(--accent); /* #cbeafc */
}

/* Hover color when scrolled */
.cz-header.scrolled .nav-list a:hover {
  color: rgba(255, 255, 255, 0.654);
}

/* logo center */
.cz-logo{ justify-self:center; display:flex; align-items:center; }

.cz-logo img{ height:46px; display:block; }

/* =========================
   Header Language Selector
   ========================= */

.lang-switch {
  position: relative;
}

.lang-trigger {
  background: none;
  border: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(0,0,0,0.6);
  cursor: pointer;
  padding: 6px 8px;
  transition: color 0.4s ease, background-color 0.4s ease;
}

.cz-header.scrolled .lang-trigger {
  color: rgba(255,255,255,0.85);
}

.lang-trigger:hover {
  color: rgba(0,0,0,0.9);
}

/* Dropdown */
.lang-menu {
  position: absolute;
  top: 140%;
  right: 0;
  list-style: none;
  padding: 6px 0;
  margin: 0;

  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-radius: 8px;

  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);

  transition:
    color 0.4s ease,
    background-color 0.4s ease,
    opacity 0.4s ease;
}

/* Language dropdown links — force your intended colors */
.lang-menu a{
  color: inherit;           /* use the li color you already set */
  text-decoration: none;    /* remove default underline */
  display: block;           /* make the whole row clickable */
  width: 100%;
}

.lang-menu li {
  padding: 6px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  white-space: nowrap;
  color: rgba(0,0,0,0.75);

  transition:
    color 0.4s ease,
    background-color 0.4s ease,
    opacity 0.4s ease;
}

/* kill default visited purple/blue */
.lang-menu a:visited{
  color: inherit;
}

/* move hover styling to the actual link */
.lang-menu a:hover{
  opacity: 0.6;
}

/* keyboard accessibility */
.lang-menu a:focus-visible{
  outline: 2px solid rgba(0,0,0,0.35);
  outline-offset: 2px;
}

.cz-header.scrolled .lang-menu {
  background: rgba(20,20,30,0.9);
}

.cz-header.scrolled .lang-menu li {
  color: rgba(255,255,255,0.85);
}

/* scrolled header focus ring should be visible on dark bg */
.cz-header.scrolled .lang-menu a:focus-visible{
  outline-color: rgba(255,255,255,0.35);
}

/* Open state */
.lang-switch.open .lang-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* actions (right) */
.cz-actions{ justify-self:end; display:flex; align-items:center; gap:14px; }

/* ============================= */
/* FOOTER — QUIET TERMINAL CLOSE */
/* ============================= */

.cz-footer {
  position: relative;
  background: linear-gradient(
    180deg,
    #0a1024 0%,
    #050914 55%,
    #02050e 100%
  );
  color: rgba(255,255,255,0.5);
  padding: 90px 0 48px;
}

.footer-inner {
  display: block;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Grid layout */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 56px;
  margin-bottom: 56px;
}

/* Column titles */
.footer-col h3 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
}

/* Lists */
.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

/* Links */
.footer-col ul li a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.695);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-col ul li a:hover {
  color: rgba(255,255,255,0.9);
}

/* Legal index */
.footer-legal-more{
  appearance:none;
  background:none;
  border:none;
  padding:0;
  margin:0;
  color:rgba(255,255,255,0.695);
  font-size:12px;
  text-decoration:none;
  transition: color 0.25s ease;
  cursor:pointer;
}
.footer-legal-more:hover{ color: rgba(255,255,255,0.9); }

/* ============================= */
/* LEGAL INDEX — FOOTER STYLE    */
/* ============================= */

.legal-index {
  padding: 0;
  overflow: hidden;
}

.legal-index-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.legal-index-header h2 {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
}

.legal-index-close {
  background: none;
  border: none;
  font-size: 22px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
}

.legal-index-close:hover {
  color: rgba(255,255,255,0.9);
}

.legal-index-list {
  display: flex;
  flex-direction: column;
  padding: 18px 24px 26px;
  max-height: 60vh;
  overflow-y: auto;
}

.legal-index-list a {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.legal-index-list a:last-child {
  border-bottom: none;
}

.legal-index-list a:hover {
  color: rgba(255,255,255,0.95);
}

/* Language select */
.footer-col select {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.695);
  color-scheme: dark;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  transition: border-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.footer-col select option {
  background-color: #ffffff;
  color: #000000;
  
}

.footer-col select option:checked {
  background-color: #e5e5e5;
  color: #000000;
}

.footer-col select:hover {
  border-color: rgba(255,255,255,0.45);
}

.footer-col select:active {
  cursor: pointer;
}

.footer-col select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.35);
  cursor: pointer;
}

/* Copyright */
.cz-footer small {
  display: block;
  font-size: 12px;
  color: rgba(222, 222, 222, 0.94);
  text-align: left;
}

/* ============================= */
/* LEGAL POPUP                   */
/* ============================= */

.legal-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
}

.legal-popup[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

/* Backdrop */
.legal-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 20, 0.72);
  backdrop-filter: blur(6px);
}

/* Panel */
.legal-popup-panel {
  position: relative;
  max-width: 420px;
  width: 92%;
  margin: 0;
  padding: 32px 30px 28px;
  background: #070c1a;
  color: rgba(255,255,255,0.9);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}

/* Title */
.legal-popup-panel h2 {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

/* Text */
.legal-popup-panel p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin-bottom: 26px;
}

/* Actions */
.legal-popup-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Buttons */
.legal-popup-cancel {
  background: none;
  border: none;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
}

.legal-popup-cancel:hover {
  color: rgba(255,255,255,0.85);
}

.legal-popup-confirm {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.legal-popup-confirm:hover {
  text-decoration: underline;
}

/* =====================================================
   RESPONSIVE — TABLET & DOWN (≤ 900px)
   ===================================================== */
@media (max-width: 900px) {

  /* Header layout */
  .cz-header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    padding: 14px 0;
  }

  /* Footer layout */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-col select {
    width: 100%;
  }

  .cz-footer {
    padding: 72px 0 40px;
  }
}

/* =====================================================
   RESPONSIVE — SMALL DEVICES (≤ 600px)
   ===================================================== */
@media (max-width: 600px) {

  /* Burger visible */
  .nav-toggle {
    display: inline-block;
    position: relative;
    z-index: 1100;
  }

  /* Mobile nav */
  .nav-list {
    display: flex;
    flex-direction: column;
    gap: 18px;

    position: absolute;
    top: 100%;
    left: 1rem;

    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 12px;

    width: max-content;
    z-index: 1000;

    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;

    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .nav-list.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .cz-logo img {
    height: 40px;
  }

  .cz-actions {
    gap: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cz-footer small {
    text-align: center;
  }

  .legal-popup-panel {
    max-width: calc(100% - 32px);
  }
}

/* =====================================================
   RESPONSIVE — VERY SMALL DEVICES (≤ 400px)
   ===================================================== */
@media (max-width: 400px) {

  .cz-header-inner {
    padding: 12px 0;
  }

  .cz-logo img {
    height: 36px;
  }
}
