/*
  shared.css — Brickfield Teaching with AI microsite
  Every page on the site imports this file.
  All colours verified WCAG 2.2 Level AA.
*/

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ── */
:root {
  /* Brand */
  --navy:        #1a2744;   /* primary — headers, hero */
  --navy-deep:   #111a30;   /* footer bg */
  --navy-mid:    #243459;   /* hover states */
  --orange:      #c93a1a;   /* Brickfield orange — CTA, accent */
  --orange-lt:   #fdf0ec;   /* light orange tint */
  --orange-mid:  #a52e12;   /* orange hover */

  /* Surfaces */
  --cream:       #faf8f4;   /* page background */
  --stone:       #f2ede4;   /* section alternates */
  --stone-dark:  #e4dcd0;   /* stone borders */
  --white:       #ffffff;

  /* Text — all verified AA on their expected backgrounds */
  --ink:         #1a2744;   /* primary text — 14.5:1 on white */
  --ink-mid:     #3a4a62;   /* body text — 8.99:1 on white */
  --ink-soft:    #4e5f7a;   /* secondary text — 6.48:1 on white, 6.11:1 on cream */

  /* Semantic — all AA on their paired backgrounds */
  --strip-bg:    #fff4f0;
  --strip-border:#c93a1a;
  --strip-text:  #7a2000;   /* 9.56:1 on #fff4f0 */
  --strip-strong:#4d1300;   /* 13.81:1 on #fff4f0 */

  --warn-bg:     #fff8ed;
  --warn-border: #a06010;
  --warn-text:   #6b3d00;   /* 8.1:1 on #fff8ed */
  --warn-strong: #3d2200;

  --success-bg:  #edfaf3;
  --success-border:#1a7a4a;
  --success-text:#0a3d22;   /* 11.2:1 on #edfaf3 */

  /* Pathway colours */
  --p1:          #6d3fc0;   /* understanding — violet */
  --p1-lt:       #f0ebfb;
  --p2:          #0b7a6b;   /* setting up — teal */
  --p2-lt:       #e6f4f2;
  --p3:          #c93a1a;   /* using daily — orange */
  --p3-lt:       #fdf0ec;

  /* Structure */
  --rule:        rgba(26, 39, 68, .12);
  --max:         1160px;
  --r:           10px;
  --rl:          16px;
  --sh:          0 2px 12px rgba(0,0,0,.06);
  --sh-lg:       0 8px 32px rgba(0,0,0,.12);

  /* Typography */
  --font-head:   'DM Sans', system-ui, sans-serif;  /* serif removed — all sans */
  --font-body:   'DM Sans', system-ui, sans-serif;
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--navy);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus { top: 1rem; }

/* ════════════════════════════════════════
   SITE HEADER — matches Prompt Lab exactly
════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 2px solid var(--orange);
  padding: 0 1.5rem;
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Logo group */
.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  height: 34px;
  width: auto;
  display: block;
}
.logo-divider {
  width: 1px;
  height: 26px;
  background: rgba(255,255,255,.25);
  flex-shrink: 0;
}
/* Site name — DM Sans (not serif) per brief */
.site-name {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -.02em;
  line-height: 1.2;
  white-space: nowrap;
}
.site-name strong {
  font-weight: 600;
  color: #ff9a7e;  /* 7.18:1 on --navy — AA large */
}

