/* =============================================================
   1. Tokens — light diplomatic palette
   ============================================================= */
:root {
  --bg:        #f6f1e6;   /* warm ivory paper */
  --bg-2:      #eee4cf;   /* deeper cream, secondary surfaces */
  --bg-3:      #ffffff;   /* card white */
  --bg-4:      #16233f;   /* deep diplomatic navy — sole dark anchor, footer floor */
  --bg-wave:   #ecdfc0;   /* warm gold-cream crest for section wave gradients */
  --ink:       #1c2b47;   /* primary text — deep navy-black, never pure black */
  --ink-soft:  #38455f;
  --ink-mute:  #6b7488;   /* metadata / mute */
  --gold:      #8a6624;   /* antique gold — primary accent */
  --gold-2:    #a67c30;   /* warmer gold — hover / glow */
  --oxblood:   #8a2323;   /* rare secondary accent */
  --line:      rgba(28,43,71,.14);
  --line-strong: rgba(28,43,71,.28);

  /* Footer stays the one dark tier — needs its own light-on-navy text set */
  --footer-ink:      #f4efe2;
  --footer-ink-soft: #cdd4e3;
  --footer-ink-mute: #8e99b0;
  --footer-line:     rgba(244,239,226,.16);

  --serif-display: "PT Serif", Georgia, "Times New Roman", serif;
  --serif-body:    "PT Serif", Georgia, "Times New Roman", serif;
  --sans:          "PT Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --nav-h: 104px;
  --container: 1180px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--serif-display); text-wrap: balance; line-height: 1.05; letter-spacing: -0.005em; font-weight: 700; color: var(--ink); }
em { font-style: italic; color: var(--gold-2); }
::selection { background: var(--gold); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.2rem; background: var(--gold); color: var(--bg);
  z-index: 9999; font-family: var(--sans); font-weight: 700; font-size: .9rem;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

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

.kicker {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.kicker.is-mute { color: var(--ink-mute); }

.hairline { border: 0; border-top: 1px solid var(--line); }

/* Ornamental divider — subtle Slavic meander motif, gold on paper */
.ornament {
  height: 14px;
  background-image: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 10px);
  opacity: .5;
  margin-block: 0;
}
.ornament-rule {
  display: flex; align-items: center; gap: .9rem;
  color: var(--gold);
  margin-block: 2.4rem;
}
.ornament-rule::before, .ornament-rule::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition-duration: .3s; }
}

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-weight: 700; font-size: .92rem;
  letter-spacing: .02em;
  white-space: nowrap;
  padding: .85rem 1.6rem;
  border: 1px solid var(--gold);
  transition: background .25s var(--ease-out), color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.btn-primary { background: var(--gold); color: var(--bg); }
