/*
Theme Name: 57401 Digital (Kadence Child)
Theme URI: https://57401digital.com
Description: Custom child theme for 57401 Digital — websites built to grow Aberdeen, SD businesses. Built on the Kadence parent theme.
Author: 57401 Digital
Author URI: https://57401digital.com
Template: kadence
Version: 3.0.0
Text Domain: 57401digital
*/

/* ==========================================================================
   57401 Digital — Design System
   Concept: technical-drawing / blueprint vocabulary for a business that
   builds websites for people who build things (contractors, trades).
   Paper background, cyanotype-blue technical lines, harvest-gold accent,
   hairline grids, dimension marks, title blocks, registration corners.
   ========================================================================== */

:root {
    --fd-ink: #0B2545;
    --fd-ink-soft: #16345E;
    --fd-blueprint: #3E92CC;
    --fd-blueprint-soft: #A9CBE8;
    --fd-gold: #C9A227;
    --fd-gold-dark: #A9861D;
    --fd-paper: #F7F5F0;
    --fd-paper-dim: #EFEBE2;
    --fd-white: #FFFFFF;
    --fd-graphite: #2B303A;
    --fd-slate: #5B6472;
    --fd-line: #C7D2DB;
    --fd-max-width: 1200px;

    --fd-font-display: 'Space Grotesk', 'Inter', sans-serif;
    --fd-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fd-font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

/* ---- Base ---- */
body {
    font-family: var(--fd-font-body);
    color: var(--fd-graphite);
    background-color: var(--fd-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--fd-font-display);
    color: var(--fd-ink);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

h1 { font-size: 58px; font-weight: 700; }
h2 { font-size: 38px; }
h3 { font-size: 22px; }
p, li { font-size: 18px; line-height: 1.65; color: var(--fd-slate); }

@media (max-width: 782px) {
    h1 { font-size: 38px; }
    h2 { font-size: 28px; }
}

.fd-wrap { max-width: var(--fd-max-width); margin: 0 auto; }

a { color: var(--fd-blueprint); text-decoration: none; }
a:hover { color: var(--fd-ink); }

/* ---- Header ---- */
.site-header, .kadence-header {
    background-color: var(--fd-white);
    border-bottom: 1px solid var(--fd-line);
}

.site-title a, .site-title a:hover {
    font-family: var(--fd-font-display);
    color: var(--fd-ink);
    font-weight: 700;
    letter-spacing: 0.2px;
}

.main-navigation a { color: var(--fd-ink); font-weight: 500; font-size: 15px; }
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--fd-blueprint); }

/* ---- Buttons: gold primary, ink secondary — not another blue SaaS button ----
   !important is used deliberately here: Kadence ships its own button color
   rules (often via Customizer-generated CSS loaded after the child theme),
   which otherwise win on specificity and silently override this palette. */
.wp-block-button__link, .kt-button, button, input[type="submit"] {
    background-color: var(--fd-gold) !important;
    color: var(--fd-ink) !important;
    border-radius: 3px !important;
    border: none !important;
    font-family: var(--fd-font-body);
    font-weight: 700;
    font-size: 16px;
    padding: 14px 30px;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.wp-block-button__link:hover, .kt-button:hover, button:hover, input[type="submit"]:hover {
    background-color: var(--fd-gold-dark) !important;
    color: var(--fd-ink) !important;
    transform: translateY(-1px);
}

.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    color: var(--fd-white) !important;
    border: 1.5px solid rgba(255,255,255,0.5) !important;
    font-weight: 600;
}
.is-style-outline .wp-block-button__link:hover {
    border-color: var(--fd-white) !important;
    background-color: rgba(255,255,255,0.08) !important;
    color: var(--fd-white) !important;
}

/* ---- Hero: paper + hairline blueprint grid + title block ---- */
/* Full-bleed technique: breaks the hero out of Kadence's boxed/contained
   content width so it runs edge-to-edge regardless of parent padding. */
