/* =====================================================
   GLOBAL.CSS — CLASSWRITES DESIGN SYSTEM
   Default Theme: Dark Mode
   Light Mode: body.light-mode
===================================================== */

/* =====================================================
   1. ROOT COLOR SYSTEM
===================================================== */

:root {

    /* ===== BRAND COLORS ===== */
    --cw-black: #0B0D0F;
    --cw-black-soft: #000000;
    --cw-black-elevated: #151A1F;

    --cw-teal: #00D2BE;
    /* Petronas teal */
    --cw-teal-dark: #00A896;
    --cw-teal-glow: color-mix(in srgb, var(--cw-teal) 15%, transparent);

    --cw-silver: #C7CCD1;
    --cw-silver-soft: #AEB5BB;
    --cw-silver-muted: #8B949E;

    --cw-white-soft: #F8F8FF;
    --cw-cream-bright: #FFFFFF;
    --cw-cream-soft: #F8F8FF;
    --cw-cream-muted: #DDE2F0;

    /* ===== TEXT COLORS (Dark Mode Default) ===== */
    --text-primary: var(--cw-cream-soft);
    --text-secondary: #EEF1FF;
    --text-muted: var(--cw-cream-muted);
    --text-heading: var(--cw-cream-bright);
    --text-glow: 0 0 18px rgba(248, 248, 255, 0.3);

    /* ===== STATUS COLORS ===== */
    --success: #1DD1A1;
    --error: #FF4D4F;
    --warning: #F5A623;
    --info: var(--cw-teal);

    /* ===== BACKGROUNDS ===== */
    --bg-primary: var(--cw-black);
    --bg-secondary: var(--cw-black-soft);
    --bg-elevated: var(--cw-black-elevated);

    /* ===== BORDERS ===== */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);

    /* ===== SHADOWS ===== */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 15px var(--cw-teal-glow);

    /* ===== SPACING SYSTEM ===== */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-xxl: 64px;

    /* ===== RADIUS ===== */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* ===== TRANSITIONS ===== */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}


/* =====================================================
   LIGHT MODE OVERRIDES
===================================================== */

body.light-mode {

    --bg-primary: #F5F7F9;
    --bg-secondary: #FFFFFF;
    --bg-elevated: #FFFFFF;

    --text-primary: #2F2922;
    --text-secondary: #50463A;
    --text-muted: #716658;
    --text-heading: #201A13;
    --text-glow: none;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.15);

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body[data-accent="blue"] {
    --cw-teal: #00A1E8;
    --cw-teal-dark: #007BB5;
    --cw-teal-glow: rgba(0, 161, 232, 0.22);
    --info: var(--cw-teal);
}

/* =====================================================
   2. TYPOGRAPHY SYSTEM
===================================================== */

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html.cw-browser-edge {
    font-size: 16.5px;
}

body {
    font-family: "Trebuchet MS", Tahoma, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: background var(--transition-normal), color var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
}

.cw-home-hero,
.cw-writers-hero,
.cw-services-hero,
.cw-service-hero,
.cw-samples-hero,
.cw-sample-hero,
.cw-blog-hero,
.cw-blog-post-hero,
.cw-error-hero {
    width: calc(100% + clamp(12px, 2.2vw, 30px)) !important;
    margin-left: calc(clamp(12px, 2.2vw, 30px) / -2) !important;
    margin-right: calc(clamp(12px, 2.2vw, 30px) / -2) !important;
    border-radius: clamp(10px, 1.4vw, 18px) !important;
}

@media (max-width: 640px) {
    .cw-home-hero,
    .cw-writers-hero,
    .cw-services-hero,
    .cw-service-hero,
    .cw-samples-hero,
    .cw-sample-hero,
    .cw-blog-hero,
    .cw-blog-post-hero,
    .cw-error-hero {
        width: calc(100% + 12px) !important;
        margin-left: -6px !important;
        margin-right: -6px !important;
        border-radius: 12px !important;
    }
}

/* Smooth theme switch transitions */
.cw-theme-logo {
    transition: opacity 0.22s ease;
}