.btn-primary:hover { background: var(--gold-2); box-shadow: 0 0 0 3px rgba(201,162,74,.22); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-instagram {
  background: transparent; color: var(--ink); border-color: var(--line-strong);
}
.btn-instagram:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-instagram img { width: 20px; height: 20px; }
.btn-ghost[data-i18n="cta.email"] { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.btn-ghost[data-i18n="cta.email"]:hover { background: var(--gold-2); box-shadow: 0 0 0 3px rgba(201,162,74,.22); }
.footer-social { display: flex; gap: .7rem; margin-top: 1.2rem; flex-wrap: nowrap; }
.footer-instagram {
  background: transparent; border-color: var(--footer-ink-soft); color: var(--footer-ink);
  padding: .65rem 1.1rem;
  font-size: .82rem; font-weight: 700;
}
.footer-instagram img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.footer-instagram:hover { background: rgba(244,239,226,.08); border-color: var(--footer-ink); }
.btn-arrow { transition: transform .25s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-pill { padding: 1.05rem 2.3rem; border-radius: 999px; }

/* =============================================================
   4. Header / Masthead
   ============================================================= */
.masthead {
  position: sticky; top: 0; z-index: 500;
  background: rgba(219,209,179,.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead-main {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  max-width: 1440px;
  align-items: center;
  gap: 1.2rem;
  padding: 1.1rem 0;
  min-height: var(--nav-h);
}
html[lang="ru"] .nav-primary ul { gap: 1.1rem; }
html[lang="ru"] .lang-toggle { margin-left: .6rem; }
html[lang="ru"] .nav-link { font-size: .92rem; }
html[lang="ru"] .masthead-brand .sub { font-size: .6rem; }
html[lang="ru"] .nav-cta { font-size: .8rem; padding-inline: 1.3rem; }
.masthead-brand {
  display: flex; align-items: center; gap: 1.5rem;
}
.masthead-logo {
  display: block; flex-shrink: 0;
  width: 115px; height: 104px;
  margin-left: -10px;
  border-radius: 15px;
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 50%, transparent 100%);
}
.masthead-logo img { width: 100%; height: 100%; object-fit: contain; }
.masthead-brand-text {
  display: flex; flex-direction: column; gap: .15rem;
}
.masthead-brand .word {
  font-family: var(--serif-display);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -.005em;
  color: var(--ink);
  white-space: nowrap;
}
.masthead-brand .sub {
  font-family: var(--sans);
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.nav-primary { display: none; justify-self: center; }
.nav-primary ul { display: flex; align-items: center; gap: 1.7rem; }
.nav-link {
  position: relative;
  font-family: var(--sans); font-size: 1.05rem; font-weight: 600;
  white-space: nowrap;
  padding-block: .3rem;
  color: var(--ink-soft);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--gold);
  transition: right .3s var(--ease-out);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after, .nav-link[aria-expanded="true"]::after { right: 0; }

.masthead-actions { display: flex; align-items: center; gap: 1rem; justify-self: end; }

.nav-cta { display: none; }

.lang-toggle {
  display: none; align-items: center;
  margin-left: 1.2rem;
  font-family: var(--sans); font-size: .84rem; font-weight: 700; letter-spacing: .01em;
  color: #fff; background: var(--bg-4);
  border: 1px solid var(--bg-4); border-radius: 999px;
  padding: .85rem 1.5rem; cursor: pointer;
  transition: background .2s ease, opacity .2s ease;
}
.lang-toggle:hover { background: #223159; }
.lang-toggle-mobile {
  display: inline-flex; align-self: flex-start; margin-left: 0;
  margin-top: .4rem; padding: .7rem 1.3rem; font-size: .82rem;
}

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px; padding: .5rem;
}
.nav-toggle span { width: 24px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mega menu (desktop) */
.mega {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 32px 64px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility .25s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; }
.mega-inner {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem;
  padding: 2.6rem 0;
}
.mega-col-title {
  font-family: var(--sans); font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 1rem; display: flex; align-items: baseline; gap: .5rem;
}
.mega-col-title .n { color: var(--ink-mute); font-weight: 500; }
.mega-col ul { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.mega-col a {
  font-family: var(--serif-body); font-size: .95rem; color: var(--ink-soft);
  transition: color .2s var(--ease-out);
}
.mega-col a:hover { color: var(--gold-2); }

/* =============================================================
   5. Mobile nav overlay
   ============================================================= */
.mobile-nav {
  position: fixed; inset: 0; z-index: 600;
  background: var(--bg);
  padding: 6.5rem 1.5rem 3rem;
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform .4s var(--ease-out);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav-close {
  position: absolute; top: 1.3rem; right: 1.3rem;
}
.mobile-nav-close span {
  display: block; width: 22px; height: 1.5px; background: var(--ink);
}
.mobile-nav-close span:first-child { transform: rotate(45deg) translate(1px,1px); }
.mobile-nav-close span:last-child { transform: rotate(-45deg) translate(1px,-1px); margin-top: -1.5px; }

.mobile-nav-list { display: flex; flex-direction: column; }
.mobile-nav-list > li { border-top: 1px solid var(--line); }
.mobile-nav-list > li:last-child { border-bottom: 1px solid var(--line); }
.mobile-nav-list a, .mobile-nav-list summary {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--serif-display); font-size: 1.5rem; font-weight: 700;
  padding: 1.1rem 0; cursor: pointer; list-style: none; color: var(--ink);
}
.mobile-nav-list summary::-webkit-details-marker { display: none; }
.mobile-nav-sub { padding-bottom: 1rem; display: flex; flex-direction: column; gap: .2rem; }
.mobile-nav-sub-group { margin-top: .7rem; }
.mobile-nav-sub-group .g-title { font-family: var(--sans); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: .4rem; display: block; }
.mobile-nav-sub a { font-family: var(--serif-body); font-size: 1rem; padding: .4rem 0; color: var(--ink-soft); }
.mobile-nav-foot { margin-top: 2.2rem; display: flex; flex-direction: column; gap: .6rem; font-family: var(--sans); font-size: .9rem; color: var(--ink-mute); }

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  padding-block: 3rem 3.5rem;
  position: relative;
  overflow: clip;
}
.hero-mesh {
  position: absolute; inset: -10% -10% auto -10%; height: 140%; z-index: -1;
  background:
    radial-gradient(38% 45% at 18% 15%, rgba(138,102,36,.14), transparent 60%),
    radial-gradient(45% 50% at 85% 30%, rgba(138,35,35,.10), transparent 65%),
    radial-gradient(60% 60% at 50% 100%, rgba(138,102,36,.08), transparent 70%);
  filter: blur(40px);
  animation: meshDrift 26s ease-in-out infinite;
}
@keyframes meshDrift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.15) rotate(6deg); }
}
.hero-grid {
  display: grid; gap: 2.4rem;
}
.hero-glyph {
  display: inline-flex; margin-bottom: 1.1rem;
  color: var(--gold);
}
.hero-glyph svg { width: 30px; height: 30px; }
.hero-eyebrow { margin-bottom: 1.2rem; }
.hero-title {
  font-size: clamp(2.3rem, 5.6vw, 4.1rem);
  max-width: 15ch;
}
.hero-title em { color: var(--gold-2); }
.hero-deck {
  font-family: var(--serif-body);
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-top: 1.3rem;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-top: 2rem;
}
.hero-figure {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 42%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 42%, transparent 100%);
}
.hero-figure img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  filter: saturate(1.1) contrast(1.08) brightness(1.08);
  transform: scale(1.05);
  will-change: transform;
}

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: 3rem;
}
.hero-stat {
  padding: 1.3rem 0;
  text-align: center;
}
.hero-stat:not(:last-child) { border-right: 1px solid var(--line); }
.hero-stat .v {
  font-family: var(--serif-display); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700;
  display: block; color: var(--gold-2);
}
.hero-stat .l {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute);
}

