:root {
  --navy: #102a43;
  --navy-deep: #091d30;
  --parchment: #f3ebdd;
  --parchment-light: #fbf7ef;
  --terracotta: #b84f30;
  --terracotta-dark: #8f351e;
  --sage: #70866a;
  --ivory: #fffdf7;
  --border: #d8cdbb;
  --ink: #1d242b;
  --muted: #625e56;
  --display: "Century Expanded", "Times New Roman", serif;
  --body: "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  background: var(--parchment-light);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input,
textarea {
  font: inherit;
}

::selection {
  background: var(--terracotta);
  color: var(--ivory);
}

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ivory);
  color: var(--navy);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1320px, calc(100% - 64px));
  margin-inline: auto;
}

.utility-bar {
  background: var(--navy-deep);
  color: var(--ivory);
  font-size: 14px;
}

.utility-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.utility-inner p {
  margin: 0;
  letter-spacing: 0.02em;
}

.utility-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.utility-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}

.emergency-link {
  gap: 7px;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 235, 221, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--navy);
}

.brand > span:last-child {
  display: grid;
}

.brand small,
.brand em {
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-style: normal;
}

.brand strong {
  font-family: var(--display);
  font-stretch: expanded;
  font-size: clamp(20px, 2vw, 29px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.official-seal {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(16, 42, 67, 0.12));
}

.seal {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  position: relative;
  display: grid;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--parchment), inset 0 0 0 5px var(--navy);
  overflow: hidden;
}

.seal-star {
  position: absolute;
  top: 4px;
  font-size: 11px;
}

.seal-field {
  padding-top: 10px;
  font-family: var(--display);
  font-size: 30px;
}

.seal-rays {
  position: absolute;
  width: 50px;
  height: 18px;
  bottom: 5px;
  border-top: 1px solid var(--navy);
  background: repeating-linear-gradient(
    165deg,
    transparent 0 5px,
    var(--navy) 6px 7px
  );
  border-radius: 50%;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 42px);
}

.desktop-nav a {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  font-size: 18px;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 2px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease-out;
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
}

.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  padding: 34px 0 52px;
  overflow: hidden;
  background:
    linear-gradient(rgba(243, 235, 221, 0.94), rgba(243, 235, 221, 0.94)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(16, 42, 67, 0.035) 3px 4px);
  border-bottom: 1px solid var(--border);
}

.paper-texture {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(115, 79, 39, 0.15) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 55%, rgba(115, 79, 39, 0.12) 0 1px, transparent 1px);
  background-size: 23px 27px, 31px 29px;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(390px, 0.78fr) minmax(560px, 1.22fr);
  gap: 54px;
  align-items: center;
}

.hero-copy {
  padding: 36px 0 44px;
  animation: rise-in 500ms ease-out both;
}

