:root {
  color-scheme: light;
  --ink: #2b201c;
  --muted: #5e4c44;
  --red: #a10000;
  --paper: #faf5ef;
  --shell: #f2d2cc;
  --sage: #dce9e3;
  --butter: #f6e3ae;
  --radius: clamp(24px, 3vw, 44px);
  --gap: clamp(12px, 1.18vw, 18px);
  --pad: clamp(22px, 4vw, 65px);
  --ease: cubic-bezier(.23, 1, .32, 1);
  font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-block-start: 130px; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.53; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 30; padding: 12px 24px; background: white; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.frame { width: min(100% - clamp(26px, 6vw, 98px), 1392px); margin-inline: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.06; letter-spacing: -.038em; }
h1 { font-size: clamp(40px, 5.15vw, 82px); font-weight: 720; }
h2 { font-size: clamp(32px, 4vw, 58px); font-weight: 710; }
h3 { font-size: clamp(21px, 2vw, 28px); font-weight: 700; }
h1 em { color: var(--red); font-style: normal; }
p { text-wrap: pretty; }
.ruby { background: var(--red); color: white; }
.shell { background: var(--shell); }
.sage { background: var(--sage); }
.butter { background: var(--butter); }
.white { background: white; }
.panel { border-radius: var(--radius); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 45px; padding: .63rem 1.08rem; border: 1px solid transparent;
  border-radius: 100vw; font-size: 14px; font-weight: 700; line-height: 1.2; text-decoration: none;
  transition: box-shadow 170ms var(--ease), transform 170ms var(--ease);
}
.button:hover { box-shadow: 0 4px 12px #2b201c20; }
.button:active { transform: scale(.97); }
.button.primary { background: var(--red); color: white; }
.button.outline { border-color: var(--red); color: var(--red); }
.button.light { background: white; color: var(--red); }
.text-link { color: var(--red); background: none; border: 0; padding: 0; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.wordmark { display: block; min-width: 0; width: min(225px, 56vw); aspect-ratio: 960 / 194; background: var(--red); mask: url("media/emdc-wordmark.webp") center / contain no-repeat; }
.site-header {
  position: sticky; top: 8px; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 15px;
  margin-block: 18px var(--gap); padding: 9px 12px 9px 23px; background: white;
  border: 1px solid #2b201c13; border-radius: 36px; min-height: 65px;
}
.nav-links, .header-actions { display: flex; align-items: center; gap: clamp(9px, 1.4vw, 22px); }
.nav-links a { font-size: 14px; font-weight: 680; text-decoration: none; }
.nav-links a:is(:hover, [aria-current=page]) { color: var(--red); text-decoration: underline; }
.header-actions { gap: 12px; }
.header-actions .button { white-space: nowrap; }
.branch-menu { position: relative; }
.branch-menu summary { display: flex; gap: 6px; align-items: center; min-height: 44px; font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; }
.branch-menu summary::-webkit-details-marker { display: none; }
.branch-menu div { position: absolute; z-index: 1; right: 0; min-width: 160px; padding: 7px; border-radius: 14px; border: 1px solid #2b201c26; box-shadow: 0 7px 22px #2b201c1c; background: white; }
.branch-menu a { display: block; padding: 7px 9px; font-size: 14px; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 3.25fr) minmax(0, 1fr); gap: var(--gap); }
.hero { display: grid; align-items: center; min-height: clamp(405px, 38vw, 545px); isolation: isolate; position: relative; overflow: hidden; }
.hero-copy { position: relative; z-index: 1; width: 64%; padding: var(--pad); }
.hero h1 { font-size: clamp(37px, 4.94vw, 77px); }
.hero p { max-width: 34ch; margin-block: 20px 23px; font-size: clamp(16px, 1.4vw, 19px); }
.hero-portrait { position: absolute; right: 0; bottom: 0; width: auto; height: 100%; max-width: 50%; object-fit: contain; object-position: right bottom; }
.hero-davao .hero-portrait { width: 54%; max-width: 54%; height: 100%; object-fit: cover; object-position: center; mask-image: linear-gradient(90deg,transparent 0%, #000 36%); }
.hero-side { display: grid; gap: var(--gap); grid-template-rows: 1.3fr .8fr; }
.hero-side > * { min-width: 0; border-radius: var(--radius); }
.prep-tile { display: grid; align-content: start; padding: 10px; text-decoration: none; }
.tile-photo { overflow: hidden; border-radius: calc(var(--radius) - 9px); aspect-ratio: 1.4; }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 350ms var(--ease); }
.prep-tile:hover img, .card-photo:hover img { transform: scale(1.055); }
.prep-tile strong { padding: 13px 10px; font-size: clamp(16px, 1.55vw, 22px); line-height: 1.1; letter-spacing: -.03em; }
.prep-tile:hover strong { text-decoration: underline; }
.hours-tile { padding: clamp(18px, 2vw, 29px); display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.hours-tile h2 { font-size: 14px; letter-spacing: 0; }
.hours-tile strong { font-size: clamp(24px, 2.7vw, 40px); line-height: 1.13; letter-spacing: -.045em; }
.hours-tile div { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 4px; font-size: 14px; }
.hours-tile a { min-height: 30px; display: inline-flex; align-items: center; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-block: var(--gap); }
.quick-card { display: grid; align-content: space-between; gap: 14px; padding: clamp(19px, 2.2vw, 31px); min-height: 155px; border-radius: var(--radius); text-decoration: none; }
.quick-card h2 { font-size: clamp(22px, 2.2vw, 34px); }
.quick-card:hover h2 { text-decoration: underline; }
.quick-card p { max-width: 34ch; }

.section { margin-block: clamp(37px, 6.1vw, 96px); }
.section.panel { padding: var(--pad); }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(19px, 2.7vw, 35px); }
.section-title p, .split > div:first-child > p { margin-top: 12px; max-width: 53ch; }
.finder-controls { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 22px; margin-bottom: 16px; }
.find-field { display: grid; gap: 6px; }
.find-field label, .count { font-size: 13px; color: var(--muted); font-weight: 650; }
.find-field input { min-height: 52px; width: 100%; background: white; color: var(--ink); border: 1px solid #2b201c42; border-radius: 16px; padding: 10px 15px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filters button { border: 1px solid #2b201c38; border-radius: 999px; padding: 8px 15px; min-height: 44px; background: white; color: var(--ink); font-size: 14px; font-weight: 650; }
.filters button[aria-pressed=true] { background: var(--red); border-color: var(--red); color: white; }
.count { grid-column: 1 / -1; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.service-card { display: flex; flex-direction: column; padding: 9px; border-radius: 26px; background: white; }
.card-photo { display: block; overflow: hidden; border-radius: 18px; aspect-ratio: 1.8; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 320ms var(--ease); }
.service-card > div { flex: 1; display: flex; flex-direction: column; padding: 14px clamp(9px, 1.45vw, 20px) 16px; }
.service-card h3 a { text-decoration: none; }
.service-card h3 a:hover { text-decoration: underline; }
.service-card p { margin-block: 10px 14px; }
.service-card .text-link { margin-top: auto; font-size: 14px; width: fit-content; }
.empty { padding: 29px; border: 1px solid #2b201c31; border-radius: 18px; }
.empty p { margin: 9px 0 15px; }
.chapter { overflow: hidden; }
.visit-scene { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); min-height: 400px; }
.chapter-photo, .frame-photo { overflow: hidden; }
.chapter-photo img, .frame-photo img { width: 100%; height: 100%; object-fit: cover; }
.chapter-copy { display: grid; align-content: center; justify-items: start; gap: 17px; padding: var(--pad); }
.chapter-copy p { max-width: 46ch; font-size: clamp(16px, 1.4vw, 19px); }
.scene-controls { display: flex; flex-wrap: wrap; gap: 8px; padding: 11px var(--pad); border-top: 1px solid #ffffff60; }
.scene-controls button { min-height: 44px; padding: 7px 14px; border: 1px solid #ffffff85; border-radius: 999px; background: transparent; color: white; font-size: 14px; font-weight: 700; }
.scene-controls button[aria-pressed=true] { background: white; color: var(--red); }
.split { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1fr); align-items: center; gap: clamp(20px, 4.5vw, 80px); }
.split .frame-photo, .detail-hero .frame-photo { aspect-ratio: 1.45; }
.frame-photo { border-radius: calc(var(--radius) - 8px); }
.frame-photo.tall { aspect-ratio: 1.05; }
.split > div:first-child > .button { margin-top: 19px; }
.faq-section { align-items: start; }
.accordion { display: grid; gap: 8px; }
.accordion details { background: white; border-radius: 17px; border: 1px solid #2b201c1f; }
.accordion summary { display: flex; gap: 14px; justify-content: space-between; align-items: baseline; cursor: pointer; list-style: none; padding: 15px 18px; font-size: 17px; font-weight: 700; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary span::after { content: '+'; color: var(--red); font-size: 20px; }
.accordion details[open] summary span::after { content: '−'; }
.accordion details > div { padding: 0 18px 17px; max-width: 72ch; }
.clinic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.clinic-card { display: grid; justify-items: start; align-content: start; gap: 10px; padding: clamp(18px, 2.5vw, 32px); background: white; border-radius: 23px; }
.clinic-card .hours-line strong { color: var(--red); }
.clinic-card .hours-line span { margin-left: 6px; font-size: 14px; color: var(--muted); }
.phone-list { display: flex; gap: 5px 15px; flex-wrap: wrap; padding: 0; margin: 2px 0; list-style: none; }
.phone-list a { display: inline-flex; min-height: 32px; align-items: center; }
.branch-filters { margin-bottom: 14px; }
.checklist { display: grid; gap: 8px; margin-top: 19px; }
.checklist label { display: flex; gap: 10px; align-items: start; background: white; border: 1px solid #2b201c1f; border-radius: 14px; padding: 11px 13px; min-height: 45px; cursor: pointer; }
.checklist input { margin-top: 4px; accent-color: var(--red); width: 17px; height: 17px; flex: none; }
.checklist button { width: fit-content; min-height: 44px; }
.page-hero, .detail-hero { padding: var(--pad); }
.page-hero h1, .detail-hero h1 { font-size: clamp(37px, 4.8vw, 70px); text-wrap: balance; }
.page-hero p, .detail-hero p { max-width: 58ch; margin-top: 15px; font-size: clamp(16px, 1.6vw, 21px); }
.page-hero .actions, .detail-hero .actions { margin-top: 20px; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(17px, 4vw, 55px); align-items: center; }
.reading-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.65fr); align-items: start; gap: clamp(20px, 5vw, 70px); }
.prose { max-width: 72ch; }
.prose section + section { margin-top: 26px; padding-top: 24px; border-top: 1px solid #2b201c26; }
.prose h2, .prep-notes h2 { font-size: clamp(24px, 2.5vw, 37px); letter-spacing: -.033em; }
.prose h2 + p, .prose .button + p, .prose p + a { margin-top: 10px; }
.prep-notes { padding: clamp(19px, 3vw, 38px); }
.prep-notes ol { padding-left: 20px; }
.prep-notes li + li { margin-top: 10px; }
.prep-notes p { margin-block: 9px 15px; }
.policy { margin-inline: auto; }
.source-links a { display: block; width: fit-content; margin-top: 10px; color: var(--red); overflow-wrap: anywhere; }
.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.event-card { overflow: hidden; }
.event-card img { width: 100%; height: 260px; object-fit: contain; background: var(--sage); }
.event-card > div { padding: clamp(17px, 3vw, 34px); }
.event-card h2 { font-size: clamp(25px, 3vw, 39px); margin-block: 7px 10px; }
.event-card h2 a { text-decoration: none; }
.event-card h2 a:hover { text-decoration: underline; }
.event-card time, .event-story time { display: block; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.event-card .text-link { display: inline-block; margin-top: 12px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 18px; }
.gallery a { display: block; overflow: hidden; border-radius: 22px; background: white; }
.gallery img { width: 100%; aspect-ratio: 1.4; object-fit: contain; }
.gallery figcaption, .marks figcaption, .photo-credit { color: var(--muted); font-size: 14px; margin-top: 8px; }
.image-label { display: block; padding: 9px 15px; color: var(--red); font-weight: 700; }
.photo-dialog { width: min(940px,calc(100% - 28px)); max-height: 90dvh; border: 1px solid #2b201c35; border-radius: 21px; padding: clamp(13px, 2vw, 26px); color: var(--ink); }
.photo-dialog::backdrop { background: #2b201ccc; }
.photo-dialog > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.photo-dialog h2 { font-size: 24px; }
.photo-dialog button { border: 1px solid var(--red); border-radius: 999px; background: white; color: var(--red); padding: 8px 14px; min-height: 44px; }
.photo-dialog img { width: 100%; max-height: 68dvh; object-fit: contain; }
.photo-dialog p { margin-top: 9px; }
.credential-list { display: grid; gap: 11px; margin-block: 18px; max-width: 75ch; }
.marks img { max-height: 110px; object-fit: contain; object-position: left; }
.four-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.four-grid article { padding-top: 15px; border-top: 1px solid #ffffff70; }
.four-grid p { margin-top: 8px; }
.reporting .button { margin-top: 23px; }
.footer { background: var(--red); color: white; border-radius: var(--radius); padding: var(--pad); margin-block: 20px 80px; }
.footer .wordmark { background: white; margin-bottom: 11px; }
.footer-grid, .footer-lead, .footer-bottom { display: flex; gap: 16px clamp(20px, 5vw, 90px); flex-wrap: wrap; }
.footer-lead { justify-content: space-between; align-items: end; }
.footer-grid { margin-top: 24px; padding-block: 22px; border-block: 1px solid #ffffff60; }
.footer-grid > div { min-width: 125px; }
.footer-grid h3 { font-size: 16px; margin-bottom: 8px; letter-spacing: 0; }
.footer-grid a:not(.wordmark) { display: block; width: fit-content; margin-top: 4px; }
.footer-bottom { padding-top: 16px; font-size: 14px; }
.messenger { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 11; padding: 10px 15px; min-height: 48px; min-width: 48px; background: white; border: 1px solid #a1000050; color: var(--red); border-radius: 999px; font-size: 14px; font-weight: 700; box-shadow: 0 4px 18px #2b201c2b; }
.messenger:hover { text-decoration: underline; }
.chat-icon { width: 16px; height: 13px; border: 2px solid currentColor; border-radius: 9px 9px 9px 3px; }

@media (prefers-reduced-motion: no-preference) {
  :is(.hero-copy, .page-hero, .detail-hero > div:first-child) > :is(h1, p) { animation: arrive 630ms var(--ease) backwards; }
  :is(.hero-copy, .page-hero, .detail-hero > div:first-child) > p { animation-delay: 55ms; }
  .detail-hero .frame-photo { animation: arrive 700ms var(--ease) backwards; }
  .hero-portrait { animation: portrait 850ms var(--ease) both; }
  [data-visit-scenes][data-entered] .visit-scene:not([hidden]) .chapter-copy { animation: chapter-fade 460ms var(--ease) both; }
  @keyframes chapter-fade { from { opacity: .64; } to { opacity: 1; } }
  @keyframes arrive { from { transform: translateY(14px); opacity: .67; } to { transform: translateY(0); opacity: 1; } }
  @keyframes portrait { from { transform: translateY(17px) scale(1.015); opacity: .7; } to { transform: translateY(0) scale(1); opacity: 1; } }
  @supports (animation-timeline: view()) {
    .depth-image { animation: dolly linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    @keyframes dolly { from { transform: scale(1.09) translateY(3%); } to { transform: scale(1.09) translateY(-3%); } }
  }
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .tile-photo img, .card-photo img { transition: none; transform: none !important; }
}
@media (max-width: 1080px) {
  .site-header { gap: 9px; }
  .site-header .wordmark { width: min(190px, 44vw); }
  .hero-copy { width: 67%; }
  .hero-portrait { max-width: 46%; }
  .finder-controls { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
  html { scroll-padding-block-start: 105px; }
  .site-header { position: relative; top: 0; flex-wrap: wrap; padding: 10px 13px; border-radius: 24px; }
  .nav-links { order: 3; flex: 1 0 100%; gap: 4px 12px; justify-content: space-around; flex-wrap: wrap; }
  .nav-links a { min-height: 34px; display: inline-flex; align-items: center; font-size: 13px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero { min-height: 400px; }
  .hero-side { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto; }
  .tile-photo { aspect-ratio: 2.2; }
  .service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .four-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 610px) {
  html { scroll-padding-block-start: 20px; }
  .frame { width: calc(100% - 24px); }
  .site-header .wordmark { width: min(187px, 43vw); }
  .header-actions { gap: 7px; }
  .header-actions .button { padding-inline: .72rem; font-size: 12px; }
  .branch-menu summary { font-size: 13px; }
  .hero { min-height: auto; }
  .hero-copy { width: 100%; padding: 26px 23px 10px; }
  .hero h1 { font-size: clamp(34px,9.4vw,53px); }
  .hero p { margin-block: 13px 17px; }
  .hero-portrait { position: static; max-width: none; justify-self: end; }
  .hero:not(.hero-davao) { min-height: 390px; }
  .hero:not(.hero-davao) .hero-copy {
    grid-area: 1 / 1;
    align-self: start;
    width: 52%;
    padding: clamp(24px, 10vw, 60px) 5px 24px clamp(17px, 4vw, 24px);
  }
  .hero:not(.hero-davao) h1 { font-size: clamp(28px, 6vw, 39px); }
  .hero:not(.hero-davao) .actions { gap: 12px; }
  .hero:not(.hero-davao) .actions .button { min-height: 48px; padding-inline: 10px; }
  .hero:not(.hero-davao) .actions .outline { background: var(--shell); }
  .hero:not(.hero-davao) .hero-portrait {
    grid-area: 1 / 1;
    align-self: end;
    width: 84%;
    height: auto;
    margin-inline-end: -14%;
    margin-block-end: -7vw;
    pointer-events: none;
  }
  .hero-davao .hero-portrait { width: 100%; max-width: 100%; height: 218px; mask-image: none; margin-top: 9px; }
  .hero-side { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .prep-tile strong { padding: 9px 4px 5px; }
  .hours-tile { padding: 13px; }
  .tile-photo { aspect-ratio: 1.7; }
  .quick-grid, .clinic-grid, .event-grid, .reading-grid, .split, .visit-scene, .detail-hero, .gallery { grid-template-columns: 1fr; }
  .quick-card { min-height: 119px; }
  .service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .service-card { padding: 6px; border-radius: 18px; }
  .card-photo { border-radius: 13px; aspect-ratio: 1.24; }
  .service-card h3 { font-size: 17px; }
  .service-card p { font-size: 13px; }
  .service-card .text-link { font-size: 12px; }
  .chapter-photo { height: 232px; }
  .visit-scene { min-height: 0; }
  .clinic-card { gap: 9px; }
  .messenger { padding: 10px 12px; right: max(12px,env(safe-area-inset-right)); bottom: max(12px,env(safe-area-inset-bottom)); }
  .messenger > span:last-child { clip-path: inset(50%); position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
}
@media (max-width: 360px) {
  .header-actions .button { font-size: 11px; }
  .service-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-inline: 18px; }
  .hours-tile strong { font-size: 22px; }
}
