/*
Theme Name: NwadFix (Astra Child)
Theme URI: https://nwadfix.co.uk
Description: NwadFix marketing site — Astra child theme. Brand tokens, WCAG 2.2 AA-verified colour pairings, and SEO-critical custom templates per Blueprint v10.3 Section 25 (Brand Identity) and Section 15 (Marketing & GTM).
Author: NWADO SOLUTIONS LTD
Template: astra
Version: 1.0.0
Text Domain: nwadfix
*/

/* ==========================================================================
   Brand tokens — Blueprint v10.3 Section 25. DO NOT alter these values;
   the palette is locked. Combustion Blue and Ember Orange are brand-only —
   never reuse them for anything that could be confused with the in-app
   ID/AR safety classifier's own red/amber colour system.
   ========================================================================== */
:root {
  --nf-combustion-blue: #1B4B66;   /* Primary brand — headers, links */
  --nf-ember-orange:    #E4572E;   /* Signature accent — CTAs only */
  --nf-graphite-ink:    #1E2226;   /* Primary text */
  --nf-steel-grey:      #6B7280;   /* Secondary text, borders */
  --nf-brass:           #B98A4E;   /* Supporting warm tone — dividers/icons */
  --nf-paper-white:     #FFFFFF;   /* Surface fill on dark contexts */

  /* Derived, functional tokens — not part of the locked palette itself,
     just named aliases so templates don't hardcode hex values. */
  --nf-surface:         var(--nf-paper-white);
  --nf-surface-muted:   #F4F6F7;
  --nf-text:            var(--nf-graphite-ink);
  --nf-text-muted:      #596069;         /* darkened Steel Grey — raw #6B7280 is 4.46:1 on the muted surface, fails AA */
  --nf-brand-text:      var(--nf-combustion-blue); /* Combustion Blue as TEXT/outline; lightened in dark mode */
  --nf-link:            var(--nf-combustion-blue);
  --nf-border:          #E2E6E8;

  /* CTA button colours — WCAG 2.2 AA, computed with the WCAG relative-luminance
     formula: #111111 on Ember Orange #E4572E = 5.13:1; on hover #F26A40 = 6.21:1.
     Graphite Ink on Ember is only 4.35:1 and white on Ember 3.68:1 — both fail
     4.5:1, so neither is used. Ember stays the locked brand background. */
  --nf-cta-bg:          var(--nf-ember-orange);
  --nf-cta-bg-hover:    #F26A40;
  --nf-cta-text:        #111111;

  --nf-font-heading: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;
  --nf-font-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --nf-font-mono:    "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --nf-radius: 6px;
  --nf-container-width: 1180px;
}

/* Dark-mode surface variant — available, not forced. CLAUDE.md treats dark
   mode as default for the app's outdoor/on-site use; the marketing site is
   read mostly indoors, so it follows the visitor's OS preference instead
   of forcing dark-by-default. Contrast pairings re-verified for this mode. */
