/* ============================================================
   Advocates Philippines — advocatesomi.com
   Black-and-white broadsheet. Ink on paper, hairline rules.
   Identity: blueprint/branding (Ink #141414 / Paper / Grey).
   ============================================================ */
:root {
  --ink:        #141414;
  --paper:      #FFFFFF;
  --grey:       #8A8A8A;
  --grey-light: #C9C9C9;
  --wash:       #F4F4F2;
  --rule:       #E4E4E1;
  --display: 'Archivo', system-ui, sans-serif;
  --serif:   'Merriweather', Georgia, 'Times New Roman', serif;
  --w-max: 1200px;
  --w-article: 680px;
  --gutter: 20px;   /* one source of truth for side margins */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--w-max); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Boot sequence ───────────────────────────────────────────
   Ink-stamp press boot: logo stamps onto paper, rule draws like
   a press roller, then the double rule slices across and the two
   paper halves part like a broadsheet fold. */
.boot { position: fixed; inset: 0; z-index: 100; }
.boot__half { position: absolute; left: 0; right: 0; background: var(--paper); }
.boot__half--top { top: 0; height: 50%; border-bottom: 3px solid transparent; }
.boot__half--btm { bottom: 0; height: 50%; border-top: 1px solid transparent; }
.boot__brand {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 20px;
}
.boot__logo { height: 74px; width: auto; animation: boot-stamp .6s cubic-bezier(.2,.8,.25,1) both; }
@keyframes boot-stamp {
  0%   { opacity: 0; transform: scale(1.14); filter: blur(3px); }
  55%  { opacity: 1; filter: blur(0); }
  72%  { transform: scale(.985); }
  100% { opacity: 1; transform: scale(1); }
}
.boot__rule { width: 210px; height: 2px; background: var(--rule); overflow: hidden; }
.boot__rule span {
  display: block; height: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  animation: boot-press 2.4s cubic-bezier(.25,.6,.3,1) .45s both;
}
@keyframes boot-press { 0% { transform: scaleX(0); } 70% { transform: scaleX(.86); } 100% { transform: scaleX(1); } }
.boot__tag {
  font-family: var(--display); font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; color: var(--grey);
  letter-spacing: .34em; opacity: 0;
  animation: boot-tag .9s ease .75s both;
}
@keyframes boot-tag { from { opacity: 0; letter-spacing: .5em; } to { opacity: 1; letter-spacing: .3em; } }

/* exit: brand lifts, ink lines flash across, halves part */
.boot--exit .boot__brand { opacity: 0; transform: translateY(-10px); transition: opacity .22s ease, transform .22s ease; }
.boot--exit .boot__half--top { border-bottom-color: var(--ink); }
.boot--exit .boot__half--btm { border-top-color: var(--ink); }
.boot--exit .boot__half { transition: transform .62s cubic-bezier(.7,0,.18,1) .26s, border-color .14s ease .1s; }
.boot--exit .boot__half--top { transform: translateY(-101%); }
.boot--exit .boot__half--btm { transform: translateY(101%); }
/* repeat visits + reduced motion: plain quick fade */
.boot--fade { opacity: 0; transition: opacity .3s ease; }
@media (prefers-reduced-motion: reduce) {
  .boot__logo, .boot__rule span, .boot__tag { animation-duration: .01s; animation-delay: 0s; }
  .boot--exit .boot__half { transition: none; transform: none; }
  .boot--exit { opacity: 0; transition: opacity .3s ease; }
}
@media (max-width: 640px) { .boot__logo { height: 56px; } .boot__tag { font-size: 9px; } }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar { border-bottom: 1px solid var(--rule); }
.topbar__in {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: 8px; gap: 12px;   /* padding-block: keep .wrap's horizontal gutter */
}
.topbar__date, .topbar__tag {
  font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: .04em; color: var(--grey);
}
.topbar__tag { font-style: normal; text-transform: uppercase; letter-spacing: .1em; }

/* ── Masthead ────────────────────────────────────────────── */
.masthead { padding: 26px 0 20px; text-align: center; }
.masthead img { height: 58px; width: auto; margin: 0 auto; }
.masthead a { display: inline-block; }

/* double rule, the broadsheet signature */
.rule-double {
  border: 0; margin: 0;
  border-top: 3px solid var(--ink);
  position: relative; height: 5px;
}
.rule-double::after {
  content: ""; position: absolute; left: 0; right: 0; top: 4px;
  border-top: 1px solid var(--ink);
}

