/* ==========================================================================
   New Image Canopy — PPC landing pages
   1. Brand tokens (colors, type, spacing, effects, fonts)
   2. Page layout variables + base styles
   3. Button component
   4. Hover / focus states (inline styles in the HTML hold the base look;
      these classes add interaction states, hence !important)
   5. Ninja Forms lead form (WordPress templates only)
   6. Mobile header (logo + phone)
   7. Browser autofill
   ========================================================================== */

/* 1. BRAND TOKENS ---------------------------------------------------------- */

/* New Image Canopy — Webfonts
   Brand fonts (per Brand Book): Inter Bold for headers, Poppins Regular for body.
   Only these two weights were supplied. Additional weights fall back to the
   browser's synthetic weighting; supply more .ttf files to remove the fallback. */

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* New Image Canopy — Color tokens
   Brand colors (Brand Book): Midnight Blue #002e4d · Amaranth #e91942 · White #ffffff */

:root {
  /* ---- Brand primaries ---- */
  --nic-midnight: #002e4d;   /* Midnight Blue — primary brand color */
  --nic-amaranth: #e91942;   /* Amaranth — accent / punchline red */
  --nic-white:    #ffffff;

  /* ---- Midnight (navy) ramp ---- for faceted backgrounds & gradients */
  --navy-900: #00192b;
  --navy-800: #002e4d;  /* = brand Midnight Blue */
  --navy-700: #073e63;
  --navy-600: #12557f;
  --navy-500: #1f6b9c;

  /* ---- Amaranth (red) ramp ---- */
  --red-700: #b30f31;
  --red-600: #c9123a;
  --red-500: #e91942;  /* = brand Amaranth */
  --red-400: #f24462;
  --red-300: #f8768c;

  /* ---- Neutrals ---- */
  --white:    #ffffff;
  --gray-50:  #f5f6f8;
  --gray-100: #eceff3;
  --gray-200: #dde2e9;
  --gray-300: #c3cbd6;
  --gray-400: #98a2b3;
  --gray-500: #6b7684;
  --gray-600: #48505c;
  --ink:      #0d1b26;   /* near-black text on light, warmer than pure navy */

  /* ---- Semantic aliases ---- */
  --brand-primary:   var(--nic-midnight);
  --brand-accent:    var(--nic-amaranth);

  --surface-page:    var(--white);
  --surface-alt:     var(--gray-50);
  --surface-card:    var(--white);
  --surface-invert:  var(--navy-800);   /* navy sections */
  --surface-accent:  var(--red-500);    /* red bands / CTA bars */

  --text-strong:     var(--nic-midnight);
  --text-body:       var(--gray-600);
  --text-muted:      var(--gray-500);
  --text-on-dark:    var(--white);
  --text-accent:     var(--nic-amaranth);

  --border-subtle:   var(--gray-200);
  --border-strong:   var(--gray-300);

  --link:            var(--nic-amaranth);
  --link-hover:      var(--red-600);

  --success:         #1e7e34;   /* form success messages; ~5:1 contrast with white text */

  /* ---- Signature gradients ---- (navy faceted hero look) */
  --grad-navy: linear-gradient(150deg, var(--navy-700) 0%, var(--navy-800) 45%, var(--navy-900) 100%); /* @kind color */
  --grad-navy-photo: linear-gradient(180deg, rgba(0,46,77,0.10) 0%, rgba(0,46,77,0.85) 100%); /* @kind color */
  --grad-red: linear-gradient(135deg, var(--red-400) 0%, var(--red-600) 100%); /* @kind color */
}

/* New Image Canopy — Typography tokens
   Header font: Inter Bold (uppercase, tight tracking).
   Body font:   Poppins Regular. */

:root {
  --font-heading: "Inter", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale (display-forward, for marketing collateral) */
  --fs-display: 72px;   /* hero punchlines */
  --fs-h1: 52px;
  --fs-h2: 38px;
  --fs-h3: 28px;
  --fs-h4: 22px;
  --fs-lead: 20px;      /* intro paragraphs */
  --fs-body: 16px;
  --fs-sm: 14px;
  --fs-xs: 12px;
  --fs-eyebrow: 13px;   /* small caps label above headings */

  --lh-tight: 0.98; /* @kind font */
  --lh-snug: 1.15;   /* @kind font */
  --lh-normal: 1.5;  /* @kind font */
  --lh-relaxed: 1.65;   /* @kind font */

  /* Inter Bold headlines are set tight & wide-cap */
  --tracking-tight: -0.01em;   /* @kind font */
  --tracking-normal: 0;   /* @kind font */
  --tracking-eyebrow: 0.18em; /* @kind font */
  --tracking-caps: 0.04em;   /* @kind font */

  --weight-heading: 700;   /* only Inter Bold supplied */
  --weight-body: 400;      /* only Poppins Regular supplied */
}

