/* Homepage only (loaded on the front page).
   Type does the work here: very large, tight headings in the site's one font, hairline lists
   instead of cards, mango used as a single full-bleed field. One motion idea throughout:
   things surface, as if from below a waterline. All motion is off for reduced-motion visitors. */

/* ---------- Shared homepage type ---------- */
.big { font-size: clamp(2.6rem, 7vw, 6.6rem); line-height: .92; letter-spacing: -.05em; font-weight: 800; max-width: 13ch; margin: 0 0 .45em; text-wrap: balance; }
.big > span { display: block; }
.intro { display: grid; gap: 4px 48px; margin-bottom: clamp(32px, 5vw, 56px); }
.intro .big { margin: 0; }
.intro p { margin: 0; max-width: 40ch; font-size: 1.05rem; color: var(--ink-2); }
@media (min-width: 900px) {
  .intro { grid-template-columns: 1fr auto; align-items: end; }
}
.more { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; white-space: nowrap; transition: color .2s ease, text-underline-offset .2s ease; }
.more:hover { color: var(--green-700); text-underline-offset: 9px; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--green-950); overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ''; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(6,42,14,.82) 0%, rgba(6,42,14,.55) 40%, rgba(6,42,14,.15) 80%),
  linear-gradient(180deg, rgba(6,42,14,.55) 0%, rgba(6,42,14,.3) 30%, rgba(6,42,14,.7) 62%, rgba(6,42,14,.96) 100%); }