body.cw-theme-transitioning,
body.cw-theme-transitioning *,
body.cw-theme-transitioning *::before,
body.cw-theme-transitioning *::after {
    transition-property: background-color, border-color, color, outline-color, box-shadow, fill, stroke;
    transition-duration: 0.36s;
    transition-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {

    body.cw-theme-transitioning,
    body.cw-theme-transitioning *,
    body.cw-theme-transitioning *::before,
    body.cw-theme-transitioning *::after,
    .cw-theme-logo {
        transition-duration: 0.01ms !important;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* ===== Headings ===== */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-heading);
    margin-bottom: var(--space-md);
    font-weight: 600;
    text-shadow: var(--text-glow);
}

h1 {
    font-size: 2.6rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.6rem;
}

h4 {
    font-size: 1.3rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}


/* ===== Paragraphs ===== */

p {
    font-size: 1rem;
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}


/* ===== Responsive Typography ===== */

@media (max-width: 768px) {

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    p {
        font-size: 0.9rem;
    }
}



/* =====================================================
   3. BUTTON SYSTEM
===================================================== */

.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid transparent;
}


/* ===== PRIMARY BUTTON (Teal) ===== */

.btn-primary {
    background: var(--cw-teal);
    color: #0B0D0F;
}

.btn-primary:hover {
    background: var(--cw-teal-dark);
    box-shadow: var(--shadow-glow);
}


/* ===== SECONDARY BUTTON (Silver Outline) ===== */

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
}


/* ===== SUCCESS BUTTON ===== */

.btn-success {
    background: var(--success);
    color: #0B0D0F;
}

.btn-success:hover {
    opacity: 0.9;
}


/* ===== DANGER BUTTON ===== */

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover {
    opacity: 0.9;
}

.cw-theme-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cw-theme-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cw-theme-trigger::after {
    content: 'Theme';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 40;
    transform: translate(-50%, 4px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    padding: 5px 9px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.cw-theme-trigger:hover::after,
.cw-theme-trigger:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.cw-theme-chip {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--cw-teal);
    box-shadow: inset 0 0 0 4px var(--bg-elevated), 0 0 0 1px var(--border-strong), 0 0 16px var(--cw-teal-glow);
}

.cw-theme-label {
    font-size: 0.82rem;
    font-weight: 800;
}

.cw-theme-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 1200;
    width: min(286px, calc(100vw - 28px));
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28), 0 0 28px var(--cw-teal-glow);
    -webkit-backdrop-filter: blur(16px) saturate(1.12);
    backdrop-filter: blur(16px) saturate(1.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.cw-theme-panel {
    z-index: 20000;
    width: auto;
    min-width: 124px;
    max-width: calc(100vw - 20px);
    padding: 7px;
    border-radius: 12px;
}

.cw-theme-panel-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.cw-theme-menu.is-open .cw-theme-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cw-theme-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    padding: 2px 2px 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-heading);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cw-theme-panel-title i {
    color: var(--cw-teal);
}

.cw-theme-options {
    display: grid;
    gap: 7px;
}

.cw-theme-options {
    grid-template-columns: repeat(2, 52px);
    gap: 7px;
}

.cw-theme-option {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-secondary) 76%, transparent);
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.cw-theme-option {
    grid-template-columns: 1fr;
    justify-items: center;
    position: relative;
    display: grid;
    place-items: center;
    gap: 0;
    min-width: 0;
    width: 52px;
    height: 52px;
    min-height: 0;
    padding: 5px;
    text-align: center;
    border-radius: 12px;
    overflow: visible;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--theme-swatch, var(--cw-teal)) 12%, transparent), color-mix(in srgb, var(--bg-secondary) 84%, transparent));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-swatch, var(--cw-teal)) 16%, transparent), 0 8px 18px rgba(0, 0, 0, 0.14);
}

.cw-theme-option:hover,
.cw-theme-option:focus-visible,
.cw-theme-option.is-active {
    border-color: color-mix(in srgb, var(--theme-swatch, var(--cw-teal)) 58%, var(--border-strong));
    background: color-mix(in srgb, var(--theme-swatch, var(--cw-teal)) 12%, var(--bg-elevated));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-swatch, var(--cw-teal)) 12%, transparent);
    outline: none;
}

.cw-theme-option:hover {
    transform: translateY(-1px);
}

