/* Harry's Handyman Services — Components CSS */

.site-header {
    position: relative;
    width: 100%;
    background-color: var(--ground);
    border-bottom: 1px solid var(--rule);
    z-index: 100;
    transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.site-header.is-condensed {
    position: sticky;
    top: 0;
    background-color: rgba(191, 163, 132, 0.96);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(20, 16, 12, 0.08);
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md) var(--gutter) var(--space-sm);
    max-width: var(--container-max);
    margin: 0 auto;
}

/* Centered Logo Presentation */
.header-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    text-decoration: none;
    line-height: 1;
}

.header-brand img {
    height: 2.1rem;
    width: auto;
    max-width: 100%;
    display: block;
}

/* Hairline Under Logo */
.header-hairline {
    width: 100%;
    max-width: var(--measure-spec);
    height: 1px;
    background-color: var(--rule);
    margin: 0 auto var(--space-xs);
}

/* Symmetrical Split Nav */
.header-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs) var(--space-lg);
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: var(--space-xs) var(--space-2xs);
    font-family: var(--biju-2fb);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

.nav-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-link:active {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
    transform: translateY(1px);
}

.nav-link:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.nav-link.is-current {
    color: #7a1005;
    border-bottom-color: #7a1005;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-height: 44px;
    min-width: 44px;
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-stamp);
    border: 1px solid var(--ink);
    background-color: var(--ground-elevated);

    color: var(--ink);
    transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.nav-toggle:hover {
    background-color: var(--ink);
    color: var(--ground);
}

.nav-toggle:active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: scale(0.98);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: inline-flex;
        margin-top: var(--space-xs);
    }

    .header-nav {

        display: none;
        width: 100%;
        padding-top: var(--space-sm);
    }

    .header-nav.is-open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--rule);
        width: 100%;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--rule-light);
    }

    .nav-link {
        width: 100%;
        justify-content: center;
        padding: var(--space-sm) var(--space-md);
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-height: 44px;
    padding: 0.65rem 1.4rem;
    font-family: var(--biju-2fb);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--tracking-stamp);
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    border-radius: 0;
    cursor: pointer;
    white-space: normal;
    text-align: center;
    transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.btn-primary {
    background-color: var(--ink);
    color: var(--ground);
    border: 2px solid var(--ink);
}

.btn-primary:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary:active {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    transform: translateY(1px);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.btn-accent {
    background-color: var(--accent);
    color: #fff;
    border: 2px solid var(--accent);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn-accent:active {
    background-color: #6c150d;
    border-color: #6c150d;
    transform: translateY(1px);
}

.btn-accent:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.btn-outline {
    background-color: transparent;
    color: var(--ink);
    border: 2px solid var(--ink);
}

.btn-outline:hover {
    background-color: var(--ink);
    color: var(--ground);
}

.btn-outline:active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(1px);
}

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

.spec-ledger-wrap {
    width: 100%;
    margin: var(--space-lg) 0 var(--space-xl);
}

.spec-ledger-header {
    border-bottom: 2px solid var(--ink);
    padding-bottom: var(--space-xs);
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.spec-ledger-title {
    font-family: var(--biju-2fb);
    font-size: var(--text-xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin: 0;

}

.spec-ledger-badge {
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-stamp);
    color: var(--ink-muted);
}

.spec-ledger {
    width: 100%;
    display: table;
    border-collapse: collapse;
}

.spec-row {
    display: table-row;
    border-bottom: 1px solid var(--rule);
}

.spec-row:last-child {
    border-bottom: 2px solid var(--ink);
}

.spec-cell-label {
    display: table-cell;
    width: 38%;
    padding: 0.85rem var(--space-sm) 0.85rem 0;
    vertical-align: top;
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
    border-right: 1px solid var(--rule-light);
}

.spec-cell-value {
    display: table-cell;
    width: 62%;
    padding: 0.85rem 0 0.85rem var(--space-sm);
    vertical-align: top;
    font-family: var(--biju-1fd);
    font-size: var(--text-sm);
    color: var(--ink);
    line-height: var(--leading-normal);
}

.spec-cell-value strong {
    font-family: var(--biju-655);
    font-weight: 700;
    color: var(--ink);
}

.spec-cell-price {
    font-family: var(--biju-655);
    font-weight: 700;
    font-size: var(--text-base);
    color: #7a1005;
}

@media (max-width: 600px) {
    .spec-ledger, .spec-row, .spec-cell-label, .spec-cell-value {
        display: block;
        width: 100%;
    }

    .spec-row {
        padding: var(--space-xs) 0;
    }

    .spec-cell-label {
        border-right: none;
        padding: 0.4rem 0 0.15rem 0;
    }

    .spec-cell-value {
        padding: 0 0 0.5rem 0;
    }
}

.duotone-break {
    position: relative;
    width: 100vw;
    margin-left: max(calc(-50vw + 50%), calc(50% - 50vw));
    margin-right: max(calc(-50vw + 50%), calc(50% - 50vw));
    padding: var(--space-3xl) var(--gutter);
    background-color: var(--ink);
    color: var(--ground);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.duotone-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    filter: grayscale(100%) contrast(140%) brightness(0.65) sepia(100%) hue-rotate(345deg) saturate(220%);
    opacity: 0.38;
    pointer-events: none;
}

@media (max-width: 600px) {
    .duotone-break {
        padding: var(--space-xl) var(--gutter);
        min-height: auto;
    }
}

.duotone-content {
    position: relative;
    z-index: 2;
    max-width: var(--measure-narrow);
    margin: 0 auto;
}

.duotone-quote {
    font-family: var(--biju-2fb);
    font-size: var(--text-2xl);
    line-height: var(--leading-tight);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: #fff;
    margin-bottom: var(--space-md);
}

.duotone-cite {
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-stamp);
    color: var(--ground-elevated);
    text-transform: uppercase;
    display: block;
}

/* Full-Width Incidental Image Break (Between Ledgers) */
.full-bleed-figure {
    width: 100vw;
    margin-left: max(calc(-50vw + 50%), calc(50% - 50vw));
    margin-right: max(calc(-50vw + 50%), calc(50% - 50vw));
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background-color: var(--ground-sunken);
}

.full-bleed-figure img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.figure-caption {
    padding: var(--space-xs) var(--gutter);
    max-width: var(--container-max);
    margin: 0 auto;
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wide);
    color: #14100c;
    text-transform: uppercase;
    border-bottom: 1px solid var(--rule-light);
}

