/* ADN Bios – Beta Sostenibilidad */

:root { --accent: #2ad1ff; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }

body {
  color: #1d2530;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f2f4f7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 68px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e4eaf2;
  box-shadow: 0 4px 18px rgba(11,26,46,.07);
}
.nav-logo { height: 44px; width: auto; }
.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: #1d2530;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  transition: background .18s, color .18s;
}
.nav-links a:hover { background: #eef4ff; color: #0ea8d5; }
.nav-cta {
  padding: 9px 22px !important;
  background: #2ad1ff !important;
  color: #122033 !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}
.nav-cta:hover { opacity: .9; }

/* Offset hero for fixed nav */
.hero { padding-top: 68px !important; }

/* ── Back home (legacy, kept hidden) ── */
.back-home {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: #122033;
  text-decoration: none;
  font-weight: 700;
  font-size: .88rem;
  border: 1px solid #d9e2ec;
  box-shadow: 0 8px 22px rgba(11,26,46,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.back-home:hover        { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(11,26,46,.18); }
.back-home:focus-visible { outline: 2px solid #2f6fd8; outline-offset: 2px; }

/* ── Hero ── */
.hero {
  min-height: 34vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}
.hero-inner { text-align: center; padding: 20px; }

.overline {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #dbe5f1;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5f7188;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 1.7s infinite;
}
.hero h1 {
  margin: 14px 0 0;
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  line-height: .96;
  letter-spacing: -.02em;
  color: #172332;
}
.hero-logo {
  margin: 14px 0 0;
  height: clamp(80px, 14vw, 180px);
  width: auto;
}

/* ── Layout ── */
.wrap {
  width: min(1100px, calc(100% - 1.6rem));
  margin: 0 auto;
  padding: 30px 0 70px;
}
.timeline { padding: 12px 0; }

/* ── Events ── */
.event {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 58px;
  margin: 0 0 38px;
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid #e4eaf2;
  box-shadow: 0 20px 45px rgba(16,31,54,.08);
}

.event-card {
  order: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: #f7f9fc;
  border: 1px solid #e1e7f0;
  border-radius: 22px;
  min-height: 320px;
  --imgX: 0px;
  --imgY: 0px;
  --imgR: 0deg;
}

.year-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.corp-logo {
  height: 36px;
  width: auto;
}

.main-img {
  display: block;
  width: min(100%, 360px);
  max-height: 360px;
  object-fit: contain;
  border-radius: 16px;
  transform: translate3d(var(--imgX), var(--imgY), 0) rotate(var(--imgR)) scale(1.01);
  transition: transform .25s ease, filter .25s ease;
  animation: imgFloat 4.8s ease-in-out infinite;
  will-change: transform;
}
.event-card:hover .main-img { filter: brightness(1.05); }

.event-year-col {
  order: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}

.year-chip {
  display: inline-block;
  padding: 10px 14px;
  min-width: 92px;
  text-align: center;
  border-radius: 999px;
  font-weight: 700;
  background: #eaf4ff;
  color: #24435f;
}
.year-label {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 800;
  color: #d8e2ef;
  line-height: 1;
  margin: 10px 0 14px;
}
.event-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  line-height: 1.2;
  color: #121e2c;
}
.event-copy p {
  margin: 0;
  color: #5e6d80;
  font-size: 1.03rem;
  line-height: 1.62;
  max-width: 56ch;
}

/* Alternating image/text layout */
.event:nth-child(even) .event-card    { order: 2; }
.event:nth-child(even) .event-year-col { order: 1; }

/* ── Animations ── */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.35); }
}
@keyframes imgFloat {
  0%, 100% { transform: translate3d(var(--imgX), calc(var(--imgY) + 0px),  0) rotate(var(--imgR)) scale(1.01); }
  50%       { transform: translate3d(var(--imgX), calc(var(--imgY) - 6px),  0) rotate(var(--imgR)) scale(1.02); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .site-nav { padding: 0 16px; }
  .nav-logo { height: 36px; }
  .nav-links a { padding: 7px 10px; font-size: .8rem; }
  .nav-cta { padding: 7px 14px !important; font-size: .8rem !important; }

  .event { grid-template-columns: 1fr; gap: 18px; padding: 18px; }

  .event-card,
  .event:nth-child(even) .event-card,
  .event-year-col,
  .event:nth-child(even) .event-year-col { order: initial; }

  .event-card { min-height: 250px; }

  .main-img { width: min(100%, 290px); max-height: 280px; animation: none; }

  .year-label { font-size: 2rem; }
}