.fd-hero,
.fd-strip,
.fd-section-navy {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

.fd-hero {
    position: relative;
    background-color: var(--fd-ink);
    background-image:
        linear-gradient(rgba(62,146,204,0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(62,146,204,0.16) 1px, transparent 1px);
    background-size: 48px 48px;
    color: var(--fd-white);
    padding: 96px 24px 64px;
    text-align: center;
    overflow: hidden;
    border-bottom: 3px solid var(--fd-gold);
}

/* Prevent the full-bleed hero from causing a horizontal scrollbar */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ---- Remove the gap above the hero (Kadence's default page-title bar) ----
   Every page in this design carries its own hero + heading, so the theme's
   built-in title bar is redundant. Hiding it site-wide via CSS is a safety
   net alongside disabling it per-page in the block editor. */
.entry-header,
.page-header,
.kadence-page-title-wrap,
.kadence-title-wrap {
    display: none !important;
}

.entry-content,
.site-main,
.content-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.entry-content > *:first-child {
    margin-top: 0 !important;
}

.fd-hero h1, .fd-hero p { color: var(--fd-white); }
.fd-hero p.fd-hero-sub { max-width: 620px; margin: 20px auto 32px; color: var(--fd-blueprint-soft); font-size: 19px; }

.fd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--fd-font-mono);
    color: var(--fd-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 18px;
}
.fd-eyebrow::before, .fd-eyebrow::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 1px;
    background: var(--fd-gold);
    opacity: 0.6;
}

/* Title block — architect's drawing info box, the signature element */
.fd-titleblock {
    display: inline-grid;
    grid-template-columns: repeat(4, auto);
    gap: 0;
    margin: 44px auto 0;
    border: 1px solid rgba(169,203,232,0.4);
    background: rgba(11,37,69,0.55);
    font-family: var(--fd-font-mono);
    font-size: 11px;
    letter-spacing: 0.6px;
    color: var(--fd-blueprint-soft);
    text-align: left;
}
.fd-titleblock div {
    padding: 12px 20px;
    border-right: 1px solid rgba(169,203,232,0.25);
}
.fd-titleblock div:last-child { border-right: none; }
.fd-titleblock span {
    display: block;
    text-transform: uppercase;
    color: var(--fd-gold);
    font-size: 9px;
    margin-bottom: 4px;
    letter-spacing: 1px;
}
@media (max-width: 640px) {
    .fd-titleblock { grid-template-columns: 1fr; }
    .fd-titleblock div { border-right: none; border-bottom: 1px solid rgba(169,203,232,0.25); }
    .fd-titleblock div:last-child { border-bottom: none; }
}

.fd-trust-points {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-top: 36px;
    font-family: var(--fd-font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--fd-blueprint-soft);
    text-transform: uppercase;
}

/* ---- Service strip ---- */
.fd-strip {
    background-color: var(--fd-paper-dim);
    color: var(--fd-ink);
    text-align: center;
    padding: 16px 24px;
    font-family: var(--fd-font-mono);
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 13px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--fd-line);
}

/* ---- Section backgrounds ---- */
.fd-section-light { background-color: var(--fd-paper); }
.fd-section-white { background-color: var(--fd-white); }
.fd-section-navy { background-color: var(--fd-ink); color: var(--fd-white); }
.fd-section-navy h2, .fd-section-navy h3, .fd-section-navy p { color: var(--fd-white); }
.fd-section-navy p { color: var(--fd-blueprint-soft); }

.fd-section { padding: 72px 24px; }
@media (max-width: 782px) {
    .fd-section { padding: 48px 20px; }
    .fd-hero { padding: 64px 20px 48px; }
}

/* Dimension-style section header: a labeled hairline, like a drawing annotation */
.fd-dim-header {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: var(--fd-max-width);
    margin: 0 auto 40px;
}
.fd-dim-header .fd-dim-label {
    font-family: var(--fd-font-mono);
    font-size: 12px;
    letter-spacing: 1.5px;
    color: var(--fd-blueprint);
    white-space: nowrap;
    text-transform: uppercase;
}
.fd-dim-header .fd-dim-line {
    flex: 1;
    height: 1px;
    background: var(--fd-line);
    position: relative;
}
.fd-dim-header .fd-dim-line::before, .fd-dim-header .fd-dim-line::after {
    content: "";
    position: absolute;
    top: -3px;
    width: 1px;
    height: 7px;
    background: var(--fd-line);
}
.fd-dim-header .fd-dim-line::before { left: 0; }
.fd-dim-header .fd-dim-line::after { right: 0; }

/* ---- Cards with registration-mark corners ---- */
.fd-card {
    position: relative;
    background-color: var(--fd-white);
    border: 1px solid var(--fd-line);
    border-radius: 2px;
    padding: 30px;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.fd-card::before, .fd-card::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--fd-blueprint);
    border-left: 2px solid var(--fd-blueprint);
    top: -1px; left: -1px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.fd-card::after {
    top: auto; left: auto; bottom: -1px; right: -1px;
    border-top: none; border-left: none;
    border-bottom: 2px solid var(--fd-blueprint);
    border-right: 2px solid var(--fd-blueprint);
}
.fd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(11,37,69,0.10);
    border-color: transparent;
}
.fd-card:hover::before, .fd-card:hover::after { opacity: 1; }

.fd-card h3 { color: var(--fd-ink); margin-bottom: 10px; }
.fd-card p { font-size: 16px; margin: 0; }

.fd-card-problem { border-left: 3px solid var(--fd-gold); }

