/* ==========================================================================
   ramprasadbismil.com — responsive.css
   Sections are RECOMPOSED per breakpoint, not merely scaled.
   Loaded after style.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Large desktop refinements — 1400px and up
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
  :root { --gut: 3.25rem; }
  .opening__grid { min-height: calc(100vh - var(--nav-h)); }
}

/* --------------------------------------------------------------------------
   Small desktop / large laptop — up to 1180px
   -------------------------------------------------------------------------- */
/* The nine menu labels need roughly 1250px of room at full size. Between
   1200px and 1440px they are set tighter so that "Contact" is never clipped;
   below 1200px they do not fit at a legible size and the drawer takes over. */
@media (min-width: 1200px) and (max-width: 1439px) {
  .nav__link { font-size: 0.7rem; letter-spacing: 0.088em; padding-inline: 0.46rem; }
  .brand__name { font-size: 1rem; }
  .brand__sub { letter-spacing: 0.24em; }
}

@media (max-width: 1180px) {
  .cards .card { grid-column: span 6; }
  .cards .card--wide { grid-column: span 6; }
}

/* --------------------------------------------------------------------------
   Small laptop and below — up to 1199px
   Primary nav collapses to the drawer here: the nine labels no longer fit
   across the bar at a legible size.
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .nav__list { display: none; }
  .nav__toggle { display: block; }
  .navdraw { display: block; }

  .split { grid-template-columns: 1fr; }
  .split__half { min-height: auto; }
  .split__half--word { border-bottom: 1px solid var(--rule-strong); }

  .exhibit { grid-template-columns: 1fr; }
  .exhibit__strip {
    flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.7rem; gap: 0.7rem;
  }
  .exhibit__thumb { flex: 0 0 clamp(122px, 26vw, 168px); scroll-snap-align: start; }
  .exhibit__thumb img { height: clamp(84px, 15vw, 112px); }
}

/* --------------------------------------------------------------------------
   Tablet portrait / iPad — up to 900px
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --nav-h: 66px; }

  /* HOME — the two leaves stack into a single vertical spread */
  .opening__grid { grid-template-columns: 1fr; min-height: 0; }
  .opening__leaf {
    border-right: 0; border-bottom: 1px solid rgba(235,205,164,0.2);
    padding-block: clamp(2.2rem, 6vw, 3.4rem);
  }
  .opening__portrait { max-width: min(340px, 74vw); }
  .opening__page { padding-block: clamp(2.4rem, 7vw, 4rem) clamp(4.4rem, 10vw, 5.5rem); }
  .opening__scroll { left: 50%; transform: translateX(-50%); }
  .opening__name { font-size: clamp(2.9rem, 1rem + 12vw, 6rem); }

  .act { grid-template-columns: auto minmax(0, 1fr); }
  .act__body { grid-column: 2 / -1; margin-top: 0.4rem; }

  .tl__row { grid-template-columns: clamp(76px, 15vw, 120px) 1px minmax(0, 1fr); }
  .tl__year { position: static; }

  .mast--early .mast__inner,
  .mast--rev .mast__inner,
  .mast--kakori .mast__inner,
  .mast--legacy .mast__inner { grid-template-columns: 1fr; }
  .mast--early .initial { display: none; }
  .mast--legacy .plate { max-width: 380px; margin-inline: auto; }

  .leaf { grid-template-columns: 1fr; gap: clamp(1rem, 3vw, 1.6rem); }
  .leaf__margin { position: static; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 1rem 1.4rem; align-items: start; }
  .leaf__margin .folio::before { margin-bottom: 0; width: 30px; }
  .leaf__marknote { margin-top: 0; border-top: 0; border-left: 1px solid var(--rule); padding: 0 0 0 1rem; }

  .attrib, .compare, .duo { grid-template-columns: 1fr; }
  .duo__seam { width: auto; height: 1px; }
  .duo--right { text-align: left; }
  .duo--right .duo__b { margin-left: 0; }

  .dossier__row { grid-template-columns: clamp(48px,7vw,70px) minmax(0,1fr); }
  .dossier__b { grid-column: 2 / -1; }

  .manifesto__cols { columns: 1; }
  .press__cols { columns: 2; }

  .cards .card, .cards .card--wide { grid-column: span 12; }

  .stmt__row { grid-template-columns: 1fr; gap: 0.9rem; }

  .contact-grid { grid-template-columns: 1fr; }

  /* Inline two-column blocks declared per page collapse here */
  [data-responsive-stack], .duplex { grid-template-columns: 1fr !important; }

  .chapnav__grid { grid-template-columns: 1fr; }
  .chapnav__cell + .chapnav__cell { border-left: 0; border-top: 1px solid var(--rule); }
  .chapnav__cell--next { text-align: left; }

  .colophon__top { grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 2.8rem); }
  .colophon__nav { columns: 2; }
}

