/* ═══════════════════════════════════════════════════════════
   HOUM — 100 Years of Scientific Excellence
   1926–2026 Centennial Timeline

   Aesthetic: Scandinavian restraint meets century-old gravitas.
   Cormorant Garamond serif for the monumental "100" —
   like a number etched into a scientific journal's frontispiece.
   Albert Sans for everything modern.
   ═══════════════════════════════════════════════════════════ */

/* ────────────────────────────────────
   TOKENS
   ──────────────────────────────────── */
:root {
  /* Palette */
  --forest:         #0a6537;
  --forest-dark:    #073d22;
  --forest-light:   #0d8448;
  --gold:           #b8960c;
  --gold-muted:     #d4b44a;
  --cream:          #fafafa;
  --cream-dark:     #f3f3f3;
  --white:          #ffffff;
  --ink:            #1a1a1a;
  --ink-muted:      #6b6b6b;
  --ink-faint:      #a3a09a;
  --line:           #d4d0c8;

  /* Type */
  --font-display:   'Cormorant Garamond', 'Georgia', serif;
  --font-heading:   'Albert Sans', system-ui, sans-serif;
  --font-body:      'Albert Sans', system-ui, sans-serif;

  /* Space */
  --sp-2xs:  0.25rem;
  --sp-xs:   0.5rem;
  --sp-sm:   1rem;
  --sp-md:   2rem;
  --sp-lg:   4rem;
  --sp-xl:   6rem;
  --sp-2xl:  8rem;
  --sp-3xl:  12rem;

  /* Layout */
  --max-w:           1200px;
  --line-w:          1.5px;
  --card-max-w:      480px;

  /* Motion */
  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur:    0.9s;
  --dur-fast: 0.5s;
}


/* ────────────────────────────────────
   RESET
   ──────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

strong { font-weight: 600; }
em { font-style: italic; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ────────────────────────────────────
   GRAIN TEXTURE (subtle paper feel)
   ──────────────────────────────────── */
.hero__grain,
.closing__grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}


/* ════════════════════════════════════
   HERO
   ════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-lg) var(--sp-md);
  overflow: hidden;
}

.hero__container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Stagger children — hidden by default, revealed by JS */
.hero__stagger {
  opacity: 0;
  transform: translateY(24px);
  will-change: transform, opacity;
}

.hero__logo-img {
  width: clamp(160px, 22vw, 260px);
  height: auto;
  margin-bottom: var(--sp-xs);
}

/* Thin decorative rule below logo */
.hero__divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin-bottom: var(--sp-md);
}

.hero__years {
  display: block;
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--sp-sm);
}

.hero__title {
  margin-bottom: var(--sp-md);
}

.hero__number {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(6rem, 18vw, 14rem);
  line-height: 0.85;
  color: var(--gold);
  letter-spacing: -0.02em;
  /* Subtle text shadow for depth */
  text-shadow: 0 2px 40px rgba(184, 150, 12, 0.12);
}

.hero__label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(0.95rem, 2vw, 1.5rem);
  color: var(--forest);
  letter-spacing: 0.06em;
  margin-top: var(--sp-xs);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  line-height: 1.9;
  color: var(--ink-muted);
  max-width: 48ch;
}

.hero__br {
  display: none;
}

@media (min-width: 600px) {
  .hero__br { display: inline; }
}

/* Scroll indicator */
.hero__scroll {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-xs);
}

.hero__scroll-text {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--forest), transparent);
  transform-origin: top;
  opacity: 0.25;
  transform: scaleY(0.5);
}


/* ════════════════════════════════════
   INTRO
   ════════════════════════════════════ */
.intro {
  padding: var(--sp-3xl) var(--sp-md) var(--sp-xl);
}

.intro__container {
  max-width: 640px;
  margin: 0 auto;
}

.intro__text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 2;
  color: var(--ink);
  text-align: center;
}

.intro__text strong {
  color: var(--forest);
}

.intro__text em {
  color: var(--forest);
  font-style: italic;
}


/* ════════════════════════════════════
   TIMELINE
   ════════════════════════════════════ */
.timeline {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-md) var(--sp-2xl);
}

/* ── Track (line container) ── */
.timeline__track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: var(--line-w);
  transform: translateX(-50%);
}

.timeline__line {
  position: absolute;
  inset: 0;
  background-color: var(--line);
}

.timeline__line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background-color: var(--forest);
  will-change: height;
}

/* ── Item ── */
.timeline__item {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--sp-xl);
  /* Animation initial state — GSAP handles transitions */
  opacity: 0;
  will-change: transform, opacity;
}

.timeline__item[data-side="left"] {
  justify-content: flex-start;
  padding-right: calc(50% + var(--sp-lg));
  text-align: right;
  transform: translate(-28px, 36px);
}

.timeline__item[data-side="right"] {
  justify-content: flex-end;
  padding-left: calc(50% + var(--sp-lg));
  text-align: left;
  transform: translate(28px, 36px);
}

.timeline__item.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ── Dot ── */
.timeline__dot {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background-color: var(--forest);
  border: 2.5px solid var(--cream);
  transform: translateX(-50%) scale(0.7);
  z-index: 2;
}

