/* ============================================================
   global.css — Liam Olsen for North Van City Council
   Design system: brand colors, typography, nav, footer, utils
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@700&family=Platypi:ital,wght@0,300;0,400;0,600;1,400&display=swap');

/* ── Custom Properties ── */
:root {
  /* Core brand colors */
  --salmon:   #EC6059;
  --brown:    #72454A;
  --black:    #432D32;
  --beige:    #EECAC4;
  --teal:     #74B6BC;
  --white:    #FEEAE7;

  /* Accent colors (use sparingly) */
  --gold:     #E9A867;
  --green:    #669977;
  --blue:     #5E8CBA;
  --purple:   #9D6C9D;
  --pink:     #DF9FBF;
  --grey:     #697C96;

  /* Semantic roles */
  --color-bg-light:    var(--white);
  --color-bg-mid:      var(--beige);
  --color-bg-dark:     var(--black);
  --color-bg-brown:    var(--brown);
  --color-text-light:  var(--white);
  --color-text-dark:   var(--black);
  --color-heading-on-light: var(--salmon);
  --color-heading-on-dark:  var(--white);
  --color-accent:      var(--teal);

  /* Typography */
  --font-heading: 'Oswald', 'Arial Black', sans-serif;
  --font-body:    'Platypi', Georgia, serif;

  /* Spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* Layout */
  --max-width: 1160px;
  --nav-height: 72px;

  /* Borders / radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(67,45,50,0.10);
  --shadow-md: 0 6px 24px rgba(67,45,50,0.14);
  --shadow-lg: 0 16px 48px rgba(67,45,50,0.18);

  /* Transitions */
  --transition: 0.22s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
}
p { max-width: 68ch; }
p + p { margin-top: 1em; }

/* Heading sizes */
.h-display { font-size: clamp(3rem, 8vw, 6.5rem); }
.h1        { font-size: clamp(2.4rem, 5vw, 4rem); }
.h2        { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.h3        { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
.h4        { font-size: clamp(1.1rem, 2vw, 1.3rem); }
.label     {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Heading color helpers */
.heading-on-light { color: var(--salmon); }
.heading-on-dark  { color: var(--white); }

/* Body text helpers */
.text-dark  { color: var(--black); }
.text-light { color: var(--white); }
.text-muted { color: var(--brown); opacity: 0.75; }
.text-teal  { color: var(--teal); }
.text-salmon { color: var(--salmon); }

/* ── Layout containers ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--space-lg); }
}
.section {
  padding: var(--space-2xl) 0;
}
.section-sm { padding: var(--space-xl) 0; }
.section-lg { padding: var(--space-3xl) 0; }

/* ── Background utilities ── */
.bg-light  { background: var(--white); }
.bg-beige  { background: var(--beige); }
.bg-dark   { background: var(--black); }
.bg-brown  { background: var(--brown); }
.bg-salmon { background: var(--salmon); }
.bg-teal   { background: var(--teal); }

/* ── Button styles ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--salmon);
  color: var(--white);
  border-color: var(--salmon);
}
.btn-primary:hover {
  background: #d44f48;
  border-color: #d44f48;
  color: var(--white);
}
.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline-light:hover {
  background: var(--white);
  color: var(--black);
}
.btn-outline-dark {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}
.btn-outline-dark:hover {
  background: var(--black);
  color: var(--white);
}
.btn-outline-salmon {
  background: transparent;
  color: var(--salmon);
  border-color: var(--salmon);
}
.btn-outline-salmon:hover {
  background: var(--salmon);
  color: var(--white);
}
.btn-teal {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn-teal:hover {
  background: #5fa2a8;
  border-color: #5fa2a8;
  color: var(--white);
}
.btn-blue {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-blue:hover {
  background: #4d7aa6;
  border-color: #4d7aa6;
  color: var(--white);
}

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--black);
  transition: background var(--transition), box-shadow var(--transition);
}
.site-nav::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--blue);
  z-index: 1;
}
.site-nav.scrolled {
  background: var(--black);
  box-shadow: var(--shadow-md);
}
.site-nav.nav-light {
  background: var(--white);
  border-bottom: 2px solid var(--beige);
}
.site-nav.nav-light.scrolled {
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  height: var(--nav-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
@media (min-width: 768px) {
  .nav-inner { padding: 0 var(--space-lg); }
}
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo img {
  height: 32px;
  width: auto;
  max-width: 200px;
}
.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-md);
}
@media (min-width: 960px) {
  .nav-links { display: flex; flex: 1; justify-content: center; }
}
.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--white);
  opacity: 0.85;
  transition: opacity var(--transition), color var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--salmon);
}
.site-nav.nav-light .nav-links a {
  color: var(--black);
  opacity: 0.8;
}
.site-nav.nav-light .nav-links a:hover,
.site-nav.nav-light .nav-links a.active {
  color: var(--salmon);
  opacity: 1;
}
.nav-cta {
  display: none;
}
@media (min-width: 960px) {
  .nav-cta {
    display: inline-flex;
    padding: 0.6rem 1.2rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }
}
/* Mobile hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  padding: 4px 0;
  margin-left: auto;
}
@media (min-width: 960px) {
  .nav-hamburger { display: none; }
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}
.site-nav.nav-light .nav-hamburger span { background: var(--black); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--black);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-xl);
}
.nav-mobile.open {
  display: flex;
}
.nav-mobile a {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  transition: color var(--transition);
}
.nav-mobile a:hover { color: var(--salmon); }
.nav-mobile .btn {
  margin-top: var(--space-sm);
}

/* ── Footer ── */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: var(--space-2xl) 0 var(--space-lg);
  border-top: 3px solid var(--salmon);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-brand .footer-logo {
  height: auto;
  width: 180px;
  margin-bottom: var(--space-sm);
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--beige);
  opacity: 0.8;
  max-width: 30ch;
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--salmon);
  margin-bottom: var(--space-sm);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col ul a {
  font-size: 0.9rem;
  color: var(--white);
  opacity: 0.75;
  transition: opacity var(--transition), color var(--transition);
}
.footer-col ul a:hover {
  opacity: 1;
  color: var(--beige);
}
.footer-col p {
  font-size: 0.9rem;
  color: var(--white);
  opacity: 0.75;
  line-height: 1.7;
  max-width: unset;
}
.footer-col a:not(ul a) {
  color: var(--teal);
}
.footer-col a:not(ul a):hover {
  color: var(--beige);
}
.footer-socials {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(238,202,196,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  opacity: 0.7;
  transition: all var(--transition);
}
.footer-socials a:hover {
  border-color: var(--salmon);
  color: var(--salmon);
  opacity: 1;
}
.footer-socials svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.footer-bottom {
  border-top: 1px solid rgba(238,202,196,0.15);
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.footer-bottom p, .footer-bottom a {
  font-size: 0.8rem;
  color: var(--white);
  opacity: 0.45;
  max-width: unset;
}
.footer-bottom a:hover { opacity: 0.75; }

/* ── Page hero (inner pages) ── */
.page-hero {
  background: var(--black);
  padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-2xl);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 45%;
  background: linear-gradient(135deg, var(--brown) 0%, var(--black) 100%);
  clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 0% 100%);
  opacity: 0.5;
}
.page-hero .label {
  color: var(--teal);
  margin-bottom: var(--space-sm);
}
.page-hero h1 {
  color: var(--white);
  font-size: clamp(2.8rem, 6vw, 5rem);
  margin-bottom: var(--space-md);
}
.page-hero .hero-sub {
  font-size: 1.15rem;
  color: var(--beige);
  opacity: 0.85;
  max-width: 50ch;
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
}

/* ── Section labels ── */
.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-sm);
}
.section-label.salmon { color: var(--salmon); }
.section-label.beige  { color: var(--beige); }

