/* ==========================================================================
   Global Group — Base design system
   Tokens taken directly from the Figma file (Global Group / Website)
   ========================================================================== */

:root {
    /* Brand */
    --gg-primary: #2e368e;
    --gg-primary-dark: #232a70;
    --gg-accent: #f97316;
    --gg-accent-alt: #fc9e09;

    /* Neutrals */
    --gg-dark: #0f172a;
    --gg-dark-soft: #1e293b;
    --gg-slate: #475569;
    --gg-muted: #64748b;
    --gg-muted-light: #94a3b8;
    --gg-border: #e2e8f0;
    /* Figma page canvas behind every light section (Home frame 1:855) */
    --gg-bg: #f8f9ff;
    --gg-white: #ffffff;

    /* Type */
    --gg-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --gg-font-display: 'Plus Jakarta Sans', var(--gg-font);

    /* Layout */
    --gg-container: 1280px;
    --gg-radius: 12px;
    --gg-radius-lg: 16px;
    --gg-radius-pill: 9999px;
    --gg-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --gg-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    --gg-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

    /* Header height — used for scroll offset + hero spacing */
    --gg-header-h: 80px;
}

/* --------------------------------------------------------------- reset -- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    margin: 0;
    font-family: var(--gg-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--gg-slate);
    background: var(--gg-white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

main,
section,
.gg-container {
    min-width: 0;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6, p {
    margin: 0;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: 0;
    background: none;
}

/* ----------------------------------------------------------- utilities -- */

.gg-container {
    width: 100%;
    max-width: var(--gg-container);
    margin-inline: auto;
    padding-inline: 40px;
}

@media (max-width: 900px) {
    .gg-container {
        padding-inline: 24px;
    }
}

@media (max-width: 560px) {
    :root {
        --gg-header-h: 72px;
    }

    .gg-container {
        padding-inline: 16px;
    }

    .gg-header__inner {
        padding: 10px 16px;
    }

    .gg-logo,
    .gg-logo--single {
        min-width: 0;
        max-width: calc(100% - 60px);
    }

    .gg-logo__mark {
        height: 38px;
    }

    .gg-logo__word {
        height: 22px;
        max-width: calc(100% - 44px);
        object-fit: contain;
    }
}

/* Buttons ---------------------------------------------------------------- */

.gg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: var(--gg-radius-pill);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.gg-btn:hover {
    transform: translateY(-1px);
}

.gg-btn--primary {
    background: var(--gg-primary);
    color: var(--gg-white);
}

.gg-btn--primary:hover {
    background: var(--gg-primary-dark);
    box-shadow: var(--gg-shadow);
}

.gg-btn--accent {
    background: var(--gg-accent);
    color: var(--gg-white);
}

.gg-btn--accent:hover {
    background: #ea6a0c;
    box-shadow: var(--gg-shadow);
}

.gg-btn--outline {
    background: transparent;
    color: var(--gg-white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

.gg-btn--outline:hover {
    background: rgba(255, 255, 255, .1);
}

/* Section heading pattern ------------------------------------------------ */

.gg-eyebrow {
    font-family: var(--gg-font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--gg-accent-alt);
}

.gg-section-title {
    font-size: 40px;
    line-height: 48px;
    font-weight: 700;
    color: var(--gg-dark);
    letter-spacing: -0.5px;
}

.gg-section-sub {
    font-size: 18px;
    line-height: 28px;
    color: var(--gg-muted);
}

@media (max-width: 768px) {
    .gg-section-title {
        font-size: 30px;
        line-height: 38px;
    }

    .gg-section-sub {
        font-size: 16px;
        line-height: 26px;
    }
}

/* ================================================================ HEADER == */

.gg-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--gg-shadow-sm);
}

