/* ============================================================
   CMC Website — site-specific styles
   Layered on top of tokens.css
   ============================================================ */

html, body { background: var(--paper); color: var(--ink); }

/* ============================================================
   TOP UTILITY BAR (Republic of the Philippines style — public-sector trust signal)
   ============================================================ */
.utility-bar {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.utility-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
  gap: var(--sp-4);
}
.utility-bar .util-left,
.utility-bar .util-right {
  display: flex;
  gap: var(--sp-4);
  align-items: center;
}
.utility-bar a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.utility-bar a:hover { color: var(--cmc-gold); }
.utility-bar .ph-flag {
  display: inline-block;
  width: 14px; height: 10px;
  background: linear-gradient(to bottom, #0038a8 50%, #ce1126 50%);
  border-radius: 1px;
  margin-right: 6px;
  vertical-align: -1px;
}

/* ============================================================
   PRIMARY HEADER
   ============================================================ */
.site-header {
  background: var(--cmc-navy);
  color: #fff;
  border-bottom: 3px solid var(--cmc-gold);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: var(--sp-6);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: #fff;
}
.brand-seal {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 2px solid var(--cmc-gold);
}
.brand-text { line-height: 1.05; }
.brand-name {
  font-family: var(--font-banner);
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}
.brand-sub {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cmc-gold);
  display: block;
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav a {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--r-md);
  letter-spacing: 0.01em;
  transition: background var(--t-default) var(--ease), color var(--t-default) var(--ease);
}
.nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav a.active {
  color: var(--cmc-navy);
  background: var(--cmc-gold);
}
.nav-cta {
  margin-left: var(--sp-3);
  padding: 10px 18px !important;
  background: var(--cmc-gold) !important;
  color: var(--cmc-navy) !important;
  border-radius: var(--r-md);
}
.nav-cta:hover { background: var(--cmc-gold-600) !important; }

/* ============================================================
   ANNOUNCEMENT TICKER (just under header)
   ============================================================ */
.ticker {
  background: var(--parchment);
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--fg2);
}
.ticker .container {
  display: flex;
  align-items: center;
  height: 40px;
  gap: var(--sp-4);
  overflow: hidden;
}
.ticker-label {
  background: var(--cmc-red);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.ticker-content {
  display: flex;
  gap: var(--sp-8);
  white-space: nowrap;
  animation: ticker-scroll 38s linear infinite;
}
.ticker-item { display: inline-flex; align-items: center; gap: 6px; }
.ticker-item .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--cmc-gold); display: inline-block;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   PAGE HEADER (for non-home pages)
   ============================================================ */
.page-header {
  background: var(--cmc-navy);
  color: #fff;
  padding: 64px 0 56px;
  border-bottom: 3px solid var(--cmc-gold);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 92% 50%, rgba(220,173,59,0.15), transparent 40%),
    repeating-linear-gradient(135deg, transparent 0 24px, rgba(255,255,255,0.02) 24px 25px);
  pointer-events: none;
}
.page-header .container { position: relative; z-index: 1; }
.page-header .crumbs {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cmc-gold);
  margin-bottom: 12px;
}
.page-header .crumbs a { color: var(--cmc-gold); text-decoration: none; }
.page-header .crumbs a:hover { color: #fff; }
.page-header .crumbs span { color: rgba(255,255,255,0.5); margin: 0 8px; }
.page-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: #fff;
  max-width: 900px;
  text-wrap: balance;
}
.page-header .lede {
  font-size: 19px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  max-width: 680px;
  margin: 0;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 80px 0;
}
.section-tight { padding: 56px 0; }
.section-parchment { background: var(--parchment); }
.section-navy { background: var(--cmc-navy); color: #fff; }
.section-navy h2, .section-navy h3 { color: #fff; }

.section-head {
  margin-bottom: var(--sp-10);
  max-width: 760px;
}
.section-head .eyebrow { display: block; margin-bottom: 8px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0 0 12px;
}
.section-head .lede {
  font-size: 18px;
  color: var(--fg2);
  line-height: 1.6;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
  border-top: 4px solid var(--cmc-gold);
}
.site-footer .container { padding-bottom: 48px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-10);
}
.footer-brand .brand-seal { width: 64px; height: 64px; }
.footer-brand .brand-name { font-size: 22px; color: #fff; }
.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
  margin-top: 16px;
  max-width: 320px;
}
.footer-col h5 {
  font-family: var(--font-banner);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cmc-gold);
  margin: 6px 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--t-default) var(--ease);
}
.footer-col a:hover { color: var(--cmc-gold); }
.footer-col p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.6); margin: 0 0 8px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.4);
}
.footer-bottom .container {
  padding-top: 18px; padding-bottom: 18px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
}
.footer-bottom a { color: rgba(255,255,255,0.7); text-decoration: none; margin-left: 18px; }
.footer-bottom a:hover { color: var(--cmc-gold); }

/* ============================================================
   COMPONENT EXTENSIONS
   ============================================================ */

/* Decorated h2 with diploma rule */
.h2-rule {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 22px;
}
.h2-rule::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 56px; height: 2px;
  background: var(--cmc-gold);
}
.h2-rule.center::after { left: 50%; transform: translateX(-50%); }

/* Navy panel utility */
.panel-navy {
  background: var(--cmc-navy);
  color: #fff;
  border-radius: var(--r-lg);
  padding: var(--sp-10);
}
.panel-navy h2, .panel-navy h3 { color: #fff; }

/* Card variants */
.card-flat {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  transition: box-shadow var(--t-default) var(--ease), transform var(--t-default) var(--ease), border-color var(--t-default) var(--ease);
}
.card-flat:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--cmc-gold); }

/* Stat */
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  color: var(--cmc-gold);
  letter-spacing: -0.02em;
}
.stat-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.65);
}
.section-light .stat-num { color: var(--cmc-navy); }
.section-light .stat-label { color: var(--fg2); }

/* Big arrow link */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cmc-navy);
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--cmc-gold);
  padding-bottom: 2px;
  transition: gap var(--t-default) var(--ease);
}
.arrow-link:hover { gap: 12px; color: var(--cmc-navy); }
.section-navy .arrow-link { color: var(--cmc-gold); border-bottom-color: var(--cmc-gold); }
.section-navy .arrow-link:hover { color: #fff; }

/* Page transition */
@keyframes page-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
main { animation: page-fade 320ms cubic-bezier(0.2, 0.8, 0.2, 1); }

/* ============================================================
   MOBILE NAV (burger + drawer)
   ============================================================ */
.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--r-md);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: background var(--t-default) var(--ease);
}
.nav-burger:hover { background: rgba(255,255,255,0.08); }
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--t-default) var(--ease), opacity var(--t-default) var(--ease);
}
body.mobile-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.mobile-open .nav-burger span:nth-child(2) { opacity: 0; }
body.mobile-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--cmc-navy-deep, #061641);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 8px 0;
}
.mobile-nav a {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  letter-spacing: 0.01em;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a.active { color: var(--cmc-gold); }
.mobile-nav a.nav-cta {
  background: var(--cmc-gold);
  color: var(--cmc-navy);
  margin: 12px 24px 8px;
  text-align: center;
  border-radius: var(--r-md);
  border-bottom: none;
}

body.mobile-open .mobile-nav { display: flex; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .nav-burger { display: flex; }
  .page-header h1 { font-size: 40px; }
}
