/* Craig Adams Mortgage & Protection — design system
   Palette, type and components derived from the approved brand file
   (craig-adams-logo-final.html). Keep this file the single source of truth
   for look and feel across every page. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/BricolageGrotesque-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/BricolageGrotesque-Bold.woff2') format('woff2');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --charcoal: #1E2630;
  --blue: #2E7DA8;
  --blue-dark: #235F80;
  --grey: #6B7480;
  --off-white: #FAFAF8;
  --white: #FFFFFF;
  --line: #E7E7E2;
  --line-dark: #2C3542;
  --success: #2E7D5B;
  --error: #B3413A;

  --font-head: 'Bricolage Grotesque', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1160px;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 2px 4px rgba(30,38,48,.04), 0 12px 32px rgba(30,38,48,.06);

  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--off-white);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:not([class]) { color: var(--blue-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.1rem, 1.6rem + 2vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin: 0 0 .8em;
  display: inline-block;
}

.lede { font-size: 1.15rem; color: #3a4350; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--charcoal);
  color: var(--white);
  padding: .8em 1.2em;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: var(--space-6) 0; }
.section--tight { padding: var(--space-5) 0; }
.section--alt { background: var(--white); }
.section--dark { background: var(--charcoal); color: var(--off-white); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: #C7CDD4; }

.grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 780px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.center { text-align: center; }
.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  white-space: nowrap;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  padding: .95em 1.7em;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--charcoal); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--charcoal); }
.section--dark .btn-ghost { color: var(--white); border-color: #3B4553; }
.section--dark .btn-ghost:hover { border-color: var(--white); }
.btn-tel { background: var(--charcoal); color: var(--white); }
.btn-tel:hover { background: #131A22; color: var(--white); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  align-items: center;
  margin-top: var(--space-3);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Top and bottom only: setting the shorthand here would wipe out the
     .container side padding, pushing the menu button to the screen edge. */
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 1.2rem;
}
.site-header__logo { display: block; flex-shrink: 0; }
.site-header__logo img, .site-header__logo svg { height: 48px; width: auto; display: block; }
@media (min-width: 980px) {
  .site-header__logo img, .site-header__logo svg { height: 52px; }
}

.top-strip {
  background: var(--charcoal);
  color: #C7CDD4;
  font-size: .82rem;
}
.top-strip .container {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  padding-top: 8px;
  padding-bottom: 8px;
}
.top-strip a { color: var(--white); text-decoration: none; font-weight: 600; }
.top-strip a:hover { color: #9FD2EA; }

.main-nav { display: none; }
.main-nav ul { list-style: none; display: flex; gap: 1.3rem; margin: 0; padding: 0; }
.main-nav a {
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 600;
  font-size: .94rem;
  padding: .4em 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { border-color: var(--blue); color: var(--blue-dark); }

.main-nav .has-sub { position: relative; }
.main-nav .has-sub > a::after {
  content: "";
  display: inline-block;
  margin-left: .4em;
  border: 4px solid transparent;
  border-top-color: currentColor;
  transform: translateY(2px);
}
.main-nav .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: .5rem;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.main-nav .sub-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.main-nav .has-sub:hover .sub-menu,
.main-nav .has-sub:focus-within .sub-menu { display: flex; }
.main-nav .sub-menu a {
  display: block;
  padding: .55em .8em;
  border-radius: 8px;
  border-bottom: none;
  font-size: .92rem;
}
.main-nav .sub-menu a:hover,
.main-nav .sub-menu a[aria-current="page"] { background: rgba(46,125,168,.09); }

.header-cta { display: none; align-items: center; gap: .7rem; }
.header-cta .btn { padding: .8em 1.3em; font-size: .92rem; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  background: none;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: .5em 1em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .9rem;
  color: var(--charcoal);
  cursor: pointer;
}

/* Full-screen overlay: fixed to the viewport and independent of the sticky
   header and scrolling top strip, so opening it never shifts the page.
   Body scroll is locked (see body.nav-open) so nothing moves behind it. */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--off-white);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; }
.mobile-nav[hidden] { display: none; }

.mobile-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.mobile-nav__top .site-header__logo img,
.mobile-nav__top .site-header__logo svg { height: 48px; }
.nav-close {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  background: none;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: .5em 1em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .9rem;
  color: var(--charcoal);
  cursor: pointer;
}

.mobile-nav__scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 1em;
}
.mobile-nav__scroll a {
  display: block;
  padding: .95em 24px;
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.mobile-nav__scroll a[aria-current="page"] { color: var(--blue-dark); }
.mobile-nav__scroll a.mobile-nav__sub {
  padding: .72em 24px .72em 46px;
  font-weight: 500;
  font-size: .93rem;
  color: #4A5461;
}
.mobile-nav__cta {
  display: flex;
  flex-direction: column;
  gap: .7em;
  padding: 1.3em 24px;
}
.mobile-nav__cta .btn { width: 100%; justify-content: center; }
.mobile-nav__cta .btn-primary { color: var(--white); }

body.nav-open { overflow: hidden; }

@media (min-width: 980px) {
  .main-nav { display: block; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* Hero */
.hero {
  padding: var(--space-6) 0 var(--space-5);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr .95fr; gap: var(--space-5); }
}
.hero__media { position: relative; }
.hero__media img { border-radius: var(--radius-lg); width: 100%; }
.hero__badge {
  position: absolute;
  left: -14px;
  bottom: -14px;
}
.hero__badge .google-badge { box-shadow: var(--shadow); }

.stars {
  display: inline-flex;
  gap: 2px;
  color: #E8A33D;
}
.stars svg { width: 1em; height: 1em; fill: currentColor; display: block; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
  align-items: center;
  margin-top: var(--space-3);
  color: var(--grey);
  font-size: .92rem;
}
.trust-strip strong { color: var(--charcoal); }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: .8em;
  height: 100%;
}
.service-card h3 { margin-bottom: 0; }
.service-card p { color: #4A5461; flex-grow: 1; }
.service-card .link-arrow { margin-top: .2em; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-weight: 700;
  color: var(--blue-dark);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: .95rem;
}
.link-arrow:hover { text-decoration: underline; }

.icon-tile {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(46,125,168,.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-dark);
  flex-shrink: 0;
}

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .7em; }
.checklist li { display: flex; gap: .7em; align-items: flex-start; }
.checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 22px; height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5L6.2 11.5L13 4.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 1.1em; }
.step-list li { display: flex; gap: 1em; counter-increment: step; }
.step-list li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
}
.step-list strong { display: block; font-family: var(--font-head); }

