/* ==========================================================
   Pays Basque Digital — Design System
   ========================================================== */

:root {
  /* Palette: Editorial Marine (default) */
  --c-primary: #0B1B3F;       /* navy */
  --c-primary-2: #16285A;
  --c-accent: #1F5FE6;        /* electric blue */
  --c-accent-deep: #1747B8;
  --c-basque: #C5462E;        /* basque red-ocre */
  --c-basque-soft: #E89B89;
  --c-bg: #F6F1EA;            /* warm ivory */
  --c-bg-2: #FFFFFF;
  --c-bg-3: #ECE4D6;          /* deeper ivory */
  --c-ink: #0B1B3F;
  --c-ink-2: #4B5870;
  --c-ink-3: #8694AE;
  --c-line: #DDD2BE;
  --c-line-2: rgba(11, 27, 63, 0.10);

  /* Type */
  --f-display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Sizes (1440 design) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-xl: 28px;

  --shadow-1: 0 2px 8px rgba(11, 27, 63, 0.06);
  --shadow-2: 0 12px 36px -12px rgba(11, 27, 63, 0.18);
}

/* Palette: Atlantic (cool slate) */
[data-palette="atlantic"] {
  --c-primary: #102542;
  --c-primary-2: #1B355E;
  --c-accent: #2E7BE0;
  --c-accent-deep: #1E5BBA;
  --c-basque: #2BA39A;
  --c-basque-soft: #A5D8D4;
  --c-bg: #EFF3F7;
  --c-bg-2: #FFFFFF;
  --c-bg-3: #E2EAF2;
  --c-ink: #102542;
  --c-ink-2: #45556C;
  --c-ink-3: #7F8DA3;
  --c-line: #CFD8E3;
  --c-line-2: rgba(16, 37, 66, 0.10);
}

/* Palette: Phosphore (high contrast) */
[data-palette="phosphore"] {
  --c-primary: #050B1F;
  --c-primary-2: #0F1A38;
  --c-accent: #3D7BFF;
  --c-accent-deep: #1F5FE6;
  --c-basque: #FF5B3A;
  --c-basque-soft: #FFB6A4;
  --c-bg: #0B1124;
  --c-bg-2: #121A33;
  --c-bg-3: #1A2444;
  --c-ink: #F2F3F8;
  --c-ink-2: #B5BCD0;
  --c-ink-3: #7782A0;
  --c-line: #243057;
  --c-line-2: rgba(255, 255, 255, 0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #1a1a1a;
  font-family: var(--f-body);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Stage — letterboxes the 1440px design */
.stage {
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  background: #181715;
}
.stage-inner {
  width: 1440px;
  flex-shrink: 0;
  background: var(--c-bg);
  position: relative;
  transition: background 0.3s;
}

/* ----------  TYPE  ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--f-display);
  color: var(--c-ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
.h-display { font-size: clamp(72px, 8vw, 132px); font-weight: 500; letter-spacing: -0.035em; line-height: 0.92; }
.h-1 { font-size: 88px; font-weight: 500; letter-spacing: -0.03em; line-height: 0.95; }
.h-2 { font-size: 56px; font-weight: 500; letter-spacing: -0.025em; }
.h-3 { font-size: 36px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; }
.h-4 { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.h-5 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }

.body-lg { font-size: 19px; line-height: 1.55; color: var(--c-ink-2); }
.body { font-size: 16px; line-height: 1.6; color: var(--c-ink-2); }
.body-sm { font-size: 14px; line-height: 1.5; color: var(--c-ink-2); }
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-ink-2);
  font-weight: 500;
}
.eyebrow-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--c-basque);
  font-weight: 600;
}

/* ----------  BUTTONS  ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--c-ink);
  color: var(--c-bg);
}
.btn-primary:hover { background: var(--c-accent); }

.btn-accent {
  background: var(--c-accent);
  color: #fff;
}
.btn-accent:hover { background: var(--c-accent-deep); }

.btn-ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-line);
}
.btn-ghost:hover { background: var(--c-bg-3); border-color: var(--c-ink); }

.btn-link {
  background: transparent;
  color: var(--c-ink);
  padding: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--c-ink);
  padding-bottom: 2px;
}
.btn-link:hover { color: var(--c-accent); border-color: var(--c-accent); }

.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 18px 28px; font-size: 16px; }

/* ----------  CARDS / SURFACES  ---------- */
.surface {
  background: var(--c-bg-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--f-body);
  background: var(--c-bg-3);
  color: var(--c-ink);
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip-outline {
  background: transparent;
  border-color: var(--c-line);
}
.chip-accent {
  background: color-mix(in srgb, var(--c-accent) 12%, transparent);
  color: var(--c-accent-deep);
}
.chip-basque {
  background: color-mix(in srgb, var(--c-basque) 14%, transparent);
  color: var(--c-basque);
}
.chip-dark {
  background: var(--c-ink);
  color: var(--c-bg);
}

/* Tag indicator (chip's interactive state) */
.chip.is-active {
  background: var(--c-ink);
  color: var(--c-bg);
}

/* ----------  INPUT  ---------- */
.input {
  width: 100%;
  border: 1px solid var(--c-line);
  background: var(--c-bg-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-family: var(--f-body);
  font-size: 15px;
  color: var(--c-ink);
  outline: none;
  transition: all 0.15s;
}
.input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-accent) 18%, transparent);
}

/* ----------  LAYOUT  ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
  position: relative;
}
.container-wide {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
}
.divider {
  height: 1px;
  background: var(--c-line-2);
  width: 100%;
  margin: 0;
}

/* ----------  HEADER / TOP CHROME  ---------- */
.site-header {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line-2);
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--c-bg) 92%, transparent);
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-link {
  font-size: 14.5px;
  color: var(--c-ink);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.nav-link:hover { color: var(--c-accent); }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  bottom: -22px;
  left: 0; right: 0;
  height: 2px;
  background: var(--c-basque);
}