.cw-theme-swatch {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background:
        linear-gradient(135deg, var(--theme-bg) 0 48%, var(--theme-swatch) 48% 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cw-theme-swatch {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background:
        radial-gradient(circle at 72% 25%, color-mix(in srgb, var(--theme-swatch) 52%, #fff) 0 17%, transparent 18%),
        linear-gradient(135deg, var(--theme-bg) 0 46%, color-mix(in srgb, var(--theme-swatch) 68%, #fff) 47% 70%, var(--theme-swatch) 71% 100%);
}

.cw-theme-option-text {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cw-theme-option-text {
    min-width: 0;
}

.cw-theme-option-name {
    display: block;
    color: var(--text-heading);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.15;
}

.cw-theme-option-name {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 7px);
    z-index: 2;
    transform: translate(-50%, 4px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    padding: 5px 7px;
    border: 1px solid color-mix(in srgb, var(--theme-swatch, var(--cw-teal)) 42%, var(--border-strong));
    border-radius: 999px;
    background: var(--bg-elevated);
    color: var(--text-heading);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
    font-size: 0.64rem;
    line-height: 1;
    white-space: nowrap;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.cw-theme-option:hover .cw-theme-option-name,
.cw-theme-option:focus-visible .cw-theme-option-name {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.cw-theme-option-meta {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.15;
}

.cw-theme-option-meta {
    display: none;
}

.cw-theme-mode-pill {
    padding: 3px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-swatch, var(--cw-teal)) 14%, transparent);
    color: var(--theme-swatch, var(--cw-teal));
    border: 1px solid color-mix(in srgb, var(--theme-swatch, var(--cw-teal)) 34%, transparent);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cw-theme-teal {
    --theme-swatch: #00D2BE;
}

.cw-theme-blue {
    --theme-swatch: #00A1E8;
}

.cw-theme-dark {
    --theme-bg: #0B0D0F;
}

.cw-theme-light {
    --theme-bg: #FFFFFF;
}

.cw-top-actions .cw-theme-menu,
.cw-admin-top-actions .cw-theme-menu {
    align-self: stretch;
}

.cw-top-actions .cw-theme-trigger,
.cw-admin-top-actions .cw-theme-trigger {
    height: 100%;
}

.cw-top-actions .cw-theme-label,
.cw-admin-top-actions .cw-theme-label {
    font-size: inherit;
}

.cw-widgets-container .cw-theme-menu {
    position: relative;
    display: inline-flex;
}

.cw-widgets-container .cw-theme-panel {
    right: 0;
    top: auto;
    bottom: calc(100% + 12px);
    width: auto;
    min-width: 166px;
    max-width: calc(100vw - 24px);
    padding: 8px;
    transform: translateY(6px) scale(0.98);
    transform-origin: bottom right;
}

.cw-widgets-container .cw-theme-menu.is-open .cw-theme-panel {
    transform: translateY(0) scale(1);
}

.cw-widgets-container .cw-theme-panel-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.cw-theme-mode-pill {
    display: none;
}

.cw-page-shell .cw-app-shell,
.cw-page-shell .cw-app-main,
.cw-app-panel:has(.cw-theme-menu),
.cw-app-topbar,
.cw-top-actions,
.cw-top-actions .cw-theme-menu {
    overflow: visible;
}

.cw-app-panel:has(.cw-theme-menu) {
    position: relative;
    z-index: 16000;
}

.cw-app-topbar {
    position: relative;
    z-index: 17000;
}

.cw-widgets-container .cw-theme-options {
    grid-template-columns: repeat(3, 46px);
    gap: 8px;
}

.cw-widgets-container .cw-theme-option {
    position: relative;
    display: block;
    width: 46px;
    height: 46px;
    padding: 5px;
    border-radius: 14px;
}

.cw-widgets-container .cw-theme-option:hover,
.cw-widgets-container .cw-theme-option:focus-visible {
    transform: translateY(-2px);
}

.cw-widgets-container .cw-theme-option.is-active::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--theme-swatch, var(--cw-teal));
    border-radius: 18px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-swatch, var(--cw-teal)) 14%, transparent);
}

.cw-widgets-container .cw-theme-option::after {
    content: 'D';
    position: absolute;
    right: 5px;
    bottom: 5px;
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-bg) 84%, var(--theme-swatch));
    color: var(--theme-swatch, var(--cw-teal));
    border: 1px solid color-mix(in srgb, var(--theme-swatch, var(--cw-teal)) 55%, transparent);
    font-size: 0.55rem;
    font-weight: 900;
    line-height: 1;
}

.cw-widgets-container .cw-theme-light::after {
    content: 'L';
    background: color-mix(in srgb, #fff 88%, var(--theme-swatch));
    color: var(--cw-black);
}

.cw-widgets-container .cw-theme-swatch {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 11px 18px 11px 18px;
    background:
        radial-gradient(circle at 72% 28%, color-mix(in srgb, var(--theme-swatch) 54%, #fff) 0 18%, transparent 19%),
        linear-gradient(135deg, var(--theme-bg) 0 46%, color-mix(in srgb, var(--theme-swatch) 68%, #fff) 47% 70%, var(--theme-swatch) 71% 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 18px color-mix(in srgb, var(--theme-swatch) 24%, transparent);
}

.cw-widgets-container .cw-theme-option-text,
.cw-widgets-container .cw-theme-mode-pill {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 560px) {
    .cw-theme-panel {
        right: 0;
        width: auto;
        min-width: 112px;
        max-width: calc(100vw - 16px);
    }

    .cw-theme-options {
        grid-template-columns: repeat(2, 48px);
        gap: 6px;
    }

    .cw-theme-option {
        width: 48px;
        height: 48px;
        padding: 5px;
    }

    .cw-theme-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}


/* ===== Small Devices Button Adjustments ===== */

@media (max-width: 480px) {

    .btn {
        max-width: 100%;
        padding: 8px 11px;
        font-size: 0.78rem;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
    }
}



/* =====================================================
   4. GLOBAL LAYOUT + MARGINS
===================================================== */

.container {
    width: min(96%, 1320px);
    margin: 0 auto;
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

.section {
    margin-bottom: var(--space-xxl);
}

.card {
    background: var(--bg-elevated);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

input,
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--cw-teal);
    outline: none;
}

/* Keep Font Awesome glyphs sized like icons instead of text blocks. */
.fa,
.fas,
.far,
.fab,
.fa-solid,
.fa-regular,
.fa-brands {
    display: inline-block;
    width: 1em;
    min-width: 1em;
    line-height: 1;
    text-align: center;
    font-size: 1em;
    flex-shrink: 0;
}


/* ===============================
   HEADER - Desktop & Mobile
================================ */

.cw-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.28s ease, top 0.28s ease, width 0.28s ease, border-color var(--transition-fast), background 0.28s ease, box-shadow 0.28s ease, border-radius 0.28s ease;
    will-change: transform, opacity, border-radius;
}

.cw-header.cw-header-hidden {
    transform: translateY(-18px) scale(0.96);
    opacity: 0;
    pointer-events: none;
}

.cw-header.cw-header-island {
    top: 8px;
    width: max-content;
    max-width: calc(100% - 24px);
    margin: 0 auto;
    border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.12));
    border-radius: 50px;
    background: var(--bg-elevated, #151A1F);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 22px color-mix(in srgb, var(--cw-teal) 20%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.18);
    backdrop-filter: blur(18px) saturate(1.18);
    overflow: visible;
    isolation: isolate;
    animation: cwIslandPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cw-header.cw-header-island::before {
    content: '';
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, color-mix(in srgb, var(--cw-teal) 28%, transparent), rgba(255, 255, 255, 0.05) 46%, color-mix(in srgb, var(--cw-teal) 18%, transparent));
    filter: blur(7px);
    opacity: 0.62;
    pointer-events: none;
}

body.light-mode .cw-header.cw-header-island {
    background: #FFFFFF;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 0 18px color-mix(in srgb, var(--cw-teal) 16%, transparent);
}

.cw-header.cw-header-island.cw-header-hidden {
    transform: translateY(-18px) scale(0.94);
    opacity: 0;
    pointer-events: none;
    animation: none;
}

@keyframes cwIslandPop {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cw-header {
        transition: none;
    }
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 14px;
    height: 70px;
    transition: height 0.28s ease, gap 0.28s ease, padding 0.28s ease;
}

.cw-header.cw-header-island .header-inner {
    display: inline-grid;
    grid-template-columns: auto auto auto;
    width: max-content;
    max-width: 100%;
    height: auto;
    min-height: 0;
    padding: 3px;
    gap: 5px;
    position: relative;
    overflow: visible;
    border-radius: inherit;
}

.cw-header.cw-header-island .header-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--cw-teal) 14%, transparent), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.cw-header.cw-header-island:hover .header-inner::before {
    left: 100%;
}

/* Brand with hover animation */
.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    position: relative;
    grid-column: 1 / 2;
    justify-self: start;
    min-width: 0;
    transition: transform var(--transition-fast);
}

.cw-header.cw-header-island .brand {
    flex-direction: row;
    align-items: center;
    padding: 0 7px 0 4px;
    border-radius: 50px;
    position: relative;
    z-index: 1;
}

.brand-top {
    display: flex;
    align-items: center;
    min-width: 0;
}

.brand:hover {
    transform: translateY(-2px);
}

.logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 6px;
    margin-right: 10px;
    transition: filter var(--transition-fast), transform var(--transition-fast);
}

.cw-header.cw-header-island .logo {
    width: 28px;
    height: 28px;
    margin-right: 6px;
    border-radius: 50%;
}

.brand:hover .logo {
    filter: drop-shadow(0 0 12px var(--cw-teal));
    transform: rotate(-2deg) scale(1.05);
}

.brand-name {
    position: relative;
    display: block;
    min-width: 0;
}

.brand-title {
    position: relative;
    display: inline-block;
    width: max-content;
    max-width: 100%;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.05;
    padding-bottom: 6px;
}

.cw-header.cw-header-island .brand-title {
    font-size: 0.86rem;
    padding-bottom: 0;
}

.brand-class {
    color: var(--text-heading);
    text-shadow: var(--text-glow);
}

.brand-writes {
    color: var(--cw-teal);
}

.brand-writes-tail {
    display: inline;
}

.underline-gradient {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg,
            transparent,
            var(--cw-teal) 20%,
            var(--cw-white-soft) 50%,
            var(--cw-teal) 80%,
            transparent);
    background-size: 200% 100%;
    background-position: 100% 0;
    border-radius: 4px;
    transition: background-position 0.6s ease, box-shadow 0.3s ease;
}