/* Utility text classes (usable in cards & static HTML) */
.nic-eyebrow {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--brand-accent);
}
.nic-display {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  color: var(--text-strong);
}
.nic-h1 { font-family: var(--font-heading); font-weight:700; font-size:var(--fs-h1); line-height:var(--lh-tight); text-transform:uppercase; letter-spacing:var(--tracking-tight); color:var(--text-strong); }
.nic-h2 { font-family: var(--font-heading); font-weight:700; font-size:var(--fs-h2); line-height:var(--lh-snug); text-transform:uppercase; color:var(--text-strong); }
.nic-h3 { font-family: var(--font-heading); font-weight:700; font-size:var(--fs-h3); line-height:var(--lh-snug); color:var(--text-strong); }
.nic-body { font-family: var(--font-body); font-weight:400; font-size:var(--fs-body); line-height:var(--lh-relaxed); color:var(--text-body); }
.nic-lead { font-family: var(--font-body); font-weight:400; font-size:var(--fs-lead); line-height:var(--lh-normal); color:var(--text-body); }

/* New Image Canopy — Spacing, radii, sizing */

:root {
  /* Spacing scale (4px base) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radii — the brand skews mostly square/angular; radius is modest.
     CTA pills and dad-joke bubbles are the main rounded shapes. */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Container widths */
  --container-sm: 640px;   /* @kind spacing */
  --container-md: 960px;   /* @kind spacing */
  --container-lg: 1200px;   /* @kind spacing */

  /* Signature angle for diagonal cuts / clip shapes */
  --nic-shear: 7deg; /* @kind other */
}

/* New Image Canopy — Effects: shadows, borders, motion */

:root {
  /* Shadows — restrained; collateral is mostly flat with crisp edges.
     Cards use a soft neutral drop; photos use a deeper lift. */
  --shadow-sm: 0 1px 2px rgba(0, 25, 43, 0.08);
  --shadow-md: 0 6px 18px rgba(0, 25, 43, 0.10);
  --shadow-lg: 0 18px 40px rgba(0, 25, 43, 0.16);
  --shadow-red: 0 10px 24px rgba(201, 18, 58, 0.30);

  --border-hairline: 1px solid var(--border-subtle);
  --border-card: 1px solid var(--border-subtle);

  /* Motion — subtle, confident. No bounce. */
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1); /* @kind other */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* @kind other */
  --dur-fast: 120ms; /* @kind other */
  --dur-med: 220ms; /* @kind other */
  --dur-slow: 360ms; /* @kind other */

  --focus-ring: 0 0 0 3px rgba(233, 25, 66, 0.35); /* @kind shadow */
}

/* 2. PAGE LAYOUT VARIABLES + BASE ----------------------------------------- */