.lang-switch {
  display: flex;
  gap: 2px;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.lang-switch span { padding: 6px 8px; color: var(--c-ink-3); cursor: pointer; }
.lang-switch span.is-active { color: var(--c-ink); border-bottom: 1px solid var(--c-basque); }

/* ---------- LOGO ---------- */
.pbd-logo { display: inline-flex; align-items: center; text-decoration: none; }
.pbd-logo img { display: block; height: 44px; width: auto; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--c-primary);
  color: #E8EBF2;
  padding: 80px 40px 32px;
  margin-top: 0;
}
.site-footer .container-wide { color: #E8EBF2; }
.site-footer h5 {
  font-family: var(--f-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8A95B4;
  font-weight: 600;
  margin-bottom: 18px;
}
.site-footer a {
  color: #E8EBF2;
  text-decoration: none;
  font-size: 14.5px;
  display: block;
  padding: 5px 0;
  transition: color 0.15s;
}
.site-footer a:hover { color: var(--c-basque-soft); }

/* ---------- IMG PLACEHOLDERS ---------- */
.img-ph {
  background:
    repeating-linear-gradient(135deg,
      color-mix(in srgb, var(--c-ink) 6%, transparent) 0 1px,
      transparent 1px 14px),
    var(--c-bg-3);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-ink-2);
  letter-spacing: 0.06em;
}

/* ---------- UTILS ---------- */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-5 { gap: 24px; } .gap-6 { gap: 32px; } .gap-7 { gap: 48px; } .gap-8 { gap: 64px; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.flex-wrap { flex-wrap: wrap; }

.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; } .mt-6 { margin-top: 32px; }
.mt-7 { margin-top: 48px; } .mt-8 { margin-top: 64px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; } .mb-6 { margin-bottom: 32px; }

/* ---------- Prototype Chrome ---------- */
.proto-bar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(11, 27, 63, 0.95);
  backdrop-filter: blur(20px);
  color: #fff;
  padding: 7px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  z-index: 1000;
  box-shadow: 0 18px 48px rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.08);
}
.proto-bar button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.65);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.15s;
  white-space: nowrap;
}
.proto-bar button:hover { color: #fff; background: rgba(255,255,255,0.06); }
.proto-bar button.is-active {
  background: #fff;
  color: var(--c-primary);
}
.proto-num {
  display: inline-block;
  width: 18px;
  text-align: left;
  opacity: 0.5;
  margin-right: 4px;
}
.proto-bar button.is-active .proto-num { opacity: 0.85; }

/* ---------- Basque motif background tile ---------- */
.basque-tile {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
  color: var(--c-ink);
}

/* ---------- Marquee  ---------- */
.marquee {
  overflow: hidden;
  position: relative;
  border-top: 1px solid var(--c-line-2);
  border-bottom: 1px solid var(--c-line-2);
  padding: 18px 0;
}
.marquee-track {
  display: inline-flex;
  gap: 56px;
  animation: marquee 80s linear infinite;
  white-space: nowrap;
  align-items: center;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Underlines (animated link) ---------- */
.u-link {
  text-decoration: none;
  color: inherit;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 1px;
  transition: color 0.15s;
}
.u-link:hover { color: var(--c-accent); }

/* Tabular numbers helper */
.tnum { font-variant-numeric: tabular-nums; }

/* Map placeholder */
.map-ph {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 8%, transparent), transparent),
    repeating-linear-gradient(45deg, var(--c-bg-3) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(-45deg, var(--c-bg-3) 0 1px, transparent 1px 18px),
    var(--c-bg-2);
}

/* dark palette adjustments */
[data-palette="phosphore"] .btn-primary { background: var(--c-bg-2); color: var(--c-bg); }
[data-palette="phosphore"] .btn-primary:hover { background: var(--c-accent); color: #fff; }
[data-palette="phosphore"] .input { background: var(--c-bg-2); color: var(--c-ink); }
[data-palette="phosphore"] .img-ph { background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.04) 0 1px,
      transparent 1px 14px),
    var(--c-bg-3); color: var(--c-ink-2); }
[data-palette="phosphore"] .site-footer { background: #02060F; }
