/* Bloque Lab — Base Reset & Core Layout */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  font-family: Arial, "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  background: var(--page-bg, #fcfaf6);
  color: var(--ink, #202829);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  cursor: pointer;
}

button, a, summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent, #245acc);
  outline-offset: 3px;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

h1, h2, h3 {
  line-height: 1.1;
  text-wrap: balance;
}

p {
  overflow-wrap: break-word;
}

address {
  font-style: normal;
}

main {
  min-width: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -8rem;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  background: var(--accent, #245acc);
  color: #ffffff;
  font-weight: 700;
  border-radius: 6px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1.2rem, 5vw, 4rem);
  background: #f8f7ef;
  color: #163353;
  border-bottom: 1px solid #dcded5;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #163353;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: var(--accent, #245acc);
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #eef3fc;
  padding: 5px;
  border-radius: 100px;
  border: 1px solid #cbd4dd;
}

.site-nav > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #163353;
  border-radius: 100px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.site-nav > a:hover {
  color: var(--accent, #245acc);
  background: rgba(36, 90, 204, 0.08);
}

.site-nav > a.is-active,
.site-nav > a[aria-current="page"] {
  background: var(--accent, #245acc) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(36, 90, 204, 0.25);
}

.site-nav > a.nav-contact {
  background: #ffffff;
  color: var(--accent, #245acc) !important;
  border: 1px solid #cbd4dd;
  padding: 0.45rem 1.15rem;
  margin-left: 0.2rem;
}

.site-nav > a.nav-contact:hover {
  background: var(--accent, #245acc);
  color: #ffffff !important;
}

.site-nav > a.nav-contact.is-active {
  background: var(--accent, #245acc) !important;
  color: #ffffff !important;
  border-color: var(--accent, #245acc);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  color: #163353;
  border: 1px solid #cbd4dd;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

.menu-toggle-lines {
  width: 17px;
  height: 12px;
  display: inline-block;
  background: 
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  flex-shrink: 0;
  border-radius: 1px;
}

/* Footer */
.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 3rem clamp(1.2rem, 5vw, 4rem);
  background: #f8f7ef;
  color: #163353;
  border-top: 1px solid #dcded5;
}

.footer-intro {
  max-width: 600px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.25rem;
  font-weight: 900;
  color: #163353;
  gap: 8px;
}

.site-footer p {
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0.4rem 0 0;
  color: #3a5370;
}

.site-footer nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #163353;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer nav a:hover {
  color: var(--accent, #245acc);
}

/* Legal Pages */
.legal-main {
  max-width: 960px;
  margin: auto;
  padding: 4.5rem 1.5rem 6rem;
}

.legal-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent, #245acc);
  margin-bottom: 0.5rem;
}

.legal-main h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: #163353;
}

.legal-intro {
  font-size: 1.18rem !important;
  color: #3a5370;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.legal-main h2 {
  font-size: 1.65rem;
  margin: 2.5rem 0 0.9rem;
  color: #163353;
}

.legal-main p, .legal-main li {
  font-size: 1rem;
  line-height: 1.8;
  color: #2b3e54;
}

.legal-main a:not(.button) {
  color: var(--accent, #245acc);
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.legal-main address {
  line-height: 1.8;
}

.legal-box {
  padding: 1.8rem;
  border: 1px solid #cbd4dd;
  border-radius: 12px;
  margin: 2.5rem 0;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(22, 51, 83, 0.04);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2.5rem;
  font-weight: 800;
  color: #ffffff !important;
}

.legal-back:hover {
  color: #ffffff !important;
}

/* Error 404 */
.error-main {
  text-align: center;
  max-width: 860px;
  margin: auto;
  padding: 6rem 1.5rem 8rem;
}

.error-code {
  font-size: clamp(5rem, 15vw, 8rem);
  line-height: 1;
  font-weight: 900;
  color: var(--accent, #245acc);
  margin-bottom: 1rem;
}

.error-main h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #163353;
}

.error-main p {
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
  color: #3a5370;
}

/* Responsive */
@media (max-width: 920px) {
  .site-header {
    flex-wrap: wrap;
    padding: 1rem 1.2rem;
  }
  .menu-toggle {
    display: none;
  }
  .has-menu-js .menu-toggle {
    display: inline-flex;
  }
  /* Fallback without JS: navigation remains accessible in flow */
  .site-nav {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #cbd4dd;
    margin-top: 0.4rem;
  }
  /* With JS: hide until opened */
  .has-menu-js .site-nav {
    display: none;
  }
  .has-menu-js .site-nav.is-open {
    display: flex;
  }
  .site-nav > a {
    width: 100%;
    justify-content: flex-start;
    padding: 0.65rem 1rem;
  }
  .site-nav > a.nav-contact {
    margin-left: 0;
  }
  .site-footer {
    display: block;
    padding: 2rem 1.2rem;
  }
  .site-footer nav {
    margin-top: 1.5rem;
    gap: 0.8rem 1.2rem;
  }
  .legal-main {
    padding: 3rem 1.2rem 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *:before, *:after {
    transition: none !important;
    animation: none !important;
  }
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 420px;
  background: #ffffff;
  color: #202829;
  border: 1px solid #cbd4dd;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
  padding: 1.4rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: slideUp 0.3s ease-out;
}

.cookie-banner[hidden] {
  display: none !important;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0;
  color: #202829;
}

.cookie-text {
  font-size: 0.825rem;
  color: #4a5859;
  line-height: 1.5;
  margin: 0;
}

.cookie-text a {
  color: #245acc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cookie-actions .btn {
  min-height: 38px;
  padding: 0.5rem 1rem;
  font-size: 0.825rem;
  flex: 1;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cookie-actions .btn-primary {
  background: #245acc;
  color: #ffffff;
}

.cookie-actions .btn-secondary {
  background: #f4f7f9;
  color: #202829;
  border-color: #cbd4dd;
}

@media (max-width: 640px) {
  .cookie-banner {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

