:root {
  --ink: #102a43;
  --ink-soft: #243b53;
  --mist: #f0f4f8;
  --fog: #d9e2ec;
  --paper: #ffffff;
  --muted: #627d98;
  --teal: #0f7c7c;
  --teal-deep: #0a5c5c;
  --crimson: #b91c2c;
  --crimson-deep: #8f1421;
  --display: "Archivo", "Segoe UI", sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  --ui: "Archivo", "Segoe UI", sans-serif;
  --max: 1480px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ui);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(16, 42, 67, 0.03) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(16, 42, 67, 0.03) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--mist);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); }
a:hover { color: var(--teal-deep); }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }

/* —— bold header band —— */
.hero {
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(15, 124, 124, 0.35), transparent 55%),
    linear-gradient(145deg, #0b1f33 0%, #102a43 48%, #143652 100%);
  color: #eef3f8;
  padding: 1.35rem 0 2.1rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--crimson), var(--teal));
}
.toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}
.brand img {
  width: 52px; height: 52px; object-fit: contain;
  background: #fff; padding: 4px; border-radius: 4px;
}
.brand strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.brand small {
  display: block;
  color: rgba(238, 243, 248, 0.7);
  font-size: 0.8rem;
}
.top-actions {
  display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0;
}
.langs {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
  overflow: hidden;
}
.langs button {
  border: 0; background: transparent; color: rgba(255,255,255,0.7);
  font: inherit; font-size: 0.8rem; font-weight: 700;
  padding: 0.5rem 0.7rem; cursor: pointer;
}
.langs button.is-on { background: #fff; color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius);
  background: var(--crimson); color: #fff;
  font: inherit; font-weight: 700; font-size: 0.92rem;
  padding: 0.7rem 1.05rem; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--crimson-deep); color: #fff; }
.btn-ghost {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }
.btn-teal { background: var(--teal); }
.btn-teal:hover { background: var(--teal-deep); color: #fff; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.65fr);
  gap: 1.5rem 3rem;
  align-items: end;
}
.hero-grid > * { min-width: 0; }
.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7fdbd4;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.2vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: min(16ch, 100%);
}
.hero-lead {
  margin: 1rem 0 0;
  max-width: 58ch;
  color: rgba(238, 243, 248, 0.82);
  font-size: 1.12rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.hero-aside {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}
.hero-aside .num {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}
.hero-aside .num-label {
  margin: 0.35rem 0 0.85rem;
  color: rgba(238, 243, 248, 0.72);
  font-size: 0.92rem;
}
.hero-aside ul {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 0.4rem;
  font-size: 0.9rem;
  color: rgba(238, 243, 248, 0.82);
}
.hero-aside li::before {
  content: "– ";
  color: #7fdbd4;
}

/* —— filter strip —— */
.controls {
  margin-top: -1.15rem;
  position: relative;
  z-index: 5;
}
.controls-panel {
  background: var(--paper);
  border: 1px solid var(--fog);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(16, 42, 67, 0.08);
  padding: 1rem;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr) auto;
  gap: 0.75rem;
}
.field { display: grid; gap: 0.3rem; min-width: 0; }
.field span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--fog);
  border-radius: 4px;
  background: #f8fafc;
  font: inherit;
  font-size: 0.98rem;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(15, 124, 124, 0.35);
  border-color: var(--teal);
  background: #fff;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 1.6rem 0 1rem;
}
.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.section-head a {
  font-weight: 700;
  text-decoration: none;
  color: var(--crimson);
}
.section-head a:hover { text-decoration: underline; }

/* —— dossier grid —— */
.atlas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  padding-bottom: 3rem;
}

.dossier {
  background: var(--paper);
  border: 1px solid var(--fog);
  border-radius: var(--radius);
  border-left: 4px solid var(--teal);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  animation: in 0.45s ease both;
  animation-delay: var(--d, 0s);
}
.dossier[hidden] { display: none; }
.dossier:nth-child(3n) { border-left-color: var(--crimson); }
.dossier:nth-child(3n+2) { border-left-color: var(--ink-soft); }

