/* ============================================
   Pedigree Forge — Modern Design System
   Ported from the Mr. Genealogy redesign and
   retuned to the Pedigree Forge brand:
   navy shield + teal accent.
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Navy — the brand shield */
  --navy: #142850;
  --navy-deep: #0d1b38;
  --navy-light: #2a4574;

  /* Teal — the brand accent (dividers, highlights, hovers) */
  --teal: #7fbfbf;
  --teal-dark: #267878;   /* dark enough for white text / link hover */
  --teal-light: #a9d6d6;  /* light enough to read on navy */

  /* Neutrals */
  --text: #3a3a3a;
  --text-light: #6b6b6b;
  --white: #ffffff;
  --off-white: #f8f6f3;
  --cream: #f2efe9;
  --border: #e0dbd4;

  /* Font */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Libre Baskerville', Georgia, serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);

  /* Radius */
  --radius: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-width: 1140px;
  --nav-height: 105px;  /* two-row header: 64px top + ~41px nav row */
}


/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

::selection {
  background: rgba(20, 40, 80, 0.15);
}


/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.25;
  margin-top: 0;
  text-wrap: balance;
}

h1 {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.1rem;
  line-height: 1.7;
}

a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: rgba(127, 191, 191, 0.6);
  text-underline-offset: 3px;
  transition: color 200ms var(--ease);
}
a:hover {
  color: var(--teal-dark);
  text-decoration-color: var(--teal-dark);
}

strong {
  font-weight: 600;
  color: var(--navy);
}

ul li, ol li {
  margin-bottom: 0.4rem;
}


/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}
.section-sm {
  padding: 48px 0;
}

.section-cream {
  background: var(--cream);
}
.section-white {
  background: var(--white);
}
.section-offwhite {
  background: var(--off-white);
}
.section-navy {
  background: var(--navy);
  color: var(--white);
}
.section-navy h1, .section-navy h2, .section-navy h3 {
  color: var(--white);
}
.section-navy p {
  color: rgba(255,255,255,0.85);
}
.section-navy strong {
  color: var(--white);
}
.section-navy a {
  color: var(--teal-light);
}

.text-center {
  text-align: center;
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--teal);
  border-radius: 2px;
  margin: 16px auto;
}
/* Left-align divider inside text-heavy left-aligned layouts */
.split-text .divider,
.contact-header-text .divider,
.divider-left {
  margin-left: 0;
  margin-right: 0;
}


/* ============================================
   NAVIGATION — two-row layout
   Row 1: logo + contact info + CTA
   Row 2: nav links (hidden on mobile)
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.nav-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Top row: logo + contact + CTA --- */
.nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  flex-shrink: 0;
}
.nav-logo img {
  height: 52px;
  width: auto;
  display: block;
}

.nav-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-contact-info {
  font-size: 13px;
  color: var(--text-light);
  text-align: right;
  display: flex;
  gap: 16px;
}
.nav-contact-info span {
  white-space: nowrap;
}
.nav-contact-info strong {
  color: var(--navy);
  font-weight: 600;
}
.nav-contact-info a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}
.nav-contact-info a:hover {
  color: var(--teal-dark);
}
.nav-contact-info .fa {
  opacity: 0.5;
  margin-right: 2px;
}

.nav-cta {
  font-family: var(--font) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: var(--navy) !important;
  color: var(--white) !important;
  padding: 9px 24px !important;
  border-radius: var(--radius-full) !important;
  text-decoration: none !important;
  transition: background 200ms var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-block;
  text-align: center;
  min-width: 134px;
}
.nav-cta:hover {
  background: var(--teal-dark) !important;
  color: var(--white) !important;
  text-decoration: none !important;
}

/* Secondary header CTA (outline) — pairs with the filled Download button */
.nav-cta-secondary {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: var(--navy);
  padding: 8px 20px;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 200ms var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-block;
  text-align: center;
  min-width: 134px;
}
.nav-cta-secondary:hover {
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}

/* Hamburger — hidden by default, shown on small screens */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 20px;
  color: var(--navy);
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.nav-toggle:hover {
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}

/* --- Bottom row: nav links --- */
.nav-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-bottom: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.nav-bottom a {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: color 180ms var(--ease), background 180ms var(--ease);
  white-space: nowrap;
}
.nav-bottom a:hover {
  color: var(--teal-dark);
  text-decoration: none;
}
.nav-bottom a .fa {
  font-size: 0.85em;
  opacity: 0.5;
  margin-right: 3px;
}
.nav-bottom a:hover .fa {
  opacity: 0.8;
}

