/* DISTEA — estilos del sitio institucional */

:root {
  --navy-950: #06122a;
  --navy-900: #0a1b3d;
  --navy-800: #112a5c;
  --blue-600: #1f5fd1;
  --blue-500: #2f6fe4;
  --blue-300: #5b9bff;
  --blue-50: #eef3fd;

  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --header-h: 72px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--blue-600); text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
address { font-style: normal; }
ul { padding: 0; margin: 0; list-style: none; }

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

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 24px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- elementos comunes ---------- */

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-600); margin-bottom: .9rem;
  display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow--light { color: var(--blue-300); }

.lead { font-size: 1.15rem; color: var(--ink); line-height: 1.6; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 1.4rem;
  font: inherit; font-weight: 600; font-size: .98rem; text-decoration: none;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue-500); color: #fff; }
.btn--primary:hover { background: var(--blue-600); }
.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .06); }

.badge {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .7rem; border-radius: 999px; background: rgba(91, 155, 255, .16); color: #cfe0ff;
}

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(6, 18, 42, .92);
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__bg { fill: var(--blue-600); }
.brand__name { font-weight: 700; font-size: 1.2rem; letter-spacing: .14em; }

.site-nav ul { display: flex; gap: 6px; }
.site-nav a {
  display: block; padding: .55rem .9rem; border-radius: 8px;
  color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 500; font-size: .95rem;
  transition: color .2s, background-color .2s;
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: #fff; background: rgba(255, 255, 255, .07); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .06); flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-toggle__bar { width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative; overflow: hidden; color: #cbd5e1;
  background: radial-gradient(1200px 600px at 85% 10%, #15336f 0%, rgba(21, 51, 111, 0) 60%), var(--navy-950);
  padding: clamp(56px, 9vw, 112px) 0 40px;
}
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5.2vw, 3.9rem); letter-spacing: -.03em; max-width: 13ch; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #e2e8f0; max-width: 54ch; }
.hero__sub { color: #94a3b8; max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

.hero__visual { position: relative; }
.hero__svg { width: 100%; height: auto; }
.hero__wave { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.4s .3s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__facts {
  position: relative; margin: clamp(40px, 6vw, 72px) 0 0; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.hero__facts dt { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #7f8ea7; }
.hero__facts dd { margin: .25rem 0 0; color: #fff; font-weight: 600; }

/* ---------- secciones ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--soft { background: var(--bg-soft); }
.section--compact { padding: 0 0 clamp(48px, 6vw, 72px); background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2, .empresa h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }

/* empresa */
.empresa { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.empresa__copy p:not(.lead):not(.eyebrow) { max-width: 60ch; }

.datacard {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.datacard__title {
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  font-weight: 600; margin-bottom: 1rem;
}
.datacard dl { margin: 0; }
.datacard dl > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.datacard dl > div:first-child { border-top: 0; padding-top: 0; }
.datacard dt { color: var(--muted); font-size: .9rem; }
.datacard dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* actividad */
.activity-main {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: #fff; border-radius: var(--radius); padding: clamp(28px, 4vw, 44px);
  margin-bottom: 24px;
}
.activity-main::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  border: 1px solid rgba(91, 155, 255, .25); box-shadow: 0 0 0 40px rgba(91, 155, 255, .04), 0 0 0 80px rgba(91, 155, 255, .03);
}
.activity-main__label { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 1rem; }
.activity-main__code { font-size: .9rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
.activity-main__title {
  position: relative; margin: 0; font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(1.25rem, 2.6vw, 1.9rem); line-height: 1.3; max-width: 30ch;
}

.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.area {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s, box-shadow .2s;
}
.area:hover { border-color: #c7d6f3; box-shadow: var(--shadow); }
.area__icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: var(--blue-50); color: var(--blue-600); margin-bottom: 1.2rem;
}
.area__icon svg, .secondary__icon svg, .contact-card svg, .contact-list svg, .footer-contact svg, .link-ext svg {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.area__icon svg { width: 24px; height: 24px; }
.area h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.area p { margin: 0; color: var(--muted); }

/* actividad complementaria (menor jerarquía) */
.secondary {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 24px; border-radius: var(--radius); border: 1px dashed #cbd5e1; background: transparent;
}
.secondary__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #e8edf5; color: var(--muted); }
.secondary__icon svg { width: 20px; height: 20px; }
.secondary__title { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: .35rem; }
.secondary__name { font-weight: 600; color: var(--text); margin-bottom: .2rem; font-size: .98rem; }
.secondary__text { margin: 0; color: var(--muted); font-size: .95rem; }

/* contacto */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: start; }
.contact-grid--solo { grid-template-columns: minmax(0, 560px); }

.contact-card {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.contact-card__name { font-weight: 700; color: var(--ink); font-size: 1.15rem; margin-bottom: 1.2rem; }
.contact-card__row { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.contact-card__row > svg { width: 22px; height: 22px; flex: none; color: var(--blue-600); margin-top: 2px; }
.contact-card__label { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.contact-card address { color: var(--ink); font-weight: 500; line-height: 1.6; }
.link-ext { display: inline-flex; align-items: center; gap: 6px; margin-top: .75rem; font-weight: 500; font-size: .95rem; }
.link-ext svg { width: 16px; height: 16px; }

.contact-list { border-top: 1px solid var(--line); padding-top: 12px; }
.contact-list li { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.contact-list svg { width: 22px; height: 22px; color: var(--blue-600); flex: none; }
.contact-list a { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--blue-600); }
.contact-label { color: var(--muted); font-weight: 500; }
.site-footer .contact-label { color: #7f8ea7; }

.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #cbd5e1; border-radius: var(--radius-sm); padding: 12px 14px; min-height: 48px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(47, 111, 228, .15); }
.field [aria-invalid="true"] { border-color: #dc2626; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--blue-500); }
.contact-form .btn { justify-self: start; }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }
.form-status { margin: 0; font-size: .92rem; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-error { color: #b91c1c; }
.form-status.is-info { color: var(--navy-800); }

/* ---------- páginas legales ---------- */

.page-hero {
  background: radial-gradient(900px 400px at 90% 0%, #15336f 0%, rgba(21, 51, 111, 0) 60%), var(--navy-950);
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px);
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 3rem); }
.page-hero__meta { color: #94a3b8; margin: 0; font-size: .92rem; }

.legal { max-width: 800px; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(64px, 8vw, 96px); }
.legal h2 { font-size: 1.25rem; margin-top: 2.4rem; }
.legal h2:first-child { margin-top: 0; }
.legal ul:not(.channels) { list-style: disc; padding-left: 1.3rem; margin: 0 0 1em; }
.legal li { margin-bottom: .4rem; }
.legal .note { font-size: .92rem; color: var(--muted); background: var(--bg-soft); border-left: 3px solid var(--blue-500); padding: 14px 18px; border-radius: 0 8px 8px 0; }

.id-card {
  display: grid; grid-template-columns: 140px 1fr; gap: 0; margin: 0 0 1.2em;
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
.id-card dt, .id-card dd { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); }
.id-card dt:first-of-type, .id-card dd:first-of-type { border-top: 0; }
.id-card dt { background: var(--bg-soft); color: var(--muted); font-size: .9rem; }
.id-card dd { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

.channels { display: grid; gap: 10px; margin: 0 0 1em; }
.channels li { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; }

/* ---------- footer ---------- */

.site-footer { background: var(--navy-950); color: #94a3b8; font-size: .95rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.site-footer__legal { margin: 1.2rem 0 .8rem; color: #cbd5e1; }
.site-footer__legal strong { color: #fff; }
.site-footer__address { line-height: 1.7; }
.site-footer h2 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.site-footer__nav li + li { margin-top: .35rem; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer__nav a { display: inline-block; padding: .2rem 0; }
.site-footer a:hover { color: #fff; }
.footer-contact { margin-top: 1rem; }
.footer-contact li { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.footer-contact svg { width: 18px; height: 18px; color: var(--blue-300); flex: none; }
.footer-contact a { overflow-wrap: anywhere; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 20px; padding-bottom: 28px; font-size: .82rem; color: #7f8ea7;
}
.site-footer__bottom p { margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero__grid, .empresa, .contact-grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; }
  .areas { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__id { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .container { padding-inline: 16px; }

  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: var(--navy-950);
    border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 8px 16px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: .9rem .75rem; font-size: 1.05rem; }

  .hero__visual { display: none; }
  .hero__facts { grid-template-columns: 1fr; gap: 14px; }
  .hero__facts > div { display: flex; justify-content: space-between; gap: 16px; }
  .hero__facts dd { margin: 0; text-align: right; }
  .hero__actions .btn { flex: 1 1 100%; }

  .areas, .field-row { grid-template-columns: 1fr; }
  .datacard { padding: 22px; }
  .datacard dl > div { grid-template-columns: 1fr; gap: 2px; }
  .contact-card { padding: 22px; }
  .contact-form .btn { justify-self: stretch; }

  .id-card { grid-template-columns: 1fr; }
  .id-card dt { padding-bottom: 4px; }
  .id-card dd { border-top: 0; padding-top: 4px; }

  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 48px; }
  .site-footer__bottom { flex-direction: column; }
}

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