/* ============================================================
   Democracy by Design — style
   Palette drawn from the Dr. Manmohan Singh Fellows Programme:
   AIPC blue #1490e7 / #1ca9ec · yellow #ffcd00 · charcoal #414042
   Typeface: Satoshi (as on manmohansinghfellows.com)
   ============================================================ */

:root {
  --blue: #1490e7;
  --blue-bright: #1ca9ec;
  --blue-deep: #0e6db3;
  --yellow: #ffcd00;
  --yellow-warm: #fccf13;
  --ink: #414042;
  --ink-deep: #2b2a2c;
  --paper: #fdfdfd;
  --paper-warm: #f6f4ee;
  --grey: #99a1a7;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(43, 42, 44, .14);
  --font: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -.01em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  padding: .85rem 1.7rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(43,42,44,.18); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-bright); }
.btn--yellow { background: var(--yellow); color: var(--ink-deep); }
.btn--yellow:hover { background: var(--yellow-warm); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline-dark { border-color: var(--ink-deep); color: var(--ink-deep); background: transparent; }
.btn--outline-light { border-color: #fff; color: #fff; background: transparent; }
.btn--small { padding: .5rem 1.1rem; font-size: .88rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem clamp(1.2rem, 4vw, 3rem);
  background: rgba(253, 253, 253, .92);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--ink-deep);
}
.nav__brand { display: flex; align-items: center; gap: .7rem; font-weight: 900; }
.nav__mark {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  background: var(--blue); color: #fff;
  font-weight: 900; font-size: .95rem;
  border-radius: 10px;
  transform: rotate(-4deg);
  box-shadow: 3px 3px 0 var(--yellow);
}
.nav__name { font-size: 1.12rem; letter-spacing: -.01em; }
.nav__name em { color: var(--blue); font-style: italic; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; font-weight: 700; font-size: .95rem; }
.nav__links a:not(.btn) { position: relative; }
.nav__links a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 3px; background: var(--yellow);
  transition: width .2s ease;
}
.nav__links a:not(.btn):hover::after { width: 100%; }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; }
.nav__burger span { display: block; width: 26px; height: 3px; background: var(--ink-deep); margin: 5px 0; border-radius: 2px; }

/* ---------- hero (simple, straightforward) ---------- */
.hero {
  padding: clamp(3rem, 8vh, 5.5rem) clamp(1.2rem, 5vw, 4rem);
  text-align: center;
  background: var(--paper);
  border-bottom: 3px solid var(--ink-deep);
}
.hero__title {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  color: var(--ink-deep);
}
.hero__tagline {
  max-width: 620px; margin: 1.2rem auto 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  color: var(--ink);
}
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- section head ---------- */
.section-head { max-width: 680px; margin: 0 auto 2.8rem; text-align: center; padding: 0 1.2rem; }
.section-head__kicker {
  display: inline-block;
  font-weight: 700; font-size: .85rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .8rem;
}
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 900; color: var(--ink-deep); margin-bottom: .8rem; }
.section-head p { color: var(--ink); font-size: 1.05rem; }

/* ---------- lighthouse ---------- */
.lighthouse { padding: clamp(4rem, 9vh, 7rem) clamp(1.2rem, 5vw, 4rem); background: var(--paper-warm); }
.lighthouse__card {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  max-width: 1060px; margin: 0 auto;
  background: #fff; border: 3px solid var(--ink-deep);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--blue);
  transition: transform .2s ease, box-shadow .2s ease;
}
.lighthouse__card:hover { transform: translate(-3px, -3px); box-shadow: 12px 12px 0 var(--blue); }
.lighthouse__imgwrap { position: relative; min-height: 320px; }
.lighthouse__imgwrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lighthouse__body { padding: clamp(1.6rem, 3.5vw, 3rem); display: flex; flex-direction: column; gap: .8rem; justify-content: center; }
.lighthouse__badge {
  align-self: flex-start;
  background: var(--ink-deep); color: var(--yellow);
  font-weight: 700; font-size: .78rem; letter-spacing: .08em;
  padding: .32rem .8rem; border-radius: 999px;
}
.lighthouse__album { font-weight: 700; color: var(--blue); font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; }
.lighthouse__body h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 900; color: var(--ink-deep); }
.lighthouse__body p { color: var(--ink); }
.lighthouse__link { font-weight: 700; color: var(--blue); margin-top: .4rem; }
.lighthouse__card:hover .lighthouse__link { text-decoration: underline; }