/* Reviews */
.reviews-strip {
  display: grid;
  gap: var(--space-3);
}
@media (min-width: 700px) { .reviews-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .reviews-strip { grid-template-columns: repeat(3, 1fr); } }

.review-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: .8em;
}
.review-card .stars { font-size: .95rem; }
.review-card blockquote {
  margin: 0;
  color: #333c47;
  font-size: .98rem;
}
.review-card footer {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .9rem;
  color: var(--charcoal);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5em;
}
.review-card footer span { font-weight: 500; color: var(--grey); font-size: .82rem; font-family: var(--font-body); }

.google-badge {
  display: inline-flex;
  align-items: center;
  gap: .8em;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .65em 1.15em;
  text-decoration: none;
  color: var(--charcoal);
  box-shadow: 0 1px 2px rgba(30,38,48,.05);
  transition: border-color .15s ease;
}
.google-badge:hover { border-color: var(--blue); }
.google-badge__g svg { width: 22px; height: 22px; display: block; }
.google-badge__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}
.google-badge__score {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .45em;
}
.google-badge__score .stars { font-size: .82em; }
.google-badge__label { color: var(--grey); font-size: .78rem; font-weight: 500; }
.google-badge--large { padding: .9em 1.35em; border-radius: var(--radius); }
.google-badge--large .google-badge__g svg { width: 30px; height: 30px; }
.google-badge--large .google-badge__score { font-size: 1.2rem; }
.google-badge--large .google-badge__label { font-size: .85rem; }

/* Lender logos */
.lender-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  align-items: center;
  justify-content: center;
}
.lender-row img { max-height: 28px; width: auto; opacity: .75; filter: grayscale(1); }

/* Forms */
.field { margin-bottom: 1.3em; }
.field label {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .92rem;
  margin-bottom: .4em;
}
.field .hint { color: var(--grey); font-size: .84rem; margin-top: .35em; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  padding: .85em 1em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--charcoal);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(46,125,168,.25);
  outline-offset: 0;
}
.field textarea { resize: vertical; min-height: 130px; }
.field-row { display: grid; gap: 1.3em; }
@media (min-width: 640px) { .field-row--2 { grid-template-columns: 1fr 1fr; } }

.form-status {
  border-radius: var(--radius-sm);
  padding: 1em 1.2em;
  margin-bottom: 1.3em;
  font-weight: 600;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status--success { background: #E7F4EE; color: var(--success); border: 1px solid #BFE3D1; }
.form-status--error { background: #FBEAE8; color: var(--error); border: 1px solid #F1C3BE; }

.honeypot-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Risk warning / notice */
.notice {
  background: #FFF8E9;
  border: 1px solid #F0DFB0;
  border-left: 4px solid #C99A2E;
  border-radius: var(--radius-sm);
  padding: 1em 1.3em;
  font-size: .92rem;
  color: #5A4A1E;
}
.notice strong { color: #4A3B12; }

.placeholder-card {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
  color: var(--grey);
  background: var(--white);
}

/* CTA band */
.cta-band {
  background: var(--charcoal);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: grid;
  gap: var(--space-3);
  align-items: center;
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #C7CDD4; }
.cta-band .btn-row { justify-content: center; }

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: #C7CDD4;
  padding: var(--space-5) 0 var(--space-3);
  font-size: .93rem;
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
@media (min-width: 780px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; }
}
.site-footer h6 {
  font-family: var(--font-head);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  margin: 0 0 1em;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6em; }
.site-footer a { color: #C7CDD4; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-logo img, .footer-logo svg { height: 46px; width: auto; margin-bottom: 1em; }
.footer-logo p { color: #9AA6AF; max-width: 32ch; }

.footer-legal {
  border-top: 1px solid var(--line-dark);
  padding-top: var(--space-3);
  display: grid;
  gap: 1em;
}
.footer-legal p { color: #9AA6AF; font-size: .82rem; margin: 0; }
.footer-legal .risk-warning { color: #E3C77A; font-weight: 700; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1em;
  margin-top: var(--space-3);
  font-size: .8rem;
  color: #7C8896;
}
.footer-bottom a { color: #9AA6AF; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--charcoal);
  color: var(--off-white);
  border-radius: var(--radius);
  padding: 1.3em 1.4em;
  box-shadow: var(--shadow);
  z-index: 200;
  display: none;
  gap: 1em;
  align-items: center;
  flex-wrap: wrap;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner p { margin: 0; font-size: .88rem; color: #C7CDD4; flex: 1 1 240px; }
.cookie-banner .btn { padding: .7em 1.3em; font-size: .88rem; }

/* Skip-to-content offsets, misc */
section[id] { scroll-margin-top: 90px; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .7em .9em; border-bottom: 1px solid var(--line); font-size: .94rem; }
th { font-family: var(--font-head); }

@media (max-width: 599px) {
  .hero__badge {
    position: static;
    margin-top: -24px;
    display: flex;
    justify-content: center;
  }
}
