/* =============================================================================
   GROW · frontend4 — cookie consent overlay (js/consent.js)
   Full-screen blurred backdrop + centred glass modal. Accept & Continue sits
   directly under the intro so it is visible without scrolling on every device;
   the category toggles (default off) + Save Settings sit below.
   ============================================================================= */
html.gcx-lock, html.gcx-lock body { overflow: hidden; }

/* the root NEVER animates opacity — an ancestor animating opacity forces Chrome to promote it to
   a "backdrop root", which permanently breaks backdrop-filter on descendants (.gcx__backdrop /
   .gcx__modal render transparent). Visibility is toggled with a close-only delay so the fade/scale
   on the backdrop + modal themselves still gets to play out before the root leaves the layout. */
.gcx { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 16px; visibility: hidden; pointer-events: none; transition: visibility 0s linear .35s; font-family: var(--font-sans, Inter, system-ui, sans-serif); color: var(--ink, #141413); }
.gcx.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
/* Chrome quirk: animating opacity on (or above) a backdrop-filter element permanently
   disables the blur — fade via background-color/transform only, never opacity. */
.gcx__backdrop { position: absolute; inset: 0; background: rgba(242,242,240,0); -webkit-backdrop-filter: blur(6px) saturate(1.05); backdrop-filter: blur(6px) saturate(1.05); transition: background-color .35s ease; }
.gcx.is-open .gcx__backdrop { background: rgba(242,242,240,.28); }

.gcx__modal {
    position: relative; width: 100%; max-width: 560px; max-height: min(calc(100dvh - 32px), 418px); overflow-y: auto; overscroll-behavior: contain;
    border-radius: 24px; background: rgba(255,255,255,.5);
    -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
    border: 1px solid rgba(255,255,255,.85);
    box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 30px 80px -30px rgba(15,23,42,.35), 0 2px 8px rgba(20,20,19,.05);
    transform: translateY(10px) scale(.985); transition: transform .45s cubic-bezier(.2,.7,.2,1);
    scrollbar-width: thin;
}
.gcx.is-open .gcx__modal { transform: none; }

.gcx__head { padding: 22px 28px 0; }
.gcx__head h2 { margin: 0; font-family: var(--font-serif, Georgia, serif); font-weight: 400; font-variation-settings: 'SOFT' 50; font-size: clamp(13px, 4vw, 22px); line-height: 1.15; letter-spacing: -0.015em; white-space: nowrap; }
.gcx__body { padding: 10px 28px 22px; }
.gcx__intro { margin: 0 0 14px; font-size: 14px; line-height: 1.55; font-weight: 300; color: var(--ink-soft, #474744); }
.gcx__intro a { color: var(--ink, #141413); text-decoration: none; font-weight: 500; }
.gcx__intro a:hover { opacity: .75; }

.gcx__accept {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    font-family: inherit; font-size: 16px; font-weight: 500; letter-spacing: -0.01em;
    background: var(--ink, #141413); color: #fff; border: 0; border-radius: 999px; height: 54px; padding: 0 22px; cursor: pointer;
    box-shadow: 0 10px 30px -12px rgba(17,17,16,.45);
    transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s;
}
.gcx__accept svg { width: 18px; height: 18px; }
.gcx__accept:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -12px rgba(17,17,16,.5); }

.gcx__divider { height: 1px; background: rgba(17,17,16,.1); margin: 16px 0 6px; }

.gcx__cats { display: grid; gap: 4px; }
.gcx__cat { padding: 10px 0; border-bottom: 1px solid rgba(17,17,16,.07); }
.gcx__cat:last-child { border-bottom: 0; }
.gcx__cat-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.gcx__cat h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; }
.gcx__cat p { margin: 0; font-size: 12.5px; line-height: 1.55; font-weight: 300; color: var(--ink-soft, #474744); }
.gcx__always { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute, #8a8a86); white-space: nowrap; }

.gcx__state { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.gcx__statelbl { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute, #8a8a86); min-width: 2.6em; text-align: right; transition: color .2s; }
.gcx__statelbl.is-on { color: var(--ink, #141413); }
.gcx__toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; cursor: pointer; }
.gcx__toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.gcx__toggle i { position: absolute; inset: 0; background: rgba(17,17,16,.15); border-radius: 999px; transition: background .2s ease; pointer-events: none; }
.gcx__toggle i::before { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease; }
.gcx__toggle input:checked + i { background: var(--ink, #141413); }
.gcx__toggle input:checked + i::before { transform: translateX(18px); }
.gcx__toggle input:focus-visible + i { outline: 2px solid var(--ink, #141413); outline-offset: 2px; }

.gcx__save {
    margin-top: 16px; width: 100%; height: 48px;
    font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
    background: #fff; color: var(--ink, #141413); border: 1px solid rgba(17,17,16,.06); border-radius: 999px; cursor: pointer;
    box-shadow: 0 1px 2px rgba(17,17,16,.04), 0 10px 30px -10px rgba(17,17,16,.18);
    transition: transform .25s cubic-bezier(.2,.7,.2,1);
}
.gcx__save:hover { transform: translateY(-1px); }

@media (max-width: 640px) {
    .gcx { padding: 10px; align-items: flex-end; }
    .gcx__modal { max-height: min(calc(100dvh - 20px), 540px); border-radius: 20px; }
    .gcx__head { padding: 20px 20px 0; }
    .gcx__body { padding: 10px 20px 18px; }
    .gcx__intro { font-size: 13.5px; margin-bottom: 14px; }
    .gcx__accept { height: 50px; font-size: 15px; }
    .gcx__divider { margin: 16px 0 8px; }
}
@media (prefers-reduced-motion: reduce) { .gcx, .gcx__backdrop, .gcx__modal { transition: none; } }

/* no motion anywhere until the visitor has made a cookie choice (overlay open = html.gcx-lock):
   content renders in its final, static state behind the glass; animations start once a choice is made */
html.gcx-lock body > *:not(#growConsent), html.gcx-lock body > *:not(#growConsent) * { animation: none !important; }
html.gcx-lock .fx-letter { opacity: 1; transform: none; color: var(--ink, #141413); -webkit-text-fill-color: currentColor; background: none; }
html.gcx-lock .fx-sup { opacity: 1; }