/* ---------- archive: one image after another ---------- */
.archive { padding: clamp(2.5rem, 6vh, 4rem) 1.2rem; }
.archive__feed { max-width: 640px; margin: 0 auto; }
.archive__feed .tile { margin-bottom: 1.6rem; }
.tile {
  position: relative;
  break-inside: avoid;
  margin-bottom: 1.1rem;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--ink-deep);
  background: var(--ink-deep);
  cursor: zoom-in;
}
.tile img { width: 100%; transition: transform .35s ease; }
.tile:hover img { transform: scale(1.045); }
.tile__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: .5rem; justify-content: flex-end;
  padding: .6rem;
  background: linear-gradient(transparent, rgba(43, 42, 44, .82));
  opacity: 0; transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
}
.tile:hover .tile__bar, .tile:focus-within .tile__bar { opacity: 1; transform: none; }
@media (hover: none) { .tile__bar { opacity: 1; transform: none; } }
.tile__btn {
  border: 0; cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: .8rem;
  padding: .45rem .85rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: .3rem;
}
.tile__btn--like { background: rgba(253,253,253,.92); color: var(--ink-deep); margin-right: auto; }
.tile__btn--like .like-heart { color: var(--grey); transition: color .15s, transform .15s; }
.tile__btn--like.is-liked { background: #fff; }
.tile__btn--like.is-liked .like-heart { color: #e0245e; transform: scale(1.15); }
.tile__btn--like .like-count:empty { display: none; }
.tile__btn--share { background: var(--yellow); color: var(--ink-deep); }
.tile__btn--dl { background: rgba(253,253,253,.92); color: var(--ink-deep); }
.tile__btn:hover { filter: brightness(1.06); }

/* ---------- submit strip (buttons only) ---------- */
.submit-strip {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  padding: 2.4rem 1.2rem;
  background: linear-gradient(120deg, var(--blue-deep), var(--blue) 45%, var(--blue-bright));
  border-top: 3px solid var(--ink-deep);
  border-bottom: 3px solid var(--ink-deep);
}

/* ---------- submit cta ---------- */
.submit-cta {
  background: var(--blue);
  background: linear-gradient(120deg, var(--blue-deep), var(--blue) 45%, var(--blue-bright));
  color: #fff;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 5vw, 4rem);
  text-align: center;
  border-top: 3px solid var(--ink-deep);
  border-bottom: 3px solid var(--ink-deep);
}
.submit-cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; margin-bottom: 1rem; }
.submit-cta p { max-width: 640px; margin: 0 auto 2rem; font-size: 1.08rem; opacity: .95; }
.submit-cta__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.submit-cta .btn--outline-dark { border-color: #fff; color: #fff; }

/* ---------- about ---------- */
.about { padding: clamp(4rem, 9vh, 7rem) clamp(1.2rem, 5vw, 4rem); background: var(--paper); }
.about__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); max-width: 1100px; margin: 0 auto; align-items: start; }
.about__text h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 900; color: var(--ink-deep); margin: .6rem 0 1.2rem; }
.about__text p { margin-bottom: 1rem; }
.about__cards { display: grid; gap: 1rem; }
.about__card {
  border: 2px solid var(--ink-deep); border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  background: var(--paper-warm);
  box-shadow: 5px 5px 0 var(--yellow);
}
.about__card:nth-child(2) { box-shadow: 5px 5px 0 var(--blue); }
.about__card:nth-child(3) { box-shadow: 5px 5px 0 var(--ink); }
.about__num { font-weight: 900; color: var(--blue); font-size: .9rem; letter-spacing: .12em; }
.about__card h4 { font-size: 1.15rem; font-weight: 900; margin: .2rem 0 .3rem; }
.about__card p { font-size: .95rem; }