.gg-header__inner {
    height: var(--gg-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 32px 16px 40px;
    max-width: var(--gg-container);
    margin-inline: auto;
}

.gg-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.gg-logo__mark {
    height: 44px;
    width: auto;
}

.gg-logo__word {
    height: 26px;
    width: auto;
}

/* A logo uploaded in the admin panel stands alone, so it gets the full height
   of the pair and is free to be any aspect ratio. */
.gg-logo--single .gg-logo__mark {
    height: 62px;
    /* max-width: 280px; */
    object-fit: contain;
    object-position: left center;
}

@media (max-width: 560px) {
    .gg-logo--single .gg-logo__mark {
        height: 44px;
        max-width: 200px;
    }
}

/* The in-drawer CTA duplicates the header button on desktop — mobile only. */
.gg-nav .gg-btn {
    display: none;
}

.gg-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.gg-nav__link {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: var(--gg-slate);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.gg-nav__link:hover {
    color: var(--gg-primary);
}

.gg-nav__link.is-active {
    color: var(--gg-primary);
    font-weight: 600;
    border-bottom-color: var(--gg-accent);
    padding-bottom: 6px;
}

/* Mobile menu toggle */

.gg-nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--gg-primary);
}

.gg-nav-toggle span,
.gg-nav-toggle span::before,
.gg-nav-toggle span::after {
    content: '';
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
}

.gg-nav-toggle span::before {
    transform: translateY(-7px);
}

.gg-nav-toggle span::after {
    transform: translateY(5px);
}

.gg-nav-toggle.is-open span {
    background: transparent;
}

.gg-nav-toggle.is-open span::before {
    transform: rotate(45deg);
}

.gg-nav-toggle.is-open span::after {
    transform: rotate(-45deg) translateY(-1px);
}

@media (max-width: 900px) {
    .gg-header__inner {
        padding: 16px 20px;
    }

    .gg-nav-toggle {
        display: flex;
        order: 3;
    }

    .gg-header__cta {
        display: none;
    }

    .gg-nav {
        position: absolute;
        top: var(--gg-header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--gg-white);
        box-shadow: var(--gg-shadow);
        padding: 8px 20px 20px;
        display: none;
    }

    .gg-nav.is-open {
        display: flex;
    }

    .gg-nav__link {
        padding: 14px 0;
        border-bottom: 1px solid var(--gg-border);
    }

    .gg-nav__link.is-active {
        border-bottom-color: var(--gg-accent);
    }

    .gg-nav .gg-btn {
        display: inline-flex;
        margin-top: 16px;
    }
}

/* ================================================================ FOOTER == */

.gg-footer {
    background: var(--gg-dark);
    color: var(--gg-muted-light);
}

.gg-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 48px;
    max-width: var(--gg-container);
    margin-inline: auto;
    padding: 80px 48px 40px;
}

.gg-footer__brand {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: var(--gg-white);
    margin-bottom: 24px;
}

.gg-footer__about {
    font-size: 16px;
    line-height: 26px;
    color: var(--gg-muted-light);
    max-width: 320px;
}

.gg-footer__socials {
    display: flex;
    gap: 16px;
    padding-top: 24px;
}

.gg-footer__social {
    width: 40px;
    height: 40px;
    border-radius: var(--gg-radius-pill);
    background: var(--gg-dark-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .2s ease;
}

.gg-footer__social:hover {
    background: var(--gg-primary);
}

.gg-footer__social img,
.gg-footer__social svg {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

/* Social icons are inline SVG so they can inherit the link colour. */
.gg-footer__social {
    color: #ffffff;
}

.gg-footer__heading {
    font-family: var(--gg-font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--gg-accent-alt);
    margin-bottom: 24px;
}

.gg-footer__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gg-footer__list a,
.gg-footer__list li {
    font-size: 16px;
    line-height: 24px;
    color: var(--gg-muted-light);
    transition: color .2s ease;
}

.gg-footer__list a:hover {
    color: var(--gg-white);
}

.gg-footer__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gg-footer__item img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.gg-footer__bottom {
    border-top: 1px solid var(--gg-dark-soft);
    padding: 41px 48px 40px;
    font-size: 14px;
    line-height: 20px;
    color: var(--gg-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    flex-wrap: wrap;
}

/* Credit sits hard against the right edge; copyright keeps the left. */
.gg-footer__credit {
    margin-left: auto;
}

.gg-footer__credit a {
    color: var(--gg-muted);
    text-decoration: none;
    transition: color .2s ease;
}

.gg-footer__credit a:hover,
.gg-footer__credit a:focus-visible {
    color: var(--gg-white);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .gg-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        padding: 56px 24px 32px;
    }

    .gg-footer__col--brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .gg-footer__grid {
        grid-template-columns: 1fr;
        padding: 48px 16px 24px;
    }

    .gg-footer__bottom {
        padding: 32px 16px;
        justify-content: center;
        text-align: center;
    }

    .gg-footer__credit {
        margin-left: 0;
    }
}

/* ==========================================================================
   Get a Quote — modal popup
   ========================================================================== */

.gg-quote[hidden] {
    display: none;
}

.gg-quote {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}

.gg-quote__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(16, 28, 44, .6);
    backdrop-filter: blur(2px);
}

.gg-quote__dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    background: var(--gg-white, #fff);
    border-radius: var(--gg-radius-lg, 20px);
    box-shadow: 0 25px 50px -12px rgba(16, 28, 44, .4);
    padding: 32px;
    margin: auto;
    animation: ggQuoteIn .22s ease;
}

@keyframes ggQuoteIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gg-quote__close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--gg-radius-pill, 999px);
    background: #f0eded;
    color: #434656;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .18s ease;
}

