/* ==============================================
   TEMPLATE STYLES
   ================================================
   QUICK CUSTOMISATION
   1. Colors  → edit :root variables
   2. Fonts   → swap --font-* vars + Google Fonts link in HTML
   3. BG img  → set --hero-bg url()
   4. Card width → --card-width
   ============================================== */


/* ── 1. DESIGN TOKENS ─────────────────────────── */
:root {
  /* Brand palette */
  --accent:       #1C2D46;   /* navy blue accent                              */
  --accent-hover: #C49A45;   /* warm gold for hover states                    */
  --accent-shadow: #825d1ec0; /* warm gold for input focus shadow              */
  --card-bg:      #202936;   /* card panel background                         */
  --card-border:  #1C2D46;   /* card border — matches accent                  */
  --card-text:    #fff;      /* card text color                               */
  --text:         #17263B;   /* main body text                                */
  --text-muted:   #454D59;   /* secondary / muted text                        */
  --input-bg:     #F5F2E9;   /* form field background                         */
  --input-text:   #343B45;   /* form field text                               */
  --footer-text:  #5B6370;   /* footer copy                                   */
  --social-bg:    #fffefad2; /* social icon background (semi-transparent white) */
  --page-bg:      #eae2cf;   /* page background color, also used as fallback if hero image fails to load */

  /* BG IMAGE: replace url() with your image path */
  --hero-bg: url('YOUR_BACKGROUND_IMAGE.jpg');

  /* Typography */
  --font-display: 'IBM Plex Serif', Georgia, serif;  /* headings   */
  --font-body:    'IBM Plex Sans',  Arial, sans-serif;  /* body copy  */

  /* Card */
  --card-width:   90%;
  --card-radius:  12px;
  --card-pad:     2.25rem 2.5rem;

  /* Inputs */
  --input-h:      50px;
  --pill:         999px;   /* pill radius */

  /* Transitions */
  --transition-fast: 0.18s ease;
}


/* ── 2. RESET / BASE ──────────────────────────── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--page-bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Screen-reader only — hides labels visually, keeps them for assistive tech */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ── 3. HERO SECTION ─────────────────────────── */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px); /* Leaves room for footer */
  background: var(--hero-bg) center/cover no-repeat var(--page-bg);
}

/* Dark overlay over the background image */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--page-bg);
  z-index: 0;
  pointer-events: none;
}

/* All hero children sit above the overlay */
.hero > * { 
  position: relative; z-index: 1; 
}


/* ── 4. TOP NAV ──────────────────────────────── */
.top-nav {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2rem;
  width: 100%;
}

/* ── Brand / logo ── */
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand__logo {
  height: 48px;
  width: auto;
  display: block;
}

.brand__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.03em;
}


/* ── Hero headline (top center) ── */
.hero__headline {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.2;
  text-align: center;
  color: var(--text);
  text-shadow: 0 2px 12px #00000099;
}


/* ── Social links (top right) ── */
.social-links {
  display: flex;
  gap: 0.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--social-bg);
  border: 1px solid var(--footer-text);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.social-link svg {
  width: 16px;
  height: 16px;
  display: block;
}

.social-link:hover {
  background: var(--accent-hover);
  border-color: var(--accent);
}

/* Accent-bordered variant */
.social-link--accent {
  border-color: var(--accent);
}

.social-link--accent:hover {
  background: var(--accent);
}

.social-link__label {
  font-family: var(--font-heading, sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* ── HAMBURGER BUTTON ── */
/* Hidden on desktop, shown on mobile */
.nav-hamburger {
  display: none;
  flex-direction: column;
  grid-column: 3;
  justify-self: end;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: none;
  border: 1px solid var(--text);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}
/* Animates to X when open */
.nav-hamburger.is-active span:nth-child(1) { 
  transform: translateY(7px) rotate(45deg); 
}
.nav-hamburger.is-active span:nth-child(2) { 
  opacity: 0; 
}
.nav-hamburger.is-active span:nth-child(3) { 
  transform: translateY(-7px) rotate(-45deg); 
}


/* ── MOBILE DRAWER ── */
.mobile-drawer {
  display: none;
  position: absolute;
  top: var(--nav-height, 68px);
  right: 1rem;
  z-index: 999;
  width: 200px;
  background: var(--page-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.mobile-drawer.is-open {
  display: flex;
}

.mobile-drawer__close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}

.mobile-drawer__close:hover { 
  color: var(--accent); 
}

.mobile-drawer__social {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
}

.mobile-drawer__social .social-link {
  width: 100%;
  height: 48px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #1C2D461A;
  justify-content: flex-start;
  padding: 0 1.25rem;
  gap: 0.75rem;
  background: transparent;
}

.mobile-drawer__social .social-link:last-child {
  border-bottom: none;
}

.mobile-drawer__social .social-link:hover {
  background: var(--accent-hover);
}

.mobile-drawer__social .social-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── 5. CARD WRAPPER ─────────────────────────── */
/* This is a flex row that pushes the card to the RIGHT.
   To CENTER the card instead: change justify-content to 'center' and remove the padding-right. */
.card-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center; /* RIGHT-aligns the card */
  padding: 2rem;
}

/* ── 6. LEAD CAPTURE CARD ────────────────────── */
/* All content (title, form, body copy, tagline) live INSIDE this card. 
   It is a fixed-width flex column. */
.lead-card {
  width: var(--card-width);
  max-width: calc(100vw - 4rem); /* never wider than viewport on small screens */
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lead-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.3;
  text-align: center;
  color: var(--accent-hover);
}

.lead-card__subject {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.3;
  text-align: center;
  text-decoration: underline;
  color: var(--accent-hover);
}

.lead-card__body {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--card-text);
}

.lead-card__list {
  color: var(--card-text);
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0 1rem;
}

.lead-card__list li {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--card-text);
  margin-bottom: 0.25rem;
}