/* =============================================================
   6.5 Flag photo banner — full-bleed, dissolves into the wave
   ============================================================= */
.flag-photo {
  position: relative;
  height: clamp(200px, 30vw, 420px);
  overflow: hidden;
}
.flag-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03) brightness(.94);
}
.flag-photo-fade-top,
.flag-photo-fade-bottom {
  position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none;
}
.flag-photo-fade-top {
  top: 0; height: 110px;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
}
.flag-photo-fade-bottom {
  bottom: 0; height: 140px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-wave) 100%);
}

/* =============================================================
   7. Manifiesto
   ============================================================= */
.manifiesto {
  padding-block: 4.5rem;
}
.manifiesto-split { display: grid; gap: 3.5rem; align-items: center; position: relative; z-index: 1; }
.manifiesto-text-centered {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.manifiesto-title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.manifiesto-text-centered .manifiesto-body { margin-inline: auto; }
.manifiesto-text-centered .pull-quote {
  border-left: none;
  padding-left: 0;
  margin-inline: auto;
  margin-bottom: 0;
}
.quote-divider {
  position: relative;
  display: block;
  width: 46px;
  margin: 1.7rem auto 2rem;
  border-top: 2px solid var(--gold);
}
.quote-divider::after {
  content: "";
  position: absolute;
  top: 9px; left: 50%;
  width: 24px;
  transform: translateX(-50%);
  border-top: 2px solid var(--gold);
}
.historia-figure.manifiesto-figure {
  border: none;
  box-shadow: none;
  border-radius: 32px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 42%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 42%, transparent 100%);
}
.manifiesto-figure img { aspect-ratio: 4/3; }
.manifiesto-body {
  font-size: 1.18rem;
  max-width: 62ch;
  color: var(--ink-soft);
}
.dropcap::first-letter {
  font-family: var(--serif-display);
  font-size: 3.4em;
  float: left;
  line-height: .82;
  padding-right: .12em;
  padding-top: .04em;
  color: var(--gold);
  font-weight: 700;
}
.pull-quote {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--ink);
  border-left: 3px solid var(--gold);
  padding-left: 1.6rem;
  margin-block: 2rem;
  max-width: 46ch;
}

/* =============================================================
   8. Departments (service categories) — even bordered grid
   ============================================================= */
