/* ==========================================================================
   IAM Local 519 — site stylesheet
   Brand per IAM Official Circular 925:
   IAM Union Blue #0F4C8B  |  Gear Red #D52029
   Edit colors in the :root block below if the brand guide ever changes.
   ========================================================================== */

:root {
  /* --- Primary (IAM Brand Guidelines, May 2025) --- */
  --iam-blue:      #0F4C8B;   /* Union Blue — official */
  --iam-red:       #D52029;   /* Union Red — official, accent only */

  /* --- Secondary palette (official) --- */
  --iam-blue-deep: #102042;   /* Dark Blue — used for ink/text & footer */
  --iam-blue-mid:  #006CAF;   /* Mid Blue */
  --iam-blue-sky:  #4FA9DF;   /* Sky Blue */
  --iam-blue-light:#E5F4FB;   /* Light Blue */
  --iam-red-dark:  #991F1F;   /* Dark Red — hover */
  --iam-yellow:    #F8D848;   /* Yellow — focus ring */

  /* derived */
  --iam-blue-dark: #0A3A6B;   /* between Union Blue and Dark Blue for gradients */

  --paper:         #FAFAF8;
  --white:         #FFFFFF;
  --steel:         #5B6B7B;   /* secondary text */
  --line:          #E2E6EB;   /* hairlines / borders */
  --focus:         #F8D848;   /* Union Yellow — high-contrast focus on blue */

  --maxw: 1120px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(16, 32, 66, 0.08);

  /* Type per brand guide: Archivo (headlines, caps), Roboto (body),
     Factoria (accent/pull-quotes; Adobe font, falls back to Roboto Slab). */
  --font-head:   "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:   "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-accent: "factoria", "Roboto Slab", Georgia, serif;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--iam-blue-deep);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--iam-blue); }
a:hover { color: var(--iam-red); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.1;
  color: var(--iam-blue-deep);
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1rem; max-width: 68ch; }

/* visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

/* skip link for accessibility */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--iam-red); color: #fff; padding: 0.6rem 1rem; z-index: 200;
  font-family: var(--font-head); font-weight: 700;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header / nav ---------- */
