/* -------------------- History Page -------------------- */

body.page-history {
  color: #0f172a;
  background: #eef2f8;
}

.section {
  padding-block: var(--section-spacing);
}

/* -------------------- Hero -------------------- */
.hero--history {
  --history-hero-position: 50% 48%;
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(420px, 78vh, 640px);
  color: #fff;
  background: #0f1d36;
  overflow: hidden;
  isolation: isolate;
}

.hero--history .hero-bg {
  object-position: var(--history-hero-position);
}

.hero--history .hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 22% 25%,
      rgba(255, 255, 255, 0.12),
      transparent 46%
    ),
    radial-gradient(
      circle at 80% 12%,
      rgba(54, 114, 220, 0.12),
      transparent 36%
    ),
    linear-gradient(
      180deg,
      rgba(13, 31, 56, 0.03) 0%,
      rgba(13, 31, 56, 0.25) 60%,
      rgba(13, 31, 56, 0.44) 100%
    ),
    linear-gradient(
      135deg,
      rgba(12, 25, 49, 0.58) 0%,
      rgba(28, 69, 122, 0.48) 55%,
      rgba(12, 25, 49, 0.65) 100%
    );
  z-index: -1;
}

.hero--history .hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.2rem;
  padding-block: calc(var(--section-spacing) * 1.4);
}

.hero--history .eyebrow {
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.hero--history .eyebrow::before {
  background: rgba(255, 255, 255, 0.82);
}

.hero--history .hero__title {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}

.hero--history .hero__lead {
  margin: 0;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero--history .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* -------------------- Overview -------------------- */
.history-overview {
  background: radial-gradient(
      circle at 18% 12%,
      rgba(25, 41, 69, 0.06),
      transparent 38%
    ),
    radial-gradient(circle at 86% 18%, rgba(30, 87, 168, 0.08), transparent 30%);
}

.history-overview__grid {
  display: grid;
  gap: clamp(1.8rem, 4vw, 2.4rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.history-overview__body {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.history-overview__highlights {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.history-highlight {
  position: relative;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, #e4ebf5);
  border-radius: 0.95rem;
  padding: 1.05rem 1.15rem 1.15rem;
  box-shadow: 0 14px 32px rgba(2, 8, 23, 0.07);
  display: grid;
  gap: 0.45rem;
  transition: transform 160ms ease, box-shadow 160ms ease,
    border-color 160ms ease;
  overflow: hidden;
}

.history-highlight::before {
  content: "";
  position: absolute;
  top: 0.85rem;
  left: 0.95rem;
  height: 3px;
  width: 54px;
  border-radius: 999px;
  background: linear-gradient(90deg, #192945 0%, #1c7ddc 100%);
}

.history-highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(2, 8, 23, 0.1);
  border-color: color-mix(in srgb, var(--accent) 24%, #dfe7f4);
}

.history-highlight::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 88% 12%,
      color-mix(in srgb, var(--accent) 12%, transparent),
      transparent 36%
    ),
    radial-gradient(
      circle at 12% 88%,
      color-mix(in srgb, var(--accent) 8%, transparent),
      transparent 32%
    );
  opacity: 0.6;
  pointer-events: none;
}

.history-highlight__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #f3f6fb;
  border: 1px solid color-mix(in srgb, var(--accent) 12%, #e0e8f4);
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.history-highlight p {
  margin: 0;
  color: #0f172a;
  line-height: 1.55;
}

/* -------------------- Timeline -------------------- */
.history-timeline {
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 28%, #f7f9fc 100%);
}

.timeline {
  --line-x: 50%;
  --line-color: rgba(25, 41, 69, 0.16);
  --accent: #192945;
  --dot-size: 12px;
  --card-shadow: 0 10px 28px rgba(2, 8, 23, 0.06);
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  padding: 1rem 0 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  inset-block: 0.5rem;
  left: var(--line-x);
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--line-color) 12%,
    var(--line-color) 88%,
    transparent 100%
  );
}

.timeline__list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: clamp(1.8rem, 3vw, 2.6rem);
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.4rem, 4vw, 3.2rem);
  align-items: center;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: var(--line-x);
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 8px 20px rgba(2, 8, 23, 0.12);
}

.timeline__item:nth-child(odd) .timeline__card {
  grid-column: 1 / 2;
  justify-self: end;
}

.timeline__item:nth-child(even) .timeline__card {
  grid-column: 2 / 3;
  justify-self: start;
}

.timeline__card {
  position: relative;
  width: min(100%, 440px);
  background: #fff;
  border: 1px solid #e7edf7;
  border-top: 3px solid var(--accent);
  border-radius: 0.9rem;
  padding: 1.05rem 1.2rem;
  box-shadow: var(--card-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease,
    border-color 160ms ease;
}

.timeline__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(2, 8, 23, 0.08);
  border-color: #dbe4f2;
}

.timeline__card::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 2px;
  background-image: repeating-linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 70%, #e1e8f5) 0 8px,
    transparent 8px 14px
  );
  opacity: 0.8;
}