.gg-quote__close:hover {
    background: #e2dede;
}

.gg-quote__head {
    margin-bottom: 20px;
    padding-right: 40px;
}

.gg-quote__title {
    font-family: var(--gg-font-display, inherit);
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--gg-dark, #101c2c);
}

.gg-quote__sub {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--gg-muted, #6a6d7d);
}

.gg-quote__alert {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.gg-quote__alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.gg-quote__alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.gg-quote__alert ul {
    margin: 0;
    padding-left: 18px;
}

.gg-quote__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gg-quote__group {
    border: 1px solid #e4e6f0;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.gg-quote__legend {
    padding: 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gg-primary, #2e368e);
}

.gg-quote__legend span {
    font-weight: 400;
    color: var(--gg-muted, #8a8fa3);
}

.gg-quote__modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.gg-quote__mode {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid #e4e6f0;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease;
}

.gg-quote__mode:hover {
    border-color: var(--gg-accent, #ffa112);
}

.gg-quote__mode input {
    width: 17px;
    height: 17px;
    accent-color: var(--gg-accent, #ffa112);
    flex-shrink: 0;
}

.gg-quote__mode:has(input:checked) {
    border-color: var(--gg-accent, #ffa112);
    background: #fff8ee;
}

.gg-quote__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.gg-quote__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.gg-quote__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gg-dark, #101c2c);
}

.gg-quote__input {
    width: 100%;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--gg-dark, #101c2c);
    background: var(--gg-white, #fff);
    border: 1px solid #d9d7e4;
    border-radius: 10px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.gg-quote__input:focus {
    border-color: var(--gg-primary, #2e368e);
    box-shadow: 0 0 0 3px rgba(46, 54, 142, .12);
}

textarea.gg-quote__input {
    resize: vertical;
}

.gg-quote__submit {
    align-self: flex-start;
    padding: 14px 36px;
    border: none;
    border-radius: 12px;
    background: var(--gg-accent, #ffa112);
    color: #1c1b1b;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 20px -8px rgba(157, 67, 0, .35);
    transition: background-color .2s ease, transform .2s ease;
}

.gg-quote__submit:hover {
    background: #f09300;
    transform: translateY(-1px);
}

/* Contact page: the small "Get a Quote" text link under Send Message */
.contact-form__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-form__quote-link {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--gg-primary, #2e368e);
    cursor: pointer;
}

.contact-form__quote-link:hover {
    text-decoration: underline;
}

@media (max-width: 560px) {
    .gg-quote {
        padding: 20px 10px;
    }

    .gg-quote__dialog {
        padding: 24px 20px;
    }

    .gg-quote__title {
        font-size: 22px;
    }

    .gg-quote__modes,
    .gg-quote__row {
        grid-template-columns: 1fr;
    }
}

/* Final small-screen shell overrides live at the end so page-wide header and
   modal media queries cannot accidentally restore desktop spacing. */
@media (max-width: 560px) {
    .gg-header__inner {
        padding: 10px 16px;
    }

    .gg-logo--single .gg-logo__mark {
        height: 38px;
        max-width: min(190px, calc(100vw - 84px));
    }
}