.cw-header.cw-header-island .underline-gradient,
.cw-header.cw-header-island .brand-tagline {
    display: none;
}

.brand:hover .underline-gradient {
    background-position: 0 0;
    box-shadow: 0 0 12px var(--cw-teal);
}

.brand-tagline {
    margin-top: 4px;
    color: var(--text-primary);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40ch;
}

/* Header Actions Container */
.header-actions {
    grid-column: 2 / 3;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cw-header.cw-header-island .header-actions {
    justify-self: center;
    gap: 4px;
}

/* Navigation - Desktop */
.nav {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(0, 0, 0, 0);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.cw-header.cw-header-island .nav {
    gap: 2px;
    padding: 2px;
    border-color: var(--border-strong, rgba(255, 255, 255, 0.12));
    background: color-mix(in srgb, var(--bg-secondary) 70%, transparent);
    z-index: 1;
    overflow: visible;
}

.nav::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    padding: 1px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--cw-teal) 85%, transparent), transparent 65%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.nav a {
    margin: 0 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    display: inline-block;
}

.nav a i {
    display: none;
}

.cw-header.cw-header-island .nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    border-radius: 50%;
    color: var(--text-secondary);
}

.cw-header.cw-header-island .nav a::before {
    content: attr(aria-label);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 20;
    transform: translate(-50%, -4px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    padding: 5px 8px;
    border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.12));
    border-radius: 999px;
    background: var(--bg-elevated, #151A1F);
    color: var(--text-primary, #F8F8FF);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

body.light-mode .cw-header.cw-header-island .nav a::before {
    background: #FFFFFF;
    border-color: rgba(0, 0, 0, 0.1);
    color: #2F2922;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.cw-header.cw-header-island .nav a:hover::before,
.cw-header.cw-header-island .nav a:focus-visible::before {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.cw-header.cw-header-island .nav a i {
    display: inline-block;
    font-size: 0.9rem;
}

.cw-header.cw-header-island .nav a span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.cw-header.cw-header-island .nav a:hover,
.cw-header.cw-header-island .nav a.is-active {
    background: color-mix(in srgb, var(--cw-teal) 16%, transparent);
    color: var(--cw-teal);
}

/* Header link hover animation */
.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cw-teal);
    transition: width 0.3s ease;
}

.nav a:hover {
    color: var(--cw-teal);
}

.cw-header.cw-header-island .nav a::after {
    display: none;
}

.nav a:hover::after {
    width: 100%;
}

.nav a.is-active {
    color: var(--cw-teal);
    font-weight: 700;
}

.nav a.is-active::after {
    width: 100%;
}

.cw-header-page-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    color: var(--cw-teal);
    background: color-mix(in srgb, var(--cw-teal) 12%, transparent);
    white-space: nowrap;
}

.cw-header.cw-header-island .cw-header-page-pill {
    display: none;
}

/* Header CTAs */
.header-auth-actions {
    grid-column: 3 / 4;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.header-signin,
.header-cta {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.header-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    color: var(--cw-teal);
    border-color: color-mix(in srgb, var(--cw-teal) 48%, var(--border-strong));
    background: color-mix(in srgb, var(--cw-teal) 8%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cw-teal) 8%, transparent);
    white-space: nowrap;
}

.header-signin i {
    font-size: 0.84rem;
}

.cw-header.cw-header-island .header-auth-actions {
    display: none;
}

.header-signin:hover {
    color: #0B0D0F;
    background: var(--cw-teal);
    border-color: var(--cw-teal);
    transform: translateY(-2px);
    box-shadow: 0 0 16px color-mix(in srgb, var(--cw-teal) 22%, transparent);
}

.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ===== MOBILE MENU (Concept 5: Staggered Cards) ===== */
.menu-toggle {
    display: none;
    grid-column: 4 / 5;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    cursor: pointer;
    min-width: 42px;
    height: 42px;
    padding: 0;
    z-index: 1100;
    color: var(--text-primary);
    font-size: 1.3rem;
    line-height: 1;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: color var(--transition-fast);
}

.menu-toggle:hover {
    color: var(--cw-teal);
}

.menu-toggle i {
    pointer-events: none;
}

/* Mobile Menu Container */
.cw-mobile-menu {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 1050;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

body.menu-open .cw-mobile-menu {
    pointer-events: auto;
    opacity: 1;
}

/* Backdrop */
.cw-menu-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.4s ease;
    cursor: pointer;
}

body.menu-open .cw-menu-backdrop {
    opacity: 1;
}

/* Single mobile menu panel (footer-like list container) */
.cw-menu-panel {
    position: absolute;
    top: 78px;
    right: 22px;
    width: 315px;
    max-width: calc(100% - 44px);
    z-index: 1060;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-soft);
    transform: translateY(-10px) scale(0.985);
    opacity: 0;
    transition: transform 0.26s ease, opacity 0.26s ease;
}