.form-sheet {
    background-color: var(--ground-elevated);
    border: 2px solid var(--ink);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: var(--space-2xs);
    color: var(--ink);
}

.form-label-optional {
    font-weight: 400;
    color: var(--ink-muted);
    text-transform: none;
    font-style: italic;
}

.form-control {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    font-family: var(--biju-1fd);
    font-size: var(--text-sm);
    background-color: var(--ground);
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 0;
    transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.form-control:hover {
    background-color: #d3ba9e;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
    background-color: #dcd0c1;
}

.form-control:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xs);
    font-size: var(--text-xs);
    line-height: var(--leading-normal);
    cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    margin-top: 0.15rem;
    accent-color: var(--accent);
}

.form-hint {
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    color: var(--ink-muted);
    margin-top: var(--space-2xs);
}

.form-error {
    display: none;
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    color: var(--error);
    margin-top: var(--space-2xs);
    font-weight: 700;
}

.form-group.has-error .form-control {
    border-color: var(--error);
    background-color: var(--error-bg);
}

.form-group.has-error .form-error {
    display: block;
}

.form-status {
    padding: var(--space-sm) var(--space-md);
    margin-top: var(--space-md);
    font-family: var(--biju-655);
    font-size: var(--text-sm);
    border: 1px solid transparent;
    display: none;
}

.form-status.is-success {
    display: block;
    background-color: var(--success-bg);
    color: var(--success);
    border-color: var(--success);
}

.form-status.is-error {
    display: block;
    background-color: var(--error-bg);
    color: var(--error);
    border-color: var(--error);
}

.site-footer {
    width: 100%;
    background-color: #1a140f;
    color: #bfa384;
    border-top: 3px solid var(--accent);
    padding: var(--space-3xl) var(--gutter) var(--space-xl);
    text-align: center;
}

.footer-inner {
    max-width: var(--measure-narrow);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-brand {
    display: inline-block;
    margin-bottom: var(--space-md);
}

.footer-brand img {
    height: 2.5rem;
    width: auto;
    max-width: 100%;
}

.footer-license {
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-stamp);
    text-transform: uppercase;
    color: var(--ground-elevated);
    margin-bottom: var(--space-sm);
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--rule);
    display: inline-block;
}

.footer-contact-block {
    margin-bottom: var(--space-lg);
    font-family: var(--biju-1fd);
    font-size: var(--text-sm);
    color: #bfa384;
    line-height: var(--leading-loose);
}

.footer-contact-block a {
    color: #fff;
    text-decoration: underline;
}

.footer-contact-block a:hover {
    color: #d3ba9e;
}

.footer-contact-block a:active {
    color: #fff;
}

.footer-contact-block a:focus-visible {
    outline: 2px solid var(--accent);
}

.footer-nav {
    margin-bottom: var(--space-lg);
}

.footer-nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs) var(--space-md);
}

.footer-nav-link {
    font-family: var(--biju-2fb);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: #bfa384;
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 var(--space-2xs);
    transition: color var(--dur-fast) ease;
}

.footer-nav-link:hover {
    color: #fff;
}

.footer-nav-link:active {
    color: var(--accent);
}

.footer-nav-link:focus-visible {
    outline: 2px solid var(--accent);
}

