/* ==========================================================================
   O.C.R.D.C. — nodatacentreoakville.ca
   Front-end prototype stylesheet
   Palette per Spec Rev 5, Section 2.1
   ========================================================================== */

:root {
  /* Core palette */
  --navy:      #1F3A5F;   /* primary: headers, nav, structure */
  --accent:    #3E6BA8;   /* links, secondary accents */
  --offwhite:  #F7F5F0;   /* page background */
  --charcoal:  #2B2B2B;   /* body text */
  --grey:      #6B7280;   /* secondary text, borders */
  --orange:    #E67E22;   /* action / urgent */
  --red:       #C0392B;   /* warnings only */
  --teal:      #2A7F7A;   /* sparing accent */

  /* Derived tints */
  --navy-90:   #24426b;
  --navy-lift: #2b4d7d;
  --offwhite-2:#EFEBE2;
  --line:      #E1DBCE;
  --white:     #ffffff;
  --orange-dk: #cf6f18;

  /* Type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Measure & rhythm */
  --measure: 64ch;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 6px 24px rgba(31, 58, 95, 0.10);
  --shadow-sm: 0 2px 8px rgba(31, 58, 95, 0.08);
  --pad: clamp(1rem, 4vw, 2.5rem);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--charcoal);
  background: var(--offwhite);
  line-height: 1.6;
  font-size: 1.02rem;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--navy); }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.15; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 2em 0 0.6em; }
h3 { font-size: 1.25rem; margin: 1.6em 0 0.4em; }
p { max-width: var(--measure); }

.wrap { width: min(1120px, 100% - 2 * var(--pad)); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2 * var(--pad)); margin-inline: auto; }

/* ---------- skip link ---------- */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; color: #fff; }

/* visible keyboard focus everywhere */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 3px; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 0;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; line-height: 1;
}
/* No hover state on the logo link */
.brand:hover, .brand:focus { text-decoration: none; opacity: 1; }
.brand-name {
  color: #fff; font-family: var(--serif); font-weight: 600;
  font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.1;
}
.brand-chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 12px; padding: 5px 8px;
}
.brand-logo {
  height: 46px; width: auto; display: block;
}
@media (max-width: 860px) {
  .brand-logo { height: 38px; }
  .brand-chip { border-radius: 10px; padding: 4px 6px; }
  .brand-name { font-size: 1rem; }
}
@media (max-width: 400px) {
  .brand-name { font-size: .92rem; }
}

.nav-links { display: flex; gap: .2rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: #e9eef6; text-decoration: none; padding: .5rem .7rem; border-radius: var(--radius);
  font-weight: 500; font-size: .95rem; white-space: nowrap;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--navy-lift); color: #fff; }
.nav-cta {
  background: var(--orange); color: #fff !important; font-weight: 600 !important;
  padding: .55rem 1rem !important;
}
.nav-cta:hover { background: var(--orange-dk); }

.nav-toggle {
  margin-left: auto; display: none; background: transparent; border: 1.5px solid #557; color: #fff;
  width: 44px; height: 40px; border-radius: var(--radius); cursor: pointer; font-size: 1.2rem;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; width: 52px; height: 48px; font-size: 1.9rem; line-height: 1; }
  .nav-links {
    display: none; width: 100%; margin: 0; flex-direction: column; align-items: stretch;
    padding: .5rem 0 .8rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .75rem .6rem; }
  .nav-cta { text-align: center; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: var(--radius); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dk); color: #fff; }