.timeline__item:nth-child(odd) .timeline__card::after {
  right: calc(-1 * clamp(16px, 4vw, 30px));
  width: clamp(16px, 4vw, 30px);
}

.timeline__item:nth-child(even) .timeline__card::after {
  left: calc(-1 * clamp(16px, 4vw, 30px));
  width: clamp(16px, 4vw, 30px);
}

.timeline__year {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  padding: 0.2rem 0.75rem;
  background: #f4f7fb;
  border: 1px solid #e0e8f4;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline__card p {
  margin: 0;
  color: #0f172a;
  line-height: 1.55;
}

.timeline__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  padding: 0.25rem 0;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  transition: color 160ms ease, text-decoration-color 160ms ease, gap 160ms ease;
}

.timeline__link::after {
  content: ">";
  font-weight: 800;
  font-size: 0.95em;
  opacity: 0.7;
  transition: transform 160ms ease, opacity 160ms ease;
}

.timeline__link:hover {
  color: #0d1c34;
  text-decoration-color: currentColor;
  gap: 0.5rem;
}

.timeline__link:focus-visible {
  color: #0d1c34;
  text-decoration-color: currentColor;
  gap: 0.5rem;
  outline: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  outline-offset: 4px;
}

.timeline__link:hover::after,
.timeline__link:focus-visible::after {
  opacity: 1;
  transform: translateX(3px);
}

/* -------------------- CTA -------------------- */
.history-cta__card {
  display: grid;
  gap: 1.1rem;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(1.4rem, 4vw, 2.6rem);
  padding: clamp(1.6rem, 4vw, 2.2rem);
  background: linear-gradient(135deg, #0f1d36 0%, #203860 60%, #0f1d36 100%);
  color: #fff;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.history-cta__title {
  margin: 0.1rem 0 0.35rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.12;
}

.history-cta__copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  max-width: 32rem;
}

.history-cta .eyebrow {
  color: #fff;
}

.history-cta .eyebrow::before {
  background: rgba(255, 255, 255, 0.85);
}

.history-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  justify-self: end;
}

.history-cta .btn--brand {
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.history-cta .btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.history-cta .btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 900px) {
  .history-overview__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .history-cta__card {
    grid-template-columns: 1fr;
  }

  .history-cta__actions {
    justify-content: flex-start;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .hero--history {
    min-height: auto;
  }

  .timeline {
    --line-x: 18px;
    padding-left: 0;
  }

  .timeline__item {
    grid-template-columns: 1fr;
    padding-left: calc(var(--line-x) + 1.2rem);
    gap: 1.4rem;
  }

  .timeline__item::before {
    left: var(--line-x);
    top: 1rem;
    transform: translate(-50%, 0);
  }

  .timeline__item:nth-child(odd) .timeline__card,
  .timeline__item:nth-child(even) .timeline__card {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .timeline__card::after {
    display: none;
  }
}
