/* Great Gateway shared theme and site chrome. See DESIGN.md. */

:root {
    --white: #ffffff;
    --paper: #f7f6f2;
    --ink: #1a1a2e;
    --ink-soft: #4a4d61;
    --graphite: #5f6274;
    --green: #047857;
    --emerald: #059669;
    --rule: rgba(26, 26, 46, 0.13);
    --rule-strong: var(--ink);
    --display: "Newsreader", Georgia, serif;
    --wordmark: "Syne", sans-serif;
    --body: "DM Sans", sans-serif;
    --radius-sm: 4px;
    --gutter: clamp(min(1.4rem, 5.75vw), 4vw, 5rem);
    --max: 1440px;
    --section-space: clamp(5rem, 8vw, 8.5rem);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

body.menu-open {
    overflow: hidden;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 1000;
    padding: 0.8rem 1rem;
    background: var(--ink);
    color: var(--white);
    transform: translate(-50%, -140%);
    transition: transform 180ms ease;
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

.button,
.nav-cta,
.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.6rem;
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.button:hover,
.button:focus-visible,
.header-cta:hover,
.header-cta:focus-visible {
    border-color: var(--green);
    background: var(--green);
}

.nav-cta {
    padding: 0.6rem 1.05rem;
    background: transparent;
    color: var(--ink);
    font-size: 0.95rem;
}

.nav-cta:hover,
.nav-cta:focus-visible {
    background: var(--ink);
    color: var(--white);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    pointer-events: auto;
    display: flex;
    height: 4.9rem;
    align-items: center;
    gap: 1.5rem;
    padding: 0 var(--gutter);
    border-bottom: 1px solid var(--rule);
}
.site-header::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    content: "";
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-right: auto;
    white-space: nowrap;
    font-family: var(--wordmark);
    font-size: 1.03rem;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.brand img {
    width: 1.85rem;
    height: 1.85rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.4vw, 2.5rem);
    font-size: 0.95rem;
    font-weight: 500;
}

.site-nav > a:not(.nav-cta) {
    transition: color 150ms ease;
}

.site-nav > a:not(.nav-cta):hover,
.site-nav > a:not(.nav-cta):focus-visible,
.site-nav > a[aria-current="page"] {
    color: var(--green);
}

.header-cta,
.menu-toggle {
    display: none;
}

.site-footer {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
    align-items: start;
    padding: 3.5rem var(--gutter) 3rem;
    border-top: 1px solid var(--rule);
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.site-footer p {
    margin: 0;
}

.brand--footer {
    color: var(--ink);
}

.footer-brand p {
    max-width: 18rem;
    margin-top: 1rem;
}

.footer-nav,
.footer-contact,
.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-footer a:not(.brand) {
    display: inline-flex;
    min-height: 2.25rem;
    align-items: center;
    width: fit-content;
    transition: color 150ms ease;
}

.site-footer a:not(.brand):hover,
.site-footer a:not(.brand):focus-visible,
.site-footer a[aria-current="page"] {
    color: var(--green);
}

.footer-legal p {
    margin-top: 0.6rem;
    color: var(--graphite);
    font-size: 0.85rem;
}

.cookie-consent {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 0.9rem var(--gutter);
    max-height: 60dvh;
    overflow: auto;
    border-top: 1px solid var(--rule);
    background: var(--white);
    box-shadow: 0 -6px 20px rgba(26, 26, 46, 0.06);
}

.cookie-consent[hidden] {
    display: none;
}

.cookie-consent-content {
    display: flex;
    width: min(100%, var(--max));
    align-items: center;
    gap: 1.5rem;
}

.cookie-consent-content p {
    flex: 1;
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.5;
}

.cookie-consent-content a {
    color: var(--green);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cookie-consent-actions .cookie-choice-btn {
    min-height: 44px;
    padding: 0.55rem 1rem;
}

.cookie-choice-btn {
    background: var(--white);
    color: var(--ink);
}

.cookie-choice-btn:is(:hover, :focus-visible) {
    border-color: var(--green);
    color: var(--green);
}

@media (max-width: 760px) {
    :root {
        --gutter: 1.35rem;
        --section-space: 4.5rem;
    }

    .site-header {
        min-height: calc(4.4rem + env(safe-area-inset-top));
        height: auto;
        gap: min(1rem, 3vw);
        padding: env(safe-area-inset-top) var(--gutter) 0;
    }

    .brand {
        min-width: 0;
        font-size: 1rem;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .brand img {
        width: 1.6rem;
        height: 1.6rem;
    }

    .header-cta {
        position: relative;
        z-index: 42;
        display: inline-flex;
        min-width: 0;
        padding: 0.55rem min(0.9rem, 3vw);
        font-size: 0.9rem;
        text-align: center;
        overflow-wrap: anywhere;
    }

    body.menu-open .header-cta {
        visibility: hidden;
    }

    .menu-toggle {
        position: relative;
        z-index: 42;
        display: flex;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        align-items: center;
        gap: 0.6rem;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .menu-toggle__label {
        font-size: 0.9rem;
        font-weight: 500;
    }

    .menu-toggle__lines,
    .menu-toggle__lines::before,
    .menu-toggle__lines::after {
        display: block;
        width: 1.35rem;
        height: 2px;
        background: currentColor;
        transition: transform 180ms ease, top 180ms ease;
    }

    .menu-toggle__lines {
        position: relative;
    }

    .menu-toggle__lines::before,
    .menu-toggle__lines::after {
        position: absolute;
        content: "";
    }

    .menu-toggle__lines::before {
        top: -0.4rem;
    }

    .menu-toggle__lines::after {
        top: 0.4rem;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__lines {
        transform: rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__lines::before {
        top: 0;
        transform: rotate(-90deg);
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__lines::after {
        top: 0;
        opacity: 0;
    }

    .site-nav {
        position: fixed;
        inset: 0;
        z-index: 40;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 1.25rem;
        padding: 6rem 2.5rem;
        background: var(--white);
        font-family: var(--display);
        font-size: clamp(2rem, 9vw, 2.75rem);
        font-weight: 400;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-1rem);
        visibility: hidden;
        transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
    }

    .site-nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: none;
        visibility: visible;
        transition-delay: 0s;
    }

    .nav-cta {
        margin-top: 1rem;
        padding: 0.85rem 1.4rem;
        font-family: var(--body);
        font-size: 1rem;
    }

    .site-footer {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .site-footer a:not(.brand) {
        min-height: 2.75rem;
    }

    main,
    .site-footer {
        overflow-wrap: anywhere;
    }

    .cookie-consent-content {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

    .cookie-consent-content p {
        min-width: min(100%, 14rem);
        font-size: 0.82rem;
    }
}

@media (max-width: 440px) {
    .menu-toggle__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (max-width: 360px) {
    .brand img {
        display: none;
    }
}

/* Interior content retains its page layouts and uses the shared theme. */
body.interior-page {
    --bg-void: var(--white);
    --bg-surface: var(--white);
    --text-main: var(--ink);
    --text-muted: var(--ink-soft);
    --border-subtle: var(--rule);
    --font-heading: var(--display);
    --font-display: var(--display);
    --font-body-alt: var(--body);
    font-family: var(--body);
    overflow-x: clip;
}

html:has(.interior-page) {
    scroll-padding-top: 6rem;
}

.interior-page main > .section {
    padding-block: var(--section-space);
}

.interior-page main > .section:first-child,
.interior-page main > .services-hero {
    padding-top: clamp(3rem, 6vw, 5.5rem);
}

.interior-page main > .section + .section:not(.legal-content) {
    border-top: 1px solid var(--rule);
}

.interior-page .container {
    padding-inline: var(--gutter);
}

.interior-page main :is(h1, h2, h3, h4) {
    font-family: var(--display);
    font-weight: 500;
}

.interior-page main h1 {
    font-size: clamp(2.75rem, 6vw, 4.8rem);
    font-weight: 400;
    line-height: 1.02;
}

.interior-page main .contact-title {
    font-size: clamp(2.65rem, 5.1vw, 4.2rem);
}

.interior-page main .legal-hero {
    padding-bottom: 2rem;
}

.interior-page main .legal-content {
    padding-top: 0;
}

.interior-page .form-help,
.interior-page .form-helper,
.interior-page .form-label,
.interior-page .legal-updated,
.interior-page .wp-icon-label {
    font-family: var(--body);
    letter-spacing: normal;
    text-transform: none;
}

.interior-page .form-helper,
.interior-page .wp-icon-label {
    font-size: 0.875rem;
}

body.light-mode.interior-page :is(.btn-primary, .btn-outline, .sticky-cta, .error-cta) {
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    background: var(--ink);
    box-shadow: none;
    color: var(--white);
    font-family: var(--body);
    font-weight: 500;
    line-height: 1.2;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

body.light-mode.interior-page .btn-outline {
    background: var(--white);
    color: var(--ink);
}

body.light-mode.interior-page :is(.btn-primary, .sticky-cta, .error-cta):is(:hover, :focus-visible) {
    border-color: var(--green);
    background: var(--green);
    box-shadow: none;
    color: var(--white);
}

body.light-mode.interior-page .btn-outline:is(:hover, :focus-visible) {
    border-color: var(--green);
    background: var(--white);
    box-shadow: none;
    color: var(--green);
}

.interior-page :is(.btn-primary, .btn-outline):hover {
    transform: none;
}

.interior-page .btn .icon-arrow-right {
    display: none;
}

body.light-mode.interior-page .pricing-badge {
    border-radius: var(--radius-sm);
    font-family: var(--body);
    font-size: 0.75rem;
    letter-spacing: normal;
    text-transform: none;
    background: var(--ink);
    color: var(--white);
    box-shadow: none;
}

body.light-mode.interior-page .form-control {
    border-radius: var(--radius-sm);
    border-color: var(--rule);
    background: var(--white);
}

body.light-mode.interior-page .form-control[aria-invalid=true],
body.light-mode.interior-page .form-control.form-error {
    border-color: #b42318;
}

body.light-mode.interior-page :is(.pricing-card.featured, .included-card, .approach-card, .value-card, .wordpress-card, .benefits-card, .contact-form-wrapper, .contact-method, .cta-card-services, .cta-card) {
    background: var(--paper);
    border: 1px solid var(--rule);
    box-shadow: none;
}

body.light-mode.interior-page :is(.pricing-card.featured, .included-card, .approach-card, .value-card, .contact-method):hover {
    border-color: var(--rule);
    box-shadow: none;
    transform: none;
}

body.light-mode.interior-page .pricing-card.featured {
    border-color: var(--green);
}

body.light-mode.interior-page .pricing-card:not(.featured) {
    box-shadow: none;
}

.interior-page .site-footer .footer-brand p {
    font-size: inherit;
}

.interior-page .error-page {
    padding: var(--section-space) var(--gutter);
}