:root, [data-vp="desktop"] {
  --lp-max: 1240px; --lp-h: auto; --lp-of: visible; --lp-radius: 0px;
  --lp-border: 1px solid var(--gray-200); --lp-shadow: 0 24px 70px rgba(0,25,43,0.16);
  --lp-gut: 56px; --lp-sec: 80px; --lp-hero-pad: 72px; --lp-card-pad: 28px;
  --lp-h1: 56px; --lp-h2: 36px; --lp-h3: 20px; --lp-body: 17px; --lp-lead: 20px;
  --lp-hero: 1.05fr 0.95fr; --lp-two: 1fr 1fr; --lp-three: repeat(3,1fr); --lp-fields: 1fr 1fr;
  --lp-hero-min: 632px; --lp-hero-gap: 36px; --lp-hero-align: start; --lp-gbadge: inline-flex;
  --lp-logo: 52px; --lp-mapfig: block; --lp-mapfig-m: none; --lp-header-cta: flex;
  --lp-bcell: 120px; --lp-bcell-h: 42px; --lp-bmark: 38px; --lp-bword: 24px; --lp-blogo-gap: 18px 56px;
}
[data-vp="mobile"] {
  --lp-max: 390px; --lp-h: 780px; --lp-of: auto; --lp-radius: 26px; --lp-switcher-h: 0px; --lp-anchor: 68px;
  --lp-border: 1px solid var(--gray-300); --lp-shadow: 0 30px 80px rgba(0,25,43,0.34);
  --lp-gut: 20px; --lp-sec: 44px; --lp-hero-pad: 34px; --lp-card-pad: 22px;
  --lp-h1: 33px; --lp-h2: 25px; --lp-h3: 18px; --lp-body: 16px; --lp-lead: 17px;
  --lp-hero: 1fr; --lp-two: 1fr; --lp-three: 1fr; --lp-fields: 1fr;
  --lp-hero-min: 0px; --lp-hero-gap: 22px; --lp-hero-align: stretch; --lp-gbadge: flex;
  --lp-logo: 34px; --lp-mapfig: none; --lp-mapfig-m: block; --lp-header-cta: none;
  --lp-bcell: 88px; --lp-bcell-h: 32px; --lp-bmark: 28px; --lp-bword: 18px; --lp-blogo-gap: 14px 26px;
}
@media (min-width: 901px) and (max-width: 1150px) {
  :root, [data-vp="desktop"] {
    --lp-gut: 32px; --lp-sec: 60px; --lp-hero-pad: 48px;
    --lp-h1: 44px; --lp-h2: 31px;
    --lp-hero: 1fr; --lp-three: repeat(2,1fr);
    --lp-hero-min: 0px; --lp-hero-gap: 28px; --lp-hero-align: stretch;
  }
}
@media (max-width: 900px) {
  :root, [data-vp="desktop"] {
    --lp-gut: 20px; --lp-sec: 44px; --lp-hero-pad: 34px; --lp-card-pad: 22px;
    --lp-h1: 34px; --lp-h2: 25px; --lp-h3: 18px; --lp-body: 16px; --lp-lead: 17px;
    --lp-hero: 1fr; --lp-two: 1fr; --lp-three: 1fr; --lp-fields: 1fr;
  --lp-hero-min: 0px; --lp-hero-gap: 22px; --lp-hero-align: stretch; --lp-gbadge: flex;
    --lp-logo: 34px; --lp-mapfig: none; --lp-mapfig-m: block; --lp-header-cta: none;
    --lp-bcell: 88px; --lp-bcell-h: 32px; --lp-bmark: 28px; --lp-bword: 18px; --lp-blogo-gap: 14px 26px;
  }
}
body { margin: 0; background: #e8ecf1; font-family: var(--font-body, "Poppins", system-ui, sans-serif); color: var(--gray-600); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
img { max-width: 100%; }
html { scroll-behavior: smooth; }
[id^="lp-"] { scroll-margin-top: var(--lp-anchor, 90px); }
a { color: var(--nic-amaranth); text-decoration: none; transition: color 180ms ease-out; }
a:hover { color: var(--red-600); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--nic-amaranth); outline-offset: 2px; }
details[data-faq] > div { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms cubic-bezier(0.2,0.6,0.2,1); }
details[data-faq][open] > div { grid-template-rows: 1fr; }
details[data-faq][data-closing] > div { grid-template-rows: 0fr; }
details[data-faq] > div > div { overflow: hidden; }
details[data-faq] summary { list-style: none; }
details[data-faq] summary::-webkit-details-marker { display: none; }
details[data-faq] summary:hover { color: var(--nic-amaranth); }
details[data-faq][open] summary i { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* 3. BUTTON --------------------------------------------------------------- */

.nic-logo { display: block; height: 36px; width: auto; }

.nic-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--tracking-caps); line-height: 1; text-decoration: none; cursor: pointer;
  border-radius: var(--radius-sm);
  background: var(--red-500); color: var(--white); border: 2px solid var(--red-500);
  transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.nic-btn:hover { background: var(--red-600); border-color: var(--red-600); color: var(--white); }
.nic-btn:active { transform: translateY(1px); }
.nic-btn--sm { padding: 9px 16px; font-size: 13px; }
.nic-btn--md { padding: 13px 24px; font-size: 15px; }
.nic-btn--lg { padding: 18px 36px; font-size: 17px; }
.nic-btn--block { width: 100%; }