.site-header {
  background: var(--iam-blue);
  color: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08), var(--shadow);
}
.nav-wrap {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.6rem 1.25rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: #fff; }
.brand img { height: 46px; width: auto; }
.brand-text { font-family: var(--font-head); font-weight: 700; line-height: 1; }
.brand-text .local { font-size: 1.25rem; display: block; letter-spacing: 0.01em; }
.brand-text .sub   { font-size: 0.72rem; font-weight: 500; color: #cfe0f2; letter-spacing: 0.02em; }

.nav-toggle {
  display: none; background: transparent; border: 2px solid rgba(255,255,255,0.5);
  color: #fff; font-family: var(--font-head); font-weight: 700;
  padding: 0.4rem 0.7rem; border-radius: 6px; cursor: pointer; font-size: 0.95rem;
}
.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: #eaf1fa; text-decoration: none; font-family: var(--font-head);
  font-weight: 600; font-size: 0.94rem; padding: 0.5rem 0.55rem; border-radius: 6px;
  display: block;
}
.nav-links a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-links a[aria-current="page"] { background: rgba(255,255,255,0.16); color: #fff; }
.nav-links .join-link {
  background: var(--iam-red); color: #fff; margin-left: 0.4rem;
}
.nav-links .join-link:hover { background: var(--iam-red-dark); color: #fff; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--iam-blue-dark); padding: 0.5rem 1rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-links .join-link { margin: 0.6rem 0 0; text-align: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  text-decoration: none; padding: 0.8rem 1.5rem; border-radius: var(--radius);
  cursor: pointer; border: 2px solid transparent; font-size: 1.02rem; transition: background .15s, color .15s;
}
.btn-primary { background: var(--iam-red); color: #fff; }
.btn-primary:hover { background: var(--iam-red-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--iam-blue); border-color: var(--iam-blue); }
.btn-outline:hover { background: var(--iam-blue); color: #fff; }
.btn-onblue { background: #fff; color: var(--iam-blue); }
.btn-onblue:hover { background: var(--focus); color: var(--iam-blue-deep); }

/* ---------- hero ---------- */
.hero {
  background:
    linear-gradient(180deg, rgba(16,32,66,0.78), rgba(15,76,139,0.88)),
    var(--iam-blue);
  color: #fff; position: relative; overflow: hidden;
}
/* Official "diagonal stripes" brand motif, subtle, top-right of hero */
.hero::after {
  content: ""; position: absolute; top: -10%; right: -5%; width: 55%; height: 140%;
  background: repeating-linear-gradient(
    -35deg,
    transparent 0, transparent 26px,
    rgba(255,255,255,0.05) 26px, rgba(255,255,255,0.05) 30px
  );
  pointer-events: none;
}
/* Red + blue diagonal accent bar under the header on interior pages */
.brand-stripe {
  height: 6px;
  background: linear-gradient(90deg, var(--iam-blue) 0 60%, var(--iam-red) 60% 100%);
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 4.5rem 1.25rem 4rem;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center;
}
.hero h1 { color: #fff; margin-bottom: 0.6rem; }
.hero p.lead { font-size: 1.2rem; color: #e7eef7; max-width: 46ch; margin-bottom: 1.6rem; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero-gear { justify-self: center; }
.hero-gear img { width: min(300px, 70vw); filter: drop-shadow(0 8px 24px rgba(0,0,0,0.35)); }
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; padding: 3rem 1.25rem; }
  .hero-gear { display: none; }
}

/* ---------- page header (interior pages) ---------- */
.page-head { background: var(--iam-blue); color: #fff; padding: 2.6rem 0 2.2rem; }
.page-head h1 { color: #fff; margin: 0; }
.page-head p { color: #dbe6f2; margin: 0.5rem 0 0; font-size: 1.1rem; }
.breadcrumb { font-size: 0.9rem; color: #b9cde3; margin-bottom: 0.5rem; }
.breadcrumb a { color: #dbe6f2; }

/* ---------- generic section ---------- */
.section { padding: 3.5rem 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lead { max-width: 60ch; color: var(--steel); font-size: 1.12rem; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  color: var(--iam-red); font-size: 0.95rem; margin-bottom: 0.4rem;
}

/* ---------- feature grid (home) ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; color: var(--iam-blue); }
.card .icon {
  width: 44px; height: 44px; border-radius: 8px; background: var(--iam-blue);
  color: #fff; display: grid; place-items: center; font-family: var(--font-head);
  font-weight: 700; font-size: 1.3rem; margin-bottom: 0.9rem;
}
.card.red .icon { background: var(--iam-red); }

/* callout band */
.band {
  background: var(--iam-blue); color: #fff; text-align: center; padding: 3rem 1.25rem;
}
.band h2 { color: #fff; }
.band p { margin-left: auto; margin-right: auto; color: #e2ecf7; }

/* ---------- info list (office / meetings) ---------- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 0.8rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: 0; }
.info-list .label { font-family: var(--font-head); font-weight: 700; color: var(--iam-blue); min-width: 130px; }

/* ---------- officers ---------- */
.officer-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
@media (max-width: 820px){ .officer-grid { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 520px){ .officer-grid { grid-template-columns: 1fr;} }
.officer {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; text-align: center;
}
.officer .avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 0.75rem;
  background: var(--iam-blue); color: #fff; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem;
}
.officer .role { color: var(--iam-red); font-family: var(--font-head); font-weight: 700; font-size: 0.9rem; }
.officer .name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; margin: 0.15rem 0; }
.officer .contact { font-size: 0.9rem; color: var(--steel); }
.officer .contact a { display: block; }

/* ---------- links list (services) ---------- */
.link-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
@media (max-width: 700px){ .link-grid { grid-template-columns: 1fr; } }
.link-card {
  display: flex; flex-direction: column; gap: 0.3rem;
  background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--iam-blue);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.link-card:hover { border-left-color: var(--iam-red); box-shadow: var(--shadow); color: inherit; }
.link-card .lc-title { font-family: var(--font-head); font-weight: 700; color: var(--iam-blue); font-size: 1.1rem; }
.link-card .lc-desc { color: var(--steel); font-size: 0.95rem; }

/* ---------- events ---------- */
.event {
  display: grid; grid-template-columns: 88px 1fr; gap: 1.1rem; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.event .date {
  background: var(--iam-blue); color: #fff; border-radius: 6px; text-align: center;
  padding: 0.5rem 0.25rem; font-family: var(--font-head); line-height: 1;
}
.event .date .mo { display: block; font-size: 0.8rem; letter-spacing: 0.05em; }
.event .date .dy { display: block; font-size: 1.7rem; font-weight: 700; }
.event h3 { margin: 0 0 0.15rem; font-size: 1.15rem; }
.event .meta { color: var(--steel); font-size: 0.95rem; }

/* recurring meeting highlight */
.meeting-highlight {
  background: linear-gradient(180deg, var(--iam-blue), var(--iam-blue-dark));
  color: #fff; border-radius: var(--radius); padding: 1.8rem; text-align: center; margin-bottom: 2rem;
}
.meeting-highlight h2 { color: #fff; margin-top: 0; }
.meeting-highlight .big { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; }

/* ---------- forms ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow); max-width: 640px;
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.7rem 0.8rem; border: 1px solid #c7cfd8; border-radius: 6px;
  font-family: var(--font-body); font-size: 1rem; background: #fff;
}
.field .req { color: var(--iam-red); }
.form-note { font-size: 0.9rem; color: var(--steel); }

/* ---------- FB embed / news ---------- */
.news-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
@media (max-width: 900px){ .news-wrap { grid-template-columns: 1fr; } }
.fb-embed { display: flex; justify-content: center; }
.announce {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
}
.announce h3 { margin-top: 0; color: var(--iam-blue); }
.announce .item { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.announce .item:last-child { border-bottom: 0; }
.announce .item .when { font-size: 0.82rem; color: var(--iam-red); font-family: var(--font-head); font-weight: 700; }

/* ---------- footer ---------- */
.site-footer { background: var(--iam-blue-deep); color: #c8d4e2; padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.site-footer img { height: 54px; margin-bottom: 0.8rem; }
.site-footer h4 { color: #fff; font-family: var(--font-head); margin: 0 0 0.6rem; }
.site-footer a { color: #cfe0f2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2rem; padding-top: 1.25rem;
  font-size: 0.85rem; color: #91a4bb; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* small helpers */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.editable { /* marks spots you fill in — no visual effect, just a hook */ }
