/* ============================================================
   Isham Ul Haque — President-Elect of Bangladesh 2026
   Palette: Bangladesh flag — Dark Green + Bright Red, plus tones
   ============================================================ */

:root {
  /* Flag core */
  --green: #006a4e;        /* Bangladesh bottle green */
  --green-deep: #004a37;
  --green-dark: #00311f;
  --green-soft: #1c8768;
  --red: #f42a41;          /* Bangladesh red */
  --red-deep: #c81e33;

  /* Tones / neutrals */
  --cream: #f7f3e9;
  --paper: #efe7d3;
  --ink: #1a2420;
  --ink-soft: #3c4b44;
  --gold: #d9b25a;

  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-lg: 0 30px 60px -20px rgba(0, 49, 31, 0.55);
  --shadow-md: 0 14px 30px -12px rgba(0, 49, 31, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .hero__subtitle, .legacy__quote p, .footer__title {
  font-family: "Playfair Display", Georgia, serif;
}

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

/* ---- Shared paper texture (rough archive look) ---- */
.hero__paper,
.legacy__paper,
.photo__grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 90% at 78% 18%, rgba(244, 42, 65, 0.42), transparent 55%),
    radial-gradient(90% 80% at 10% 90%, rgba(28, 135, 104, 0.55), transparent 60%),
    linear-gradient(160deg, var(--green) 0%, var(--green-deep) 45%, var(--green-dark) 100%);
}

/* Faint national-circle motif */
.hero__bg::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(70vmin, 620px);
  aspect-ratio: 1;
  transform: translate(-42%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 42, 65, 0.30), rgba(244, 42, 65, 0.06) 62%, transparent 66%);
  filter: blur(2px);
}

.hero__paper {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.10;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.6rem clamp(1.2rem, 4vw, 2.5rem);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 243, 233, 0.9);
}

.nav__seal {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(247, 243, 233, 0.25), inset 0 0 8px rgba(0,0,0,0.3);
}

.nav__cta {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(247, 243, 233, 0.35);
  border-radius: 999px;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav__cta:hover { background: rgba(247, 243, 233, 0.12); border-color: rgba(247,243,233,0.6); }

/* Hero content */
.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem clamp(1.2rem, 4vw, 2.5rem) 5rem;
}

.hero__eyebrow {
  margin: 0 0 1rem;
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.hero__title {
  margin: 0;
  font-weight: 900;
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hero__subtitle {
  margin: 1rem 0 0;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  color: var(--cream);
}

.hero__subtitle::before {
  content: "";
  display: inline-block;
  width: 42px;
  height: 2px;
  background: var(--red);
  vertical-align: middle;
  margin-right: 0.8rem;
}

.hero__lede {
  max-width: 44ch;
  margin: 1.6rem 0 2.4rem;
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: rgba(247, 243, 233, 0.82);
  font-weight: 300;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.btn {
  display: inline-block;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(244, 42, 65, 0.8);
}
.btn--primary:hover { background: var(--red-deep); transform: translateY(-3px); }
.btn--ghost {
  border: 1px solid rgba(247, 243, 233, 0.45);
  color: var(--cream);
}
.btn--ghost:hover { background: rgba(247, 243, 233, 0.1); transform: translateY(-3px); }

/* Scroll cue */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(247, 243, 233, 0.4);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.hero__scroll-dot {
  width: 4px; height: 8px;
  border-radius: 999px;
  background: var(--cream);
  animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(-4px); }
  40% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translateY(12px); }
}

/* ============================================================
   STAT STRIP
   ============================================================ */
.strip {
  background: var(--green-dark);
  color: var(--cream);
}
.strip__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.6rem clamp(1.2rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.strip__stat { position: relative; }
.strip__stat:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -0.75rem;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(247, 243, 233, 0.18);
}
.strip__num {
  display: block;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--gold);
  line-height: 1;
}
.strip__label {
  display: block;
  margin-top: 0.5rem;
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247, 243, 233, 0.7);
}

/* ============================================================
   SECTION HEAD
   ============================================================ */
.section-head {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) 1.5rem 1rem;
  text-align: center;
}
.section-head__eyebrow {
  margin: 0 0 0.8rem;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.section-head__title {
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 700;
  color: var(--green-deep);
  line-height: 1.05;
}
.section-head__sub {
  margin: 1rem auto 0;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.section-head__admin {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-deep);
  text-decoration: none;
  border-bottom: 1px dashed var(--green-soft);
  padding-bottom: 1px;
}
.section-head__admin:hover { color: var(--red-deep); border-color: var(--red); }

.tl__empty {
  max-width: 46ch;
  margin: 2rem auto;
  text-align: center;
  color: var(--ink-soft);
}
.tl__empty a { color: var(--green-deep); font-weight: 600; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem clamp(1.2rem, 4vw, 2.5rem) 2rem;
}

.tl {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  position: relative;
}
/* central spine */
.tl::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: linear-gradient(var(--green-soft), var(--green), var(--red));
  border-radius: 3px;
}

.tl__item {
  position: relative;
  width: 50%;
  padding: 1.5rem 3rem 1.5rem 0;
  /* reveal-on-scroll */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.tl__item.is-visible { opacity: 1; transform: none; }

.tl__item:nth-child(even) {
  margin-left: 50%;
  padding: 1.5rem 0 1.5rem 3rem;
}

.tl__marker {
  position: absolute;
  top: 2.1rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  border: 4px solid var(--cream);
  box-shadow: 0 0 0 3px var(--green-soft);
  z-index: 2;
}
.tl__item:nth-child(odd) .tl__marker { right: -9px; }
.tl__item:nth-child(even) .tl__marker { left: -9px; }

.tl__year {
  display: inline-block;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--green-deep);
  margin-bottom: 0.7rem;
}
.tl__year::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  background: var(--red);
  margin-top: 0.35rem;
}
.tl__item:nth-child(odd) { text-align: right; }
.tl__item:nth-child(odd) .tl__year::after { margin-left: auto; }