/* 4. HOVER / FOCUS STATES ------------------------------------------------- */

.hover-1:hover {
  opacity:0.75 !important;
}
.hover-2:hover {
  color:var(--nic-amaranth) !important;
}
.hover-3:hover {
  opacity:0.7 !important;
}
.focus-4:focus {
  border-color:var(--nic-amaranth) !important;
  box-shadow:0 0 0 3px rgba(233,25,66,0.14) !important;
  outline:none !important;
}
.hover-5:hover {
  transform:scale(1.06) !important;
}
.hover-6:hover {
  transform:translateY(-3px) !important;
  box-shadow:0 14px 30px rgba(0,25,43,0.12) !important;
}
.hover-7:hover {
  background:var(--nic-midnight) !important;
  color:#ffffff !important;
}
.hover-8:hover {
  background:#ffffff !important;
  color:var(--nic-amaranth) !important;
}
.hover-9:hover {
  color:#174ea6 !important;
}
.hover-10:hover {
  color:#1a73e8 !important;
}
.hover-11:hover {
  background:#ffffff !important;
  color:var(--nic-midnight) !important;
}

/* 5. NINJA FORMS LEAD FORM ------------------------------------------------ */
/* Matches the hand-built form in the static previews. Scoped to .nic-lp-nf,
   the wrapper around [ninja_form id=5] in lib/theme/landing-pages.php. */

.nic-lp-nf .nf-form-title,
.nic-lp-nf .nf-form-fields-required { display: none; }
.nic-lp-nf .nf-form-content { padding: 0; max-width: none; }
/* Columns come from the form's Ninja Forms Layouts rows; this only tightens the gutters. */
.nic-lp-nf .nf-multi-cell .nf-row { margin: 0 -7px; }
.nic-lp-nf .nf-multi-cell .nf-cell { padding: 0 7px; }
.nic-lp-nf .nf-field-container { margin: 0 0 14px; }
.nic-lp-nf .nf-field-label { margin: 0 0 6px; padding: 0; }
.nic-lp-nf .nf-field-label label { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--nic-midnight); }
.nic-lp-nf .ninja-forms-req-symbol { color: var(--nic-amaranth); }

.nic-lp-nf input[type="text"],
.nic-lp-nf input[type="email"],
.nic-lp-nf input[type="tel"],
.nic-lp-nf select,
.nic-lp-nf textarea {
  width: 100%; min-height: 48px; margin: 0; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: 3px; background: #ffffff;
  font-family: inherit; font-size: 16px; line-height: 1.4; color: var(--ink);
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
.nic-lp-nf textarea { height: 110px; min-height: 110px; resize: vertical; }
.nic-lp-nf input:focus,
.nic-lp-nf select:focus,
.nic-lp-nf textarea:focus { border-color: var(--nic-amaranth); box-shadow: 0 0 0 3px rgba(233,25,66,0.14); outline: none; }

.nic-lp-nf .checkbox-container .nf-field-element { order: -1; }
.nic-lp-nf .checkbox-container .nf-field-label label { font-size: 13px; font-weight: 400; color: var(--gray-500); }
.nic-lp-nf input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--nic-amaranth); }

.nic-lp-nf .nf-error-msg,
.nic-lp-nf .nf-error .nf-error-msg { margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--red-600); }
.nic-lp-nf .nf-error .ninja-forms-field { border-color: var(--red-600); }