@keyframes in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.dossier-top {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.9rem;
  padding: 1.05rem 1.05rem 0.85rem;
  background: linear-gradient(180deg, #f7fafc, #fff);
  border-bottom: 1px solid var(--fog);
}
.mark {
  width: 96px; height: 72px;
  background: #fff;
  border: 1px solid var(--fog);
  border-radius: 4px;
  display: grid; place-items: center;
  padding: 0.4rem;
}
.mark img { max-height: 56px; max-width: 100%; object-fit: contain; }
.who h2 {
  margin: 0;
  font-family: var(--body);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
}
.meta {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.meta i { font-style: normal; opacity: 0.5; }

.dossier-body {
  padding: 0.95rem 1.05rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  flex: 1;
}
.cell { min-width: 0; }
.cell.wide { grid-column: 1 / -1; }
.cell span {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.18rem;
}
.cell p,
.cell a {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-decoration: none;
  color: var(--ink);
}
.cell a {
  color: var(--teal);
  font-weight: 600;
}
.cell a:hover { text-decoration: underline; }
.socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.45rem;
}
.cell .social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px; flex: none;
  margin: 0; padding: 0;
  font-size: 0; font-weight: 400;
  letter-spacing: 0; text-transform: none;
  color: var(--teal);
  line-height: 0;
}
.cell .social svg { width: 20px; height: 20px; display: block; }
.cell .social:hover { color: var(--teal-deep); }

.dossier-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 1.05rem;
  border-top: 1px solid var(--fog);
  background: #f8fafc;
  font-size: 0.8rem;
  color: var(--muted);
}
.dossier-foot a {
  font-weight: 700;
  text-decoration: none;
  color: var(--crimson);
  white-space: nowrap;
}
.dossier-foot a:hover { text-decoration: underline; }
.dossier { cursor: pointer; }
.dossier:hover { border-color: #b7c6d4; }
.dossier .cell.extra { display: none; }

.popup {
  width: min(720px, calc(100% - 2rem));
  max-height: min(86vh, 820px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(16, 42, 67, .28);
}
.popup::backdrop { background: rgba(16, 42, 67, .48); }
.popup-card { position: relative; padding: 1.35rem 1.4rem 1.15rem; overflow: auto; max-height: min(86vh, 820px); }
.popup-x {
  position: absolute; top: 0.7rem; right: 0.7rem;
  width: 34px; height: 34px; border: 1px solid var(--fog); border-radius: 6px;
  background: #fff; color: var(--ink); font: inherit; font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.popup-x:hover { background: var(--mist); }
.popup-head {
  display: grid; grid-template-columns: 96px 1fr; gap: 0.9rem; align-items: center;
  padding: 0 2.4rem 1rem 0; border-bottom: 1px solid var(--fog);
}
.popup-head h2 { margin: 0; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.popup h3 {
  margin: 1.15rem 0 0.35rem; font-size: 0.78rem; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.popup-about {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted);
}
.popup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 1.1rem; }
.popup-grid .wide { grid-column: 1 / -1; }
.popup-foot {
  display: flex; justify-content: space-between; gap: 0.75rem; align-items: center;
  margin-top: 1.1rem; padding-top: 0.85rem; border-top: 1px solid var(--fog);
  font-size: 0.85rem; color: var(--muted);
}
.popup-foot a { font-weight: 700; text-decoration: none; color: var(--crimson); }
.popup-foot a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .popup-grid, .popup-head { grid-template-columns: 1fr; }
}

/* —— footer —— */
.site-foot {
  background: var(--ink);
  color: #bcccdc;
  padding: 2.2rem 0 1.3rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr;
  gap: 1.5rem;
}
.site-foot h2 {
  margin: 0 0 0.55rem;
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-foot p, .site-foot li { margin: 0; font-size: 0.92rem; }
.site-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.copy {
  width: min(var(--max), calc(100% - 2rem));
  margin: 1.35rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.8rem;
  color: #829ab1;
}

/* —— apply —— */
.page {
  padding: 2rem 0 3rem;
}
.page h1 {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}
.page .lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  max-width: 58ch;
  font-size: 1.05rem;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--fog);
  border-radius: var(--radius);
  border-left: 4px solid var(--teal);
  padding: 1.25rem;
  box-shadow: 0 12px 30px rgba(16, 42, 67, 0.05);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.form-grid .full { grid-column: 1 / -1; }
.help { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .controls-panel { grid-template-columns: 1fr 1fr; }
  .controls-panel .btn { grid-column: 1 / -1; }
  .atlas { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dossier-top { grid-template-columns: 72px 1fr; gap: 0.7rem; padding: 0.9rem; }
  .mark { width: 72px; height: 56px; }
  .who h2 { font-size: 1.15rem; }
  .dossier-body, .form-grid, .controls-panel { grid-template-columns: 1fr; }
  .brand small { display: none; }
  .toprow { flex-wrap: wrap; align-items: flex-start; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .hero { padding-bottom: 1.6rem; }
  .hero h1 { font-size: 2rem; }
  .hero-lead { font-size: 1rem; }
  .section-head { flex-wrap: wrap; }
  .popup { width: calc(100% - 1rem); }
  .popup-card { padding: 1rem 0.9rem 0.9rem; }
  .page { padding-top: 1.25rem; }
}