.timeline__dot--gold {
  background-color: var(--gold);
  width: 14px;
  height: 14px;
  border-width: 3px;
  box-shadow: 0 0 0 3px rgba(184, 150, 12, 0.15);
}

.timeline__item.is-visible .timeline__dot {
  transform: translateX(-50%) scale(1);
}

/* ── Card ── */
.timeline__card {
  max-width: var(--card-max-w);
}

.timeline__decade {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(0.65rem, 0.9vw, 0.78rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-2xs);
}

.timeline__year {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  color: var(--forest);
  line-height: 1;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.timeline__year--gold {
  color: var(--gold);
}

.timeline__heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink);
  margin-bottom: var(--sp-2xs);
  line-height: 1.35;
}

.timeline__desc {
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  font-weight: 300;
  color: var(--ink-muted);
  line-height: 1.75;
}


/* ════════════════════════════════════
   CLOSING
   ════════════════════════════════════ */
.closing {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-2xl) var(--sp-md);
  overflow: hidden;
  /* Subtle background shift */
  background-color: var(--cream-dark);
}

.closing__watermark {
  position: absolute;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(18rem, 40vw, 36rem);
  color: var(--gold);
  opacity: 0.045;
  will-change: transform, opacity;
  line-height: 0.8;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.03em;
}

.closing__container {
  position: relative;
  z-index: 1;
  max-width: 560px;
  /* Fade in — GSAP handles animation */
  opacity: 0;
  transform: translateY(30px);
}

.closing.is-visible .closing__container {
  opacity: 1;
  transform: translateY(0);
}

.closing__heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  color: var(--forest);
  margin-bottom: var(--sp-sm);
  letter-spacing: -0.01em;
}

.closing__text {
  font-weight: 300;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--ink-muted);
  line-height: 1.9;
  margin-bottom: var(--sp-md);
}

.closing__tagline {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: var(--forest);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}


/* ════════════════════════════════════
   FOOTER
   ════════════════════════════════════ */
.footer {
  padding: var(--sp-md) var(--sp-md);
  background-color: var(--cream-dark);
  border-top: 1px solid var(--line);
}

.footer__container {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.footer__copy {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink-faint);
}

.footer__link {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--forest);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-soft);
}

.footer__link:hover {
  border-bottom-color: var(--forest);
}


/* ════════════════════════════════════
   COOKIE BANNER
   ════════════════════════════════════ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 0.5rem var(--sp-md);
  background-color: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(0);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}

.cookie-banner--hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.cookie-banner__text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.cookie-banner__link {
  color: var(--forest);
  font-weight: 400;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-soft);
}

.cookie-banner__link:hover {
  border-bottom-color: var(--forest);
}

.cookie-banner__btn {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background-color: var(--forest);
  border: none;
  border-radius: 3px;
  padding: 0.35rem 1rem;
  cursor: pointer;
  transition: background-color 0.3s var(--ease-soft);
}

.cookie-banner__btn:hover {
  background-color: var(--forest-dark);
}

@media (max-width: 480px) {
  .cookie-banner {
    flex-direction: column;
    gap: var(--sp-xs);
    text-align: center;
  }
}


/* ════════════════════════════════════
   RESPONSIVE — TABLET
   ════════════════════════════════════ */
@media (max-width: 768px) {
  .timeline__track {
    left: 28px;
    transform: none;
  }

  .timeline__item,
  .timeline__item[data-side="left"],
  .timeline__item[data-side="right"] {
    padding-left: calc(28px + var(--sp-lg));
    padding-right: var(--sp-sm);
    justify-content: flex-start;
    text-align: left;
    transform: translate(20px, 28px);
  }

  .timeline__item.is-visible,
  .timeline__item[data-side="left"].is-visible,
  .timeline__item[data-side="right"].is-visible {
    transform: translate(0, 0);
  }

  .timeline__dot {
    left: calc(28px - var(--sp-md));
  }

  .timeline__dot--gold {
    left: calc(28px - var(--sp-md));
  }
}


/* ════════════════════════════════════
   RESPONSIVE — SMALL MOBILE
   ════════════════════════════════════ */
@media (max-width: 480px) {
  :root {
    --sp-lg: 2.5rem;
    --sp-xl: 3.5rem;
    --sp-2xl: 5rem;
    --sp-3xl: 7rem;
  }

  .hero__number {
    font-size: 5rem;
  }

  .timeline__track {
    left: 18px;
  }

  .timeline__item,
  .timeline__item[data-side="left"],
  .timeline__item[data-side="right"] {
    padding-left: calc(18px + var(--sp-md));
  }

  .timeline__dot,
  .timeline__dot--gold {
    left: calc(18px - var(--sp-md));
    width: 9px;
    height: 9px;
  }

  .timeline__dot--gold {
    width: 11px;
    height: 11px;
  }

  .timeline__item {
    margin-bottom: var(--sp-lg);
  }
}


/* ════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero__stagger {
    opacity: 1;
    transform: none;
  }

  .timeline__item {
    opacity: 1;
    transform: none;
  }

  .timeline__dot {
    transform: translateX(-50%) scale(1);
  }

  .closing__container {
    opacity: 1;
    transform: none;
  }
}