/* ---- Process steps (legitimately sequential, so numbering is earned) ---- */
.fd-step-number {
    font-family: var(--fd-font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--fd-gold-dark);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* ---- Local badge / tags ---- */
.fd-local-badge {
    display: inline-block;
    font-family: var(--fd-font-mono);
    background-color: rgba(201,162,39,0.12);
    color: var(--fd-gold-dark);
    padding: 6px 16px;
    border: 1px solid rgba(201,162,39,0.35);
    border-radius: 2px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.fd-tag {
    display: inline-block;
    font-family: var(--fd-font-mono);
    font-size: 13px;
    color: var(--fd-ink);
    background: var(--fd-white);
    border: 1px solid var(--fd-line);
    padding: 6px 14px;
    border-radius: 2px;
}

/* ---- Footer ---- */
.site-footer, .kadence-footer { background-color: var(--fd-ink); color: var(--fd-white); }
.site-footer a, .kadence-footer a { color: var(--fd-blueprint-soft); }
.site-footer a:hover, .kadence-footer a:hover { color: var(--fd-white); }

/* ---- Forms ---- */
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form input[type="tel"], .wpcf7-form textarea,
input[type="text"], input[type="email"], input[type="tel"], textarea {
    border: 1px solid var(--fd-line);
    border-radius: 2px;
    padding: 12px 14px;
    font-size: 16px;
    width: 100%;
    font-family: var(--fd-font-body);
    background: var(--fd-white);
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { border-color: var(--fd-blueprint); outline: none; }

.fd-form-wrap {
    max-width: 560px;
    margin: 0 auto;
    background-color: var(--fd-white);
    border: 1px solid var(--fd-line);
    border-radius: 3px;
    padding: 36px;
    position: relative;
}
.fd-form-wrap::before {
    content: "FORM";
    position: absolute;
    top: -1px; right: -1px;
    font-family: var(--fd-font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--fd-white);
    background: var(--fd-blueprint);
    padding: 4px 10px;
}
.fd-form-label {
    display: block;
    font-family: var(--fd-font-mono);
    font-weight: 600;
    color: var(--fd-ink);
    margin: 16px 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Photo frame ----
   Matches the card's registration-mark corners so real photography (once
   available) fits the blueprint design system rather than looking bolted on. */
.fd-photo-frame {
    position: relative;
    border: 1px solid var(--fd-line);
    padding: 8px;
    background: var(--fd-white);
    display: inline-block;
    max-width: 100%;
}
.fd-photo-frame::before, .fd-photo-frame::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-top: 2px solid var(--fd-blueprint);
    border-left: 2px solid var(--fd-blueprint);
    top: -1px; left: -1px;
}
.fd-photo-frame::after {
    top: auto; left: auto; bottom: -1px; right: -1px;
    border-top: none; border-left: none;
    border-bottom: 2px solid var(--fd-blueprint);
    border-right: 2px solid var(--fd-blueprint);
}
.fd-photo-frame img {
    display: block;
    width: 100%;
    height: auto;
}
.fd-photo-frame--headshot img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    max-width: 280px;
}
.fd-photo-frame--wide img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.fd-photo-caption {
    font-family: var(--fd-font-mono);
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--fd-slate);
    text-transform: uppercase;
    margin-top: 10px;
    text-align: center;
}

/* ---- Interactive tools (calculators, quizzes) ---- */
.fd-tool-wrap {
    max-width: 640px;
    margin: 0 auto;
    background-color: var(--fd-white);
    border: 1px solid var(--fd-line);
    border-radius: 3px;
    padding: 40px;
}

.fd-tool-question {
    margin-bottom: 28px;
}

.fd-tool-question > p {
    font-weight: 700;
    color: var(--fd-ink);
    margin: 0 0 12px;
    font-size: 17px;
}

.fd-tool-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fd-tool-option {
    position: relative;
}

.fd-tool-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.fd-tool-option label {
    display: inline-block;
    padding: 10px 18px;
    border: 1.5px solid var(--fd-line);
    border-radius: 3px;
    font-size: 15px;
    font-weight: 600;
    color: var(--fd-ink);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.fd-tool-option input:checked + label {
    background-color: var(--fd-gold);
    border-color: var(--fd-gold);
    color: var(--fd-ink);
}

.fd-tool-option input:focus-visible + label {
    outline: 2px solid var(--fd-blueprint);
    outline-offset: 2px;
}

.fd-tool-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--fd-line);
    border-radius: 3px;
    font-size: 16px;
    font-family: var(--fd-font-body);
    background: var(--fd-white);
    color: var(--fd-graphite);
}

.fd-tool-number {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--fd-line);
    border-radius: 3px;
    font-size: 16px;
    font-family: var(--fd-font-body);
}

.fd-tool-result {
    margin-top: 28px;
    padding: 24px;
    border-radius: 3px;
    background-color: var(--fd-paper);
    border-left: 3px solid var(--fd-gold);
    display: none;
}

