:root {
  --ink: var(--dana-heading, #202020);
  --paper: var(--dana-ice, #f1f6fb);
  --white: var(--dana-white, #ffffff);
  --gold: var(--dana-blue, #2169a7);
  --navy: var(--dana-navy, #114167);
  --deep: var(--dana-blue-deep, #0d4b95);
  --promo: var(--dana-promo, #03508b);
  --muted: var(--dana-muted, #707070);
  --header-h: var(--dana-nav-h, 92px);
  --nav-h: var(--header-h);
  --hub-max: 1560px;
  --hub-gutter: clamp(16px, 2.4vw, 36px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", system-ui, sans-serif;
  background:
    radial-gradient(1200px 520px at 50% -8%, rgba(86, 168, 219, 0.18), transparent 60%),
    linear-gradient(180deg, #e8f0f8 0%, var(--paper) 42%, #eef4fa 100%);
  color: var(--ink);
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 300;
  background: var(--promo);
  color: #fff;
  padding: 8px 12px;
}

.skip:focus {
  top: 12px;
}

.hub-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 12px var(--hub-gutter);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17, 65, 103, 0.1);
}

.hub-nav__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.hub-nav__brand img {
  /* Match danacorp.cl header: width 202px → ~38px height (300×56 asset) */
  height: 38px;
  width: auto;
  max-width: min(202px, 58vw);
  object-fit: contain;
  object-position: left center;
  display: block;
  background: transparent;
}

.hub-nav__meta {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

.hub-main {
  width: min(var(--hub-max), 100%);
  margin: 0 auto;
  padding: 0 var(--hub-gutter);
}

.hub-intro {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vh, 56px) 0 clamp(20px, 3vh, 32px);
  text-align: center;
}

.hub-kicker {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  animation: hubFadeIn 0.7s ease-out 0.05s both;
}

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

.hub-intro h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.15rem, 4.6vw, 3.55rem);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 auto 16px;
  max-width: 24ch;
  color: var(--ink);
  animation: hubFadeIn 0.75s ease-out 0.12s both;
}

.hub-lead {
  max-width: 52ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  animation: hubFadeIn 0.7s ease-out 0.22s both;
}

.hub-grid {
  display: grid;
  gap: clamp(16px, 1.8vw, 24px);
  width: 100%;
  margin: 0 auto;
  padding-bottom: clamp(40px, 6vh, 72px);
  perspective: 1400px;
}

@media (min-width: 980px) {
  .hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    min-height: calc(100dvh - var(--nav-h) - 210px);
  }
}

.hub-card {
  --hub-tilt-x: 0deg;
  --hub-tilt-y: 0deg;
  --hub-lift: 0px;
  min-width: 0;
  opacity: 0;
  transform: translateY(36px);
  animation: hubCardIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--hub-delay, 0.1s);
}

@keyframes hubCardIn {
  to { opacity: 1; transform: translateY(0); }
}

.hub-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid rgba(17, 65, 103, 0.1);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 12px 28px rgba(17, 65, 103, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transform:
    translateY(var(--hub-lift))
    rotateX(var(--hub-tilt-x))
    rotateY(var(--hub-tilt-y));
  transform-style: preserve-3d;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  will-change: transform;
}

.hub-card.is-hot .hub-card__link,
.hub-card__link:hover,
.hub-card__link:focus-visible {
  --hub-lift: -10px;
  border-color: rgba(33, 105, 167, 0.28);
  box-shadow:
    0 28px 56px rgba(17, 65, 103, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.hub-card__link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.hub-card__media {
  position: relative;
  flex: 0 0 auto;
  height: clamp(42vh, 46vh, 520px);
  min-height: 260px;
  overflow: hidden;
  background: #1a2430;
}

@media (min-width: 980px) {
  .hub-card__media {
    flex: 1 1 auto;
    height: auto;
    min-height: 46vh;
  }
}

.hub-card__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
  filter: saturate(1.04) contrast(1.03);
}

.hub-card.is-hot .hub-card__img,
.hub-card__link:hover .hub-card__img,
.hub-card__link:focus-visible .hub-card__img {
  transform: scale(1.12);
  filter: saturate(1.08) contrast(1.05) brightness(1.03);
}

.hub-card__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 28%,
    rgba(255, 255, 255, 0.18) 46%,
    transparent 62%
  );
  transform: translateX(-120%) skewX(-12deg);
  opacity: 0;
}

.hub-card.is-hot .hub-card__shine,
.hub-card__link:hover .hub-card__shine,
.hub-card__link:focus-visible .hub-card__shine {
  opacity: 1;
  animation: hubShine 0.9s ease forwards;
}

@keyframes hubShine {
  from { transform: translateX(-120%) skewX(-12deg); }
  to   { transform: translateX(120%) skewX(-12deg); }
}

.hub-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 65, 103, 0.05) 0%, rgba(17, 65, 103, 0.35) 100%);
  pointer-events: none;
}

.hub-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  min-width: 48px;
  padding: 7px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  box-shadow: 0 8px 18px rgba(17, 65, 103, 0.14);
}

.hub-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
  padding: 22px 22px 24px;
  background: var(--white);
}

.hub-card__label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.hub-card h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.45rem, 1.5vw, 1.75rem);
  font-weight: 500;
  line-height: 1.22;
  margin: 0;
  color: var(--ink);
}

.hub-card__body > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.hub-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 2px 0 6px;
  padding: 0;
}

.hub-card__tags li {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hub-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 6px;
  padding: 0 18px;
  border-radius: 2px;
  background: var(--promo);
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.3s ease, transform 0.3s ease;
}

.hub-card.is-hot .hub-card__cta,
.hub-card__link:hover .hub-card__cta,
.hub-card__link:focus-visible .hub-card__cta {
  background: var(--navy);
}

.hub-footer {
  width: min(var(--hub-max), 100%);
  margin: 0 auto;
  padding: 0 var(--hub-gutter) 56px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.hub-footer p {
  max-width: 72ch;
  margin: 0 0 10px;
}

.hub-footer a {
  color: var(--gold);
  font-weight: 600;
}

@media (max-width: 979px) {
  .hub-card__media {
    height: 44vh;
  }
}

@media (max-width: 640px) {
  .hub-nav {
    padding: 10px 16px;
  }

  .hub-nav__brand img {
    /* Match danacorp.cl ≤767px: width 123px → ~23px height */
    height: 23px;
    max-width: min(123px, 58vw);
  }

  .hub-nav__meta {
    font-size: 0.62rem;
  }

  .hub-intro {
    padding-top: 24px;
  }

  .hub-card__media {
    height: 42vh;
    min-height: 220px;
  }

  .hub-card__body {
    padding: 18px 18px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hub-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hub-card__link,
  .hub-card__img,
  .hub-card__cta {
    transition: none !important;
  }

  .hub-card.is-hot .hub-card__link,
  .hub-card__link:hover,
  .hub-card__link:focus-visible {
    --hub-tilt-x: 0deg;
    --hub-tilt-y: 0deg;
    --hub-lift: 0px;
  }

  .hub-card.is-hot .hub-card__img,
  .hub-card__link:hover .hub-card__img,
  .hub-card__link:focus-visible .hub-card__img {
    transform: none;
  }

  .hub-card__shine,
  .hub-card.is-hot .hub-card__shine,
  .hub-card__link:hover .hub-card__shine {
    animation: none !important;
    opacity: 0;
  }

  .hub-kicker,
  .hub-intro h1,
  .hub-lead {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