/* ── Dividers ── */
.divider {
  width: 60px;
  height: 3px;
  background: var(--salmon);
  display: block;
  margin: var(--space-sm) 0;
}
.divider.teal    { background: var(--teal); }
.divider.beige   { background: var(--beige); }
.divider.center  { margin: var(--space-sm) auto; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-body { padding: var(--space-md); }

/* ── Get involved CTA strip ── */
.cta-strip {
  background: var(--salmon);
  padding: var(--space-xl) 0;
  text-align: center;
}
.cta-strip h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: var(--space-sm);
}
.cta-strip p {
  color: var(--white);
  opacity: 0.9;
  font-size: 1.05rem;
  margin: 0 auto var(--space-lg);
  max-width: 52ch;
}
.cta-strip .btn-outline-light {
  border-color: var(--white);
}

/* ── Form styles ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--space-md);
}
.form-group label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brown);
}
.form-group label.light { color: var(--beige); }
.form-control {
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--beige);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--black);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(116,182,188,0.18);
}
.form-control::placeholder { color: rgba(67,45,50,0.4); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Accessibility ── */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ── Utilities ── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-sm       { gap: var(--space-sm); }
.gap-md       { gap: var(--space-md); }
.gap-lg       { gap: var(--space-lg); }
.mt-sm        { margin-top: var(--space-sm); }
.mt-md        { margin-top: var(--space-md); }
.mt-lg        { margin-top: var(--space-lg); }
.mb-sm        { margin-bottom: var(--space-sm); }
.mb-md        { margin-bottom: var(--space-md); }
.mb-lg        { margin-bottom: var(--space-lg); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.full-width   { width: 100%; }
.hidden       { display: none !important; }
.img-fill     { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Scroll animation */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.22s; }
.fade-in-delay-3 { transition-delay: 0.34s; }
.fade-in-delay-4 { transition-delay: 0.46s; }

/* Responsive grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
@media (min-width: 960px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
