/*
Theme Name: CACFF Clear Shield
Theme URI: https://canadiansagainstcyberfraud.ca
Author: Canadians Against Cyber Fraud Foundation
Author URI: https://canadiansagainstcyberfraud.ca
Description: A calm, accessible WordPress theme for Canadians Against Cyber Fraud Foundation.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: cacff-clear-shield
*/

/* Self-hosted fonts. No third-party requests. */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --blue-900: #0b2f4a;
  --blue-800: #123f63;
  --blue-700: #17617a;
  --teal-700: #1f6f6b;
  --teal-100: #e8f3f2;
  --ink: #1f2933;
  --muted: #52606d;
  --line: #d9e2ec;
  --bg: #fbfcfd;
  --surface: #ffffff;
  --surface-soft: #f4f7f9;
  --accent: #8a6f2a;
  --focus: #0f6fff;
  --shadow: 0 10px 30px rgba(11, 47, 74, 0.08);
  --radius: 16px;
  --max: 1120px;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Newsreader", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

img, svg { max-width: 100%; }
a { color: var(--blue-800); text-underline-offset: 0.2em; }
a:hover { color: var(--blue-700); }

h1, h2, h3, h4 {
  margin: 0 0 0.65rem;
  font-family: var(--font-head);
  line-height: 1.12;
  color: var(--blue-900);
  font-weight: 600;
}
h1 { font-size: clamp(2.2rem, 6.4vw, 4.4rem); letter-spacing: -0.01em; max-width: 940px; font-weight: 600; }
h2 { font-size: clamp(1.75rem, 4vw, 2.7rem); letter-spacing: -0.005em; }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); font-weight: 600; }
p { margin: 0 0 1.1rem; }
ul, ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
li { margin: 0.35rem 0; }
strong { font-weight: 700; color: var(--blue-900); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -8rem;
  background: var(--blue-900);
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 0 0 10px 10px;
  z-index: 9999;
}
.skip-link:focus { top: 0; color: #fff; }

.container {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section-tight { padding-block: clamp(2rem, 6vw, 3.5rem); }
.section-soft { background: var(--surface-soft); }
.measure { max-width: 720px; }
.measure-wide { max-width: 900px; }
.lead { font-size: clamp(1.2rem, 2.6vw, 1.5rem); color: var(--muted); line-height: 1.55; }
.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--teal-700);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--blue-900);
  text-decoration: none;
  font-weight: 700;
}
.brand:hover { color: var(--blue-900); }
.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--blue-800);
  border-radius: 12px;
  color: var(--blue-800);
  background: var(--teal-100);
}
.brand-text { line-height: 1.1; }
.brand-name { display: block; font-size: 1rem; font-weight: 700; }
.brand-sub { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--blue-900);
  min-width: 48px;
  min-height: 48px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
}
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.96rem;
}
.nav-links a:hover { background: var(--surface-soft); color: var(--blue-800); }
.nav-links .nav-cta a { background: var(--blue-800); color: #fff; margin-left: 0.25rem; }
.nav-links .nav-cta a:hover { background: var(--blue-900); color: #fff; }

.hero {
  padding-block: clamp(4rem, 10vw, 7rem);
  background:
    radial-gradient(circle at 88% 18%, rgba(31, 111, 107, 0.12), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}
.hero h1 { font-weight: 600; }
.hero-actions, .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
  border: 2px solid transparent;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.2;
}
.btn-primary { background: var(--blue-800); color: #fff; }
.btn-primary:hover { background: var(--blue-900); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--blue-800); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-soft); color: var(--blue-900); border-color: var(--blue-700); }
.link-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--blue-800);
}

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow);
}
.card-flat { box-shadow: none; }
.card h3 { margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }
.pillar { border-top: 4px solid var(--teal-700); }

.trust-band {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.trust-item { font-size: 0.98rem; color: var(--muted); }
.trust-item strong { display: block; font-size: 1.05rem; margin-bottom: 0.15rem; font-weight: 700; }

.check-list, .warning-list {
  list-style: none;
  padding-left: 0;
}
.check-list li, .warning-list li {
  position: relative;
  padding-left: 1.9rem;
  margin: 0.65rem 0;
}
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal-700);
  font-weight: 700;
}
.warning-list li::before {
  content: "\26A0";
  position: absolute;
  left: 0.1rem;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

.callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-left: 6px solid var(--teal-700);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.25rem;
}
.callout strong { display: block; margin-bottom: 0.25rem; }

/* Invitation band for institutions and partners */
.invite {
  background:
    radial-gradient(circle at 12% 20%, rgba(31, 111, 107, 0.16), transparent 40%),
    var(--blue-900);
  color: #eaf1f7;
}
.invite h2 { color: #fff; }
.invite .eyebrow { color: #8fd0c9; }
.invite p { color: #cddbe8; }
.invite .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.invite .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: #fff; }

.page-hero {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  border-bottom: 1px solid var(--line);
}

.scam-block {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.scam-block + .scam-block { margin-top: 1.25rem; }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
  font-weight: 700;
  font-family: var(--font-body);
}

.fact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.fact {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.1rem 1.25rem;
}
.fact strong { display: block; font-size: 1.05rem; margin-bottom: 0.2rem; }

.form-grid { display: grid; gap: 1rem; }
label { font-weight: 700; color: var(--blue-900); }
input, textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
textarea { min-height: 180px; resize: vertical; }
.form-note { color: var(--muted); font-size: 0.98rem; }
.honeypot { position: absolute; left: -10000px; opacity: 0; }
.notice {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--teal-100);
  margin-bottom: 1rem;
}
.notice-error { background: #fff8e5; }

.site-footer {
  background: var(--blue-900);
  color: #e6eef5;
  padding-block: 3rem;
}
.site-footer h2, .site-footer h3 { color: #fff; font-family: var(--font-head); }
.site-footer a { color: #ffffff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.5rem;
}
.footer-small { color: #cbd7e3; font-size: 0.95rem; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin: 0.3rem 0; }

@media (max-width: 900px) {
  body { font-size: 1.06rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 76px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { width: 100%; justify-content: flex-start; }
  .nav-links .nav-cta a { margin-left: 0; justify-content: center; }
  .grid-2, .grid-3, .trust-grid, .footer-grid, .scam-block, .fact-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .container { padding-inline: 1rem; }
  .brand-icon { width: 38px; height: 38px; }
  .brand-name { font-size: 0.9rem; }
  .brand-sub { font-size: 0.66rem; }
  .hero-actions .btn, .action-row .btn { width: 100%; }
  .steps li { grid-template-columns: 40px 1fr; }
}

/* Keep colours and the primary button visible when the page is printed or saved to PDF */
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .site-header { position: static; }
  .btn-primary { background: var(--blue-800) !important; color: #fff !important; border-color: var(--blue-800) !important; }
  .btn-secondary { border-color: var(--blue-700) !important; color: var(--blue-800) !important; }
  .invite { background: var(--blue-900) !important; color: #fff !important; }
}
