/* Merilees4Nanaimo — single stylesheet. Colours are final; see README for the contrast rules. */

/* The [hidden] attribute is only display:none via a UA rule (specificity 0-0-1), so ANY class
   that sets display beats it. Both .form and .sent are display:flex and both are toggled by
   form.js, so without this the thank-you panel shows permanently and the form never hides on
   submit. Keep this rule ahead of everything that sets display. */
[hidden] { display: none !important; }

:root {
  --blue: #15577F;          /* links, buttons, primary accent */
  --blue-dark: #104463;     /* hover on blue */
  --orange: #FF7A18;        /* rules and borders only, never text */
  --orange-ink: #A85010;    /* orange when it carries small text (5.05:1 on --page) */
  --on-blue-soft: #B9CDD9;  /* muted text on blue panels (4.74:1 on --blue) */
  --on-blue-border: #779EB5;/* outlined controls on blue panels */

  --page: #F7F5F1;
  --raised: #FFFDFA;
  --band: #F1EDE5;
  --placeholder: #EDE8DF;
  --hairline: #E3DCD0;
  --input-border: #D8D1C4;
  --divider: #DED7CA;

  --ink: #23201C;
  --ink-quote: #2A2721;
  --ink-body: #33302A;
  --ink-2: #3A352E;
  --ink-3: #4A443B;
  --ink-muted: #6B6459;
  --ink-faint: #7A7368;

  --error: #A3261C;
  --error-bg: #FDF6F4;

  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Libre Franklin", Helvetica, Arial, sans-serif;

  --container: 1080px;
  --container-narrow: 820px;
  --section-pad: clamp(30px, 5vw, 64px) clamp(18px, 4vw, 36px);
  --gutter: clamp(18px, 4vw, 36px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page); color: var(--ink);
  font-family: var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
img { display: block; max-width: 100%; }
p { text-wrap: pretty; }

.container { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
main { flex: 1; }

/* ---------- header ---------- */
/* Deliberately NOT sticky: most visitors arrive in Facebook's in-app browser,
   whose own chrome already occupies the top and bottom of the webview. */
.site-header { background: var(--page); border-bottom: 1px solid var(--hairline); }
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px;
  padding-top: 16px; padding-bottom: 16px;
}
.wordmark {
  margin-right: auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px;
  font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
/* Monogram: NOT client-approved. Delete this element to remove it — nothing else depends on it. */
.wordmark__mark {
  flex: none; align-self: center; position: relative; overflow: hidden;
  width: 34px; height: 34px; border-radius: 5px; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.wordmark__mark span { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1; color: var(--raised); transform: translateY(-1px); }
.wordmark__mark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--orange); }
.wordmark__tag { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange-ink); }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin: -6px -8px; }
/* Vertical padding brings the tap target to WCAG 2.5.8's 24px minimum (was 18px). The negative
   margin on the parent absorbs the extra box so the header keeps its original height. */
.site-nav a { font-size: 14.5px; color: var(--ink-2); text-decoration: none; padding: 6px 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue); }

/* ---------- shared type ---------- */
.eyebrow { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; color: var(--orange-ink); }
.label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.h1-hero { margin: 0; font-family: var(--serif); font-size: clamp(44px, 8vw, 82px); line-height: 0.98; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.h1-page { margin: 14px 0 0; font-family: var(--serif); font-size: clamp(32px, 4.6vw, 46px); line-height: 1.05; font-weight: 600; letter-spacing: -0.025em; }
.h2-section { margin: 0; font-family: var(--serif); font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; letter-spacing: -0.02em; }
.lede { margin: 0; font-size: clamp(17px, 2vw, 20px); line-height: 1.55; color: var(--ink-3); max-width: 40ch; }

/* Quiet inline link used instead of a hero button (client asked for no CTAs) */
.link-rule {
  align-self: start; display: inline-block; text-decoration: none;
  font-size: 16.5px; font-weight: 500; color: var(--blue);
  padding: 12px 0; border-bottom: 1.5px solid var(--orange);
}
.link-rule:hover { border-bottom-color: var(--blue); }

.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  background: var(--blue); color: var(--raised); border: none;
  font-family: inherit; font-size: 15.5px; font-weight: 500;
  padding: 14px 24px; border-radius: 7px;
}
.btn:hover { background: var(--blue-dark); color: var(--raised); }
.btn--lg { font-size: 16px; padding: 14px 28px; }
.btn--ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); padding: 11px 18px; font-size: 15px; }
.btn--ghost:hover { background: var(--placeholder); color: var(--blue); }

.photo { position: relative; overflow: hidden; border-radius: 8px; background: var(--placeholder); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--portrait { aspect-ratio: 4 / 5; max-height: 540px; }
.photo--square { aspect-ratio: 1 / 1; max-height: 580px; }
.photo--wide { aspect-ratio: 3 / 2; }
.credit { margin: 12px 2px 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-faint); }