.footer-legal-row {
    border-top: 1px solid #3d3328;
    padding-top: var(--space-lg);
    width: 100%;
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    color: #bfa384;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: center;
}

.footer-legal-row p {
    color: #cbb194;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs) var(--space-sm);
    margin-bottom: var(--space-xs);
}

.footer-legal-links a,
.footer-legal-links button {
    color: #bfa384;
    text-decoration: underline;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 var(--space-2xs);
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: color var(--dur-fast) ease;
}

.footer-legal-links a:hover,
.footer-legal-links button:hover {
    color: #fff;
}

.footer-legal-links a:active,
.footer-legal-links button:active {
    color: var(--accent);
}

.footer-legal-links a:focus-visible,
.footer-legal-links button:focus-visible {
    outline: 2px solid var(--accent);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #14100c;
    color: #bfa384;
    border-top: 2px solid var(--rule);
    padding: 0.65rem var(--gutter);
    z-index: 9990;
    transform: translateY(0);
    transition: transform var(--dur-base) ease, opacity var(--dur-base) ease;
}

.cookie-banner.is-hidden {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
}

.cookie-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-md);
}

.cookie-text {
    font-family: var(--biju-1fd);
    font-size: var(--text-xs);
    line-height: var(--leading-snug);
    margin: 0;
    color: #bfa384;
    flex: 1 1 300px;
}

.cookie-text a {
    color: #fff;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.btn-cookie {
    min-height: 44px;
    padding: 0.4rem 0.9rem;
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    cursor: pointer;
    border-radius: 0;
    transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.btn-cookie-accept {
    background-color: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.btn-cookie-accept:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-cookie-accept:active {
    background-color: #6c150d;
    transform: scale(0.98);
}

.btn-cookie-accept:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.btn-cookie-decline {
    background-color: transparent;
    color: #bfa384;
    border: 1px solid #8c755b;
}

.btn-cookie-decline:hover {
    background-color: #3d3328;
    color: #fff;
    border-color: #fff;
}

.btn-cookie-decline:active {
    background-color: #14100c;
    transform: scale(0.98);
}

.btn-cookie-decline:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.chat-launcher {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 9980;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-height: 48px;
    min-width: 48px;
    padding: 0.6rem 1.1rem;
    background-color: var(--ink);
    color: var(--ground);
    border: 2px solid var(--ground-elevated);
    font-family: var(--biju-655);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-stamp);
    box-shadow: 0 4px 12px rgba(20, 16, 12, 0.25);
    cursor: pointer;
    transition: transform var(--dur-fast) ease, background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, bottom var(--dur-base) ease;
}

body.cookie-banner-active .chat-launcher {
    bottom: 4.8rem;
}

.chat-launcher:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.chat-launcher:active {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    transform: translateY(1px);
}

.chat-launcher:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.chat-launcher .icon {
    width: 1.35em;
    height: 1.35em;
}

.chat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}

.chat-panel {
    position: fixed;
    bottom: 5.5rem;
    right: 1.25rem;
    width: 360px;
    max-width: calc(100vw - 2.5rem);
    max-height: 520px;
    background-color: var(--ground-elevated);
    border: 2px solid var(--ink);
    box-shadow: 0 8px 24px rgba(20, 16, 12, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 9985;
    transition: opacity var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.chat-panel[hidden] {
    display: none !important;
}

.chat-header {
    background-color: var(--ink);
    color: var(--ground);
    padding: var(--space-xs) var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--accent);
}

.chat-title {
    font-family: var(--biju-2fb);
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin: 0;
    color: var(--ground);
}

.chat-close-btn {
    background: transparent;
    border: none;
    color: var(--ground);
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

.chat-close-btn:hover {
    color: var(--accent);
}

.chat-close-btn:active {
    color: #fff;
    transform: scale(0.95);
}

.chat-close-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.chat-body {
    flex: 1;
    padding: var(--space-sm);
    overflow-y: auto;
    min-height: 200px;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    background-color: var(--ground);
}

.chat-msg {
    padding: var(--space-xs) var(--space-sm);
    max-width: 85%;
    font-size: var(--text-xs);
    line-height: var(--leading-normal);
}

.chat-msg-operator {
    align-self: flex-start;
    background-color: var(--ground-elevated);
    border: 1px solid var(--rule);
    color: var(--ink);
}

.chat-msg-client {
    align-self: flex-end;
    background-color: var(--ink);
    border: 1px solid var(--ink);
    color: var(--ground);
}

.chat-msg-time {
    display: block;
    font-family: var(--biju-655);
    font-size: 0.65rem;
    color: var(--ink-faint);
    margin-top: 0.2rem;
    text-align: right;
}

.chat-footer {
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--ground-elevated);
    border-top: 1px solid var(--rule);
}

.chat-form-start {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-xs) 0;
}

.chat-input-row {
    display: flex;
    gap: var(--space-2xs);
}

.chat-input-row .form-control {
    flex: 1;
    min-height: 44px;
}