/* ── Section nav ─────────────────────────────────────────── */
.secnav {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.secnav__in {
  display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; justify-content: safe center;
}
.secnav__in::-webkit-scrollbar { display: none; }
.secnav a {
  font-family: var(--display); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em; color: var(--ink);
  padding: 12px 0 10px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.secnav a:hover { border-bottom-color: var(--grey-light); }
.secnav a.is-active { border-bottom-color: var(--ink); }

/* ── Load reveal ─────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .5s cubic-bezier(.2,.7,.3,1) both; }
.reveal:nth-child(2) { animation-delay: .06s; }
.reveal:nth-child(3) { animation-delay: .12s; }
.reveal:nth-child(4) { animation-delay: .18s; }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }

/* ── Lead package ────────────────────────────────────────── */
.lead { display: grid; grid-template-columns: 1fr 320px; gap: 0; padding: 28px 0 32px; }
.lead__main { padding-right: 32px; border-right: 1px solid var(--rule); }
.lead__story > a { display: block; }
.lead__story .card__img { aspect-ratio: 16/9; margin-top: 22px; }
.lead__kicker {
  font-family: var(--display); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; color: var(--grey); margin-bottom: 10px;
}
.lead__hed {
  font-family: var(--serif); font-weight: 700; font-size: 44px;
  line-height: 1.14; letter-spacing: -.016em; margin: 0 0 12px; max-width: 22ch;
}
.lead__dek { font-size: 16.5px; color: #463F3F; line-height: 1.6; margin: 0 0 12px; max-width: 62ch; }
.lead__story a:hover .lead__hed { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.lead__aside { padding-left: 28px; }
.aside__label {
  font-family: var(--display); font-size: 12px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .1em; margin: 2px 0 4px;
}
.aside__list { list-style: none; margin: 0; padding: 0; }
.aside__list li { border-top: 1px solid var(--rule); padding: 13px 0; }
.aside__list li:first-child { border-top: 0; }
.aside__hed { font-family: var(--serif); font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.aside__list a:hover .aside__hed { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ── Section zones ───────────────────────────────────────── */
.zone { padding: 26px 0 30px; border-top: 1px solid var(--rule); }
.zone__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.zone__title {
  font-family: var(--display); font-size: 13px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .1em; margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.zone__title::before { content: ""; width: 22px; height: 3px; background: var(--ink); }
.zone__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.zone__all {
  font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: .05em; color: var(--grey); text-transform: uppercase;
}
.zone__all:hover { color: var(--ink); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

/* ── Cards ───────────────────────────────────────────────── */
.card { min-width: 0; }
.card__img {
  aspect-ratio: 3/2; background: var(--wash); overflow: hidden;
  position: relative; margin-bottom: 12px;
}
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__img.is-fallback img { display: none; }
.card__img.is-fallback::after {
  content: ""; position: absolute; inset: 0;
  background: url('/images/adv-ph-black.png') center/56px auto no-repeat;
  opacity: .1;
}
.card__kicker {
  font-family: var(--display); font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em; color: var(--grey); margin-bottom: 6px;
}
.card__hed { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.32; margin: 0 0 8px; }
.grid-4 .card__hed { font-size: 16.5px; }
.card a:hover .card__hed { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card__date { font-family: var(--display); font-size: 11px; color: var(--grey); letter-spacing: .03em; }

/* ── Article page ────────────────────────────────────────── */
.article { max-width: var(--w-article); margin: 0 auto; padding: 36px var(--gutter) 20px; }
.article__kicker {
  font-family: var(--display); font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .11em; text-align: center; margin-bottom: 16px;
}
.article__kicker a { border-bottom: 1px solid var(--grey-light); padding-bottom: 2px; }
.article__kicker a:hover { border-bottom-color: var(--ink); }
.article__hed {
  font-family: var(--serif); font-weight: 700; font-size: 38px;
  line-height: 1.16; letter-spacing: -.014em; text-align: center; margin: 0 0 16px;
}
.article__dek {
  font-size: 18px; line-height: 1.55; color: #463F3F; text-align: center;
  margin: 0 auto 22px; max-width: 56ch; font-style: italic;
}
.article__meta {
  display: flex; justify-content: center; gap: 14px; align-items: center;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 10px 0; margin-bottom: 28px;
  font-family: var(--display); font-size: 12px; letter-spacing: .03em;
}
.article__byline { font-weight: 700; }
.article__date { color: var(--grey); }

.article__hero { max-width: 920px; margin: 0 auto 10px; padding: 0 var(--gutter); }
.article__hero .card__img { aspect-ratio: 16/9; margin: 0; }
.article__caption {
  max-width: 920px; margin: 8px auto 26px; padding: 0 var(--gutter);
  font-family: var(--display); font-size: 12px; color: var(--grey);
}

.article__embed { max-width: var(--w-article); margin: 0 auto 30px; padding: 0 var(--gutter); }
.embed { border-radius: 0; overflow: hidden; }
.embed__frame { width: 100%; display: block; border: 0; }
.embed--video { position: relative; aspect-ratio: 16 / 9; }
.embed--video .embed__frame { position: absolute; inset: 0; width: 100%; height: 100%; }

.article__body { max-width: var(--w-article); margin: 0 auto; padding: 0 var(--gutter) 46px; font-size: 17.5px; line-height: 1.85; }
.article__body p { margin: 0 0 1.35em; }
.article__body p:first-of-type::first-letter {
  font-family: var(--serif); font-weight: 700; font-size: 3.3em;
  float: left; line-height: .82; padding: 6px 10px 0 0;
}
.article__body img { margin: 1.6em 0; }
.article__body h2, .article__body h3 { font-family: var(--serif); line-height: 1.3; margin: 1.6em 0 .6em; }
.article__body blockquote {
  margin: 1.6em 0; padding: 0 0 0 20px; border-left: 3px solid var(--ink);
  font-style: italic; color: #463F3F;
}
.article__end { display: flex; justify-content: center; margin: 6px 0 0; }
.article__end::after { content: ""; width: 44px; border-top: 3px solid var(--ink); }

.related { border-top: 1px solid var(--rule); padding: 26px 0 34px; }

/* ── Section page ────────────────────────────────────────── */
.sectionpage { padding: 30px 0 40px; }
.sectionpage__head { text-align: center; padding: 6px 0 24px; border-bottom: 3px solid var(--ink); margin-bottom: 28px; }
.sectionpage__title {
  font-family: var(--display); font-size: 30px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .06em; margin: 0;
}
.sectionpage__count { font-family: var(--display); font-size: 12px; color: var(--grey); margin-top: 6px; letter-spacing: .04em; }
.sectionpage .grid-4 { row-gap: 34px; }
.loadmore { display: flex; justify-content: center; padding: 38px 0 6px; }
.loadmore button {
  font-family: var(--display); font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em;
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink);
  padding: 12px 34px; cursor: pointer;
}
.loadmore button:hover { background: var(--ink); color: var(--paper); }
.loadmore button[disabled] { opacity: .4; cursor: default; }

/* ── States ──────────────────────────────────────────────── */
.msg { text-align: center; padding: 70px 20px; font-family: var(--display); color: var(--grey); font-size: 14px; letter-spacing: .03em; }
.skeleton .card__img { background: linear-gradient(100deg, var(--wash) 40%, #ECECEA 50%, var(--wash) 60%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton .sk-line { height: 12px; background: var(--wash); margin-bottom: 8px; }
.skeleton .sk-line--w60 { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton .card__img { animation: none; } }

/* ── Footer ──────────────────────────────────────────────── */
.footer { background: var(--ink); color: var(--paper); margin-top: 24px; }
/* padding-block only — keep the horizontal gutter from .wrap (shorthand would zero it) */
.footer__in { padding-block: 44px 30px; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: start; }
.footer img { height: 44px; width: auto; }
.footer__tag { font-family: var(--display); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #9B9B9B; margin-top: 14px; }
.footer__secs { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 30px; }
.footer__secs a { font-family: var(--display); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #C9C9C9; }
.footer__secs a:hover { color: var(--paper); }
.footer__legal {
  border-top: 1px solid #2E2E2E; padding-block: 16px 26px;
  font-family: var(--display); font-size: 11px; color: #8A8A8A; letter-spacing: .03em;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ── Cookie consent ──────────────────────────────────────── */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--paper); border-top: 1px solid var(--rule);
  transform: translateY(101%); transition: transform .34s cubic-bezier(.2,.7,.3,1);
  box-shadow: 0 -8px 30px rgba(20,20,20,.06);
}
.consent.is-in { transform: none; }
.consent__in { max-width: var(--w-max); margin: 0 auto; padding: 0 var(--gutter); }
.consent__rule { border-top: 3px solid var(--ink); position: relative; height: 4px; }
.consent__rule::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--ink); }
.consent__body {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 15px 0 17px; flex-wrap: wrap;
}
.consent__text { margin: 0; font-family: var(--serif); font-size: 14px; color: var(--body); max-width: 62ch; }
.consent__link { border-bottom: 1px solid var(--grey-light); padding-bottom: 1px; white-space: nowrap; }
.consent__link:hover { border-bottom-color: var(--ink); }
.consent__actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent__btn {
  font-family: var(--display); font-size: 11px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; padding: 10px 22px; border: 1px solid var(--ink); cursor: pointer;
  background: var(--paper); color: var(--ink); transition: background .15s ease, color .15s ease;
}
.consent__btn--ghost { border-color: var(--grey-light); color: var(--grey); }
.consent__btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.consent__btn--ink { background: var(--ink); color: var(--paper); }
.consent__btn--ink:hover { background: #000; }
@media (max-width: 560px) {
  .consent__body { flex-direction: column; align-items: flex-start; gap: 12px; }
  .consent__actions { width: 100%; }
  .consent__btn { flex: 1; text-align: center; }
}

/* ── Legal / privacy page ────────────────────────────────── */
.legal { max-width: var(--w-article); margin: 0 auto; padding: 40px var(--gutter) 60px; }
.legal__kicker {
  font-family: var(--display); font-size: 12px; font-weight: 800; letter-spacing: .11em;
  text-transform: uppercase; text-align: center; color: var(--grey); margin-bottom: 14px;
}
.legal__title { font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1.16; text-align: center; margin: 0 0 8px; }
.legal__sub { text-align: center; font-family: var(--display); font-size: 12px; color: var(--grey); letter-spacing: .04em; margin-bottom: 30px; }
.legal__body { font-size: 16.5px; line-height: 1.8; }
.legal__body h2 { font-family: var(--serif); font-size: 21px; margin: 34px 0 10px; padding-top: 20px; border-top: 1px solid var(--rule); }
.legal__body h2:first-of-type { border-top: 0; padding-top: 0; }
.legal__body p { margin: 0 0 14px; }
.legal__body ul { margin: 0 0 14px; padding-left: 22px; }
.legal__body li { margin-bottom: 7px; }
.legal__body a { border-bottom: 1px solid var(--grey-light); }
.legal__body a:hover { border-bottom-color: var(--ink); }
.legal__note { background: var(--wash); border: 1px solid var(--rule); padding: 16px 18px; font-size: 14.5px; margin: 8px 0 18px; }
.legal__reset {
  font-family: var(--display); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: var(--paper); border: 1px solid var(--ink); color: var(--ink); padding: 10px 20px; cursor: pointer;
}
.legal__reset:hover { background: var(--ink); color: var(--paper); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  :root { --gutter: 30px; }   /* tablet: more breathing room than the base 20px */
  .lead { grid-template-columns: 1fr; }
  .lead__main { padding-right: 0; border-right: 0; }
  .lead__aside { padding-left: 0; border-top: 3px solid var(--ink); margin-top: 26px; padding-top: 16px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  /* stack the footer so the section columns stop overflowing the right edge */
  .footer__in { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  :root { --gutter: 24px; }   /* phone: generous but not wasteful on a small screen */
  /* topbar: drop the slogan (it already sits under the logo), center the dateline */
  .topbar__in { justify-content: center; padding-block: 7px; }
  .topbar__tag { display: none; }
  .topbar__date { font-size: 10px; letter-spacing: .07em; white-space: nowrap; }
  .masthead { padding: 20px 0 16px; }
  .masthead img { height: 42px; }
  .secnav__in { justify-content: flex-start; scroll-padding-inline: var(--gutter); }
  .lead__hed { font-size: 28px; }
  .article__hed { font-size: 29px; }
  .article__dek { font-size: 16px; }
  .article__body { font-size: 16.5px; }
  .grid-3 { grid-template-columns: 1fr; }
  .sectionpage__title { font-size: 22px; }
  .footer__in { grid-template-columns: 1fr; }
  .footer__secs { grid-template-columns: repeat(2, auto); }
}