.eyebrow,
.kicker {
  margin: 0 0 18px;
  color: var(--terracotta-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 46px;
  height: 1px;
  background: var(--terracotta);
}

.hero h1 {
  margin: 0;
  color: var(--navy);
  font-family: var(--display);
  font-size: clamp(50px, 5.2vw, 78px);
  font-stretch: expanded;
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hero-lede {
  max-width: 560px;
  margin: 30px 0 0;
  padding-top: 26px;
  border-top: 2px solid var(--terracotta);
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 24px;
  border: 2px solid;
  border-radius: 6px;
  font-weight: 700;
  transition:
    transform 180ms ease-out,
    color 180ms ease-out,
    background 180ms ease-out;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: var(--ivory);
  box-shadow: inset 0 0 0 2px var(--terracotta), inset 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.button-primary:hover {
  border-color: var(--terracotta-dark);
  background: var(--terracotta-dark);
}

.button-secondary {
  border-color: var(--terracotta);
  background: transparent;
  color: var(--terracotta-dark);
}

.button-secondary:hover {
  background: var(--ivory);
}

.hero-image-frame {
  position: relative;
  height: 476px;
  margin: 0;
  padding: 7px;
  border: 1px solid #9a7a51;
  box-shadow: 0 20px 45px rgba(16, 42, 67, 0.14);
  animation: fade-in 620ms 120ms ease-out both;
}

.hero-image-frame::before,
.hero-image-frame::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--terracotta);
}

.hero-image-frame::before {
  top: -5px;
  left: -5px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.hero-image-frame::after {
  right: -5px;
  bottom: -5px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.hero-image {
  position: relative;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(16, 42, 67, 0.04), rgba(16, 42, 67, 0.18)),
    linear-gradient(120deg, #a9b9bf 0%, #d7d5b7 38%, #738b5d 65%, #354936 100%);
  background-image:
    linear-gradient(180deg, rgba(16, 42, 67, 0.02), rgba(16, 42, 67, 0.16)),
    url("malasiqui-hero.png");
  background-size: cover;
  background-position: center;
}

.mayor-portrait {
  position: absolute;
  z-index: 4;
  top: -24px;
  right: -22px;
  width: clamp(190px, 18vw, 238px);
  padding: 7px;
  background: var(--ivory);
  border: 1px solid #9a7a51;
  box-shadow: 0 18px 38px rgba(9, 29, 48, 0.28);
}

.mayor-portrait::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgba(255, 253, 247, 0.75);
}

.mayor-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: cover;
  object-position: 50% 26%;
}

.mayor-portrait figcaption {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1px;
  padding: 11px 12px 10px;
  background: var(--navy);
  color: var(--ivory);
  line-height: 1.25;
}

.mayor-portrait small {
  color: #e1a68f;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.mayor-portrait strong {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 400;
}

.image-label {
  position: absolute;
  right: 14px;
  bottom: 14px;
  max-width: 290px;
  padding: 7px 11px;
  background: rgba(9, 29, 48, 0.86);
  color: var(--ivory);
  font-size: 12px;
  line-height: 1.25;
}

.map-lines {
  position: absolute;
  pointer-events: none;
  opacity: 0.11;
  background:
    repeating-radial-gradient(
      ellipse at 10% 50%,
      transparent 0 18px,
      var(--navy) 19px 20px,
      transparent 21px 30px
    );
}

.map-lines-left {
  left: -140px;
  bottom: -130px;
  width: 520px;
  height: 520px;
  transform: rotate(20deg);
}

.map-lines-image {
  top: 7px;
  right: 7px;
  width: 42%;
  height: 42%;
  opacity: 0.22;
}

.compass {
  position: absolute;
  right: 34px;
  bottom: 32px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: start center;
  border: 1px solid rgba(255, 253, 247, 0.8);
  border-radius: 50%;
  color: var(--ivory);
  font-size: 11px;
}

.compass::before,
.compass::after,
.compass i::before,
.compass i::after {
  content: "";
  position: absolute;
  background: rgba(255, 253, 247, 0.75);
}

.compass::before {
  top: 8px;
  bottom: 8px;
  width: 1px;
}

.compass::after {
  top: 26px;
  right: 8px;
  left: 8px;
  height: 1px;
}

.compass i::before {
  top: 25px;
  left: 11px;
  width: 32px;
  height: 1px;
  transform: rotate(45deg);
}

.compass i::after {
  top: 25px;
  left: 11px;
  width: 32px;
  height: 1px;
  transform: rotate(-45deg);
}

.quick-services {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.quick-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 2px solid var(--navy);
  border-radius: 9px;
  background: var(--ivory);
  box-shadow: 0 5px 0 rgba(16, 42, 67, 0.09);
  transition:
    transform 180ms ease-out,
    box-shadow 180ms ease-out;
}

.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 11px 0 rgba(16, 42, 67, 0.1);
}

.service-mark {
  width: 54px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--navy);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.quick-card-copy {
  min-width: 0;
  display: grid;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.quick-card-copy small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quick-card-copy strong {
  color: var(--navy);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.08;
}

.circle-arrow {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--ivory);
  font-size: 21px;
  transition: transform 180ms ease-out;
}

.quick-card:hover .circle-arrow {
  transform: translateX(4px);
}

.section {
  padding: 110px 0;
}

.section-heading {
  margin-bottom: 56px;
}

.split-heading {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 80px;
  align-items: end;
}

.section-heading h2,
.government-intro h2,
.discover-story h2,
.contact-section h2 {
  max-width: 820px;
  margin: 0;
  color: var(--navy);
  font-family: var(--display);
  font-size: clamp(42px, 5vw, 68px);
  font-stretch: expanded;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.section-heading > p,
.split-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.services-section {
  background: var(--parchment-light);
}

.service-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.service-feature {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 253, 247, 0.55);
}

.card-number {
  color: var(--terracotta);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.service-feature p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.service-feature h3,
.more-services h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.05;
}

.service-feature .service-summary {
  margin: 20px 0 28px;
  font-size: 16px;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0;
}

.service-feature a,
.story-links a,
.text-link,
.transparency-note a {
  color: var(--terracotta-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(184, 79, 48, 0.35);
  text-underline-offset: 5px;
}

.service-feature a span,
.story-links a span,
.text-link span {
  display: inline-block;
  transition: transform 180ms ease-out;
}

.service-feature a:hover span,
.story-links a:hover span,
.text-link:hover span {
  transform: translateX(4px);
}

.more-services {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 90px;
  margin-top: 90px;
}

.more-services-intro > p:last-child {
  color: var(--muted);
}

.more-services-list {
  border-top: 1px solid var(--navy);
}

.more-services-list details {
  border-bottom: 1px solid var(--border);
}

.more-services-list summary {
  min-height: 72px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  cursor: pointer;
  color: var(--navy);
  font-family: var(--display);
  font-size: 24px;
  list-style: none;
}

.more-services-list summary::-webkit-details-marker,
.barangay-list summary::-webkit-details-marker,
.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.more-services-list summary > span {
  color: var(--terracotta);
  font-family: var(--body);
  font-size: 12px;
}

.more-services-list summary i {
  font-family: var(--body);
  font-size: 26px;
  font-style: normal;
  transition: transform 180ms ease-out;
}

.more-services-list details[open] summary i {
  transform: rotate(45deg);
}

.more-services-list details > p {
  margin: -6px 44px 22px 46px;
  color: var(--muted);
}

.facts-band {
  padding: 42px 0;
  background: var(--terracotta);
  color: var(--ivory);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.facts-grid div {
  display: grid;
  gap: 4px;
  padding: 8px 26px;
  border-right: 1px solid rgba(255, 253, 247, 0.35);
}

.facts-grid div:first-child {
  padding-left: 0;
}

.facts-grid div:last-child {
  border-right: 0;
}

.facts-grid strong {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.facts-grid span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.government-section {
  background: var(--parchment);
}

.government-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 76px 90px;
}

.government-intro {
  align-self: start;
  position: sticky;
  top: 150px;
}

.government-intro h2 {
  font-size: clamp(42px, 4.5vw, 62px);
}

.government-intro > p:not(.kicker) {
  max-width: 510px;
  color: var(--muted);
  font-size: 18px;
}

.leadership-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  background: var(--ivory);
}

.leader {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 34px;
  border-right: 1px solid var(--border);
}

.leader:last-child {
  border-right: 0;
}

.leader-monogram {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid var(--navy);
  border-radius: 50%;
  background: var(--parchment);
  color: var(--navy);
  font-family: var(--display);
  font-size: 28px;
}

.leader small {
  color: var(--terracotta-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.leader h3 {
  margin: 7px 0 0;
  color: var(--navy);
  font-family: var(--display);
  font-size: 29px;
  font-weight: 400;
  line-height: 1.1;
}

.council-card {
  grid-column: 2;
}

.council-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--navy);
}

.council-heading .kicker {
  margin-bottom: 6px;
}

.council-heading h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--display);
  font-size: 40px;
  font-weight: 400;
}

.council-heading > span {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.council-card ol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.council-card li {
  display: grid;
  gap: 2px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}

.council-card li span {
  color: var(--navy);
}

.council-card li small {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.transparency-section {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--ivory);
}

.transparency-section::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  opacity: 0.08;
  border: 1px solid var(--ivory);
  border-radius: 50%;
  box-shadow:
    0 0 0 40px transparent,
    0 0 0 41px var(--ivory),
    0 0 0 85px transparent,
    0 0 0 86px var(--ivory);
}

.transparency-section .shell {
  position: relative;
  z-index: 2;
}

.transparency-heading {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: end;
}

.kicker-light {
  color: #e7a187;
}

.transparency-heading h2,
.contact-section h2 {
  color: var(--ivory);
}

.transparency-heading > p {
  color: #d4dbe0;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 253, 247, 0.28);
  border-left: 1px solid rgba(255, 253, 247, 0.28);
}

.document-grid a {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-right: 1px solid rgba(255, 253, 247, 0.28);
  border-bottom: 1px solid rgba(255, 253, 247, 0.28);
  transition:
    background 180ms ease-out,
    transform 180ms ease-out;
}

.document-grid a:hover {
  background: rgba(255, 253, 247, 0.07);
  transform: translateY(-3px);
}

.document-grid a > span {
  margin-bottom: auto;
  color: #e7a187;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.document-grid h3 {
  margin: 24px 0 12px;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.08;
}

.document-grid p {
  margin: 0 0 24px;
  color: #d4dbe0;
  font-size: 15px;
}

.document-grid b {
  color: #f0b39c;
  font-size: 15px;
}

.transparency-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 253, 247, 0.28);
}

.transparency-note p {
  max-width: 790px;
  margin: 0;
  color: #d4dbe0;
  font-size: 15px;
}

.transparency-note a {
  color: #f0b39c;
  white-space: nowrap;
}

.discover-section {
  background: var(--parchment-light);
}

.discover-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 100px;
}

.discover-story {
  position: relative;
}

.discover-story::before {
  content: "1671";
  position: absolute;
  z-index: 0;
  top: -54px;
  right: -16px;
  color: rgba(184, 79, 48, 0.075);
  font-family: var(--display);
  font-size: 180px;
  line-height: 1;
}

.discover-story > * {
  position: relative;
  z-index: 1;
}

.discover-story .large-copy {
  margin-top: 34px;
  color: var(--navy);
  font-size: 23px;
  line-height: 1.55;
}

.discover-story > p:not(.kicker):not(.large-copy) {
  color: var(--muted);
}

.story-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 32px;
}

.barangay-directory {
  padding: 40px;
  border: 1px solid var(--border);
  background: var(--parchment);
  box-shadow: 14px 14px 0 rgba(16, 42, 67, 0.07);
}

.directory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--navy);
}

.directory-heading .kicker {
  margin-bottom: 7px;
}

.directory-heading h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--display);
  font-size: 44px;
  font-weight: 400;
}

.directory-heading > span {
  color: var(--terracotta);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.barangay-directory > p {
  color: var(--muted);
}

.barangay-directory label {
  display: block;
  margin: 28px 0 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.barangay-directory select {
  width: 100%;
  min-height: 54px;
  padding: 8px 16px;
  border: 1px solid var(--navy);
  border-radius: 0;
  background: var(--ivory);
  color: var(--navy);
}

.barangay-list {
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.barangay-list summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--terracotta-dark);
  font-weight: 700;
  list-style: none;
}

.barangay-list summary span {
  font-size: 24px;
  transition: transform 180ms ease-out;
}

.barangay-list[open] summary span {
  transform: rotate(45deg);
}

.barangay-list > div {
  max-height: 230px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 16px;
  overflow: auto;
  padding: 14px 12px 14px 0;
  border-top: 1px solid var(--border);
}

.barangay-list > div span {
  font-size: 14px;
}

.updates-section {
  border-top: 1px solid var(--border);
  background: var(--ivory);
}

.updates-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr 0.75fr;
  gap: 22px;
}

.update-feature,
.update-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--parchment-light);
  transition:
    transform 180ms ease-out,
    border-color 180ms ease-out;
}

.update-feature {
  background: var(--terracotta);
  color: var(--ivory);
}

.update-feature:hover,
.update-card:hover {
  transform: translateY(-4px);
  border-color: var(--terracotta);
}