/* --- Mobile menu panel --- */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 64px; /* just below top row when nav-bottom is hidden */
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 99;
  padding: 8px 0;
}
.nav-mobile-menu.is-open {
  display: block;
}
.nav-mobile-menu a {
  display: block;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 150ms var(--ease);
}
.nav-mobile-menu a:last-child {
  border-bottom: none;
}
.nav-mobile-menu a:hover {
  background: var(--off-white);
  color: var(--teal-dark);
}
.nav-mobile-menu a .fa {
  width: 1.4em;
  text-align: center;
  opacity: 0.5;
  margin-right: 8px;
}


/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  padding-top: var(--nav-height);
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  min-height: 480px;
}

.hero-content {
  padding: 56px 0;
}

.hero-content h1 {
  color: var(--white);
  font-size: 2.8rem;
  line-height: 1.15;
  margin-bottom: 16px;
  text-wrap: balance;
}

.hero-subtitle {
  font-family: var(--font);
  font-size: 1.15rem;
  color: var(--teal-light);
  font-weight: 400;
  margin-bottom: 24px;
  line-height: 1.5;
  text-wrap: balance;
}

.hero-text {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
  text-wrap: balance;
}
/* Bold emphasis in hero body copy — override the global navy strong,
   which would be invisible on the navy hero background */
.hero-text strong {
  color: var(--white);
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-buttons .btn {
  min-width: 180px;
  text-align: center;
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-image img {
  width: 100%;
  max-width: 560px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,0.12);
  margin: 32px 0;
}


/* ============================================
   IMAGE STRIP (screenshot band)
   ============================================ */

.image-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--navy-deep);
  padding: 4px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.image-strip img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}
.image-strip img.object-top {
  object-position: top;
}


/* ============================================
   BUTTONS
   ============================================ */

.btn {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 30px;
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 200ms var(--ease);
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1.3;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  color: var(--white);
  text-decoration: none;
}

.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-dark:hover {
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}

/* On navy surfaces a navy primary button is invisible — switch the
   primary CTA to the teal accent (with navy text) so it stands out. */
.hero .btn-primary,
.section-navy .btn-primary,
.cta-banner .btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--navy);
}
.hero .btn-primary:hover,
.section-navy .btn-primary:hover,
.cta-banner .btn-primary:hover {
  background: var(--teal-light);
  border-color: var(--teal-light);
  color: var(--navy);
}

/* Legacy button classes — still used on content pages */
.button,
.narrow_button {
  font-family: var(--font) !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  background: var(--navy) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: var(--radius-full) !important;
  padding: 12px 28px !important;
  text-decoration: none !important;
  display: inline-block;
  text-align: center;
  transition: background 200ms var(--ease), box-shadow 200ms var(--ease);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  width: auto;
}
.button:hover,
.narrow_button:hover {
  background: var(--teal-dark) !important;
  color: var(--white) !important;
  box-shadow: var(--shadow-md);
  text-decoration: none !important;
}


/* ============================================
   CONTENT CARDS
   ============================================ */

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow 300ms var(--ease), transform 300ms var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
  display: block;
}
.card-body {
  padding: 24px;
}
.card-body h3 {
  margin-bottom: 8px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}


/* ============================================
   SPLIT SECTIONS (text + image side by side)
   ============================================ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.split-reverse {
  direction: rtl;
}
.split-reverse > * {
  direction: ltr;
}


/* ============================================
   CTA BANNER
   ============================================ */

.cta-banner {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 32px 24px;
}

.cta-banner-hero {
  display: block;
  padding: 56px 24px;
}
.cta-banner-hero h2 {
  color: var(--white);
  margin-bottom: 8px;
}
.cta-banner-hero p {
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
  text-wrap: balance;
}

.cta-banner-light {
  background: var(--cream);
}
.cta-banner-light h2 {
  color: var(--navy);
}
.cta-banner-light p {
  color: var(--text-light);
}

.cta-banner-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
}
.cta-banner-buttons .btn {
  min-width: 200px;
  text-align: center;
}

@media (max-width: 800px) {
  .cta-banner-buttons {
    grid-template-columns: repeat(2, 1fr);
    max-width: 360px;
  }
}

@media (max-width: 480px) {
  .cta-banner {
    padding: 24px 16px;
  }
  .cta-banner-buttons .btn {
    font-size: 14px;
    padding: 11px 12px;
    min-width: 0;
  }
  .cta-banner-hero {
    padding: 40px 20px;
  }
}


/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  line-height: 1.8;
  margin-top: auto; /* sticky footer: pushes footer to viewport bottom on short pages */
}