body.menu-open .cw-menu-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Same fade-to-corner border style used on footer hover */
.cw-menu-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 2px;
    background: linear-gradient(145deg, var(--cw-teal), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cw-menu-panel:hover::after {
    opacity: 1;
}

.cw-menu-panel h4 {
    margin: 0 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-heading);
    font-size: 1rem;
}

.cw-menu-panel h4 i {
    color: var(--cw-teal);
    font-size: 0.9rem;
}

.cw-menu-current-page {
    margin: 0 0 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cw-menu-current-page::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: middle;
    background: var(--cw-teal);
}

.cw-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cw-menu-list li {
    margin: 0 0 8px;
}

.cw-menu-list li:last-child {
    margin-bottom: 0;
}

.cw-menu-list a {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.98rem;
    position: relative;
    transition: color var(--transition-fast);
}

.cw-menu-list a i {
    color: var(--cw-teal);
    font-size: 0.86rem;
    min-width: 14px;
    text-align: center;
}

.cw-menu-list a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cw-teal);
    transition: width 0.25s ease;
}

.cw-menu-list a:hover {
    color: var(--cw-teal);
}

.cw-menu-list a:hover::after {
    width: 100%;
}

.cw-menu-list a.is-active {
    color: var(--cw-teal);
}

.cw-menu-list a.is-active::after {
    width: 100%;
}

