/* =============================================================================
   MaxOfRideauStreet — style.css
   A calm, document-like civic aesthetic: IBM Plex Serif wordmark over a clean
   Plex Sans body, a single civic-blue accent, generous whitespace. Designed to
   feel trustworthy and intentionally simple. Responsive down to small phones.
   ========================================================================== */

:root {
  --ink: #16202e;
  --muted: #5b6675;
  --bg: #eef1f6;
  --surface: #ffffff;
  --border: #d8dee8;
  --accent: #2b5fd6;
  --accent-dark: #1f49ad;
  --success: #1f8a6d;
  --success-bg: #e7f4ef;
  --error: #b3261e;
  --error-bg: #fbeae8;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 32, 46, 0.06), 0 8px 24px rgba(22, 32, 46, 0.06);
  --maxw: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}

/* ---- Layout ------------------------------------------------------------- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---- Masthead ----------------------------------------------------------- */
.masthead {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.masthead .container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: block;
  background: var(--bg);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border);
}
.wordmark {
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.masthead .eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* ---- Hero (home) -------------------------------------------------------- */
main { flex: 1 0 auto; padding: 56px 0 72px; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
}
.hero-copy { text-align: left; }
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  background: #e7edfc;
  border-radius: 999px;
  padding: 5px 12px;
  margin: 0 0 18px;
}
.hero h1 {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.hero p.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 32px;
}

/* Max's portrait — slight tilt for a bit of attitude. */
.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 10px 36px rgba(22, 32, 46, 0.22);
  transform: rotate(2deg);
}
.hero-media .caption {
  position: absolute;
  left: 14px;
  bottom: -14px;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  transform: rotate(2deg);
  box-shadow: var(--shadow);
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.05s ease,
    box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 3px solid rgba(43, 95, 214, 0.4);
  outline-offset: 2px;
}
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn .arrow { font-size: 1.1em; line-height: 1; }

/* ---- Card / form -------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.intro { margin-bottom: 4px; }
.intro h1 {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 4.5vw, 2.1rem);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.intro p { color: var(--muted); margin: 0 0 28px; max-width: 60ch; }

.notice {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: #f4f7fe;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.92rem;
  color: var(--ink);
  margin: 0 0 28px;
}
.notice strong { color: var(--accent-dark); }

/* ---- Form fields -------------------------------------------------------- */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.field .hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
}
.req { color: var(--accent); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; min-height: 96px; }

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 95, 214, 0.15);
}

input.invalid,
textarea.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12);
}

.field .error-text {
  display: none;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 6px;
}
.field.has-error .error-text { display: block; }

/* Two-up rows on wider screens. */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* Section dividers within the form. */
.section-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 32px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.section-label:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

/* Consent checkbox. */
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.consent label { font-weight: 400; font-size: 0.94rem; }

/* ---- Result banners ----------------------------------------------------- */
.result { margin-top: 22px; border-radius: var(--radius-sm); padding: 16px 18px; display: none; }
.result.show { display: block; }
.result.success { background: var(--success-bg); border: 1px solid #bfe3d6; color: #14694f; }
.result.error { background: var(--error-bg); border: 1px solid #f0c4bf; color: var(--error); }
.result h3 { margin: 0 0 6px; font-size: 1.05rem; }
.result ul { margin: 8px 0 0; padding-left: 20px; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
}
.site-footer .container { padding-top: 22px; padding-bottom: 22px; }
.site-footer a { color: var(--accent-dark); }

.backlink {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.backlink:hover { text-decoration: underline; }

/* ---- Legal-support card ------------------------------------------------- */
.support { margin-top: 24px; }
.support-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.support-intro { flex: 1 1 320px; min-width: 0; }
.support h2 {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.support p { color: var(--ink); margin: 0; }
.support a { color: var(--accent-dark); }
.support-cta { flex: 0 0 auto; white-space: nowrap; }
.support-cta:hover { color: #fff; }

.news {
  margin-top: 26px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.news h3 {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 16px;
}
.story { margin-bottom: 22px; }
.story:last-child { margin-bottom: 0; }
.story-title {
  display: inline-block;
  font-weight: 600;
  font-style: italic;
  color: var(--accent-dark);
  text-decoration: none;
  margin-bottom: 2px;
}
.story-title:hover { text-decoration: underline; }
.story .source {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin: 2px 0 8px;
}
.story p:last-child { color: var(--ink); margin: 0; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero-media { order: -1; max-width: 360px; }
  .hero-media img { transform: rotate(0deg); }
  .hero-media .caption { transform: rotate(0deg); }
}

@media (max-width: 560px) {
  main { padding: 36px 0 52px; }
  .card { padding: 20px; }
  .row { grid-template-columns: 1fr; gap: 0; }
}

/* ---- Accessibility ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
