/*
style.css - Theme Name: Hello Blocks Child
Description: frontend custom styles for Factor Financial
Template: hello-blocks

Note: All fonts are now loaded and managed via fonts.css. 
This file only contains layout, colors, and typography structure.
*/

/* =========================
GLOBAL RESET - ZERO SPACE ABOVE HEADER AND BELOW FOOTER
========================= */
.wp-site-blocks {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* =========================
PAGE TEMPLATE – PAGE HEADER NO NAV
REMOVE INLINE MAIN TOP MARGIN
FOR QUOTE PAGES – FORM ABOVE THE FOLD
========================= */

.page-template-page-header-no-nav main#wp--skip-link--target {
    margin-top: 0 !important;
}

/* =========================
PAGE TEMPLATE – PAGE CONTACT FULL NAV
REMOVE INLINE MAIN TOP MARGIN
FOR CONTACT PAGE – FORM ABOVE THE FOLD
========================= */

.page-template-page-contact-full-nav main#wp--skip-link--target {
    margin-top: 10px !important;
}

/* ========================
COLOR PALETTE (SAFE ZONE)
========================= */
:root {
  /* === PRIMARY / SECONDARY PAIRS === */
  --primary-dark-spruce: #234326;
  --secondary-honeydew: #F1FFF5;
  --primary-grape-soda: #7A4E7B;
  --secondary-lavender: #FFEEFD;

  /* === CANVAS BACKGROUND, NEUTRALS === */
  --beige: #F5F5DC;
  --grey: #A6A6A6;
  --slate-grey: #6B7280;

  /* === HEADINGS AND BODY TEXT === */
  --onyx-headings: #141414;
  --carbon-body-text: #1F1F1F;

  /* === CTA === */
  --indigo-cta: #6A0DAD;

  /* === OVERLAY BLACK === */
  --carbon-overlay: #262626;

  /* === SPECIAL / ACCENTS === */
  --h1-white: #FFFFFF;
  --dark-goldenrod: #B8860B;
  --laser-green: #39ff14;

  /* === TYPOGRAPHY / FONTS === */
  --font-body: 'Work Sans', sans-serif;
  --font-heading: 'Rubik', sans-serif;
  --font-icon-box: 'Rubik Dirt', cursive;

  /* Optional font-weight variables for reference */
  --fw-regular: 400;
  --fw-italic: 400;
  --fw-semibold: 600;
  --fw-semibold-italic: 600;
  --fw-bold: 700;
  --fw-bold-italic: 700;

  /* === WP PRESET ALIASES FOR COLORS === */

  /* Primary / Secondary Pairs */
  --wp--preset--color--primary-dark-spruce: var(--primary-dark-spruce);
  --wp--preset--color--secondary-honeydew: var(--secondary-honeydew);
  --wp--preset--color--primary-grape-soda: var(--primary-grape-soda);
  --wp--preset--color--secondary-lavender: var(--secondary-lavender);

  /* Canvas / Neutrals */
  --wp--preset--color--beige: var(--beige);
  --wp--preset--color--grey: var(--grey);
  --wp--preset--color--slate-grey: var(--slate-grey);

  /* Headings / Body Text */
  --wp--preset--color--onyx-headings: var(--onyx-headings);
  --wp--preset--color--carbon-body-text: var(--carbon-body-text);

  /* CTA */
  --wp--preset--color--indigo-cta: var(--indigo-cta);

  /* Overlay Black */
  --wp--preset--color--carbon-overlay: var(--carbon-overlay);

  /* Special / Accents */
  --wp--preset--color--h1-white: var(--h1-white);
  --wp--preset--color--dark-goldenrod: var(--dark-goldenrod);
  --wp--preset--color--laser-green: var(--laser-green);
}

/* =========================
PAGE/POST TITLES
========================= */
/* Hide all native WP page/post titles on front-end */
body:not(.wp-admin) .entry-title,
body:not(.wp-admin) .post-title,
body:not(.wp-admin) h1.wp-block-post-title,
body:not(.wp-admin) .wp-block-post-title,
body:not(.wp-admin) .page-title,
body:not(.wp-admin) .post .entry-title {
    display: none !important;
}

/* =========================
CUSTOM H1 COLORS
========================= */
/* Homepage H1: Onyx Headings */
.home h1 {
    color: var(--onyx-headings);
}