@media (min-width: 769px) {
    .nav:hover {
        transform: translateY(-2px);
        border-color: var(--border-strong);
        background: linear-gradient(145deg, color-mix(in srgb, var(--cw-teal) 12%, transparent), color-mix(in srgb, var(--cw-teal) 2%, transparent));
        box-shadow: 0 10px 26px color-mix(in srgb, var(--cw-teal) 22%, transparent);
    }

    .nav:hover::before {
        opacity: 1;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-inner {
        grid-template-columns: minmax(0, 1fr) auto auto;
        height: 60px;
        gap: 10px;
    }

    .cw-header.cw-header-island {
        width: max-content;
        max-width: calc(100% - 12px);
        top: 6px;
    }

    .cw-header.cw-header-island .header-inner {
        grid-template-columns: auto auto auto;
        width: max-content;
        max-width: 100%;
        height: auto;
        gap: 3px;
        padding: 2px;
    }

    .header-actions {
        display: none;
    }

    .cw-header.cw-header-island .header-actions {
        display: inline-flex;
        grid-column: 2 / 3;
        justify-self: center;
        min-width: 0;
    }

    .cw-header.cw-header-island .nav {
        gap: 1px;
        padding: 1px;
    }

    .cw-header.cw-header-island .nav a {
        width: 24px;
        height: 24px;
    }

    .cw-header.cw-header-island .nav a i {
        font-size: 0.78rem;
    }

    .menu-toggle {
        display: inline-flex;
        grid-column: 3 / 4;
        justify-self: end;
    }

    .cw-header.cw-header-island .menu-toggle {
        display: none;
    }

    .cw-header.cw-header-hidden {
        transform: translateY(calc(-100% - 10px));
        opacity: 0;
        pointer-events: none;
    }

    .header-auth-actions {
        display: inline-flex;
        grid-column: 2 / 3;
        justify-self: end;
        gap: 6px;
    }

    .header-signin,
    .header-cta {
        padding: 8px 12px;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .brand-title {
        font-size: 1.2rem;
    }

    .brand-tagline {
        display: none;
    }

    .cw-header.cw-header-island .brand {
        max-width: 94px;
        padding: 0 4px 0 2px;
    }

    .cw-header.cw-header-island .brand-title {
        max-width: none;
        font-size: 0.8rem;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }

    .cw-header.cw-header-island .brand-writes-tail {
        display: inline;
        margin-left: 0;
        font-size: inherit;
        line-height: inherit;
        transform: none;
        color: inherit;
        text-shadow: inherit;
    }

    .logo {
        width: 32px;
        height: 32px;
    }

    .cw-header.cw-header-island .logo {
        width: 24px;
        height: 24px;
        margin-right: 4px;
    }

    /* Leave clear space between the ellipsis toggle and dropdown panel */
    .cw-menu-panel {
        top: 90px;
        right: 20px;
        width: min(300px, calc(100% - 40px));
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .cw-header.cw-header-island {
        max-width: calc(100% - 8px);
    }

    .cw-header.cw-header-island .header-inner {
        gap: 2px;
        padding: 2px;
    }

    .brand-title {
        font-size: 1rem;
    }

    .cw-header.cw-header-island .brand {
        max-width: 76px;
        padding-right: 3px;
    }

    .cw-header.cw-header-island .brand-title {
        max-width: none;
        font-size: 0.7rem;
    }

    .header-auth-actions {
        gap: 5px;
    }

    .header-signin,
    .header-cta {
        padding: 7px 10px;
        font-size: 0.78rem;
    }

    .header-signin {
        width: 34px;
        padding-inline: 0;
    }

    .header-signin span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .logo {
        width: 28px;
        height: 28px;
        margin-right: 8px;
    }

    .cw-header.cw-header-island .logo {
        width: 20px;
        height: 20px;
        margin-right: 2px;
    }

    .cw-header.cw-header-island .nav a {
        width: 21px;
        height: 21px;
    }

    .cw-header.cw-header-island .nav a i {
        font-size: 0.68rem;
    }

    .cw-menu-panel {
        top: 96px;
        right: 16px;
        width: min(292px, calc(100% - 40px));
        max-width: calc(100% - 40px);
        padding: 14px 14px;
    }
}


/* ===============================
   FOOTER - With Hover Animations
================================ */

.cw-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(160px, 1fr));
    gap: clamp(18px, 3vw, var(--space-xl));
}

/* Footer Brand Section */
.footer-brand {
    position: relative;
    padding: var(--space-sm);
}

.footer-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    margin-bottom: var(--space-sm);
    border-radius: 6px;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.footer-logo:hover {
    filter: drop-shadow(0 0 12px var(--cw-teal));
    transform: rotate(-2deg) scale(1.05);
}

.footer-brand h3 {
    margin: 0 0 var(--space-sm);
    transition: color var(--transition-fast);
}

.footer-tagline {
    margin: 0 0 var(--space-sm);
    color: var(--cw-teal);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.footer-brand:hover h3 .brand-writes {
    text-shadow: 0 0 10px var(--cw-teal);
}

.disclaimer {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 280px;
    transition: color var(--transition-fast);
}

.footer-brand:hover .disclaimer {
    color: var(--text-secondary);
}

/* Footer Sections with Animated Border */
.footer-section {
    position: relative;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: transform 0.2s ease;
}

.footer-section:hover {
    transform: translateY(-5px);
}

/* Animated gradient border on hover */
.footer-section::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 2px;
    background: linear-gradient(145deg, var(--cw-teal), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.footer-section:hover::after {
    opacity: 1;
}

.cw-footer h4 {
    margin: 0 0 var(--space-md);
    transition: color var(--transition-fast);
}

.footer-section:hover h4 {
    color: var(--cw-teal);
}

.cw-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cw-footer ul li {
    margin-bottom: 8px;
}

.cw-footer a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    display: inline-block;
    transition: color var(--transition-fast);
}

/* Link underline animation */
.cw-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cw-teal);
    transition: width 0.3s ease;
}