.nic-lp-nf .nf-form-content input[type="submit"],
.nic-lp-nf .nf-form-content input[type="button"] {
  /* An <input> doesn't wrap its label by default, so long labels overflowed on phones.
     white-space + height: auto let it wrap and grow instead. */
  display: block; width: 100%; max-width: 100%; height: auto; min-height: 56px;
  margin: 0; padding: 18px 24px; border: 2px solid var(--red-500); border-radius: var(--radius-sm);
  background: var(--red-500); color: var(--white); cursor: pointer; -webkit-appearance: none; appearance: none;
  font-family: var(--font-heading); font-weight: 700; font-size: 17px; line-height: 1.2;
  text-align: center; text-transform: uppercase; letter-spacing: var(--tracking-caps);
  white-space: normal; overflow-wrap: break-word;
  transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.nic-lp-nf .nf-form-content input[type="submit"]:hover,
.nic-lp-nf .nf-form-content input[type="submit"]:focus-visible { background: var(--red-600); border-color: var(--red-600); }
@media (max-width: 600px) {
  .nic-lp-nf .nf-form-content input[type="submit"],
  .nic-lp-nf .nf-form-content input[type="button"] { padding: 16px 14px; font-size: 16px; letter-spacing: 0.02em; }
}

/* Success message (set in the form's Success Message action): green panel,
   white text. Holds a heading line, body copy and a call link. */
.nic-lp-nf .nf-response-msg:not(:empty) {
  margin: 0 0 4px; padding: 20px 22px; border-radius: 3px; background: var(--success);
  font-size: 15px; line-height: 1.65; color: var(--white);
}
.nic-lp-nf .nf-response-msg h1,
.nic-lp-nf .nf-response-msg h2,
.nic-lp-nf .nf-response-msg h3,
.nic-lp-nf .nf-response-msg h4 {
  margin: 0 0 12px; font-family: var(--font-heading); font-weight: 700; font-size: 22px; line-height: 1.05;
  text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--white);
}
.nic-lp-nf .nf-response-msg p { margin: 0 0 10px; color: var(--white); }
.nic-lp-nf .nf-response-msg p:last-child { margin-bottom: 0; }
.nic-lp-nf .nf-response-msg strong { color: var(--white); }
.nic-lp-nf .nf-response-msg a { font-weight: 700; color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.nic-lp-nf .nf-response-msg a:hover,
.nic-lp-nf .nf-response-msg a:focus-visible { color: var(--white); text-decoration-thickness: 2px; outline-color: var(--white); }
.nic-lp-nf .nf-response-msg a[href^="tel:"] { display: inline-flex; align-items: center; min-height: 48px; font-size: 17px; }

/* Form-level errors (e.g. a failed submission) shown under the submit button. */
.nic-lp-nf .nf-form-errors:not(:empty) { margin-top: 14px; }
.nic-lp-nf .nf-form-errors .nf-error-msg {
  margin: 0 0 8px; padding: 10px 14px; border-left: 4px solid var(--red-600); border-radius: 3px;
  background: rgba(233,25,66,0.07); font-size: 13px; color: var(--red-700);
}
.nic-lp-nf .nf-form-errors .nf-error-msg:last-child { margin-bottom: 0; }

/* 6. MOBILE HEADER -------------------------------------------------------- */
/* The logo (~6.6:1) at its 36px desktop height is ~237px wide and can't shrink,
   so next to the phone number it overflows phone screens. Let the logo scale
   down and tighten the phone link. !important beats the header's inline styles. */

@media (max-width: 600px) {
  /* Drop the desktop "floating card" frame so the page runs edge to edge. */
  div:has(> div > #lp-header) { padding: 0 !important; }
  div:has(> #lp-header) { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
  #lp-header { gap: 12px !important; padding-left: 16px !important; padding-right: 16px !important; }
  #lp-header > a:first-child { flex: 1 1 auto !important; min-width: 0; max-width: 190px; }
  #lp-header .nic-logo { width: 100%; height: auto; }
  #lp-header a[href^="tel:"] { gap: 6px !important; padding: 0 !important; font-size: 15px !important; }
  #lp-header a[href^="tel:"] > span:first-child { width: 28px !important; height: 28px !important; }
}

/* Very narrow phones: keep the call icon as the tap target, hide the digits visually
   (still read by screen readers) so the logo stays legible. */
@media (max-width: 359px) {
  #lp-header a[href^="tel:"] { min-width: 44px; justify-content: center; }
  #lp-header a[href^="tel:"] > span:last-child {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}

/* 7. BROWSER AUTOFILL ----------------------------------------------------- */
/* Chrome/Safari paint autofilled fields light blue and ignore background-color,
   so cover it with a white inset shadow (keeping the focus ring on focus).
   !important beats the .focus-4 / .nic-lp-nf focus box-shadows. */

input:-webkit-autofill,
input:-webkit-autofill:hover,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
select:-webkit-autofill,
select:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  transition: background-color 600000s 0s, color 600000s 0s;
}
input:-webkit-autofill:focus,
textarea:-webkit-autofill:focus,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 3px rgba(233,25,66,0.14) !important;
  box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 3px rgba(233,25,66,0.14) !important;
}