/* All other H1s: white */
h1 {
    color: var(--h1-white);
}

/* =========================
BODY / TYPOGRAPHY
========================= */
body {
    color: var(--carbon-body-text);
    background-color: var(--beige);
    font-size: clamp(1.125rem, 1.06rem + 0.3vw, 1.1875rem);
}

body,
.wp-site-blocks,
.wp-block,
.wp-block p,
.wp-block li {
    font-family: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =========================
HEADINGS
========================= */
h1,
h2,
h3,
h4,
h5,
h6,
.wp-block-heading {
    font-family: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h2,
h3,
h4,
h5,
h6 {
    color: var(--onyx-headings);
}

/* =========================
RESPONSIVE TYPOGRAPHY - HEADINGS & BODY
Inserted here to override defaults and normalize icon box descriptions
========================= */

/* Body text */
body,
.wp-site-blocks,
.wp-block,
.wp-block p,
.wp-block li {
    font-family: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(1.125rem, 1.06rem + 0.3vw, 1.1875rem);
    line-height: 1.5;
}

/* Headings: Rubik, proper hierarchy, responsive scaling */
h1 {
    font-family: "Rubik", system-ui, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    font-family: "Rubik", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.25;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
}

h3 {
    font-family: "Rubik", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
    font-family: "Rubik", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

h5 {
    font-family: "Rubik", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.4;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

h6 {
    font-family: "Rubik", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.4;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

/* =========================
LINKS (GLOBAL)
========================= */
body a {
    color: inherit;
    text-decoration: underline;
}

body a:hover,
body a:focus {
    opacity: 0.85; /* subtle hover feedback */
}

body a:visited {
    color: inherit;
}

/* =========================
GUTENKIT — MOBILE OFF-CANVAS NAV
Hidden by default; visible only when toggled open
========================= */

@media (max-width: 1024px) {
  
  /* =========================
  GUTENKIT MOBILE NAV OVERLAY & PANEL
  ========================= */

  /* Off-canvas panel — CLOSED state */
  .gkit-offcanvas,
  .gkit-nav-menu__offcanvas,
  [class*="offcanvas"] {
    position: fixed;
    top: 0;
    right: 0;
    width: 85vw;
    max-width: 360px;
    height: 100vh;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10001;
  }

  /* Overlay — hidden by default */
  .gkit-offcanvas-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  /* OPEN STATE — slide panel in */
  .gkit-open .gkit-offcanvas,
  .gkit-open .gkit-nav-menu__offcanvas,
  .gkit-offcanvas-open .gkit-offcanvas,
  .gkit-offcanvas-open .gkit-nav-menu__offcanvas {
    transform: translateX(0);
  }

  /* OPEN STATE — show overlay */
  .gkit-open .gkit-offcanvas-overlay,
  .gkit-offcanvas-open .gkit-offcanvas-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Prevent horizontal scroll on mobile */
  html,
  body {
    overflow-x: hidden;
    width: 100%;
  }

  /* Safety: no GutenKit element may exceed viewport width */
  [class*="gkit"],
  [class*="gkit-"] {
    max-width: 100vw;
  }

  /* Keep hamburger wrapper visible */
  .gkit-nav-menu-wrapper,
  .gkit-nav-menu-wraper {
    display: block;
  }

  /* Lock page scroll when menu is open */
  body.gkit-open,
  body.gkit-offcanvas-open {
    overflow: hidden;
  }

}

/* =========================
GLOBAL IMAGE CAPTIONS — GUTENKIT ADVANCED IMAGE

In GutenKit Advanced Image block:
Add +1.25rem BOTTOM MARGIN
for each additional caption line (all breakpoints)
========================= */

figcaption.gkit-image-caption {
    display: block;
    font-size: 0.97rem; /* ~15.5px, ~86% of body text */
    line-height: 1.3;
    color: var(--carbon-overlay); /* overlay color */
}

/* Tablet */
@media (max-width: 1024px) {
    figcaption.gkit-image-caption {
        display: block;
        font-size: 0.95rem; /* ~15.2px, ~84% of body text */
    }
}

/* Mobile */
@media (max-width: 768px) {
    figcaption.gkit-image-caption {
        display: block;
        font-size: 0.91rem; /* ~14.5px, ~80% of body text */
        line-height: 1.35; /* slightly taller for readability on small screens */
    }
}

/* =========================
     END OF FILE
========================= */