.footer-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  margin-top: 16px;
  max-width: 320px;
}
.footer-brand img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.site-footer h4 {
  color: var(--white);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  padding: 3px 0;
  transition: color 150ms var(--ease);
}
.footer-links a:hover {
  color: var(--white);
}

.footer-contact a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}
.footer-contact a:hover {
  color: var(--white);
}
.footer-contact .fa {
  width: 1.2em;
  opacity: 0.5;
}

.btn-footer-cta {
  font-size: 13px;
  padding: 8px 22px;
  background: transparent;
  color: var(--teal-light) !important;
  border: 1.5px solid var(--teal);
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-block;
  transition: all 200ms var(--ease);
}
.btn-footer-cta:hover {
  background: var(--teal);
  color: var(--navy-deep) !important;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 24px 48px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-bottom a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}
.footer-bottom a:hover {
  color: var(--white);
}


/* ============================================
   SECTION INTRO / SHARED HELPERS
   ============================================ */

.section-intro {
  max-width: 680px;
  margin: 0 auto 40px;
  color: var(--text-light);
}

.btn-sm {
  font-size: 14px;
  padding: 10px 24px;
}

.hero-highlight {
  color: var(--teal-light);
}

.list-unstyled {
  list-style-type: none;
}

.img-full {
  width: 100%;
}

.mt-28 {
  margin-top: 28px;
}

.link-plain {
  text-decoration: none;
}


/* ============================================
   CONTENT-PAGE HELPERS
   Used by the inner pages (features, download,
   news, help) that open with a navy header.
   ============================================ */

/* Cream page body — warmer than white after the navy header.
   White cards, forms and screenshots stand out against it. */
html.page-cream body {
  background: var(--cream);
}

/* Mobile-device warning on the demo page — hidden until JS detects a
   touch/mobile device, then revealed with .is-visible */
.mobile-warning {
  display: none;
  align-items: flex-start;
  gap: 14px;
  background: #fdf3d6;
  border: 1px solid #e6c65c;
  border-left: 5px solid #d99e00;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  text-align: left;
}
.mobile-warning.is-visible {
  display: flex;
}
/* Let the text column shrink so long headings wrap instead of forcing
   the page wider than the viewport */
.mobile-warning > div {
  min-width: 0;
}
.mobile-warning .fa {
  font-size: 1.6rem;
  color: #b87f00;
  margin-top: 2px;
  flex-shrink: 0;
}
.mobile-warning h3 {
  color: #5a4500;
  margin: 0 0 4px;
  font-size: 1.15rem;
}
.mobile-warning p {
  color: #6b5410;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.mobile-warning strong {
  color: #5a4500;
}

/* Callout / notice box — teal-accented info panel */
.callout {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 28px;
  box-shadow: var(--shadow-sm);
}
.callout p:last-child {
  margin-bottom: 0;
}

/* Centred download card */
.download-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 32px;
  text-align: center;
  max-width: 460px;
  margin: 0 auto 8px;
}
.download-card .download-product {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.download-card .download-version {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* Centred figure for installation-guide screenshots */
.guide-figure {
  text-align: center;
  margin: 24px auto 8px;
}
.guide-figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  max-width: 100%;
}

/* Responsive 16:9 video embed */
.video-embed {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 12px;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Changelog — breathing room below the navy header and above the footer */
.news-log {
  padding-top: 48px;
  padding-bottom: 48px;
}
/* Each dated release separated by a top rule + teal date */
.news-log h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--teal-dark);
}
.news-log > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.news-log h3 {
  margin-top: 24px;
}


/* ============================================
   CONTACT FORM (legacy w3 form, restyled)
   ============================================ */

.w3-input {
  font-family: var(--font) !important;
  font-size: 15px !important;
  padding: 10px 12px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 6px !important;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.w3-input:focus {
  border-color: var(--teal-dark) !important;
  box-shadow: 0 0 0 3px rgba(38,120,120,0.12) !important;
  outline: none;
}

select.w3-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b6b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px !important;
}

textarea.w3-input {
  min-height: 140px;
  resize: vertical;
}

form.w3-card-4 {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md) !important;
  padding: 0 0 1.25rem !important;   /* drop side padding so the header bleeds to the card edges */
}
/* Field rows regain the horizontal padding lost from the form container */
form.w3-card-4 .w3-section {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
form .w3-section.w3-container.w3-theme,
.w3-section.w3-container.w3-theme {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: 0 !important;
  padding: 1rem 1.5rem !important;
}
form .w3-container.w3-theme h2,
.w3-section.w3-container.w3-theme h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0;
  color: var(--white);
}

label span {
  font-weight: 500;
  color: var(--navy);
  font-size: 14.5px;
}