/* Main nav */
.main-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
  list-style: none;
}
.main-nav a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.82);  /* 10.6:1 on --navy — AAA */
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a:focus-visible {
  background: rgba(255,255,255,.13);
  color: #fff;
  border-color: rgba(255,255,255,.3);
}
.main-nav a[aria-current="page"] {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}
.main-nav a:focus-visible { outline: 2px solid #ff9a7e; outline-offset: 2px; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--r);
  padding: 6px 10px;
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  margin-left: auto;
}
.nav-toggle:focus-visible { outline: 2px solid #ff9a7e; outline-offset: 2px; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 66px;
  left: 0;
  right: 0;
  background: var(--navy-deep);
  border-bottom: 2px solid var(--orange);
  padding: 1rem 1.5rem;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,.88);  /* 12.2:1 on #111a30 — AAA */
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--r);
  transition: background .15s;
}
.mobile-nav a:hover,
.mobile-nav a:focus-visible { background: rgba(255,255,255,.1); color: #fff; }
.mobile-nav a:focus-visible { outline: 2px solid #ff9a7e; outline-offset: 2px; }
.mobile-nav a[aria-current="page"] { color: #ff9a7e; }

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
}

/* ════════════════════════════════════════
   SITE FOOTER
════════════════════════════════════════ */
.site-footer {
  background: var(--navy-deep);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 2rem 1.5rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-left {
  font-size: 13px;
  color: rgba(255,255,255,.72);  /* 8.44:1 on #111a30 — AAA */
  line-height: 1.6;
}
.footer-left a {
  color: rgba(255,255,255,.72);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-left a:hover { color: #fff; }
.footer-left a:focus-visible { outline: 2px solid #ff9a7e; outline-offset: 2px; }

.footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  list-style: none;
}
.footer-nav a {
  font-size: 12px;
  color: rgba(255,255,255,.58);  /* 5.98:1 on #111a30 — AA */
  text-decoration: none;
  transition: color .15s;
}
.footer-nav a:hover { color: rgba(255,255,255,.88); }
.footer-nav a:focus-visible { outline: 2px solid #ff9a7e; outline-offset: 2px; }

/* ════════════════════════════════════════
   PAGE LAYOUT HELPERS
════════════════════════════════════════ */
.page-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

/* Page hero (inner pages) */
.page-hero {
  background: var(--navy);
  padding: 3.5rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--orange);
}
.page-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.page-hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .07em;
  color: rgba(255,255,255,.65);  /* 7.08:1 on navy — AA */
  margin-bottom: .75rem;
  display: block;
}
.page-hero h1 {
  font-family: 'DM Sans', system-ui, sans-serif;  /* explicitly sans — never serif */
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.015em;
  color: #fff;
  margin-bottom: .75rem;
}
.page-hero h1 em { font-style: italic; color: #ff9a7e; }
.page-hero-lede {
  font-size: clamp(15px, 2vw, 17px);
  color: rgba(255,255,255,.78);  /* 9.58:1 on navy — AAA */
  max-width: 640px;
  line-height: 1.75;
  font-weight: 300;
}

/* Breadcrumb */
.breadcrumb {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  font-size: 13px;
  color: var(--ink-soft);  /* 6.48:1 on cream — AA */
}
.breadcrumb li + li::before {
  content: '›';
  margin-right: .25rem;
  color: var(--ink-soft);
}
.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.breadcrumb [aria-current="page"] { color: var(--ink-mid); font-weight: 500; }

/* ════════════════════════════════════════
   TYPOGRAPHY — CONTENT PAGES
════════════════════════════════════════ */
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--ink-soft);
  margin-bottom: .6rem;
  display: block;
}
.section-heading {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: .75rem;
  line-height: 1.15;
}
.section-heading em { font-style: italic; color: var(--orange); }
.section-intro {
  font-size: 16px;
  color: var(--ink-mid);
  max-width: 600px;
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 2.5rem;
}

/* Content card */
.content-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--rl);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--sh);
}
.content-card h2 {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: .6rem;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.content-card h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin: 1.25rem 0 .4rem;
}
.content-card p {
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.75;
  margin-bottom: .85rem;
  max-width: 680px;
}
.content-card p:last-child { margin-bottom: 0; }

/* Step list */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 1rem 0;
}
.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.65;
}
.steps li:last-child { border-bottom: none; }
.step-num {
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange-lt);
  border: 1px solid rgba(201,58,26,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange-mid);  /* 6.2:1 on #fdf0ec — AA */
  flex-shrink: 0;
  margin-top: 2px;
}
.steps li strong { color: var(--ink); font-weight: 500; }

/* ════════════════════════════════════════
   NOTIFICATION STRIPS — all AA verified
════════════════════════════════════════ */

/* Data / orange warning */
.data-strip {
  background: var(--strip-bg);
  border: 1.5px solid var(--strip-border);
  border-radius: var(--r);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--strip-text);  /* 9.56:1 on #fff4f0 */
  line-height: 1.7;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.data-strip-icon {
  min-width: 22px;
  height: 22px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.data-strip strong { font-weight: 600; color: var(--strip-strong); }

/* Amber caution */
.warn-strip {
  background: var(--warn-bg);
  border: 1.5px solid var(--warn-border);
  border-radius: var(--r);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--warn-text);  /* 8.1:1 on #fff8ed */
  line-height: 1.7;
  margin: 1rem 0;
}
.warn-strip strong { font-weight: 600; color: var(--warn-strong); }

/* Info / teal */
.info-strip {
  background: #e6f4f2;
  border: 1.5px solid #0b7a6b;
  border-radius: var(--r);
  padding: 14px 18px;
  font-size: 14px;
  color: #064038;  /* 9.8:1 on #e6f4f2 — AAA */
  line-height: 1.7;
  margin: 1rem 0;
}
.info-strip strong { font-weight: 600; color: #042920; }

/* Success / green */
.success-strip {
  background: var(--success-bg);
  border: 1.5px solid var(--success-border);
  border-radius: var(--r);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--success-text);  /* 11.2:1 on #edfaf3 */
  line-height: 1.7;
  margin: 1rem 0;
}
.success-strip strong { font-weight: 600; }