.cw-footer a:hover {
    color: var(--cw-teal);
}

.cw-footer a:hover::after {
    width: 100%;
}

/* Cards Section */
.cards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.card-icon {
    width: 58px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: white;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-icon:hover {
    transform: translateY(-4px) scale(1.1);
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding: var(--space-md);
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-xl);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-bottom:hover {
    color: var(--text-secondary);
}

/* ===============================
   FLOATING WIDGETS
================================ */

.cw-widgets {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cw-widget {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 164px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 11px 15px;
    color: var(--text-heading);
    background: linear-gradient(135deg, rgba(255, 248, 232, 0.18), color-mix(in srgb, var(--cw-teal) 20%, transparent));
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.cw-widget:hover {
    transform: translateY(-2px) scale(1.01);
    border-color: var(--cw-teal);
    box-shadow: 0 14px 34px var(--cw-teal-glow);
}

.cw-widget:active {
    transform: translateY(0);
}

.cw-widget-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cw-widget-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cw-chat-widget svg path {
    fill: currentColor;
    stroke: none;
}

.cw-widget-label {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cw-icon-sun,
.cw-icon-moon {
    display: none;
}

.cw-icon-sun {
    display: block;
}

body.light-mode .cw-icon-sun {
    display: none;
}

body.light-mode .cw-icon-moon {
    display: block;
}

body.light-mode .cw-widget {
    background: linear-gradient(135deg, rgba(32, 26, 19, 0.08), color-mix(in srgb, var(--cw-teal) 18%, transparent));
    box-shadow: 0 10px 26px rgba(19, 22, 24, 0.18);
}


/* Responsive Footer */

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(128px, 1fr));
        gap: var(--space-lg);
    }

    .cw-footer h4 {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .cw-footer {
        padding-top: var(--space-md);
    }

    .footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px 10px;
        padding-top: var(--space-md);
        padding-bottom: var(--space-md);
    }

    .footer-brand {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 6px 10px;
        padding: var(--space-xs);
    }

    .footer-logo {
        grid-row: 1 / 3;
        width: 38px;
        height: 38px;
        margin-bottom: 0;
    }

    .footer-brand h3,
    .footer-tagline,
    .disclaimer {
        margin-bottom: 0;
    }

    .disclaimer {
        grid-column: 1 / -1;
        max-width: 100%;
        font-size: 0.78rem;
        line-height: 1.45;
    }

    .footer-section {
        padding: var(--space-xs);
    }

    .footer-section:hover {
        transform: none;
    }

    .cw-footer h4 {
        margin-bottom: 7px;
        font-size: 0.78rem;
        line-height: 1.2;
    }

    .cw-footer h4 i,
    .cw-footer a i {
        margin-right: 5px !important;
    }

    .cw-footer ul li {
        margin-bottom: 5px;
    }

    .cw-footer a {
        font-size: 0.78rem;
        line-height: 1.25;
    }

    .cards {
        gap: 5px;
    }

    .card-icon {
        width: 38px;
        height: 26px;
        border-radius: 5px;
    }

    .footer-section p {
        margin-top: 8px !important;
        margin-bottom: 0;
        font-size: 0.72rem !important;
    }

    .footer-bottom {
        margin-top: 0;
        padding: 10px 12px;
        font-size: 0.72rem;
        line-height: 1.35;
    }
}

@media (max-width: 768px) {
    .cw-widgets {
        right: 12px;
        bottom: 12px;
        gap: 10px;
    }

    .cw-widget {
        min-width: 140px;
        padding: 10px 13px;
    }
}

/* =====================================================
   END GLOBAL SYSTEM
===================================================== */