/* ---------- home: hero ---------- */
/* No media queries anywhere: auto-fit + minmax collapses these grids intrinsically. */
.hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(26px, 5vw, 56px); align-items: center;
  padding-top: clamp(30px, 6vw, 76px); padding-bottom: clamp(28px, 5vw, 60px);
}
.hero__copy { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero__media { min-width: 0; }

/* ---------- home: credential strip ---------- */
.creds { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.creds__inner {
  display: flex; flex-wrap: wrap; gap: 10px 44px; align-items: baseline;
  padding-top: clamp(18px, 2.5vw, 26px); padding-bottom: clamp(18px, 2.5vw, 26px);
}
.creds__inner span { font-size: 15px; color: var(--ink-body); }
.creds__inner strong { font-weight: 600; }

/* ---------- home: facebook ---------- */
.fb { background: var(--raised); border-bottom: 1px solid var(--hairline); }
.fb__inner { padding-top: clamp(30px, 5vw, 60px); padding-bottom: clamp(30px, 5vw, 60px); }
.fb__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; margin-bottom: 22px; }
.fb__head a { font-size: 15.5px; font-weight: 500; white-space: nowrap; }
.fb__body { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(18px, 3vw, 32px); align-items: start; }
/* Contained on purpose: the Meta widget renders in Facebook's own styling, so it should read
   as a guest panel rather than native page furniture. Must not break at ~500px wide. */
.fb__feed { min-width: 0; width: 100%; max-width: 520px; border: 1px solid var(--input-border); border-radius: 10px; padding: 12px; background: var(--page); }
.fb__feed > * { width: 100% !important; }
.fb__side { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.fb__side p { margin: 0; font-size: clamp(16px, 1.9vw, 18px); line-height: 1.65; color: var(--ink-body); max-width: 40ch; }
.fb__videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fb__video { aspect-ratio: 16 / 10; border: 1px solid var(--hairline); border-radius: 8px; overflow: hidden; background: var(--page); }
.slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 20px; text-align: center; border-radius: 8px;
  border: 1px dashed var(--orange);
  background: repeating-linear-gradient(135deg, var(--raised) 0 8px, var(--band) 8px 16px);
}
/* Shown only when the Page plugin collapses because the Page is not public — see the guard
   script in index.html. Sized so the column does not jump when it replaces the feed. */
.fb-unavailable {
  display: flex; align-items: center; justify-content: center;
  min-height: 180px; margin: 0; padding: 24px; text-align: center;
}
.fb-unavailable a { font-size: 17px; font-weight: 500; }

.slot__title { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.slot__note { font-size: 13px; line-height: 1.6; color: var(--ink-faint); max-width: 30ch; }

/* ---------- home: page rows ---------- */
.rows { padding-top: clamp(30px, 5vw, 58px); padding-bottom: clamp(30px, 5vw, 58px); }
.row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px 32px; align-items: baseline; padding: 22px 0;
  border-top: 1px solid var(--hairline); text-decoration: none; color: inherit;
}
.rows .row:last-child { border-bottom: 1px solid var(--hairline); }
.row:hover { background: var(--band); color: inherit; }
.row__title { font-family: var(--serif); font-size: clamp(22px, 2.8vw, 28px); font-weight: 600; }
.row__desc { font-size: 15.5px; line-height: 1.55; color: var(--ink-3); }
.row__more { font-size: 15px; font-weight: 500; color: var(--blue); }

/* ---------- contact ---------- */
.contact { background: var(--band); border-top: 1px solid var(--hairline); }
.contact__inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(24px, 4vw, 48px); align-items: start;
  padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(32px, 5vw, 64px);
}
.contact__form-col { min-width: 0; }
.contact__h { margin: 0 0 8px; font-family: var(--serif); font-size: clamp(26px, 3.2vw, 34px); font-weight: 600; letter-spacing: -0.02em; }
.contact__intro { margin: 0 0 26px; font-size: 16px; line-height: 1.6; color: var(--ink-3); max-width: 42ch; }

.form { display: flex; flex-direction: column; gap: 18px; }
.form__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
/* 16px is a hard floor: anything smaller makes iOS zoom the page on focus. */
.field input, .field textarea {
  font-family: inherit; font-size: 16px; padding: 13px; width: 100%;
  border: 1px solid var(--input-border); border-radius: 7px;
  background: var(--raised); color: var(--ink);
}
.field textarea { line-height: 1.55; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border: 1.5px solid var(--error); background: var(--error-bg); }
.field__error { font-size: 13px; line-height: 1.45; color: var(--error); }
.field__error:empty { display: none; }
.form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form__note { font-size: 13px; color: var(--ink-muted); }
.honeypot { display: none; }