.departments {
  padding-block: 4.5rem;
  position: relative;
  overflow: hidden;
}
.departments-cathedral {
  position: fixed; z-index: 0; pointer-events: none;
  top: 96px; right: -20px;
  width: 300px; height: auto;
  opacity: 0;
  transition: opacity .4s ease;
}
.departments-waves {
  position: fixed; z-index: 0; pointer-events: none;
  left: -140px; bottom: 40px;
  width: 480px; height: auto;
  opacity: 0;
  filter: saturate(1.4) brightness(.88) contrast(1.1);
  transform: scaleX(-1) rotate(-30deg);
  transition: opacity .4s ease;
}
.departments.is-decor-visible .departments-cathedral { opacity: .8; }
.departments.is-decor-visible .departments-waves { opacity: .7; }
.departments > .container { position: relative; z-index: 1; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; margin-bottom: 2.6rem; flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section-head-desc { margin-top: .7rem; max-width: 46ch; color: var(--ink-mute); }

.dept-grid {
  display: grid; gap: 1.6rem;
}
.dept-card {
  padding: 2.4rem 2rem;
  background: var(--bg-3);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(28,43,71,.09);
  display: grid; gap: .7rem;
  align-content: start;
  position: relative;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
  transform-style: preserve-3d;
}
.dept-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(201,162,74,.12), transparent 60%);
  opacity: 0; transition: opacity .3s var(--ease-out); pointer-events: none;
  z-index: 0;
}
.dept-card:hover { transform: translateY(-4px); box-shadow: 0 28px 56px rgba(28,43,71,.15); }
.dept-card:hover::before { opacity: 1; }
.dept-card-wave {
  position: absolute; z-index: -1; pointer-events: none;
  left: -10%; right: -10%; top: -96px;
  height: 150px;
  border-radius: 50%;
}
.dept-card-wave.is-white { background: rgba(28,43,71,.055); }
.dept-card-wave.is-blue  { background: rgba(40,81,163,.11); }
.dept-card-wave.is-red   { background: rgba(138,35,35,.11); }
.dept-icon {
  width: 88px; height: 88px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .3rem;
}
.dept-icon img { width: 100%; height: 100%; object-fit: contain; }
.dept-card h3 { font-size: 1.35rem; }
.dept-desc { font-family: var(--sans); font-size: .92rem; color: var(--ink-mute); }
.dept-rule { display: block; width: 34px; height: 2px; background: var(--gold); margin-block: .2rem; }
.dept-list { display: flex; flex-direction: column; gap: .55rem; }
.dept-list a {
  font-family: var(--serif-body); font-size: 1rem; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: space-between;
  padding-block: .2rem;
  border-bottom: 1px dotted var(--line);
  transition: color .2s var(--ease-out), padding-left .2s var(--ease-out);
}
.dept-list a:hover { color: var(--gold-2); padding-left: .3rem; }
.dept-list a .arrow { color: var(--gold); font-size: .85em; }

/* =============================================================
   9. Info / office section
   ============================================================= */
.info {
  padding-block: 4.5rem;
}
.info-grid {
  display: grid; gap: 2.4rem;
  position: relative; z-index: 1;
}
.info-figure { border: 1px solid var(--line-strong); overflow: hidden; box-shadow: 0 24px 56px rgba(0,0,0,.45); }
.info-figure img { width: 100%; aspect-ratio: 5/4; object-fit: cover; filter: saturate(.85) contrast(1.05) sepia(.15); }
.landmark-slider { position: relative; aspect-ratio: 5/4; }
.landmark-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
}
.landmark-slide.is-active { opacity: 1; }
.landmark-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.landmark-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,8,4,.72) 0%, rgba(10,8,4,0) 42%);
  pointer-events: none;
}
.landmark-slide figcaption {
  position: absolute; left: 1.1rem; right: 1.1rem; bottom: .85rem;
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .03em;
  color: #f4efe2;
  text-shadow: 0 1px 4px rgba(0,0,0,.55);
}
.info-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  padding: 2.2rem;
}
.info-card h3 { font-size: 1.5rem; margin-bottom: 1.4rem; }
.info-row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-block: .75rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans); font-size: .92rem;
  color: var(--ink-soft);
}
.info-row:first-of-type { border-top: none; }
.info-row .k { color: var(--ink-mute); }
.info-row .v { text-align: right; }
.info-row a:hover { color: var(--gold-2); }
.info-card .btn { margin-top: 1.6rem; width: 100%; justify-content: center; }

/* =============================================================
   10. CTA / contact
   ============================================================= */