.btn-secondary { background: var(--navy); color: #fff; }
.btn-secondary:hover { background: var(--navy-lift); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.08rem; }

/* ==========================================================================
   Hero + reel (Home)
   ========================================================================== */
.hero {
  background:
    linear-gradient(180deg, rgba(31,58,95,0.03), rgba(31,58,95,0)) ,
    var(--offwhite);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .eyebrow {
  color: var(--teal); font-weight: 600; font-size: .95rem; margin: 0 0 .6rem;
  font-family: var(--sans);
}
.hero h1 { margin-bottom: .5rem; }
.hero .lede { font-size: 1.18rem; color: #3f4650; max-width: 34ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* Reel */
.reel { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--navy); }
.reel-track { display: flex; transition: transform .5s ease; }
.reel-slide { min-width: 100%; position: relative; }
.reel-slide .ph {
  aspect-ratio: 4 / 3; display: grid; place-items: center; color: #fff; text-align: center;
  padding: 2rem; background-size: cover; background-position: center;
}
.reel-slide .s1 { background: linear-gradient(135deg, #24426b, #1F3A5F); }
.reel-slide .s2 { background: linear-gradient(135deg, #2A7F7A, #1F3A5F); }
.reel-slide .s3 { background: linear-gradient(135deg, #3E6BA8, #24426b); }
.reel-slide .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem 1.4rem;
  background: linear-gradient(0deg, rgba(20,34,55,.92), rgba(20,34,55,0));
  color: #fff;
}
.reel-slide .caption h3 { color: #fff; margin: 0 0 .2rem; font-size: 1.3rem; }
.reel-slide .caption p { color: #dce4ef; margin: 0; max-width: none; font-size: .96rem; }
.reel-slide .caption .btn { margin-top: .8rem; }
.reel-badge {
  position: absolute; top: .9rem; left: .9rem; z-index: 3;
  background: var(--orange); color: #fff; font-weight: 600; font-size: .8rem;
  padding: .3rem .7rem; border-radius: 100px;
}
.reel-dots { position: absolute; bottom: .8rem; right: 1rem; display: flex; gap: .4rem; z-index: 4; }
.reel-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); cursor: pointer; padding: 0;
}
.reel-dots button[aria-current="true"] { background: #fff; }
.reel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  background: rgba(20,34,55,.55); color: #fff; border: 0; width: 42px; height: 42px; border-radius: 50%;
  cursor: pointer; font-size: 1.2rem; display: grid; place-items: center;
}
.reel-arrow:hover { background: rgba(20,34,55,.8); }
.reel-arrow.prev { left: .7rem; } .reel-arrow.next { right: .7rem; }

/* ==========================================================================
   Sections / cards
   ========================================================================== */
.section { padding: clamp(2.2rem, 5vw, 3.6rem) 0; }
.section.alt { background: var(--offwhite-2); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 1.6rem; }
.section-head p { color: var(--grey); font-size: 1.05rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.4rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card p { color: #4a505a; font-size: .98rem; }
.card .card-link { font-weight: 600; text-decoration: none; display: inline-block; margin-top: .4rem; }

/* quick links row */
.quicklinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1rem; }
.quicklink {
  display: block; background: var(--navy); color: #fff; text-decoration: none; padding: 1.1rem 1.2rem;
  border-radius: var(--radius); font-weight: 600;
}
.quicklink span { display: block; font-weight: 400; font-size: .9rem; color: #c7d2e2; margin-top: .2rem; }
.quicklink:hover { background: var(--navy-lift); color: #fff; }

/* alert / urgent callout */
.alert {
  border-left: 5px solid var(--orange); background: #fff5ec; color: #7a4a16;
  padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2rem 0;
}
.alert.warn { border-left-color: var(--red); background: #fdeeec; color: #86271d; }
.alert strong { color: inherit; }

/* placeholder banner */
.placeholder {
  border: 2px dashed var(--accent); background: #eef3fa; color: var(--navy);
  padding: 1.2rem 1.3rem; border-radius: var(--radius); margin: 1.4rem 0; max-width: var(--measure);
}
.placeholder h3 { margin-top: 0; }
.placeholder .tag {
  display: inline-block; background: var(--accent); color: #fff; font-size: .74rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 100px; margin-bottom: .5rem;
}

/* ==========================================================================
   Breadcrumb + page header
   ========================================================================== */
.page-head { background: var(--navy); color: #fff; padding: clamp(1.8rem,4vw,2.8rem) 0; }
.page-head h1 { color: #fff; margin: 0; }
.page-head p { color: #cdd7e6; margin: .5rem 0 0; font-size: 1.08rem; }
.crumb { font-size: .85rem; color: #b9c5d8; margin-bottom: .6rem; }
.crumb a { color: #dce4ef; }

/* content pages: table of contents + prose */
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 2.4rem; align-items: start; }
@media (max-width: 820px){ .doc { grid-template-columns: 1fr; } .toc { position: static !important; } }
.toc {
  position: sticky; top: 84px; font-size: .92rem; border-left: 2px solid var(--line); padding-left: 1rem;
}
.toc h4 { font-family: var(--sans); text-transform: none; color: var(--grey); font-size: .8rem; letter-spacing: .04em; margin: 0 0 .6rem; }
.toc a { display: block; color: var(--charcoal); text-decoration: none; padding: .28rem 0; }
.toc a:hover { color: var(--accent); }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { max-width: var(--measure); }
.prose li { margin: .3rem 0; }

/* ==========================================================================
   Forms
   ========================================================================== */
.formcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow-sm); max-width: 640px;
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .8rem; border: 1.5px solid #cfd6e0; border-radius: var(--radius);
  font: inherit; color: var(--charcoal); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(62,107,168,.18); }
.field textarea { min-height: 130px; resize: vertical; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: #444; }
.consent input { width: auto; margin-top: .25rem; flex: 0 0 auto; }
.form-note { font-size: .84rem; color: var(--grey); margin-top: .8rem; }
.form-msg { margin-top: 1rem; padding: .8rem 1rem; border-radius: var(--radius); display: none; }
.form-msg.ok { display: block; background: #eaf6f2; border-left: 4px solid var(--teal); color: #1f5f59; }

/* ==========================================================================
   Map placeholder
   ========================================================================== */
#map { height: 440px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.map-legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: .9rem; font-size: .9rem; color: var(--grey); }
.map-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy); color: #d7deea; margin-top: 3rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
  padding: 2.6rem 0 1.6rem;
}
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; } }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .95rem; letter-spacing: .02em; margin: 0 0 .8rem; }
.site-footer a { color: #c7d2e2; text-decoration: none; display: block; padding: .2rem 0; }
.site-footer a:hover { color: #fff; }
.footer-brand p { color: #aab6c9; font-size: .92rem; max-width: 34ch; }
.social { display: flex; gap: .6rem; margin-top: .6rem; }
.social a { border: 1px solid #3c567a; width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; color: #cbd6e6; transition: background .15s, color .15s, border-color .15s; }
.social a:hover { background: #2b4d7d; color: #fff; border-color: #2b4d7d; }
.social a svg { width: 20px; height: 20px; display: block; }
.footer-bottom { border-top: 1px solid #34507a; padding: 1rem 0; font-size: .84rem; color: #9fb0c8; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ==========================================================================
   Pop-up (home only)
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,34,55,.55); z-index: 300;
  display: none; align-items: center; justify-content: center; padding: 1.2rem;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg); max-width: 460px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; position: relative;
  animation: pop .28s ease;
}
@keyframes pop { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal .modal-top { background: var(--orange); color: #fff; padding: .5rem 1rem; font-weight: 600; font-size: .85rem; }
.modal .modal-body { padding: 1.6rem; }
.modal .modal-body h2 { margin: 0 0 .5rem; color: var(--navy); }
.modal .modal-body p { color: #4a505a; }
.modal .modal-actions { margin-top: 1.2rem; display: flex; gap: .7rem; flex-wrap: wrap; }
.modal-close {
  position: absolute; top: .5rem; right: .5rem; background: rgba(255,255,255,.2); color: #fff;
  border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1.1rem;
}
.modal-close:hover { background: rgba(255,255,255,.35); }

/* utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.lead { font-size: 1.14rem; color: #3f4650; max-width: 60ch; }
.pill { display:inline-block; background: var(--teal); color:#fff; font-size:.76rem; font-weight:600; padding:.25rem .7rem; border-radius:100px; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:1.4rem; } @media(max-width:720px){ .grid-2{grid-template-columns:1fr;} }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; max-width: var(--measure); margin-inline: 0; }

/* ==========================================================================
   Community Survey  (matches approved mock; desktop + mobile)
   ========================================================================== */
.survey-intro, .survey-privacy { max-width: var(--measure); margin-bottom: 1.4rem; }
.survey-privacy { background:#eef3fa; border-left:4px solid var(--accent); padding:1rem 1.2rem; border-radius:0 var(--radius) var(--radius) 0; font-size:.95rem; }
.survey-privacy p { max-width:none; margin:0; }
h2.sec { color:var(--navy); border-bottom:2px solid var(--line); padding-bottom:.4rem; margin-top:2.4rem; margin-bottom:1rem; }
.q { margin:1.6rem 0; }
.q-label { font-weight:600; color:var(--charcoal); margin:0 0 .7rem; max-width:var(--measure); font-size:1.02rem; }

/* Point 1 — every option on its own line */
.opt-list { display:flex; flex-direction:column; gap:.1rem; }
.opt {
  display:flex; align-items:flex-start; gap:.7rem;
  padding:.6rem .7rem; cursor:pointer; line-height:1.45;
  border:1px solid transparent; border-radius:var(--radius); max-width:760px;
}
.opt:hover { background:#fff; border-color:var(--line); }
.opt input { margin:.2rem 0 0 0; flex:0 0 auto; width:18px; height:18px; }
.opt-text { display:flex; flex-direction:column; }
.opt-main { color:var(--charcoal); }
.opt-desc { color:var(--grey); font-size:.85rem; margin-top:.15rem; line-height:1.4; }
.other-text { margin:.4rem 0 .3rem 2.4rem; width:calc(100% - 2.4rem); max-width:420px; padding:.55rem .7rem; border:1.5px solid #cfd6e0; border-radius:var(--radius); font:inherit; }
.other-text:disabled { background:#f3f3f0; color:#999; }

/* Point 2 — matrix: left-aligned first column, centered radios under headers */
.matrix { overflow-x:auto; margin-top:.5rem; }
.matrix-table { width:100%; border-collapse:separate; border-spacing:0; table-layout:fixed; }
.matrix-table th, .matrix-table td { padding:.7rem .5rem; border-bottom:1px solid var(--line); vertical-align:middle; }
.matrix-table thead th { background:var(--navy); color:#fff; font-weight:600; font-size:.86rem; line-height:1.2; text-align:center; }
.matrix-table th.row-head { width:40%; text-align:left; }
.matrix-table tbody th.row-head { font-weight:500; background:#f7f9fc; color:var(--charcoal); font-size:.92rem; line-height:1.35; border-right:1px solid var(--line); text-align:left; }
.matrix-table td { width:calc(60% / 4); text-align:center; }
.matrix-table tbody tr:nth-child(even) td { background:#fbfcfe; }
.matrix-table td input[type=radio] { width:20px; height:20px; margin:0; cursor:pointer; }

/* Matrix — stacked cards on mobile */
@media (max-width:720px){
  .matrix-table, .matrix-table thead, .matrix-table tbody, .matrix-table tr, .matrix-table th, .matrix-table td { display:block; width:auto; }
  .matrix-table thead { display:none; }
  .matrix-table tr { margin-bottom:1rem; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
  .matrix-table tbody th.row-head { width:auto; background:var(--navy); color:#fff; border:0; border-radius:0; font-weight:600; text-align:left; }
  .matrix-table td { display:flex; justify-content:space-between; align-items:center; text-align:left; padding:.7rem 1rem; }
  .matrix-table td::before { content:attr(data-label); color:var(--charcoal); font-size:.95rem; }
  .matrix-table td input[type=radio] { margin-left:1rem; }
}

.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin:1rem 0; }
@media (max-width:640px){ .contact-grid { grid-template-columns:1fr; } }
.consents { margin:1.2rem 0; }
.consents .consent { display:flex; gap:.6rem; align-items:flex-start; margin:.7rem 0; font-size:.95rem; }
.consents .consent input { margin-top:.25rem; }
.survey-thanks { text-align:left; }
.survey-thanks p { max-width:none; }