.sent { background: var(--raised); border-top: 3px solid var(--blue); border-radius: 4px 4px 10px 10px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.sent__kicker { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); }
.sent__title { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.sent__body { font-size: 15.5px; line-height: 1.6; color: var(--ink-3); }
.sent .btn--ghost { align-self: start; margin-top: 8px; }

.details { min-width: 0; display: flex; flex-direction: column; gap: 22px; padding-top: 6px; }
.details__item { display: flex; flex-direction: column; gap: 5px; }
.details__item a { font-size: 17px; font-weight: 500; }
.details__item a.break { word-break: break-word; }
.details__vote { border-top: 1px solid var(--divider); padding-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.details__vote strong { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.details__vote span { font-size: 14px; line-height: 1.55; color: var(--ink-3); }

/* ---------- roots ---------- */
/* align-items: start — the copy column is much taller than the square photo. */
.roots {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(26px, 5vw, 56px); align-items: start;
  padding-top: clamp(30px, 5vw, 68px); padding-bottom: clamp(30px, 5vw, 68px);
}
.roots__copy { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.roots__copy .h1-page { margin: 0; }
.roots__standfirst { margin: 0; font-family: var(--serif); font-size: clamp(18px, 2.1vw, 21px); line-height: 1.6; color: var(--ink-body); max-width: 42ch; }
.roots__copy p:not(.roots__standfirst) { margin: 0; font-size: clamp(16px, 1.9vw, 17.5px); line-height: 1.7; color: var(--ink-3); max-width: 46ch; }
/* 34px optically aligns the photo's top edge with the H1, past the eyebrow. */
.roots__media { min-width: 0; margin-top: 34px; }

/* ---------- experience ---------- */
.page-body { padding-top: clamp(30px, 5vw, 64px); padding-bottom: clamp(30px, 5vw, 64px); }
.page-body .h1-page { margin: 14px 0 clamp(26px, 4vw, 40px); }
.entries { display: flex; flex-direction: column; gap: clamp(24px, 3.5vw, 34px); }
/* Independent blocks: add or remove one without touching the others. */
.entry { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--hairline); padding-top: 20px; }
.entry__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.entry__kicker { font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: var(--orange-ink); }
.entry h2 { margin: 0; font-family: var(--serif); font-size: clamp(21px, 2.6vw, 26px); font-weight: 600; }
.entry p { margin: 0; font-size: 16.5px; line-height: 1.7; color: var(--ink-body); max-width: 62ch; }
.page-foot { margin-top: clamp(32px, 5vw, 52px); border-top: 1px solid var(--hairline); padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.page-foot a:not(.btn) { font-size: 15.5px; font-weight: 500; }

/* ---------- vision ---------- */
/* Client-requested photo above the statement. Landscape source, so it runs the full narrow
   container rather than sitting beside the quote, which would squeeze the 50ch measure. */
.vision__photo { margin: clamp(22px, 3.5vw, 34px) 0 clamp(26px, 4vw, 38px); }

/* The client's Vision copy is one continuous first-person quote, so the whole page
   is set as an attributed statement. Holds 25-65 words per paragraph. */
.statement { margin: 0; border-left: 3px solid var(--orange); padding: 4px 0 4px clamp(18px, 3vw, 30px); display: flex; flex-direction: column; gap: clamp(16px, 2.2vw, 22px); }
.statement__label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.statement p { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(18px, 2.1vw, 21px); line-height: 1.62; color: var(--ink-quote); max-width: 50ch; }
.statement footer { font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }

.priorities { margin-top: clamp(28px, 4vw, 44px); border-top: 1px solid var(--hairline); padding-top: clamp(20px, 3vw, 26px); }
.priorities__label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.priorities__grid { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.priorities__grid div { border-top: 1px solid var(--orange); padding-top: 10px; font-size: 15.5px; line-height: 1.45; font-weight: 500; color: var(--ink-body); }

.closer { margin-top: clamp(30px, 4.5vw, 48px); background: var(--blue); border-radius: 10px; padding: clamp(26px, 4vw, 38px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.closer__copy { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.closer__date { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-blue-soft); }
.closer__title { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 34px); font-weight: 600; line-height: 1.1; color: var(--raised); max-width: 24ch; text-wrap: balance; }
.closer a { text-decoration: none; color: var(--raised); font-size: 15.5px; font-weight: 500; padding: 13px 22px; border-radius: 7px; border: 1.5px solid var(--on-blue-border); white-space: nowrap; }
.closer a:hover { border-color: var(--raised); color: var(--raised); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); background: var(--page); }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-top: clamp(26px, 4vw, 40px); padding-bottom: clamp(26px, 4vw, 40px); }
.site-footer__col { display: flex; flex-direction: column; gap: 7px; }
.site-footer__col a { font-size: 14.5px; }
.site-footer__brand { display: flex; flex-direction: column; gap: 8px; }
.site-footer__brand strong { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.site-footer__brand span { font-size: 13.5px; line-height: 1.55; color: var(--ink-3); }
.site-footer__legal { border-top: 1px solid var(--hairline); }
.site-footer__legal-inner { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; padding-top: clamp(18px, 3vw, 26px); padding-bottom: clamp(18px, 3vw, 26px); }
.site-footer__legal p { margin: 0; font-size: 13px; line-height: 1.65; }
.acknowledgement { color: var(--ink-3); max-width: 62ch; }
.authorization { color: var(--ink-muted); max-width: 34ch; display: flex; flex-direction: column; gap: 5px; }