.cta {
  padding-block: 4.5rem;
  text-align: center;
  position: relative;
}
.cta > .container { position: relative; z-index: 2; }
.cta h2 { font-size: clamp(2rem, 4.4vw, 3rem); max-width: 20ch; margin-inline: auto; }
.cta p { font-family: var(--serif-body); color: var(--ink-mute); max-width: 46ch; margin: 1.1rem auto 0; }
.cta-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 560px; margin: 2rem auto 0; }
.cta-actions .btn { justify-content: center; }

/* =============================================================
   11. Footer
   ============================================================= */
.site-footer {
  border-top: 1px solid var(--footer-line);
  padding-block: 3rem 2rem;
  background: var(--bg-4);
  color: var(--footer-ink);
}
.footer-grid {
  display: grid; gap: 2.4rem;
}
.footer-brand .word { font-family: var(--serif-display); font-size: 1.5rem; font-weight: 700; color: var(--footer-ink); }
.footer-brand .legal { font-family: var(--sans); font-size: .82rem; color: var(--footer-ink-mute); margin-top: .8rem; max-width: 42ch; line-height: 1.6; }
.footer-col-title { font-family: var(--sans); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--footer-ink-mute); margin-bottom: .9rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-col a { font-family: var(--sans); font-size: .92rem; color: var(--footer-ink-soft); }
.footer-col a:hover { color: var(--gold-2); }
.footer-bottom {
  margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--footer-line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--sans); font-size: .78rem; color: var(--footer-ink-mute);
}

/* =============================================================
   12. Servicios (directory) page
   ============================================================= */
.directory-hero { padding-block: 3rem 2.5rem; position: relative; z-index: 2; }
.directory-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 18ch; }
.directory-hero p { font-family: var(--serif-body); font-size: 1.1rem; color: var(--ink-soft); max-width: 52ch; margin-top: 1.1rem; }

.directory-section { padding-block: 3rem; position: relative; }
.directory-section > .container { position: relative; z-index: 2; }
.directory-section-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: .7rem; }
.directory-section-head .n { font-family: var(--serif-display); font-size: 2.2rem; color: var(--gold); opacity: .7; }
.directory-section-head .rule { width: 40px; height: 2px; background: var(--gold); flex-shrink: 0; }
.directory-section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.directory-section-desc { font-family: var(--serif-body); font-size: 1rem; color: var(--ink-mute); max-width: 60ch; margin-bottom: 2.2rem; }

.service-grid { display: grid; gap: 1.4rem; }
.service-card {
  background: var(--bg-3); padding: 1.8rem;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(28,43,71,.08);
  position: relative;
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 24px 48px rgba(28,43,71,.14); }
.service-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--bg-wave);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .9rem;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: 1.15rem; margin-bottom: .6rem; padding-right: 1.6rem; }
.service-card p { font-family: var(--serif-body); font-size: .96rem; color: var(--ink-mute); padding-right: 1.6rem; }
.service-card .card-arrow {
  position: absolute; right: 1.6rem; bottom: 1.8rem;
  color: var(--gold); font-size: .9rem;
}
.service-card .ext-link {
  display: flex; align-items: center; gap: .4rem;
  font-family: var(--sans); font-size: .82rem; font-weight: 700; color: var(--gold-2);
  margin-top: 1rem;
}
.service-card .ext-link + .ext-link { margin-top: .5rem; }
.directory-bg-cathedral {
  position: fixed; z-index: 1; pointer-events: none;
  bottom: 20px; right: 4px;
  width: auto; height: auto;
  max-height: 116vh; max-width: 92vw;
  opacity: .75;
  transition: opacity .5s ease;
}
.directory-bg-cathedral.is-faded {
  opacity: 0;
}

/* =============================================================
   13. Responsive
   ============================================================= */
@media (min-width: 720px) {
  .hero-grid { grid-template-columns: 1fr 1fr; align-items: center; }
  .info-grid { grid-template-columns: 1fr 1fr; align-items: center; }
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 960px) {
  .nav-primary { display: block; }
  .nav-cta { display: inline-flex; padding-inline: 2rem; }
  .lang-toggle { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; }
  .manifiesto-split { grid-template-columns: 1.05fr .95fr; }
  .dept-grid { grid-template-columns: repeat(3, 1fr); }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1280px) {
  .container { padding-inline: 2rem; }
}