/* --------------------------------------------------------------------------
   Large phone / small tablet — up to 720px
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .route__stops { grid-template-columns: 1fr; gap: 0; }
  .route__line { display: none; }
  .route__stop {
    padding: 1.4rem 0 1.4rem 2.6rem; text-align: left;
    border-bottom: 1px solid var(--rule);
  }
  .route__stop::before { top: 1.55rem; left: 0; transform: none; }
  .route__stop::after {
    top: 1.55rem; bottom: -1px; left: 7px; right: auto;
    width: 1px; height: auto; background: var(--rule-strong);
  }
  .route__stop:last-child::after { display: none; }

  .press__cols { columns: 1; }
  .press__ttl { max-width: none; }

  .four__row { grid-template-columns: 1fr; gap: 0.7rem; }

  .memorials li { grid-template-columns: clamp(38px,9vw,52px) minmax(0,1fr); }
  .memorials__y { grid-column: 2 / -1; margin-top: 0.4rem; }

  .form__row--split { grid-template-columns: 1fr; }

  .lightbox__btn--prev { left: 50%; top: auto; bottom: clamp(0.8rem,3vw,1.4rem); transform: translateX(calc(-50% - 74px)); }
  .lightbox__btn--next { right: auto; left: 50%; top: auto; bottom: clamp(0.8rem,3vw,1.4rem); transform: translateX(calc(-50% + 74px)); }
  .lightbox__count { bottom: clamp(1.7rem,4vw,2.2rem); }
  .lightbox__img { max-height: 56vh; }
  .lightbox { padding-bottom: 6.5rem; }
}

/* --------------------------------------------------------------------------
   Phone — up to 560px
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  :root { --sec-y: 3.4rem; --gut: 1.15rem; }

  .opening__meta { gap: 0.65rem; letter-spacing: 0.18em; }
  .opening__meta i { width: 26px; }
  .opening__roles { font-size: 1.02rem; gap: 0.35rem 0.75rem; }
  .opening__years { font-size: 1.75rem; gap: 0.65rem; }
  .opening__years i { max-width: 40px; }

  .act { grid-template-columns: 1fr; gap: 0.55rem; padding-block: 2.1rem; }
  .act__body { grid-column: 1 / -1; }
  .act__n { font-size: 1.75rem; }

  .tl__row { grid-template-columns: 1fr; gap: 0.85rem; padding-block: 1.7rem; }
  .tl__spine { display: none; }
  .tl__year { display: flex; align-items: baseline; gap: 0.9rem; }
  .tl__year small { margin-top: 0; }

  .register__cell { padding-right: 0; }

  .quote { padding-left: 1rem; }
  .verse { padding-inline: 0.9rem; }
  .dropcap::first-letter { font-size: 3.3em; }

  .seq__row { grid-template-columns: 1fr; gap: 0.5rem; }
  .seq__row::before { font-size: 1.4rem; }

  .figures { grid-template-columns: 1fr 1fr; }

  .verdicts { display: block; }
  .verdicts thead { display: none; }
  .verdicts tbody, .verdicts tr, .verdicts td { display: block; width: 100%; }
  .verdicts tr { border-bottom: 1px solid var(--rule-strong); padding-block: 1.1rem; }
  .verdicts td { border: 0; padding: 0.3rem 0; }
  .verdicts td::before {
    content: attr(data-th); display: block;
    font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--copper-400); margin-bottom: 0.3rem;
  }
  .verdicts td:first-child::before { content: none; }

  .colophon__nav { columns: 1; }
  .colophon__base { flex-direction: column; align-items: flex-start; gap: 0.6rem; }

  .navdraw__link { font-size: 1.32rem; }
}

/* --------------------------------------------------------------------------
   Very small phone — up to 380px
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  :root { --gut: 0.95rem; }
  .brand__sub { display: none; }
  .brand__name { font-size: 0.86rem; letter-spacing: 0.055em; }
  .figures { grid-template-columns: 1fr; }
  .chips { gap: 0.4rem; }
  .chip { padding-inline: 0.85rem; letter-spacing: 0.1em; }
  .ghost-word { font-size: 3.4rem; }
}

/* --------------------------------------------------------------------------
   Landscape phone — keep the drawer usable
   -------------------------------------------------------------------------- */
@media (max-height: 480px) and (orientation: landscape) {
  .navdraw { padding-block: 1.2rem 2rem; }
  .navdraw__link { font-size: 1.05rem; padding-block: 0.6rem; }
  .navdraw__foot { margin-top: 1.4rem; }
  .lightbox__img { max-height: 60vh; }
}

/* --------------------------------------------------------------------------
   Coarse pointer — remove hover-only affordances, enlarge targets
   -------------------------------------------------------------------------- */
@media (hover: none) {
  .act:hover { background: transparent; }
  .chapnav__cell:hover { background: transparent; }
  .verdicts tbody tr:hover { background: transparent; }
  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] { border-bottom: 1px solid var(--copper-500); }
}

/* --------------------------------------------------------------------------
   Print — a readable archival document
   -------------------------------------------------------------------------- */
@media print {
  .nav, .navdraw, .chapnav, .colophon, .exhibit__strip, .chips,
  .lightbox, .opening__scroll, .ghost-word, .mast__ghost { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .band { padding-block: 1.2rem; background: #fff !important; color: #000 !important; }
  .band--ink, .band--ink-deep, .band--wine, .band--char { color: #000 !important; }
  a { text-decoration: underline; }
  .plate__img, .exhibit__img { max-height: 12cm; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 900px) { .register { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .register { grid-template-columns: 1fr; } }