/* ════════════════════════════════════════
   BUTTONS
════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 99px;
  background: var(--orange);
  color: #fff;  /* 4.72:1 on --orange — AA */
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .15s, transform .1s;
}
.btn-primary:hover { background: var(--orange-mid); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 99px;
  background: var(--white);
  color: var(--ink);  /* 14.5:1 on white */
  text-decoration: none;
  border: 1.5px solid var(--rule);
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}
.btn-secondary:hover { border-color: var(--navy); box-shadow: var(--sh); }
.btn-secondary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 24px;
  border-radius: 99px;
  background: none;
  color: var(--ink) !important;  /* prevent browser default blue — 14.5:1 on white */
  text-decoration: none;
  border: 1.5px solid var(--rule);
  transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--stone); border-color: var(--navy); color: var(--ink) !important; }
.btn-ghost:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* btn-ghost-dark = ghost button on navy/dark backgrounds */
.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 24px;
  border-radius: 99px;
  background: none;
  color: rgba(255,255,255,.88);  /* 12.2:1 on --navy */
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.32);
  transition: background .15s, border-color .15s, color .15s;
}
.btn-ghost-dark:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.6);
  color: #fff;
}
.btn-ghost-dark:focus-visible { outline: 3px solid #ff9a7e; outline-offset: 2px; }

/* ════════════════════════════════════════
   COPY BUTTON + PROMPT BLOCKS
════════════════════════════════════════ */
.prompt-block {
  background: var(--stone);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1.1rem 1.4rem;
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.8;
  white-space: pre-wrap;
  font-family: var(--font-body);
  margin: .75rem 0;
}
.prompt-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .07em;
  color: var(--ink-soft);
  margin-bottom: .4rem;
  display: block;
}
.copy-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 99px;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink-mid);
  cursor: pointer;
  transition: background .15s, color .15s;
  margin-top: .5rem;
  font-family: var(--font-body);
}
.copy-btn:hover { background: var(--navy); color: #fff; }
.copy-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ════════════════════════════════════════
   FORMS
════════════════════════════════════════ */
.field { margin-bottom: 1.25rem; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: .4rem;
  line-height: 1.4;
}
.field label span {
  font-weight: 300;
  color: var(--ink-soft);
}
.field input[type="text"],
.field input[type="search"],
.field textarea,
.field select {
  width: 100%;
  background: var(--stone);
  border: 1px solid var(--stone-dark);
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  transition: border-color .15s;
  appearance: none;
  -webkit-appearance: none;
}
.field input[type="text"]:focus,
.field input[type="search"]:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(201,58,26,.12);
}
.field textarea { resize: vertical; min-height: 80px; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234e5f7a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
.field-hint {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: .35rem;
  line-height: 1.5;
}

/* ════════════════════════════════════════
   TABLES
════════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--ink-mid);
  margin: 1rem 0;
}
.data-table caption {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  text-align: left;
  margin-bottom: .5rem;
  caption-side: top;
}
.data-table th {
  text-align: left;
  font-weight: 500;
  color: var(--ink);
  background: var(--stone);
  padding: 10px 14px;
  border-bottom: 2px solid var(--stone-dark);
  font-size: 13px;
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.6;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(26,39,68,.03); }

/* ════════════════════════════════════════
   CHECKLIST
════════════════════════════════════════ */
.checklist { list-style: none; margin: 1rem 0; }
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.6;
}
.checklist li:last-child { border-bottom: none; }
.chk {
  min-width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1.5px solid var(--stone-dark);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  font-size: 12px;
  color: transparent;
  flex-shrink: 0;
  margin-top: 1px;
}
.chk:hover { border-color: var(--orange); }
.chk:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.chk.done { background: var(--navy); border-color: var(--navy); color: #fff; }
.checklist li.done-item > span {
  text-decoration: line-through;
  color: var(--ink-soft);
}

/* ════════════════════════════════════════
   ALTERNATING SECTION BACKGROUNDS
════════════════════════════════════════ */
.section-cream  { background: var(--cream); }
.section-stone  { background: var(--stone); border-top: 1px solid var(--stone-dark); border-bottom: 1px solid var(--stone-dark); }
.section-navy   { background: var(--navy); }
.section-white  { background: var(--white); }

/* ════════════════════════════════════════
   RESPONSIVE UTILITIES
════════════════════════════════════════ */
@media (max-width: 640px) {
  .page-wrap { padding: 2.5rem 1rem 4rem; }
  .content-card { padding: 1.25rem; }
}

/* ════════════════════════════════════════
   MOTION
════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.fade-up   { animation: fadeUp .5s ease both; }
.fade-up-1 { animation-delay: .1s; }
.fade-up-2 { animation-delay: .2s; }
.fade-up-3 { animation-delay: .3s; }
.fade-up-4 { animation-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  *, .fade-up, .fade-up-1, .fade-up-2, .fade-up-3, .fade-up-4 {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
