/* PIES Information Technology Solutions - shared design system.
   Plain CSS, no build step. Icons: /assets/img/icons.svg (see .icon). */

:root {
  /* brand */
  --navy: #1F3A5F;
  --navy-900: #14263F;
  --gold: #C9A961;       /* accents/borders/icons only; never body text or links on light bg */
  --gold-600: #8A6D2B;   /* darker gold, safe for text on light backgrounds (>=4.5:1) */
  --green: #2D6A4F;
  --gray-50: #F7F8FA;
  --gray-100: #E8ECF1;
  --gray-300: #C5CDD8;
  --gray-500: #5F6B7C;
  --gray-700: #3A4556;

  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 38, 63, 0.08), 0 1px 3px rgba(20, 38, 63, 0.06);
  --shadow-md: 0 4px 12px rgba(20, 38, 63, 0.10), 0 2px 4px rgba(20, 38, 63, 0.06);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 5rem;

  --font: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* legacy aliases - remove once pages are rebuilt */
  --black: var(--navy-900);
  --white: #F8F9FB;
  --cream: #F1F3F7;
  --accent: var(--navy);
  --accent-light: #3F618F;
  --gold-light: #DCC590;
  --serif: var(--font);
  --sans: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gray-700);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw + 0.5rem, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2.5vw + 0.75rem, 2.5rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.2rem, 1vw + 0.9rem, 1.5rem); }
h4 { font-size: 1.125rem; }
p { max-width: 70ch; }

a { color: var(--navy); }

img { max-width: 100%; height: auto; }

/* layout */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--space-5); }
.section { padding-block: var(--space-8); }
.section-label {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-600); margin-bottom: var(--space-3);
}
.section-title { color: var(--navy); margin-bottom: var(--space-4); }
.lead { font-size: 1.125rem; color: var(--gray-700); max-width: 62ch; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0.7rem 1.4rem; border-radius: var(--radius);
  border: 2px solid transparent; font: 600 0.95rem/1.2 var(--font);
  text-decoration: none; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-900); border-color: var(--navy-900); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* cards, badges, tags */
.card {
  background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: var(--space-5);
}
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1); padding: 0.2rem 0.65rem;
  border-radius: 999px; background: var(--gray-100); color: var(--navy);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.badge-new { background: var(--gold); color: var(--navy-900); }
.tag {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 6px;
  background: var(--gray-50); border: 1px solid var(--gray-300); color: var(--gray-700);
  font-size: 0.8rem; font-weight: 500;
}

/* icons: <svg class="icon" aria-hidden="true"><use href="/assets/img/icons.svg#i-NAME"/></svg> */
.icon {
  width: 1em; height: 1em; flex: none; vertical-align: -0.125em;
  stroke: currentColor; fill: none;
}

/* scroll reveal: site.js adds html.js, then .is-visible once an element is on screen.
   Without JS (no html.js) everything stays visible. */
.reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal:not(.is-visible) { opacity: 0; transform: translateY(16px); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* accessibility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 1000;
  background: var(--navy); color: #fff; padding: var(--space-3) var(--space-4);
  border-radius: var(--radius); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: var(--space-4); }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
/* navy outline is invisible on navy: use a light one inside dark sections */
.on-dark :focus-visible,
.site-footer :focus-visible, .cta-band :focus-visible,
#hero :focus-visible, .page-hero :focus-visible, .page-title :focus-visible {
  outline-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important; animation: none !important; scroll-behavior: auto !important;
  }
  html.js .reveal:not(.is-visible) { opacity: 1; transform: none; }
}

/* ---------- header, mobile menu ---------- */
.btn-gold { background: var(--gold); color: var(--navy-900); border-color: var(--gold); }
.btn-gold:hover, .btn-gold:focus-visible { background: #DCC590; border-color: #DCC590; color: var(--navy-900); }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: var(--gray-100); border-color: var(--gray-100); }

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 68px;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100); transition: box-shadow 0.2s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  max-width: 1200px; height: 100%; margin-inline: auto; padding-inline: var(--space-5);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--navy); }
.brand img { height: 36px; width: auto; display: block; }
.brand-text { font-weight: 700; font-size: 1rem; letter-spacing: 0.02em; white-space: nowrap; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--space-5); }
.site-nav a:not(.btn) {
  color: var(--gray-700); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  padding: 0.4rem 0.1rem; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.site-nav a:not(.btn):hover { color: var(--navy); border-bottom-color: var(--gold); }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--navy); font-weight: 700; border-bottom-color: var(--gold); }
.site-nav .btn { min-height: 40px; padding: 0.5rem 1.2rem; font-size: 0.9rem; }

.menu-toggle {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px;
  background: none; border: 0; border-radius: var(--radius); color: var(--navy); font-size: 1.6rem; cursor: pointer;
}
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: inline-block; }

.mobile-menu {
  position: fixed; top: 68px; left: 0; right: 0; bottom: 0; z-index: 99; overflow-y: auto;
  display: flex; flex-direction: column; padding: var(--space-4) var(--space-5) var(--space-7);
  background: #fff;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) {
  display: block; padding: var(--space-4) var(--space-2); color: var(--navy); text-decoration: none;
  font-size: 1.25rem; font-weight: 600; border-bottom: 1px solid var(--gray-100);
}
.mobile-menu a[aria-current="page"]:not(.btn) { color: var(--gold-600); }
.mobile-menu .btn { margin-top: var(--space-5); }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 400px) {
  .brand img { height: 30px; }
  .brand-text { font-size: 0.92rem; }
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #fff; padding-block: var(--space-7); }
.container.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: clamp(1.4rem, 1.6vw + 1rem, 2rem); margin: 0 0 var(--space-2); max-width: 28ch; }
.cta-band p { margin: 0; color: var(--gray-300); }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-900); color: var(--gray-300); padding-top: var(--space-7); font-size: 0.95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a.btn-gold { color: var(--navy-900); }
.site-footer a.btn-light { color: var(--navy); }
.site-footer a.btn:hover { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.site-footer .brand { color: #fff; margin-bottom: var(--space-3); }
.site-footer h3 { color: #fff; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 var(--space-4); }
.site-footer p { margin: 0 0 var(--space-4); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--space-6); }
.footer-links li { margin-bottom: var(--space-2); }
.footer-contact li { display: flex; gap: var(--space-2); align-items: flex-start; margin-bottom: var(--space-2); }
.footer-contact .icon { margin-top: 0.3em; color: var(--gold); }
.footer-social { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 50%; font-size: 1.15rem;
  transition: border-color 0.2s, color 0.2s;
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.container.footer-bottom { margin-top: var(--space-7); padding-block: var(--space-5); border-top: 1px solid rgba(255, 255, 255, 0.12); }
.site-footer .footer-bottom p { margin: 0; font-size: 0.85rem; color: var(--gray-300); max-width: none; }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } .cta-band-actions .btn { width: 100%; } }

/* Mobile quick bar (in the shared footer partial): fixed call/Messenger buttons, <= 640px only */
.quick-bar { display: none; }
@media (max-width: 640px) {
  .quick-bar {
    display: flex; gap: var(--space-3); position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: var(--space-3) var(--space-4); background: var(--navy); box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
  }
  .quick-bar .btn { flex: 1; justify-content: center; }
  .quick-bar .btn[hidden] { display: none; }
  body { padding-bottom: 72px; }
}
