/* =========================================================
   VeriLinq: stylesheet
   Implements Brand Guidelines v0.1 (see BRANDING.md).
   Tokens below are the single source of truth for colours.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --color-bg: #F8FAFC;          /* page background */
  --color-surface: #FFFFFF;     /* cards, header */
  --color-text: #1E293B;        /* primary text */
  --color-text-muted: #64748B;  /* secondary text */
  --color-accent: #2563EB;      /* primary blue: links, buttons, attention */
  --color-accent-dark: #1D4ED8; /* primary hover state */
  --color-teal: #14B8A6;        /* accent teal: decorative only, fails contrast as text */
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-error: #DC2626;
  --color-border: #E2E8F0;
  --color-alt-bg: #F1F5F9;      /* alternating section background */

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;

  --space-section: 4.5rem;
  --max-width: 1100px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1, h2, h3 {
  line-height: 1.25;
  color: var(--color-text);
}

h1 {
  font-weight: 700;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

a {
  color: var(--color-accent);
  transition: color 0.15s ease;
}

a:hover,
a:focus {
  color: var(--color-accent-dark);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

/* ---------- Header & navigation ---------- */
.site-header {
  background: var(--color-text);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: #FFFFFF;
  letter-spacing: 0.01em;
}

.brand-logo {
  height: 26px;
  width: auto;
}

/* Teal is permitted as text here because the header background is dark;
   the contrast restriction in BRANDING.md applies to teal on white. */
.wordmark-accent {
  color: var(--color-teal);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: #CBD5E1;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus {
  color: #FFFFFF;
  text-decoration: underline;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 0.4rem 0.9rem;
  font: inherit;
  color: #FFFFFF;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-section) 0 3.5rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 0.9rem;
}

.hero h1 {
  font-size: 2.35rem;
  margin: 0 0 1rem;
  max-width: 42rem;
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 44rem;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.button-primary {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.button-primary:hover,
.button-primary:focus {
  background: var(--color-accent-dark);
  color: #ffffff;
  box-shadow: var(--shadow-hover);
}

.button-secondary {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.button-secondary:hover,
.button-secondary:focus {
  background: rgba(37, 99, 235, 0.06);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-section) 0;
}

.section-alt {
  background: var(--color-alt-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-intro {
  max-width: 46rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.disclaimer {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 0.9rem;
  margin-top: 2rem;
  max-width: 46rem;
}

/* ---------- Steps (How it works) ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.step-number {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

.card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: box-shadow 0.15s ease;
}

.card > * {
  width: 100%;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card p {
  margin: 0;
  color: var(--color-text-muted);
}

.card-highlight {
  border-color: var(--color-teal);
  border-width: 2px;
}

.card-icon {
  width: 26px;
  height: 26px;
  color: var(--color-accent);
  margin-bottom: 0.85rem;
}

.card .more-link {
  margin-top: auto;
  padding-top: 1.1rem;
}

.more-link a {
  display: inline-block;
  padding: 0.45rem 1rem;
  margin: 0.2rem 0.35rem 0.2rem 0;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.more-link a:hover,
.more-link a:focus {
  background: var(--color-accent);
  color: #ffffff;
  text-decoration: none;
}

/* ---------- Problem section benefits ---------- */
.benefits {
  margin-top: 3rem;
  max-width: 46rem;
}

.benefits p {
  color: var(--color-text-muted);
}

.benefits ul {
  color: var(--color-text-muted);
  padding-left: 1.4rem;
}

.benefits li {
  margin-bottom: 0.6rem;
}

.benefits strong {
  color: var(--color-text);
}

/* ---------- Use cases ---------- */
.use-case-group {
  font-size: 1.3rem;
  margin: 2.75rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-teal);
}

.use-case-group-note {
  color: var(--color-text-muted);
  max-width: 46rem;
  margin: -0.25rem 0 1.5rem;
}

.use-case dl {
  margin: 0;
}

.use-case dt {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-top: 1rem;
}

.use-case dd {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ---------- Who Trust wants to speak to ---------- */
.who-we-want {
  margin-top: 3rem;
  max-width: 46rem;
}

.who-we-want ul {
  color: var(--color-text-muted);
  padding-left: 1.4rem;
}

.who-we-want li {
  margin-bottom: 0.35rem;
}

/* ---------- FAQ ---------- */
.faq-list {
  margin: 0;
  max-width: 46rem;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.faq-item dt {
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.faq-item dd {
  margin: 0;
  color: var(--color-text-muted);
}

/* ---------- Form ---------- */
.enquiry-form {
  max-width: 46rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label,
.form-field legend {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font: inherit;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-accent);
  outline: 2px solid var(--color-accent);
  outline-offset: 0;
}

fieldset.form-field {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.radio-group label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.radio-group input {
  width: auto;
}

.form-status {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--color-accent);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-text);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: #94A3B8;
}

.site-footer a {
  color: #E2E8F0;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #FFFFFF;
}

.footer-logo {
  height: 30px;
  width: auto;
  display: block;
  margin: 0 0 1.1rem;
  opacity: 0.9;
}

.footer-inner p {
  margin: 0 0 0.6rem;
}

.footer-note {
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .card-grid-2 {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Collapsible navigation */
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 0.75rem;
  }

  .site-nav a {
    display: block;
    padding: 0.6rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }
}

@media (max-width: 480px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

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