@media (prefers-color-scheme: dark) {
  :root {
    --nf-surface:       #14181A;
    --nf-surface-muted: #1B2124;
    --nf-text:          #F4F6F7;
    --nf-text-muted:    #9AA3AA;
    --nf-link:          #6FA9C9;   /* lightened Combustion Blue for AA on dark */
    --nf-border:        #2A3134;
    --nf-brand-text:    var(--nf-link); /* Combustion Blue is 1.9:1 on the dark surface */
  }
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
  background: var(--nf-surface);
  color: var(--nf-text);
  font-family: var(--nf-font-body);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.nf-heading {
  font-family: var(--nf-font-heading);
  font-weight: 600;
  color: var(--nf-text);
  line-height: 1.2;
}

a {
  color: var(--nf-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover, a:focus { color: var(--nf-text); text-decoration-thickness: 2px; } /* Ember text fails AA on white */
a:focus-visible {
  outline: 2px solid var(--nf-brand-text);
  outline-offset: 2px;
}

code, .nf-mono, .nf-fault-code {
  font-family: var(--nf-font-mono);
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.nf-container {
  max-width: var(--nf-container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.nf-section { padding: 64px 0; }
.nf-section--muted { background: var(--nf-surface-muted); }

.nf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 782px) {
  .nf-grid-3 { grid-template-columns: 1fr; }
  .nf-section { padding: 40px 0; }
}

/* ==========================================================================
   Buttons / CTAs
   ========================================================================== */
.nf-btn {
  display: inline-block;
  font-family: var(--nf-font-heading);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--nf-radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 44px; /* WCAG 2.2 target-size (AA, 24x24 min; we exceed it) */
}
.nf-btn--primary {
  background: var(--nf-cta-bg);
  color: var(--nf-cta-text);
}
.nf-btn--primary:hover, .nf-btn--primary:focus {
  background: var(--nf-cta-bg-hover);
  color: var(--nf-cta-text);
}
.nf-btn--secondary {
  background: transparent;
  border-color: var(--nf-brand-text);
  color: var(--nf-brand-text);
}
.nf-btn--secondary:hover, .nf-btn--secondary:focus {
  background: var(--nf-brand-text);
  color: var(--nf-surface);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.nf-hero {
  padding: 96px 0 72px;
  text-align: center;
}
.nf-hero__tagline {
  font-family: var(--nf-font-heading);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nf-brand-text);
  margin-bottom: 16px;
}
.nf-hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  max-width: 900px;
  margin: 0 auto 20px;
}
.nf-hero p.nf-lede {
  font-size: 19px;
  color: var(--nf-text-muted);
  max-width: 680px;
  margin: 0 auto 32px;
}
.nf-trust-line {
  margin-top: 28px;
  font-size: 14px;
  color: var(--nf-text-muted);
}

/* ==========================================================================
   Fault Code Hub
   ========================================================================== */
.nf-fault-card {
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius);
  padding: 24px;
  background: var(--nf-surface);
}
.nf-fault-card__code {
  font-family: var(--nf-font-mono);
  font-size: 22px;
  color: var(--nf-brand-text);
  display: block;
  margin-bottom: 8px;
}
.nf-fault-card__manufacturer {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--nf-text-muted);
}
.nf-breadcrumb {
  font-size: 14px;
  color: var(--nf-text-muted);
  margin-bottom: 24px;
}
.nf-breadcrumb a { color: var(--nf-text-muted); }

.nf-callout {
  border-left: 4px solid var(--nf-ember-orange);
  background: var(--nf-surface-muted);
  padding: 20px 24px;
  border-radius: 0 var(--nf-radius) var(--nf-radius) 0;
  margin: 32px 0;
}

/* ==========================================================================
   Waitlist form
   ========================================================================== */
.nf-waitlist-form {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nf-waitlist-form input[type="email"],
.nf-waitlist-form input[type="text"],
.nf-waitlist-form select {
  padding: 12px 14px;
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius);
  font-size: 16px;
  font-family: var(--nf-font-body);
  background: var(--nf-surface);
  color: var(--nf-text);
}
.nf-waitlist-form label {
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.nf-form-notice {
  padding: 14px 18px;
  border-radius: var(--nf-radius);
  font-size: 15px;
  margin-bottom: 20px;
}
.nf-form-notice--success {
  background: #E9F5EC;
  color: #1C5E32;
  border: 1px solid #B8E0C4;
}
.nf-form-notice--error {
  background: #FBEAE7;
  color: #8A2E1B;
  border: 1px solid #F1C3B8;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.nf-footer {
  background: var(--nf-graphite-ink);
  color: #C9CDCF;
  padding: 48px 0 24px;
  font-size: 14px;
}
.nf-footer a { color: #C9CDCF; }
.nf-footer a:hover, .nf-footer a:focus { color: #FFFFFF; } /* Ember on Graphite is 4.35:1 — fails AA */

/* ==========================================================================
   Header logo — horizontal lockup derived from the locked mark + wordmark
   (brand-derived/). The artwork has a white background, so in dark mode it
   sits on a white chip rather than being recoloured (brand is locked).
   ========================================================================== */
.custom-logo-link img.custom-logo {
  height: auto;
  max-height: 56px;
  width: auto;
}
@media (prefers-color-scheme: dark) {
  .custom-logo-link img.custom-logo {
    background: #FFFFFF;
    padding: 4px 10px;
    border-radius: var(--nf-radius);
  }
}
