/* ===== TOKENS ===== */
:root {
  --paper: #faf9f5;
  --paper-alt: #f2efe7;
  --ink: #2c2c44;
  --ink-soft: #6b6675;
  --ink-faint: #a09a8e;
  --navy: #272741;
  --navy-dark: #1c1c30;
  --accent: #f08a2e;
  --accent-dark: #c8771f;
  --accent-darker: #9a5a16;
  --chip: #f3ece1;
  --border: #e6e2d7;
  --border-2: #e8e4d8;
  --border-3: #ece7da;
  --cream: #f1ede2;
  --font-ui: 'Montserrat', system-ui, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ===== RESET ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  font-family: var(--font-ui);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(240, 138, 46, 0.24);
}

a {
  color: inherit;
}

/* ===== NAV ===== */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 30px;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  font-weight: 800;
  color: var(--cream);
  font-size: 19px;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.accent-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  text-decoration: none;
  color: rgba(241, 237, 226, 0.6);
  font-size: 13.5px;
  font-weight: 500;
}

.nav-link.is-active {
  color: var(--cream);
  font-weight: 600;
}

.nav-link:hover {
  color: #fff;
}

.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cream);
}

.lang-caret {
  font-size: 9px;
  opacity: 0.7;
  transition: transform 0.2s;
  display: inline-block;
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #2f2f4d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px;
  min-width: 150px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
  z-index: 60;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: rgba(241, 237, 226, 0.7);
}

.lang-item.active {
  color: #fff;
  background: rgba(240, 138, 46, 0.22);
}

@media (max-width: 640px) {
  .nav-bar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .nav-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav-link {
    font-size: 12px;
  }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy-dark);
  color: rgba(241, 237, 226, 0.55);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
}

.illari-dot .accent-dot {
  display: inline-block;
  animation: illariDot 2.6s ease-in-out infinite;
  transform-origin: center 78%;
}

@keyframes illariDot {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(240, 138, 46, 0);
  }
  50% {
    transform: scale(1.13);
    text-shadow: 0 0 16px rgba(240, 138, 46, 0.6);
  }
}

/* ===== REVEAL (FADE-UP ANIMATION) ===== */
.reveal {
  opacity: 0;
}

.reveal.in {
  animation: illariFadeUp 0.7s ease both;
}

@keyframes illariFadeUp {
  from {
    opacity: 0;
    transform: translateY(38px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== ACCORDION ===== */
.acc-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.acc-item:hover {
  border-color: #d8d2c4;
}

.acc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 18px 22px;
  font-family: inherit;
}

.acc-badge {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.acc-q {
  flex: 1;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  color: var(--ink);
}

.acc-icon {
  flex: 0 0 auto;
  font-size: 20px;
  color: var(--accent);
  transition: transform 0.25s;
  line-height: 1;
  display: inline-block;
}

.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.acc-body > div {
  overflow: hidden;
}

.acc-a {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
  padding: 0 22px 20px 66px;
}

/* ===== CAP PANEL ===== */
.cap-panel {
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cap-panel:hover {
  border-color: #d8d2c4 !important;
  box-shadow: 0 18px 40px -30px rgba(39, 39, 65, 0.28);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .caps-grid, .bondades-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .split-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
  .cf-inner-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .caps-grid, .bondades-grid {
    grid-template-columns: 1fr !important;
  }
  .illari-embed {
    height: 92vw !important;
    max-height: 520px;
  }
}