/* =============================================================
   13.5 Background waves — chained gradients between sections.
   Each section starts exactly where the previous one ended, so the
   color flows down the page instead of cutting at hard seams.
   ============================================================= */
section { position: relative; }
.wave-up   { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-wave) 100%); }
.wave-down { background: linear-gradient(180deg, var(--bg-wave) 0%, var(--bg) 100%); }

.section-blob {
  position: absolute; z-index: -1; pointer-events: none;
  width: 520px; height: 520px; border-radius: 50%;
  top: 50%; transform: translateY(-50%);
  background: radial-gradient(circle, rgba(201,162,74,.16), transparent 70%);
  filter: blur(20px);
  animation: blobFloat 18s ease-in-out infinite;
}
.section-blob.is-right { right: -160px; }
.section-blob.is-left  { left: -160px; }
@keyframes blobFloat {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%      { transform: translateY(calc(-50% - 26px)) scale(1.06); }
}

/* =============================================================
   13.6 Historia (dedicated page)
   ============================================================= */
.section-pad { padding-block: 4.5rem; }

.historia-hero .historia-emblem {
  display: block;
  width: 72px; height: 72px;
  margin-bottom: 1.3rem;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}
.historia-hero .historia-emblem img { width: 100%; height: 100%; object-fit: cover; }

.historia-split { display: grid; gap: 2.2rem; align-items: center; }
.historia-split-top { align-items: start; }
.historia-figure {
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 56px rgba(0,0,0,.16);
  overflow: hidden;
}
.historia-figure img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4/3; }
.historia-figure.is-portrait img { aspect-ratio: 3/4; }

.historia-gallery { display: grid; gap: 1rem; margin-top: 2.2rem; }
.historia-gallery figure {
  border: 1px solid var(--line-strong);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.14);
}
.historia-gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; display: block; }
.historia-gallery figcaption {
  font-family: var(--sans); font-size: .76rem; color: var(--ink-mute);
  padding: .6rem .1rem 0;
}

.historia-callout {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  padding: 2rem 2.2rem;
  max-width: 62ch;
}
.historia-callout p { font-size: 1.05rem; color: var(--ink-soft); }
.historia-callout p + p { margin-top: 1rem; }

.historia-emblem-card {
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  min-height: 240px;
}
.historia-emblem-card img { max-width: 100%; max-height: 280px; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.14)); }

.historia-section h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  margin-bottom: 1.6rem;
}
.historia-section .kicker { margin-bottom: .8rem; display: block; }

@media (min-width: 720px) {
  .historia-split { grid-template-columns: 1.05fr .95fr; }
  .historia-split-top { grid-template-columns: auto 1fr; }
  .historia-split-top .historia-figure { width: 280px; justify-self: center; }
  .historia-gallery { grid-template-columns: repeat(3, 1fr); }
  .historia-gallery.is-two { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================================
   13.7 Splash — full-screen loader, blurred flag + brand mark.
   Double safety: CSS auto-hide keyframe (works even if JS never
   runs) plus main.js adds .is-out for a smoother fade.
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--bg-4);
  animation: splashSafety .01s 1.4s forwards;
}
.splash-bg {
  position: absolute; inset: -6%;
  width: 112%; height: 112%;
  max-width: none;
  object-fit: cover;
  filter: blur(28px) saturate(1.05) brightness(.55);
}
.splash-scrim {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,4,3,.25) 0%, rgba(10,4,3,.55) 100%);
}
.splash-brand {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  color: var(--footer-ink);
  text-align: center;
  animation: splashBrandIn .8s var(--ease-out) both;
}
.splash-brand svg { width: 42px; height: 42px; color: var(--gold-2); }
.splash-logo { width: 160px; height: 145px; object-fit: contain; }
.splash-brand .word { font-family: var(--serif-display); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
.splash-brand .sub { font-family: var(--sans); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
.splash.is-out {
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .45s var(--ease-out), visibility .45s;
}
@keyframes splashSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes splashBrandIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =============================================================
   14. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-figure img { transform: none; }
  .hero-mesh { animation: none; }
  .section-blob { animation: none; }
  .splash-brand { animation-duration: .3s; }
  .splash { animation-delay: .5s; }
}

/* =============================================================
   15. View transitions
   ============================================================= */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: fadeOutUp .5s var(--ease-out); }
::view-transition-new(root) { animation: fadeInUp .5s var(--ease-out); }
@keyframes fadeOutUp { to { opacity: 0; transform: translateY(-10px); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } }
