/* Page-level layout for the Candijay LGU site.
   Component look lives with the components; this file holds the container,
   the section rhythm, the grids, and the optional polish layer that the
   Display menu switches on and off. */

body { margin: 0; }

.lgu-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter-desktop);
  padding-right: var(--gutter-desktop);
}
.lgu-section { padding-top: var(--section-gap); padding-bottom: var(--section-gap); }
.lgu-h2 { font-size: var(--text-headline-lg); font-weight: var(--weight-bold); margin: 0 0 var(--space-2); }
.lgu-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--text-label); font-weight: 800; text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow); color: var(--color-primary); margin: 0 0 var(--space-3);
}
.lgu-eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; display: inline-block; }
.lgu-lead { font-size: var(--text-body-lg); color: var(--text-muted); margin: 0; max-width: 70ch; }

.lgu-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.lgu-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.lgu-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }

/* Card hover lift, from the Card component. */
.lgu-card--interactive:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--outline-strong);
  transform: translateY(-2px);
}
.lgu-card--interactive:focus-within { box-shadow: var(--shadow-card-hover); }

/* Hero quick actions */
.hero-tasks { display: grid; grid-template-columns: repeat(4, 1fr); }

/* Citizen's Charter teaser banner */
.lgu-charter-teaser { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6); align-items: center; }

/* Start a Business stepper */
.biz-stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; }
.biz-stepper > li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.biz-stepper .biz-line { position: absolute; top: 19px; right: 50%; width: 100%; height: 3px; background: var(--outline-strong); z-index: 0; }

/* Governance accordions */
#legal details[open] .lgu-acc-chev { transform: rotate(180deg); }
#legal summary::-webkit-details-marker { display: none; }

@media (max-width: 1000px) {
  .lgu-grid-3, .lgu-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .lgu-container { padding-left: var(--gutter-mobile); padding-right: var(--gutter-mobile); }
  .lgu-section { padding-top: var(--space-8); padding-bottom: var(--space-8); }
  .lgu-grid-2 { grid-template-columns: 1fr; }
  .lgu-charter-teaser { grid-template-columns: 1fr; }
  .lgu-teaser-glyph { display: none; }
  .hero-tasks { grid-template-columns: 1fr 1fr; }
  .hero-tasks > a:nth-child(odd) { border-left: none; }
  .hero-tasks > a:nth-child(n+3) { border-top: var(--border-hairline); }
}
@media (max-width: 760px) {
  .biz-stepper { flex-direction: column; gap: 14px; }
  .biz-stepper > li { flex-direction: row; align-items: flex-start; text-align: left; gap: 12px; }
  .biz-stepper .biz-line { display: none; }
}
@media (max-width: 560px) {
  .lgu-grid-3, .lgu-grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero-tasks { grid-template-columns: 1fr; }
  .hero-tasks > a { border-left: none; border-top: var(--border-hairline); }
}

/* Polish layer, switched from the Display menu. */

/* Editorial type: a touch bigger and tighter, not oversized. */
.polish-editorial #hero-title { font-size: clamp(2.5rem, 4.4vw, 3.5rem); letter-spacing: -0.022em; line-height: 1.05; }
.polish-editorial .lgu-h2 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); letter-spacing: -0.014em; line-height: 1.1; }
.polish-editorial .lgu-lead { font-size: clamp(1.0625rem, 1.3vw, 1.2rem); }

/* Duotone photos: brand-tinted. */
.polish-duotone .site-photo { filter: grayscale(1) sepia(0.42) hue-rotate(72deg) saturate(1.55) contrast(1.06) brightness(0.97); }

/* Terrace texture: faint contour lines on neutral sections only. Colored
   sections set an inline background, which overrides this. */
.polish-terrace .lgu-section {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='96'%3E%3Cg fill='none' stroke='%2300450d' stroke-opacity='0.05' stroke-width='1.4'%3E%3Cpath d='M0 14 C40 3 78 25 150 12'/%3E%3Cpath d='M0 36 C44 24 84 46 150 33'/%3E%3Cpath d='M0 58 C38 46 80 68 150 55'/%3E%3Cpath d='M0 80 C48 68 88 90 150 77'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 150px 96px;
}

/* Scroll reveals for below-fold sections; honors reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .polish-motion #main > section:not(#home) {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .polish-motion #main > section.is-in:not(#home) { opacity: 1; transform: none; }
}

/* Sticky header refinement: a subtle shadow once the page scrolls. */
header.lgu-scrolled { box-shadow: 0 4px 20px rgba(0, 49, 10, 0.08); }

/* Utility bar on phones (JC, 16 Sep 2026): the public-domain sentence and the
   clock crowd the row, so below 720 px the bar keeps the flag, the Republic
   label and the GOV.PH and Official Gazette links only. */
@media (max-width: 720px) {
  .lgu-util-note, .lgu-util-time { display: none; }
  .lgu-util-links { border-left: 0; padding-left: 0; }
}

/* Footer columns (16 Sep): three columns on desktop, two on tablets with the
   government links spanning the row, one column on phones. Lists never share
   a row with a wrapped neighbour; each link sits on its own line. */
.ft-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-6); }
.ft-col { min-width: 0; }
.ft-heading { color: #fff; font-size: var(--text-label); text-transform: uppercase; letter-spacing: var(--tracking-eyebrow); margin: 0 0 12px; }
.ft-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px 24px; }
.ft-links a { color: var(--inverse-fg-muted); }
.ft-links a:hover, .ft-links a:focus-visible { color: #fff; }
.ft-links-portal { grid-template-columns: 1fr; }
.ft-links-gov { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 880px) {
  .ft-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ft-gov { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .ft-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .ft-links-portal { display: flex; flex-wrap: wrap; gap: 8px 20px; }
  .ft-links-gov { grid-template-columns: 1fr; }
}