.fd-tool-result.is-visible {
    display: block;
}

.fd-tool-result-headline {
    font-family: var(--fd-font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--fd-ink);
    margin: 0 0 10px;
}

.fd-tool-result-body {
    color: var(--fd-slate);
    margin: 0 0 16px;
}

.fd-tool-error {
    color: #B3261E;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}
.fd-tool-error.is-visible {
    display: block;
}

/* ---- Two-column layout utility ----
   Used for photo+text (About) and content+form (Free Website Audit) splits.
   Unlike inline grid-template-columns, this always collapses to one column
   below the mobile breakpoint — inline styles can't be safely overridden
   the same way, which is what caused the audit page to break on phones. */
.fd-two-col {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: start;
}
.fd-two-col--even {
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 782px) {
    .fd-two-col,
    .fd-two-col--even {
        grid-template-columns: 1fr !important;
    }
}

/* ---- Speculative client mockup pages ----
   Pitch mockups (e.g. the Hub City Roofing homepage concept) get their own
   fully self-contained styling in-page and should NOT show 57401 Digital's
   own header/footer chrome — the whole point is to look like the
   prospective client's site, not a 57401 Digital page. Target by post ID
   rather than guessing at Kadence's internal header/footer class names,
   since body_class() reliably outputs page-id-{ID} regardless of theme
   version. Add one line per mockup page as new ones are built. */
body.page-id-235 .site-header,
body.page-id-235 .kadence-header,
body.page-id-235 .site-footer,
body.page-id-235 .kadence-footer,
body.page-id-235 .fd-sticky-cta {
    display: none !important;
}
body.page-id-235 .entry-content,
body.page-id-235 .site-main,
body.page-id-235 .content-area {
    margin: 0 !important;
    padding: 0 !important;
}
body.page-id-235 {
    padding-bottom: 0 !important;
}

/* Vosika Fencing mockup */
body.page-id-257 .site-header,
body.page-id-257 .kadence-header,
body.page-id-257 .site-footer,
body.page-id-257 .kadence-footer,
body.page-id-257 .fd-sticky-cta {
    display: none !important;
}
body.page-id-257 .entry-content,
body.page-id-257 .site-main,
body.page-id-257 .content-area {
    margin: 0 !important;
    padding: 0 !important;
}
body.page-id-257 {
    padding-bottom: 0 !important;
}
body.page-id-252 .site-header,
body.page-id-252 .kadence-header,
body.page-id-252 .site-footer,
body.page-id-252 .kadence-footer,
body.page-id-252 .fd-sticky-cta {
    display: none !important;
}
body.page-id-252 .entry-content,
body.page-id-252 .site-main,
body.page-id-252 .content-area {
    margin: 0 !important;
    padding: 0 !important;
}
body.page-id-252 {
    padding-bottom: 0 !important;
}

/* ---- Sticky mobile lead-gen bar ---- */
.fd-sticky-cta {
    display: none;
}

@media (max-width: 782px) {
    .fd-sticky-cta {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        background: var(--fd-ink);
        padding: 10px 12px;
        gap: 10px;
        box-shadow: 0 -4px 16px rgba(11,37,69,0.25);
    }
    .fd-sticky-cta__btn {
        flex: 1;
        text-align: center;
        background: var(--fd-gold) !important;
        color: var(--fd-ink) !important;
        font-weight: 700 !important;
        padding: 12px 10px !important;
        border-radius: 4px;
        font-size: 14px;
    }
    .fd-sticky-cta__btn--outline {
        background: transparent !important;
        border: 1.5px solid rgba(255,255,255,0.5) !important;
        color: var(--fd-white) !important;
    }
    /* Prevent the sticky bar from covering the page's last section */
    body {
        padding-bottom: 64px;
    }
}

/* ---- Booking-status line under hero CTAs ---- */
.fd-booking-note {
    display: block;
    margin-top: 20px;
    font-family: var(--fd-font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--fd-blueprint-soft);
    text-transform: uppercase;
}

/* ---- Persistent header CTA button ----
   Dropped in via Kadence's Header Builder (an HTML element), not a
   guessed template hook — this keeps a lead-gen action visible on every
   page without depending on Kadence's internal markup staying the same
   across theme updates. */
.fd-header-cta {
    display: inline-block;
    background-color: var(--fd-gold) !important;
    color: var(--fd-ink) !important;
    font-family: var(--fd-font-body);
    font-weight: 700 !important;
    font-size: 14px !important;
    padding: 10px 20px !important;
    border-radius: 3px !important;
    border: none !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.15s ease;
}
.fd-header-cta:hover {
    background-color: var(--fd-gold-dark) !important;
    color: var(--fd-ink) !important;
    transform: translateY(-1px);
}