/* ============================================
   COOKIE NOTICE
   ============================================ */

#cookie_notice {
  background: var(--white) !important;
  color: var(--text) !important;
  border-top: 1px solid var(--border);
  padding: 12px 20px !important;
  font-size: 13px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
  z-index: 200;
}
#cookie_notice a {
  font-weight: 600;
}


/* ============================================
   LEGACY W3.CSS OVERRIDES
   (keep content pages working)
   ============================================ */

/* Hide the old W3.CSS headers (replaced by .site-header) */
.w3-top {
  display: none !important;
}

/* Full-screen image modal must sit above the fixed header + cookie notice */
.w3-modal {
  z-index: 9999 !important;
}

/* Main content container — nav is now a fixed-height bar */
.w3-main.main_content_container {
  padding-top: calc(var(--nav-height) + 24px) !important;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* On the homepage, the hero provides its own top padding */
.page-home .w3-main.main_content_container,
/* Cream content pages use full-width bands; inner .wrapper centres content */
.page-cream .w3-main.main_content_container {
  padding-top: 0 !important;
  max-width: none;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Pages that open with a hero — collapse the initial main container */
.page-hero .w3-main.main_content_container {
  padding-top: 0 !important;
}

/* Navy page header — used on pages that open with a navy heading panel */
.page-header-navy {
  padding-top: calc(var(--nav-height) + 48px) !important;
}

/* W3 heading size overrides */
.w3-xxlarge { font-size: 1.85rem !important; font-weight: 700 !important; }
.w3-xxxlarge { font-size: 2.1rem !important; font-weight: 700 !important; }

/* W3 text / theme colours -> brand */
.w3-text-theme { color: var(--navy) !important; }
.w3-theme { background-color: var(--navy) !important; color: var(--white) !important; }
.w3-theme-d1, .w3-theme-d2, .w3-theme-d3 { background-color: var(--navy) !important; color: var(--white) !important; }
.w3-theme-l5 { background-color: var(--off-white) !important; }

/* W3 cards */
.w3-card, .w3-card-2, .w3-card-4 {
  box-shadow: var(--shadow-md) !important;
  border-radius: var(--radius);
  overflow: hidden;
}

img.w3-card, .w3-row-padding img {
  border-radius: var(--radius);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.w3-button {
  font-family: var(--font);
}

.w3-row-padding {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.w3-section {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}

.logo_grey_text {
  color: var(--text-light) !important;
  font-family: var(--font);
}

/* Old footer — hide it (replaced by .site-footer) */
body > footer.w3-container {
  display: none !important;
}


/* ============================================
   RESPONSIVE
   ============================================ */

/* Medium: hide email, keep phone */
@media (max-width: 768px) {
  .nav-email {
    display: none;
  }
}

/* Small: hide nav row, show hamburger, drop contact info */
@media (max-width: 640px) {
  :root {
    --nav-height: 64px;
  }
  .nav-bottom {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .nav-contact-info {
    display: none;
  }
  /* Keep the small-screen top bar uncluttered — both CTAs move to the menu */
  .nav-cta,
  .nav-cta-secondary {
    display: none;
  }
  .nav-mobile-menu {
    top: 64px;
  }
}

/* Tablet and below */
@media (max-width: 992px) {

  /* Technical is a specialist link — the first to drop from the nav bar
     as it narrows. It remains in the mobile menu and footer. */
  .nav-optional {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: auto;
  }
  .hero-content {
    padding: 40px 0 24px;
    text-align: center;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-buttons {
    justify-content: center;
  }
  .hero-image {
    justify-content: center;
  }
  .hero-image img {
    max-width: 520px;
    margin-top: 0;
  }

  .image-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .image-strip img {
    height: 160px;
  }

  .split, .split-reverse {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .split-reverse {
    direction: ltr;
  }

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

  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .footer-brand p {
    max-width: none;
  }

  .button, .narrow_button {
    width: auto !important;
    min-width: 120px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.15rem; }
  .w3-xxlarge { font-size: 1.5rem !important; }

  .section {
    padding: 48px 0;
  }

  .hero-content {
    padding: 32px 0 20px;
  }
  .hero-content h1 {
    font-size: 1.75rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }

  .image-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    padding: 3px;
  }
  .image-strip img {
    height: 120px;
  }

  .cta-banner {
    padding: 40px 20px;
  }

  .button, .narrow_button {
    font-size: 14px !important;
    padding: 10px 20px !important;
    margin-left: 4px !important;
    margin-right: 4px !important;
  }

  .w3-main.main_content_container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .footer-main {
    padding: 40px 20px 28px;
  }
}