/* ---- Archive photo card ---- */
.photo {
  margin: 0;
  display: inline-block;
  max-width: 420px;
  text-align: left;
}
.tl__item:nth-child(odd) .photo { margin-left: auto; }

.photo__frame {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  padding: 10px;                       /* photo-print border */
  background: #fbf7ec;
  box-shadow: var(--shadow-md);
  transform: rotate(-1.2deg);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.tl__item:nth-child(even) .photo__frame { transform: rotate(1.2deg); }
.photo__frame:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.photo__frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  /* archive / sepia treatment */
  filter: sepia(0.55) contrast(0.95) brightness(0.98) saturate(0.85);
}

/* rough paper grain overlaid on the photo */
.photo__grain {
  position: absolute;
  inset: 10px;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-size: 220px 220px;
}
/* warm sepia wash + vignette for the archive feel */
.photo__frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 2px;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 50% 40%, transparent 55%, rgba(60, 40, 15, 0.35) 100%),
    linear-gradient(180deg, rgba(120, 88, 40, 0.12), rgba(90, 60, 20, 0.20));
  mix-blend-mode: multiply;
}

.photo__cap {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--green-soft);
  padding-left: 0.9rem;
}
.photo__cap strong { color: var(--green-deep); }
.photo__cap em { color: var(--red-deep); font-style: italic; opacity: 0.8; font-size: 0.85em; }

/* ============================================================
   LEGACY QUOTE
   ============================================================ */
.legacy {
  position: relative;
  margin-top: 3rem;
  padding: clamp(4rem, 10vw, 7rem) 1.5rem;
  background:
    radial-gradient(90% 120% at 80% 0%, rgba(244, 42, 65, 0.30), transparent 60%),
    linear-gradient(150deg, var(--green) 0%, var(--green-deep) 60%, var(--green-dark) 100%);
  color: var(--cream);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.legacy__paper {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.09;
  mix-blend-mode: overlay;
}
.legacy__quote { margin: 0 auto; max-width: 780px; }
.legacy__quote p {
  font-size: clamp(1.5rem, 4.2vw, 2.8rem);
  font-style: italic;
  line-height: 1.3;
  margin: 0 0 1.4rem;
}
.legacy__quote cite {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold);
}

/* ============================================================
   DONATE
   ============================================================ */
.donate {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 2.5rem) clamp(3.5rem, 8vw, 6rem);
  text-align: center;
}

.donate__action { margin-top: 1.8rem; }

.donate__btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* Collapsible thank-you panel — animated with the grid-rows 0fr→1fr trick */
.donate__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}
.donate__panel.is-open { grid-template-rows: 1fr; }
/* `hidden` is toggled by JS as a no-transition fallback for no-JS clients */
.donate__panel[hidden] { display: none; }

.donate__panel-clip {
  min-height: 0;
  overflow: hidden;
}

.donate__card {
  max-width: 620px;
  margin: 1.8rem auto 0;
  padding: 2.4rem 1.8rem 2.2rem;
  background: #fbf7ec;
  border-top: 5px solid var(--red);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.donate__panel.is-open .donate__card { opacity: 1; transform: none; }

.donate__seal {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(0, 106, 78, 0.18), inset 0 0 10px rgba(0, 0, 0, 0.3);
}
.donate__card-title {
  margin: 0 0 0.9rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  color: var(--green-deep);
}
.donate__card-body {
  margin: 0 auto 1rem;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.donate__card-note {
  margin: 0 auto;
  max-width: 46ch;
  font-size: 1.08rem;
  line-height: 1.55;
}
.donate__card-note strong { color: var(--red-deep); }

@media (prefers-reduced-motion: reduce) {
  .donate__panel,
  .donate__card { transition: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--green-dark);
  color: var(--cream);
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
}
.footer__flag {
  width: 66px;
  height: 40px;
  margin: 0 auto 1.4rem;
  background: var(--green);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.footer__flag-circle {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  margin-left: -6px;                    /* offset like the real flag */
}
.footer__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}
.footer__sub {
  margin: 0.3rem 0 1.4rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}
.footer__disclaimer {
  max-width: 46ch;
  margin: 0 auto 1.6rem;
  font-size: 0.82rem;
  color: rgba(247, 243, 233, 0.6);
}
.footer__top {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--cream);
  border-bottom: 1px solid rgba(247, 243, 233, 0.35);
  padding-bottom: 2px;
}
.footer__top:hover { color: var(--gold); border-color: var(--gold); }

/* ============================================================
   RESPONSIVE — collapse timeline to single rail on mobile
   ============================================================ */
@media (max-width: 720px) {
  .tl::before { left: 18px; }
  .tl__item,
  .tl__item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 1.2rem 0 1.2rem 3rem;
    text-align: left;
  }
  .tl__item:nth-child(odd) { text-align: left; }
  .tl__item:nth-child(odd) .tl__year::after { margin-left: 0; }
  .tl__item:nth-child(odd) .tl__marker,
  .tl__item:nth-child(even) .tl__marker { left: 9px; right: auto; }
  .tl__item:nth-child(odd) .photo { margin-left: 0; }
  .photo { max-width: 100%; }
}

@media (max-width: 420px) {
  .strip__inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .strip__stat:not(:last-child)::after { display: none; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tl__item { opacity: 1; transform: none; transition: none; }
  .hero__scroll-dot { animation: none; }
}