.hero-inner { text-shadow: 0 1px 18px rgba(6,42,14,.45); }
.hero-inner .btn { text-shadow: none; }
.hero-inner { min-height: min(calc(100svh - 104px), 980px); display: flex; flex-direction: column; justify-content: flex-end; padding-top: 48px; padding-bottom: 28px; }
.hero-place { margin: 0 0 auto; padding-bottom: 32px; font-weight: 600; font-size: .95rem; color: rgba(255,255,255,.88); }
.hero-title { margin: 0 0 clamp(20px, 3vw, 36px); font-weight: 800; }
.hero-title .ln { display: block; overflow: clip; padding: .1em 0 .14em; margin: -.1em 0 -.14em; }
.hero-title .ln > span { display: block; }
.hero-title .ln:first-child { font-size: clamp(3.4rem, 11.5vw, 11.5rem); line-height: .86; letter-spacing: -.06em; max-width: 9ch; }
.hero-title .ln-2 { margin-top: .5em; font-size: clamp(1.35rem, 3vw, 2.7rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 600; color: rgba(255,255,255,.92); }
.hero-foot { display: grid; gap: 20px; align-items: end; }
.hero-lede { margin: 0; max-width: 50ch; font-size: clamp(1rem, 1.4vw, 1.15rem); color: rgba(255,255,255,.86); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .hero-foot { grid-template-columns: 1fr auto; gap: 48px; }
}
.hero-facts { display: grid; grid-template-columns: repeat(2, 1fr); margin: clamp(32px, 5vw, 56px) 0 0; border-top: 1px solid rgba(255,255,255,.28); }
.hero-facts div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: 16px 16px 4px 0; }
.hero-facts dt { font-size: .85rem; color: rgba(255,255,255,.75); }
.hero-facts dd { margin: 0; font-size: clamp(1.5rem, 2.8vw, 2.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (min-width: 800px) {
  .hero-facts { grid-template-columns: repeat(4, 1fr); }
  .hero-facts div + div { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.18); }
}

/* ---------- Where to start: three big rows, then the directory index ---------- */
.paths { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.paths li { border-top: 1px solid var(--line); }
.path { display: grid; grid-template-columns: 1fr 104px; grid-template-areas: 'word img' 'text img'; gap: 4px 16px; align-items: center; padding: 20px 0; color: var(--ink); text-decoration: none; }
.path-word { grid-area: word; font-size: clamp(2.6rem, 8vw, 7.4rem); font-weight: 800; line-height: .95; letter-spacing: -.055em; transition: color .3s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.path-text { grid-area: text; color: var(--ink-2); max-width: 32ch; }
.path-img { grid-area: img; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--green-100); }
.path-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
@media (min-width: 900px) {
  .path { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr) 300px; grid-template-areas: 'word text img'; gap: 32px; padding: 28px 0; }
  .path-text { font-size: 1.1rem; }
  .path-img { aspect-ratio: 16 / 10; clip-path: inset(9% 7% round 14px); transition: clip-path .6s cubic-bezier(.2,.7,.2,1); }
  .path-img img { transform: scale(1.12); }
  .path:hover .path-img, .path:focus-visible .path-img { clip-path: inset(0 round 14px); }
  .path:hover .path-img img, .path:focus-visible .path-img img { transform: scale(1); }
  .path:hover .path-word, .path:focus-visible .path-word { color: var(--green-700); transform: translateX(.08em); }
}
.path:active .path-word { color: var(--green-700); }

.index-title { margin: clamp(48px, 7vw, 80px) 0 4px; font-size: 1.1rem; }
.index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 20px; }
@media (min-width: 900px) { .index { grid-template-columns: repeat(4, 1fr); column-gap: 32px; } }
.index a { display: grid; gap: 2px; padding: 16px 0 18px; border-top: 1px solid var(--line); color: var(--ink-2); text-decoration: none; height: 100%; }
.index strong { font-size: clamp(2.1rem, 4vw, 3.4rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; transition: color .2s ease, transform .3s cubic-bezier(.2,.7,.2,1); transform-origin: left bottom; }
.index span { font-size: .95rem; line-height: 1.3; }
.index a:hover strong { color: var(--green-700); transform: translateY(-3px); }
.index a:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Statement ---------- */
.statement { padding-top: 16px; }
.tagline { margin: 0 0 clamp(36px, 5vw, 64px); max-width: 21ch; font-size: clamp(2.2rem, 5.6vw, 5.4rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; text-wrap: pretty; }
.statement-cols { display: grid; gap: 8px 64px; max-width: 1000px; }
@media (min-width: 900px) { .statement-cols { grid-template-columns: 1fr 1fr; margin-left: auto; } }
.statement-cols .lede { margin: 0; }

/* ---------- News ---------- */
.news { display: grid; gap: 32px; }
@media (min-width: 960px) { .news { grid-template-columns: 1.3fr 1fr; gap: 56px; } }
.news-feature { display: grid; gap: 10px; align-content: start; color: var(--ink); text-decoration: none; }
.news-img { display: block; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--green-100); margin-bottom: 8px; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.news-feature:hover .news-img img { transform: scale(1.04); }
.news-feature .news-title { font-size: clamp(1.6rem, 2.8vw, 2.5rem); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.news-feature:hover .news-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.news time { font-size: .85rem; font-weight: 600; color: var(--green-700); }
.news-list { list-style: none; margin: 0; padding: 0; align-self: start; }
.news-list li { border-top: 1px solid var(--line); }
.news-list li:last-child { border-bottom: 1px solid var(--line); }
.news-list a { display: grid; grid-template-columns: 1fr 112px; gap: 20px; align-items: center; padding: 20px 0; color: var(--ink); text-decoration: none; }
.news-list a > span { display: grid; gap: 6px; }
.news-list img { width: 112px; height: 84px; object-fit: cover; border-radius: 12px; background: var(--green-100); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.news-list .news-title { font-size: 1.12rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-list a:hover .news-title { text-decoration: underline; text-underline-offset: 3px; }
.news-list a:hover img { transform: scale(1.05) rotate(-1deg); }

/* ---------- Municipalities ---------- */
.towns { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .towns { grid-template-columns: .9fr 1.1fr; gap: 80px; } }
.map { position: relative; width: min(440px, 80vw); margin: 0 auto; }
.map > img { width: 100%; }
.pin { position: absolute; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; display: grid; place-items: center;
       background: var(--green-800); color: #fff; font-size: .82rem; font-weight: 800; text-decoration: none; box-shadow: 0 0 0 4px var(--bg);
       transition: transform .25s cubic-bezier(.2,.7,.2,1), background-color .2s ease, color .2s ease; }
.pin:hover { transform: scale(1.2); background: var(--mango); color: var(--green-950); }
.town-list { list-style: none; margin: 0 0 20px; padding: 0; }
.town-list li { display: grid; grid-template-columns: 40px 1fr auto; grid-template-areas: 'num name pop' 'num meta meta'; gap: 0 12px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); scroll-margin-top: 140px; transition: background-color .3s ease; }
.town-list li:last-child { border-bottom: 1px solid var(--line); }
.town-list li:target { background: var(--green-50); }
.num { grid-area: num; align-self: center; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--green-100); color: var(--green-800); font-weight: 800; font-size: .8rem; transition: background-color .2s ease, color .2s ease; }
.tname { grid-area: name; font-weight: 800; font-size: clamp(1.4rem, 2.5vw, 2.1rem); letter-spacing: -.035em; line-height: 1.15; }
.tpop { grid-area: pop; color: var(--muted); font-size: .9rem; text-align: right; }
.tpop strong { color: var(--ink); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tmeta { grid-area: meta; color: var(--muted); font-size: .88rem; }
/* Hovering a municipality in the list highlights its pin, and the other way round. */
.towns:has(.t-1:hover) .pin-1, .towns:has(.t-2:hover) .pin-2, .towns:has(.t-3:hover) .pin-3,
.towns:has(.t-4:hover) .pin-4, .towns:has(.t-5:hover) .pin-5 { transform: scale(1.3); background: var(--mango); color: var(--green-950); }
.town-list li:hover .num,
.towns:has(.pin-1:hover) .t-1 .num, .towns:has(.pin-2:hover) .t-2 .num, .towns:has(.pin-3:hover) .t-3 .num,
.towns:has(.pin-4:hover) .t-4 .num, .towns:has(.pin-5:hover) .t-5 .num { background: var(--mango); color: var(--green-950); }
.total { font-size: .95rem; color: var(--ink-2); margin-bottom: 24px; max-width: 52ch; }

/* ---------- By the numbers: the one mango field ---------- */
.numbers { padding: clamp(64px, 9vw, 120px) 0; background: var(--mango); color: var(--green-950); }
.numbers .intro p { color: var(--green-900); }
.figures { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 20px; margin: 0; }
@media (min-width: 900px) { .figures { grid-template-columns: repeat(4, 1fr); column-gap: 32px; } }
.figures div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 18px 0 28px; border-top: 2px solid var(--green-950); }
.figures dd { margin: 0; font-size: clamp(2.2rem, 4.2vw, 4.1rem); font-weight: 800; letter-spacing: -.055em; line-height: .95; font-variant-numeric: tabular-nums; }
.figures dt { font-size: .98rem; font-weight: 600; line-height: 1.3; max-width: 22ch; }

/* ---------- Ease of doing business ---------- */
.edb { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .edb { grid-template-columns: 1fr 1fr; gap: 80px; } }
.edb-media { display: block; border-radius: 22px; overflow: hidden; }
.edb-media img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; }
.checks { list-style: none; margin: 8px 0 32px; padding: 0; }
.checks li { position: relative; padding: 14px 0 14px 38px; border-top: 1px solid var(--line); color: var(--ink-2); }
.checks li:last-child { border-bottom: 1px solid var(--line); }
.checks li::before { content: ''; position: absolute; left: 0; top: 17px; width: 22px; height: 22px; border-radius: 50%;
                     background: var(--green-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.checks strong { color: var(--ink); }

/* ---------- Attractions rail (swipe on phones, scroll on desktop) ---------- */
.rail { list-style: none; margin: 0; padding: 4px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 24px; display: grid; grid-auto-flow: column; grid-auto-columns: min(72vw, 320px); gap: 24px;
        overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); scrollbar-width: thin; }
.rail li { scroll-snap-align: start; }
.spot { display: grid; gap: 4px; color: var(--ink); text-decoration: none; }
.spot-img { display: block; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: var(--green-100); margin-bottom: 10px; }
.spot-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.spot:hover .spot-img img { transform: scale(1.06); }
.spot-name { font-weight: 800; font-size: 1.3rem; letter-spacing: -.025em; line-height: 1.15; }
.spot:hover .spot-name { text-decoration: underline; text-underline-offset: 4px; }
.spot-loc { font-size: .9rem; color: var(--muted); }

/* ---------- Manggahan ---------- */
.fest { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .fest { grid-template-columns: 1fr 1.1fr; gap: 80px; } }
.when { margin: -8px 0 18px; font-weight: 700; color: var(--green-700); }
.fest-media { position: relative; padding-bottom: 18%; }
.fest-media .f1 { display: block; width: 82%; border-radius: 22px; overflow: hidden; }
.fest-media .f1 img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; }
.fest-media .f2 { position: absolute; right: 0; bottom: 0; width: 48%; border-radius: 18px; overflow: hidden; outline: 6px solid var(--bg); }
.fest-media .f2 img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Closing ---------- */
.closing { padding: clamp(64px, 9vw, 128px) 0 clamp(72px, 10vw, 140px); border-top: 1px solid var(--line); }
.closing .big { max-width: 15ch; font-size: clamp(2.8rem, 8vw, 7.6rem); }
.closing-foot { display: grid; gap: 24px; align-items: end; }
.closing-foot p { margin: 0; max-width: 46ch; font-size: 1.1rem; color: var(--ink-2); }
@media (min-width: 900px) { .closing-foot { grid-template-columns: 1fr auto; gap: 48px; } }

/* ---------- Motion ---------- */
@keyframes surface { from { transform: translateY(108%); } }
@keyframes appear { from { opacity: 0; transform: translateY(12px); } }
@keyframes settle { from { transform: scale(1.14); filter: brightness(.6); } }
@keyframes unveil { from { clip-path: inset(35% 0 0 0); transform: scale(1.15); } }
@keyframes fill { to { background-size: 100% 100%, auto; } }

@media (prefers-reduced-motion: no-preference) {
  /* Page load: the photo settles, the headline surfaces, the rest follows. */
  .hero-media img { animation: settle 2.6s cubic-bezier(.2,.7,.2,1) both; }
  .hero-title .ln > span { animation: surface 1.1s cubic-bezier(.16,1,.3,1) .15s both; }
  .hero-title .ln-2 > span { animation-delay: .3s; }
  .hero-place { animation: appear .8s ease-out .45s both; }
  .hero-foot { animation: appear .8s ease-out .6s both; }
  .hero-facts { animation: appear .8s ease-out .75s both; }

  /* While scrolling. Browsers without scroll-driven animations simply show everything. */
  @supports (animation-timeline: view()) {
    /* Big headings surface as they come into view. */
    .big { overflow: clip; padding: .1em 0 .14em; margin-top: -.1em; view-timeline: --big; }
    .intro .big { margin-bottom: -.14em; }
    .big > span { animation: surface linear both; animation-timeline: --big; animation-range: entry 0% entry 90%; }

    /* The statement fills in, line by line, as it scrolls past. */
    .tagline { view-timeline: --tag; }
    .tagline .fill { color: transparent; -webkit-background-clip: text; background-clip: text;
      background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(rgba(15,26,18,.16), rgba(15,26,18,.16));
      background-size: 0% 100%, auto; background-repeat: no-repeat;
      animation: fill linear both; animation-timeline: --tag; animation-range: cover 15% cover 60%; }

    /* Large photos rise into their frames. */
    .unveil { view-timeline: --unveil; }
    .unveil img { animation: unveil linear both; animation-timeline: --unveil; animation-range: entry 0% entry 80%; }

    /* Directory and figure rows lift in turn. */
    .index li, .figures div { view-timeline: --row; }
    .index a, .figures div > * { animation: appear linear both; animation-timeline: --row; animation-range: entry 10% entry 90%; }
  }
}