.lead-card__list li::marker {
  color: var(--accent-hover);
}

/* Italic golden tagline / pull-quote */
.lead-card__tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--accent-hover);
  text-align: center;
}


/* ── 7. LEAD FORM ────────────────────────────── */
.lead-form {
  display: flex;
  flex-direction: column;
  align-items: center;    /* Center the input and button */
  gap: 0.75rem;
}

/* Wrapper for each field, needed so label stays accessible but invisible.
   Do NOT remove the .form-group div. */
.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: center;
}

/* Pill Input fields */
.lead-form__input {
  height: var(--input-h);
  width: 50%;
  padding: 0 1.25rem;
  border-radius: var(--pill);
  border: 1.5px solid transparent;
  background: var(--input-bg);
  color: var(--input-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lead-form__input::placeholder {
  color: #888;
}

.lead-form__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-shadow);
}

/* CTA Pill button */
.lead-form__btn {
  height: var(--input-h);
  width: 50%;
  border-radius: var(--pill);
  border: var(--accent-shadow) 1.5px solid;
  background: var(--accent);
  color: var(--card-text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  /* Remove browser default input[type=submit] appearance */
  -webkit-appearance: none;
  appearance: none;
}

.lead-form__btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 10px var(--accent-hover);
  color: var(--accent);
}

.lead-form__btn:active {
  transform: scale(0.98);
}

/* Trust badge line */
.lead-form__trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.trust-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--text-muted);
}


/* ── 8. FOOTER ──────────────────────────────── */
.site-footer {
  background: transparent;
  padding: 0.75rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--footer-text);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--footer-text);
}

.footer__links a {
  color: var(--footer-text);
  transition: color 0.15s;
}

.footer__links a:hover {
  color: var(--text-primary);
}


/* ── 9. RESPONSIVE ADJUSTMENTS ───────────────── */

/* Tablet */
@media (max-width: 950px) {
  .top-nav {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    padding: 0.75rem 1rem;
  }

  .hero__headline {
    grid-column: 1 / -1;
    grid-row: 2;
    order: 3;
    text-align: center;
    font-size: 1.3rem;
  }

  .brand   { 
    grid-column: 1; 
    grid-row: 1;  
  }
  
  .social-links { 
    order: 2; 
    justify-self: end; 
  }

  .nav-hamburger { 
    grid-column: 3; 
    grid-row: 1; 
    justify-self: end; 
  }

  .mobile-drawer {
    grid-column: 1 / -1;          
  }

  .card-wrapper {
    padding: 1rem 1rem 1rem;
    justify-content: center;
  }

  /* Cancel the right-side positioning on tablet */
  .lead-card {
    margin-left: 0 !important;
    margin-right: 0;
    width: 100%;
    max-width: 540px;
  }
}

/* Mobile — hamburger kicks in */
@media (max-width: 860px) {
  /* Hide social icons in the nav bar */
  .top-nav .social-links { 
    display: none; 
  }

  /* Show hamburger button */
  .nav-hamburger { 
    display: flex; 
    grid-column: 3;
    grid-row: 1; 
    justify-self: end; 
  }

  /* Tighten the nav so hamburger stays on screen */
  .mobile-drawer { 
    gap: 0.5rem; 
    padding: 0 1rem; 
  }
}

/* Small Mobile */
@media (max-width: 600px) {
  :root {
    --card-pad: 0.25rem 0.25rem;
  }

  /* Prevent horizontal overflow */
  body  { 
    overflow-x: hidden; 
  }

  /* Card fills full width edge-to-edge */
  .card-wrapper { padding: 1rem 0.75rem; }
  .lead-card {
    margin-left: 0 !important;
    margin-right: 0;
    max-width: 100%;
    width: 100%;
    border-radius: 8px;
  }
}