/* ---------- footer ---------- */
.footer { background: var(--ink-deep); color: var(--paper); padding: 3.2rem clamp(1.2rem, 5vw, 4rem) 1.6rem; }
.footer__top { display: flex; flex-wrap: wrap; gap: 2.6rem; justify-content: space-between; max-width: 1100px; margin: 0 auto 2.4rem; }
.footer__brand { display: flex; gap: .9rem; align-items: flex-start; font-weight: 700; }
.footer__brand span.nav__mark { box-shadow: 3px 3px 0 var(--yellow); }
.footer__brand p span { font-weight: 400; color: var(--grey); font-size: .9rem; }
.footer__col h5 { font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; color: var(--yellow); margin-bottom: .7rem; }
.footer__col a, .footer__col p { display: block; color: var(--paper); opacity: .85; margin-bottom: .4rem; font-size: .95rem; }
.footer__col a:hover { opacity: 1; text-decoration: underline; }
.footer__bottom { border-top: 1px solid rgba(253,253,253,.18); padding-top: 1.3rem; max-width: 1100px; margin: 0 auto; }
.footer__bottom p { font-size: .82rem; color: var(--grey); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(43, 42, 44, .94);
  padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox__figure { max-width: min(92vw, 900px); text-align: center; }
.lightbox__figure img { max-height: 78vh; max-width: 100%; margin: 0 auto; border-radius: 8px; box-shadow: var(--shadow); }
.lightbox__actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.1rem; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.4rem;
  background: none; border: 0; color: #fff;
  font-size: 2.6rem; cursor: pointer; line-height: 1;
}
.lightbox__nav {
  background: none; border: 0; color: #fff;
  font-size: 3.4rem; cursor: pointer; padding: 0 1rem;
  opacity: .75; transition: opacity .15s;
  user-select: none;
}
.lightbox__nav:hover { opacity: 1; }

/* ---------- share sheet ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 120;
  display: none; align-items: flex-end; justify-content: center;
  background: rgba(43,42,44,.55);
}
.sheet.is-open { display: flex; }
.sheet__panel {
  background: #fff; width: min(100%, 460px);
  border-radius: 18px 18px 0 0;
  padding: 1.6rem 1.4rem 1.2rem;
  border-top: 4px solid var(--yellow);
}
.sheet__panel h4 { font-weight: 900; margin-bottom: 1rem; }
.sheet__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }
.sheet__grid a, .sheet__grid button {
  font-family: var(--font); font-weight: 700; font-size: .95rem;
  border: 2px solid var(--ink-deep); border-radius: 10px;
  background: var(--paper-warm); color: var(--ink-deep);
  padding: .8rem; text-align: center; cursor: pointer;
}
.sheet__grid a:hover, .sheet__grid button:hover { background: var(--yellow); }
.sheet__close { width: 100%; background: none; border: 0; font-family: var(--font); font-weight: 700; color: var(--grey); cursor: pointer; padding: .5rem; }

/* ---------- forms (submit page) ---------- */
.form-page { max-width: 720px; margin: 0 auto; padding: clamp(2.5rem, 6vh, 4.5rem) 1.4rem 5rem; }
.form-page__head { text-align: center; margin-bottom: 2.4rem; }
.form-page__head h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; color: var(--ink-deep); margin-bottom: .8rem; }
.form-page__head p { color: var(--ink); }
.form-card {
  background: #fff; border: 3px solid var(--ink-deep); border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--yellow);
  padding: clamp(1.4rem, 4vw, 2.4rem);
}
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; font-size: .95rem; }
.field label .opt { font-weight: 400; color: var(--grey); }
.field input[type="text"], .field input[type="email"], .field textarea, .field select {
  width: 100%; font-family: var(--font); font-size: 1rem;
  padding: .75rem .9rem;
  border: 2px solid var(--ink); border-radius: 10px;
  background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,144,231,.2);
}
.field textarea { resize: vertical; min-height: 120px; }
.field--file input[type="file"] {
  width: 100%; padding: 1.6rem 1rem;
  border: 2px dashed var(--blue); border-radius: 10px;
  background: rgba(28,169,236,.05);
  font-family: var(--font); cursor: pointer;
}
.field--file small { color: var(--grey); }
.field--check { display: flex; gap: .7rem; align-items: flex-start; }
.field--check input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.field--check span { font-size: .92rem; }
.form-card .btn { width: 100%; font-size: 1.05rem; }
.form-note { text-align: center; margin-top: 1.4rem; font-size: .92rem; color: var(--grey); }
.form-note a { color: var(--blue); font-weight: 700; }

