/* Cardiff Group v2, straight-coded static build.
   Visual spec from the design handoff:
   bg #FAF7F0 · primary #0E2A3A · secondary #2E6E9E · accent #D9A441
   Poppins. No gray/pink UI, no gradients. */

:root {
  --bg: #EDF2F7;
  --primary: #102F3F;
  --button: #173E65;
  --muted: #526578;
  --secondary: #2E6E9E;
  --accent: #D9A441;
  --rule: #102F3F;
  --max-width: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--primary);
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; }

a { color: var(--secondary); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--button);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

.kicker {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
  margin: 0 0 16px;
}

/* ---------- Header ---------- */

/* ---------- Header (identical on all three pages) ---------- */

.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--primary);
}

.brand-mark {
  width: 44px;
  height: auto;
  display: block;
}

.brand-word {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
}

.site-nav a {
  display: inline-block;
  padding: 10px 0;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.site-nav a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .site-header { padding: 18px 20px; }
  .brand-mark { width: 34px; }
  .brand-word { font-size: 20px; }
  .site-nav { gap: 0 20px; }
  .site-nav a { font-size: 15px; }
}




/* ---------- Layout ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 56px;
}

section { padding: 64px 0; }
section + section { border-top: 1px solid var(--rule); }

/* ---------- Hero + form ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 55fr 45fr;
  grid-template-areas:
    "intro   form"
    "preview form";
  column-gap: 56px;
  align-items: start;
}
.hero-intro { grid-area: intro; }
.form-col { grid-area: form; }
#setup-form, #get-started { scroll-margin-top: 24px; }
.hero-preview { grid-area: preview; }

/* Structural wrapper for the form column inside the hero grid. */
.form-col { min-width: 0; }

.hero-intro h1 {
  font-size: 72px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lede {
  font-size: 20px;
  color: var(--muted);
  max-width: 34em;
}

.email-preview { margin-top: 40px; }
.email-preview h2 { font-size: 28px; }
.email-preview ul { list-style: none; padding: 0; margin: 0; }
.email-preview li {
  padding: 14px 0;
  font-size: 18px;
}
.email-preview li::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 4px;
  background: var(--accent);
  margin-right: 14px;
  vertical-align: middle;
}

/* ---------- Form ---------- */

#setup-form h2 { font-size: 34px; }
.form-helper { color: var(--muted); margin-top: -8px; }

.field { margin: 18px 0; }
.field label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
}
.field input[aria-invalid="true"] { border-width: 2px; }

.field-error {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}
.field-error::before { content: "▸ "; color: var(--secondary); }

.honeypot { display: none; }

.tool-line { font-size: 16px; margin: 20px 0 8px; }
.tool-line button {
  background: none;
  border: none;
  padding: 0 0 0 10px;
  font: inherit;
  color: var(--secondary);
  text-decoration: underline;
  cursor: pointer;
}

.tool-picker {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 0 0 8px;
  background: #fff;
}
.tool-picker legend { font-size: 14px; font-weight: 600; padding: 0 6px; }
.tool-picker label {
  display: block;
  padding: 8px 0;
  font-size: 16px;
  cursor: pointer;
}
.tool-picker input { margin-right: 10px; accent-color: var(--primary); }

.error-summary {
  border: 2px solid var(--primary);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 16px;
  background: #fff;
}
.error-summary p { margin: 0 0 6px; font-weight: 600; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--secondary); }

button.primary {
  width: 100%;
  margin-top: 10px;
  padding: 16px;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: var(--button);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
button.primary:hover { background: #102C49; }
button.primary:disabled { opacity: 0.65; cursor: wait; }

.fine { font-size: 14px; color: var(--muted); }

.form-status {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 500;
}

/* ---------- Confirmation ---------- */

.confirmation h2 { font-size: 48px; }
.conf-sub { font-size: 22px; color: var(--muted); }
.conf-details { margin: 24px 0; }
.conf-details > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.conf-details dt { font-weight: 600; font-size: 16px; }
.conf-details dd { margin: 0; font-size: 16px; }

/* ---------- Pedigree strip ---------- */

.pedigree {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.pedigree-item strong { display: block; font-size: 22px; }
.pedigree-item span { font-size: 16px; color: var(--muted); }

/* ---------- About / leadership ---------- */

#about h2, #other-tools h2 { font-size: 40px; }

/* Leaders: one open block, three across on desktop — not a chapter per name. */
.leaders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
  margin: 40px 0 0;
}
.leader { padding: 0; min-width: 0; }
.leader h3 { font-size: 24px; margin: 0 0 6px; }
.leader-role { font-weight: 600; font-size: 16px; margin: 0 0 4px; }
.leader p:last-child { margin: 0; font-size: 16px; color: var(--muted); }
.leader-backer { grid-column: 1 / -1; }
.leader-backer h3 { font-size: 17px; font-weight: 500; color: var(--muted); margin: 0; }

.cardiff-contact { margin: 64px 0 32px; }
.cardiff-contact h3 { font-size: 28px; }
.contact-line { font-size: 18px; }

.return-link { font-size: 18px; }

/* ---------- Tool rows ---------- */

.tool-rows { list-style: none; padding: 0; margin: 28px 0; }
.tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.tool-row h3 { font-size: 20px; margin: 0 0 2px; }
.tool-row p { margin: 0; font-size: 16px; color: var(--muted); }
.tool-goto { min-height: 44px; }
.tool-row .ph-block { margin: 0; max-width: 40em; }

.tool-goto {
  flex: none;
  background: none;
  border: none;
  padding: 8px 4px;
  font: inherit;
  font-size: 16px;
  color: var(--secondary);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

.tools-note { margin-top: 24px; }

.tools-intro { margin: 0 0 8px; }

/* ---------- Placeholders: always visible, never mistaken for copy ---------- */

.ph-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary);
  border: 1px dashed var(--accent);
  border-radius: 4px;
  padding: 2px 8px;
  margin-right: 8px;
  vertical-align: middle;
}
.ph-block {
  border: 1px dashed var(--accent);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--primary);
}
.ph-link {
  pointer-events: none;
  text-decoration: underline dotted;
}

/* ---------- Footer (identical on all three pages) ---------- */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 32px 48px;
  text-align: center;
  border-top: 1px solid var(--rule);
}

.footer-brand { justify-content: center; margin-bottom: 12px; }
.site-footer .locale { margin: 0 0 8px; padding: 0; font-size: 15px; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 28px;
}

.footer-nav a {
  display: inline-block;
  padding: 10px 0;
  font-size: 15px;
}

.footer-nav a[aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.footer-fine { margin: 8px 0 0; font-size: 14px; }

@media (max-width: 600px) {
  .site-footer { padding: 48px 20px 40px; }
  .footer-nav { gap: 0 20px; }
}

/* ---------- Footer ---------- */


/* ---------- Mobile: stack under ~800px ---------- */

@media (max-width: 800px) {
  body { font-size: 17px; }

  main { padding: 0 22px; }
  section { padding: 44px 0; }

  .leaders { grid-template-columns: 1fr; gap: 24px; }
  .tool-row { align-items: flex-start; flex-direction: column; gap: 0; padding: 12px 0; }
  .tool-goto { padding: 8px 0; }
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "intro" "form" "preview";
    row-gap: 32px;
  }
  .hero-preview { margin-top: 8px; }
  .hero-intro h1 { font-size: 40px; }
  .lede { font-size: 18px; }
  .email-preview h2 { font-size: 24px; }

  #setup-form h2 { font-size: 30px; }
  .field input[type="text"],
  .field input[type="email"],
  button.primary { min-height: 50px; font-size: 16px; }

  .pedigree { grid-template-columns: 1fr; gap: 20px; }

  #about h2, #other-tools h2 { font-size: 30px; }


  .tool-goto { padding-left: 0; }

  .confirmation h2 { font-size: 36px; }
}

/* ---------- Note for visiting AI agents (collapsed line at the very top) ---------- */
.agent-note { max-width: var(--max-width); margin: 0 auto; padding: 8px 32px 0; font-size: 14px; color: var(--muted); }
.agent-note summary { cursor: pointer; display: inline-block; padding: 6px 0; color: var(--muted); }
.agent-note summary:hover { color: var(--primary); text-decoration: underline; }
.agent-note[open] summary { color: var(--primary); font-weight: 500; }
.agent-note-body { max-width: 62ch; padding: 8px 0 28px; font-size: 15px; line-height: 1.6; color: var(--primary); }
.agent-note-body h3 { font-size: 17px; margin: 24px 0 8px; }
.agent-note-body blockquote { margin: 12px 0; padding: 0 0 0 16px; border-left: 3px solid var(--accent); }
.agent-note-rule { border: 0; border-top: 1px solid var(--rule); margin: 24px 0; opacity: 0.4; }
@media (max-width: 600px) { .agent-note { padding: 6px 20px 0; } }
/* ---------- end agent note ---------- */

/* ---------- Evidence (NN/g: trust comes from evidence) ---------- */
.proof { margin-top: 56px; max-width: 900px; }
.proof-lede { font-size: 18px; margin: 0 0 20px; max-width: 62ch; }
.proof-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 40px; }
.proof-list li { font-size: 17px; color: var(--muted); }
.proof-list strong { display: block; font-size: 28px; font-weight: 600; color: var(--primary); }
.proof-quote { margin: 0 0 12px; padding: 0 0 0 18px; border-left: 3px solid var(--accent); }
.proof-quote p { font-size: 20px; margin: 0 0 6px; }
.proof-quote footer { font-size: 15px; color: var(--muted); }
@media (max-width: 600px) { .proof-list { grid-template-columns: 1fr; } }
.proof-quotes-small { list-style: none; padding: 0; margin: 20px 0 12px; display: grid; gap: 8px; }
.proof-quotes-small li { font-size: 17px; }
.proof-quotes-small span { display: inline; color: var(--muted); font-size: 15px; margin-left: 6px; }

/* ---------- Mobile hamburger nav ---------- */
/* Hidden on desktop. Below 768px the desktop .site-nav hides and the
   hamburger button + dropdown panel take over. */

.nav-toggle {
  display: none;
}

.mobile-nav[hidden] { display: none; }

@media (max-width: 768px) {
  .site-header { position: relative; }
  .site-nav { display: none; }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 6px;
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary);
  }

  .mobile-nav {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    z-index: 60;
    background: var(--bg);
    border: 1px solid var(--primary);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16, 47, 63, 0.18);
    padding: 8px;
  }

  .mobile-nav a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    color: var(--primary);
    border-radius: 6px;
  }

  .mobile-nav a:hover {
    background: rgba(46, 110, 158, 0.12);
    text-decoration: none;
  }
}
/* ---------- end mobile hamburger nav ---------- */

/* Closing CTA link-button (conversion restructure 2026-09-27) */
a.cta-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: var(--button);
  border-radius: 8px;
  text-decoration: none;
}
a.cta-btn:hover { background: #102C49; }