.update-type,
.update-card > span {
  margin-bottom: auto;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.update-feature h3,
.update-card h3 {
  margin: 32px 0 12px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.08;
}

.update-feature p {
  margin: 0 0 28px;
}

.update-feature b,
.update-card b {
  font-size: 15px;
}

.update-card {
  color: var(--navy);
}

.contact-section {
  padding: 82px 0;
  background: var(--terracotta-dark);
  color: var(--ivory);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr 0.8fr;
  gap: 40px;
  align-items: end;
}

.contact-section h2 {
  font-size: clamp(44px, 4vw, 58px);
}

.contact-grid address,
.hours {
  display: grid;
  gap: 4px;
  font-style: normal;
}

.contact-grid address strong,
.hours strong {
  margin-bottom: 7px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-actions {
  display: grid;
  gap: 12px;
}

.button-light {
  border-color: var(--ivory);
  background: var(--ivory);
  color: var(--terracotta-dark);
}

.contact-emergency {
  text-align: center;
  font-size: 14px;
}

footer {
  padding: 60px 0 24px;
  background: var(--navy-deep);
  color: #dbe2e7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 0.75fr 1fr;
  gap: 64px;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-brand .seal {
  border-color: var(--ivory);
  box-shadow: inset 0 0 0 4px var(--navy-deep), inset 0 0 0 5px var(--ivory);
}

.footer-brand .seal-rays,
.footer-brand .seal-rays::before {
  border-color: var(--ivory);
}

.footer-brand > div {
  display: grid;
}

.footer-brand strong {
  color: var(--ivory);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
}

.footer-brand span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: var(--ivory);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.concept-note {
  margin: 0;
  color: #aebbc5;
  font-size: 14px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #93a3af;
  font-size: 12px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1120px) {
  .shell {
    width: min(100% - 40px, 960px);
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
    position: relative;
  }

  .mobile-nav summary {
    min-width: 78px;
    min-height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid var(--navy);
    cursor: pointer;
    color: var(--navy);
    font-weight: 700;
    list-style: none;
  }

  .mobile-nav nav {
    position: absolute;
    top: 54px;
    right: 0;
    width: 250px;
    display: grid;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--ivory);
    box-shadow: 0 16px 30px rgba(16, 42, 67, 0.18);
  }

  .mobile-nav nav a {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
    color: var(--navy);
  }

  .mobile-nav nav a:last-child {
    border-bottom: 0;
  }

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

  .hero-copy {
    max-width: 760px;
    padding-bottom: 0;
  }

  .hero-image-frame {
    height: 460px;
  }

  .quick-services {
    grid-template-columns: 1fr 1fr;
  }

  .service-feature-grid,
  .document-grid {
    grid-template-columns: 1fr 1fr;
  }

  .more-services,
  .government-grid,
  .discover-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .government-intro {
    position: static;
  }

  .council-card {
    grid-column: auto;
  }

  .facts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 0;
  }

  .facts-grid div:nth-child(3) {
    border-right: 0;
  }

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

  .update-feature {
    grid-column: 1 / -1;
  }

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

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

  .concept-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 92px;
  }

  body {
    font-size: 16px;
  }

  .shell {
    width: min(100% - 28px, 620px);
  }

  .utility-inner {
    min-height: 36px;
  }

  .utility-inner p,
  .utility-actions > a:first-child {
    display: none;
  }

  .utility-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .header-inner {
    min-height: 82px;
  }

  .brand {
    gap: 10px;
  }

  .brand .official-seal {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .brand small,
  .brand em {
    display: none;
  }

  .brand strong {
    max-width: 190px;
    font-size: 18px;
  }

  .hero {
    padding-top: 16px;
  }

  .hero-grid {
    gap: 28px;
  }

  .hero-copy {
    padding-top: 24px;
  }

  .eyebrow::before {
    width: 24px;
  }

  .eyebrow::after {
    display: none;
  }

  .hero h1 {
    font-size: clamp(42px, 13.5vw, 62px);
  }

  .hero-lede {
    font-size: 18px;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .hero-image-frame {
    height: 300px;
  }

  .mayor-portrait {
    top: 10px;
    right: 10px;
    width: 138px;
    padding: 5px;
  }

  .mayor-portrait figcaption {
    padding: 8px;
  }

  .mayor-portrait small {
    font-size: 8px;
  }

  .mayor-portrait strong {
    font-size: 12px;
  }

  .quick-services,
  .service-feature-grid,
  .document-grid,
  .updates-grid {
    grid-template-columns: 1fr;
  }

  .quick-card {
    min-height: 108px;
  }

  .quick-card-copy strong {
    font-size: 22px;
  }

  .section {
    padding: 74px 0;
  }

  .split-heading,
  .transparency-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .section-heading h2,
  .government-intro h2,
  .discover-story h2,
  .contact-section h2 {
    font-size: 42px;
  }

  .service-feature {
    min-height: 300px;
  }

  .more-services {
    margin-top: 64px;
  }

  .more-services-list summary {
    grid-template-columns: 38px 1fr auto;
    font-size: 21px;
  }

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

  .facts-grid div {
    padding: 8px 16px;
  }

  .facts-grid div:nth-child(2),
  .facts-grid div:nth-child(4) {
    border-right: 0;
  }

  .facts-grid div:last-child {
    grid-column: 1 / -1;
    padding-left: 16px;
  }

  .leadership-card,
  .council-card ol {
    grid-template-columns: 1fr;
  }

  .leader {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .leader:last-child {
    border-bottom: 0;
  }

  .document-grid a {
    min-height: 270px;
  }

  .transparency-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .barangay-directory {
    padding: 28px 22px;
  }

  .barangay-list > div {
    grid-template-columns: 1fr;
  }

  .update-feature {
    grid-column: auto;
  }

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

  .contact-actions {
    margin-top: 10px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Internal information pages */
.internal-mark {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  display: grid;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--parchment), inset 0 0 0 5px var(--navy);
  font-family: var(--display);
  font-size: 28px;
}

.internal-header {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.internal-header nav {
  display: flex;
  gap: 30px;
  color: var(--navy);
}

.internal-header nav a {
  border-bottom: 1px solid transparent;
}

.internal-header nav a:hover {
  border-color: var(--terracotta);
}

.internal-hero {
  position: relative;
  overflow: hidden;
  padding: 68px 0 82px;
  color: var(--ivory);
  background:
    linear-gradient(110deg, rgba(9, 29, 48, 0.98), rgba(16, 42, 67, 0.92)),
    var(--navy);
}

.internal-hero::after {
  content: "MALASIQUI";
  position: absolute;
  right: -22px;
  bottom: -42px;
  color: rgba(255, 255, 255, 0.035);
  font-family: var(--display);
  font-size: clamp(84px, 15vw, 210px);
  line-height: 1;
  letter-spacing: 0.05em;
}

.breadcrumbs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 9px;
  margin-bottom: 48px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--ivory);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.internal-hero .kicker {
  position: relative;
  z-index: 1;
  color: #e1a68f;
}

.internal-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 12px 0 24px;
  font-family: var(--display);
  font-size: clamp(54px, 8vw, 102px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.internal-lede {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(20px, 2.3vw, 27px);
  line-height: 1.45;
}

.office-chip {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 34px 0 0;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.internal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(50px, 7vw, 110px);
  padding-top: 84px;
  padding-bottom: 110px;
}

.content-section {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 26px;
  padding: 0 0 62px;
  margin-bottom: 62px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 150px;
}

.content-section:last-child {
  margin-bottom: 0;
}

.section-index {
  padding-top: 8px;
  color: var(--terracotta);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.content-section h2,
.page-aside h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
}

.content-section h2 {
  font-size: clamp(34px, 4vw, 50px);
}

.section-intro {
  max-width: 780px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.requirements-list {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: resident-list;
  border-top: 1px solid var(--border);
}

.requirements-list li {
  position: relative;
  padding: 18px 12px 18px 46px;
  border-bottom: 1px solid var(--border);
}

ol.requirements-list li {
  counter-increment: resident-list;
}

.requirements-list li::before {
  content: "✓";
  position: absolute;
  left: 10px;
  color: var(--terracotta);
  font-size: 15px;
  font-weight: 700;
}

ol.requirements-list li::before {
  content: counter(resident-list, decimal-leading-zero);
  top: 20px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.info-note {
  margin: 28px 0 0;
  padding: 18px 20px;
  border-left: 4px solid var(--terracotta);
  background: var(--parchment);
  color: #4f4940;
}

.record-link {
  display: inline-flex;
  margin-top: 28px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--terracotta);
  color: var(--navy);
  font-weight: 700;
}

.page-aside {
  position: sticky;
  top: 130px;
  align-self: start;
  padding: 30px;
  border-top: 5px solid var(--terracotta);
  background: var(--parchment);
}

.page-aside h2 {
  margin-top: 8px;
  font-size: 31px;
}

.page-aside > p:not(.kicker) {
  color: var(--muted);
}

.page-aside .button {
  width: 100%;
  margin-top: 16px;
  justify-content: center;
}

.source-link {
  display: block;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--navy);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.internal-footer {
  padding: 36px 0;
  background: var(--navy-deep);
  color: var(--ivory);
}

.internal-footer .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.internal-footer a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.internal-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

@media (max-width: 820px) {
  .internal-header nav {
    display: none;
  }

  .internal-hero {
    padding: 42px 0 62px;
  }

  .breadcrumbs {
    margin-bottom: 34px;
  }

  .internal-layout {
    grid-template-columns: 1fr;
    padding-top: 58px;
    padding-bottom: 72px;
  }

  .page-aside {
    position: static;
  }

  .content-section {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 42px;
    margin-bottom: 44px;
  }

  .internal-footer .shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .internal-header .brand small,
  .internal-header .brand em {
    display: none;
  }

  .internal-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    font-size: 23px;
  }

  .internal-header {
    min-height: 76px;
  }

  .section-intro {
    font-size: 18px;
  }
}


.offline-demo-ribbon {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(9, 29, 48, 0.92);
  color: #fffdf7;
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 20px rgba(9, 29, 48, 0.2);
}

@media print {
  .offline-demo-ribbon { display: none; }
}