/* ---------- essay page ---------- */
.essay-hero {
  position: relative; min-height: 82vh;
  display: flex; align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.essay-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.essay-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(43,42,44,.1) 30%, rgba(43,42,44,.86));
}
.essay-hero__body { position: relative; z-index: 2; padding: clamp(1.6rem, 5vw, 4rem); max-width: 900px; }
.essay-hero__body .lighthouse__badge { margin-bottom: .9rem; display: inline-block; }
.essay-hero__body h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); font-weight: 900; margin: .4rem 0 .8rem; }
.essay-hero__body p { font-size: 1.1rem; max-width: 640px; opacity: .95; }
.essay-meta { font-size: .88rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--yellow); }

.essay-body { max-width: 720px; margin: 0 auto; padding: clamp(3rem, 7vh, 5rem) 1.4rem; }
.essay-body > p { font-size: 1.13rem; margin-bottom: 1.5rem; }
.essay-body > p:first-of-type::first-letter {
  font-size: 3.4em; font-weight: 900; float: left;
  line-height: .85; padding: .06em .12em 0 0;
  color: var(--blue);
}
.essay-figure { margin: 2.6rem calc(-1 * clamp(0rem, 6vw, 6rem)); }
.essay-figure img { width: 100%; border-radius: 10px; border: 3px solid var(--ink-deep); }
.essay-figure figcaption { font-size: .88rem; color: var(--grey); margin-top: .6rem; text-align: center; font-style: italic; }
.essay-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.6rem calc(-1 * clamp(0rem, 6vw, 6rem)); }
.essay-duo img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 3px solid var(--ink-deep); }
.essay-quote {
  margin: 2.8rem 0; padding: 1.4rem 1.8rem;
  border-left: 6px solid var(--yellow);
  background: var(--paper-warm);
  font-size: 1.3rem; font-weight: 700; font-style: italic;
  border-radius: 0 10px 10px 0;
}
.essay-auth {
  margin-top: 3rem; padding: 1.5rem 1.7rem;
  border: 2px solid var(--ink-deep); border-radius: var(--radius);
  background: var(--paper-warm);
  box-shadow: 6px 6px 0 var(--blue);
  font-size: .95rem;
}
.essay-auth strong { color: var(--blue-deep); }
.essay-back { text-align: center; padding-bottom: 4rem; }

/* ---------- thanks page ---------- */
.thanks { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 2rem 1.4rem; }
.thanks h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 900; color: var(--ink-deep); margin-bottom: .8rem; }
.thanks p { max-width: 520px; margin: 0 auto 1.8rem; }
.thanks .big { font-size: 4rem; margin-bottom: 1rem; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink-deep); color: var(--yellow);
  font-weight: 700; font-size: .92rem;
  padding: .7rem 1.4rem; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 140;
}
.toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .lighthouse__card { grid-template-columns: 1fr; }
  .lighthouse__imgwrap { min-height: 300px; }
  .about__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* .nav's backdrop-filter turns it into the containing block for
     position:fixed children, so anchor the menu to the nav instead */
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column; align-items: center;
    padding: 2rem 0 2.6rem; gap: 1.7rem;
    font-size: 1.2rem;
    border-bottom: 3px solid var(--ink-deep);
    box-shadow: 0 22px 34px rgba(43, 42, 44, .22);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__burger { display: block; }
  .nav__name { display: none; }
  .essay-duo { grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; bottom: .6rem; z-index: 4; }
  .lightbox__nav--prev { left: 18%; }
  .lightbox__nav--next { right: 18%; }
}
