/* ==========================================================================
   Supersquid Theme - Global Styles & Design System
   Soft Pastel Yellow, Warm Beige & Calm Onboarding Palette
   Matches app.supersquid.co Onboarding Language (No Orange, No Harsh Contrast)
   ========================================================================== */

/* Base Design Tokens */
:root {
    /* Color Palette - Soft Calm Yellow & Gentle Beiges */
    --color-bg-light: #fdfbf7;
    --color-bg-warm: #fff9f0;
    --color-bg-beige: #f7efe1;
    --color-bg-onboarding: linear-gradient(135deg, #E3FDF5 0%, #FFF8E8 50%, #FFE6FA 100%);
    
    --color-primary: #282d4c;
    --color-primary-dark: #1b1e36;
    --color-contrast: #282d4c;
    --color-espresso: #522106;
    
    /* Soft Yellows & Delicate Beiges (Zero Orange) */
    --color-yellow: #ffe6ab;
    --color-yellow-light: #fff8e0;
    --color-yellow-pale: #fffdf5;
    --color-yellow-warm: #ffebb9;
    --color-yellow-gold: #e2ba60;
    --color-beige: #f6edd9;
    --color-beige-dark: #e8dcc4;
    
    --color-accent: #e2ba60;
    --color-accent-hover: #cf9f38;
    --color-accent-deep: #282d4c;
    --color-accent-mint: #4DB6AC;
    --color-accent-purple: #7E57C2;

    /* Text Colors - Soft Slate & Warm Espresso */
    --color-text-dark: #282d4c;
    --color-text-body: #4e5370;
    --color-text-muted: #6f7490;
    --color-text-white: #ffffff;
    --color-text-light: #ffffff;
    --color-text-subtle: #8e93ac;

    /* Glassmorphism & Soft Card Surfaces */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-bg-warm: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 248, 235, 0.75) 100%);
    --glass-border: rgba(255, 255, 255, 0.95);
    --glass-border-warm: rgba(226, 186, 96, 0.25);
    --border-subtle: rgba(40, 45, 76, 0.07);

    /* Typography System (DM Sans + Domine) */
    --font-base: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: "Domine", Georgia, serif;

    /* Type Scale */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 2rem;      /* 32px */
    --text-4xl: 2.5rem;    /* 40px */
    --text-5xl: 3.25rem;   /* 52px */

    /* Font Weights */
    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    /* Layout & Spacing */
    --max-width: 1320px;
    --max-width-narrow: 960px;
    --header-height: 76px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 9999px;

    /* Soft Shadows & Warm Ambient Glows */
    --shadow-sm: 0 2px 8px rgba(40, 45, 76, 0.04);
    --shadow-md: 0 8px 24px rgba(40, 45, 76, 0.06);
    --shadow-lg: 0 16px 40px rgba(40, 45, 76, 0.08);
    --shadow-glow-yellow: 0 4px 20px rgba(226, 186, 96, 0.22);
    --shadow-card: 0 12px 32px rgba(40, 45, 76, 0.06);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text-dark);
    background: linear-gradient(135deg, #E3FDF5 0%, #FFF8E8 50%, #FFE6FA 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus {
    color: var(--color-accent);
}

/* Containers */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    width: 100%;
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    font-weight: var(--weight-medium);
    line-height: 1.25;
    color: var(--color-primary);
}

h1 {
    font-family: var(--font-serif);
    font-size: var(--text-5xl);
    letter-spacing: -0.02em;
}

h2 {
    font-family: var(--font-serif);
    font-size: var(--text-4xl);
    letter-spacing: -0.015em;
}

h3 {
    font-family: var(--font-base);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
}

h4 {
    font-family: var(--font-base);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
}

h5 {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
}

h6 {
    font-family: var(--font-base);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: var(--weight-bold);
}

p {
    margin: 0 0 1.25rem 0;
}

p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   BUTTONS & BADGES (Soft Yellow & Warm Beige Tone)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-base);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    line-height: 1.2;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(180deg, #FFEAB5 0%, #FFDF94 100%);
    color: var(--color-primary) !important;
    font-weight: var(--weight-semibold);
    border: 1px solid rgba(226, 186, 96, 0.4);
    box-shadow: 0 4px 14px rgba(226, 186, 96, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(226, 186, 96, 0.4);
    background: linear-gradient(180deg, #FFF0C8 0%, #FFE5A3 100%);
    color: var(--color-primary) !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.88);
    color: var(--color-primary) !important;
    border: 1.5px solid rgba(40, 45, 76, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: #ffffff;
    border-color: var(--color-yellow-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    color: var(--color-primary) !important;
}

.btn-outline-dark {
    background: transparent;
    color: var(--color-primary) !important;
    border: 1.5px solid var(--border-subtle);
}

.btn-outline-dark:hover {
    border-color: var(--color-yellow-gold);
    color: var(--color-primary) !important;
    background: rgba(255, 248, 235, 0.4);
    transform: translateY(-2px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.95rem;
    border-radius: var(--radius-pill);
    line-height: 1;
}

.badge-pill {
    background: rgba(255, 230, 171, 0.45);
    color: #5c4308;
    border: 1px solid rgba(226, 186, 96, 0.35);
}

.badge-glow {
    background: rgba(255, 244, 215, 0.7);
    color: #522106;
    border: 1px solid rgba(226, 186, 96, 0.35);
    box-shadow: 0 0 14px rgba(226, 186, 96, 0.18);
}

.badge-dark {
    background: rgba(40, 45, 76, 0.06);
    color: var(--color-primary);
    border: 1px solid rgba(40, 45, 76, 0.1);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: background-color var(--transition-smooth), backdrop-filter var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
    background: transparent;
}

.site-header.scrolled,
.site-header:not(.landing-header) {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(40, 45, 76, 0.05);
    box-shadow: 0 6px 20px rgba(40, 45, 76, 0.04);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.site-branding a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.site-branding img {
    height: 34px;
    width: auto;
    transition: transform var(--transition-fast);
}

/* Landing hero top state (white logo & white nav links) */
.site-header.landing-header:not(.scrolled) .header-logo-dark {
    display: none;
}
.site-header.landing-header:not(.scrolled) .header-logo-white {
    display: block;
}
.site-header.landing-header:not(.scrolled) .primary-nav a {
    color: rgba(255, 255, 255, 0.9);
}
.site-header.landing-header:not(.scrolled) .primary-nav a:hover {
    color: #ffffff;
}
.site-header.landing-header:not(.scrolled) .mobile-nav-toggle span {
    background: #ffffff;
}

/* Scrolled or inner pages state (dark logo & dark nav links) */
.site-header.scrolled .header-logo-white,
.site-header:not(.landing-header) .header-logo-white {
    display: none;
}
.site-header.scrolled .header-logo-dark,
.site-header:not(.landing-header) .header-logo-dark {
    display: block;
}
.site-header.scrolled .primary-nav a,
.site-header:not(.landing-header) .primary-nav a {
    color: var(--color-primary);
}
.site-header.scrolled .primary-nav a:hover,
.site-header:not(.landing-header) .primary-nav a:hover {
    color: var(--color-accent);
}
.site-header.scrolled .mobile-nav-toggle span,
.site-header:not(.landing-header) .mobile-nav-toggle span {
    background: var(--color-primary);
}

.site-branding a:hover img {
    transform: scale(1.03);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 1.75rem;
}

.primary-nav li {
    position: relative;
}

.primary-nav a {
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    padding: 0.5rem 0;
    transition: color var(--transition-fast), opacity var(--transition-fast);
    position: relative;
}

.primary-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-yellow);
    transition: width var(--transition-smooth);
    border-radius: 2px;
}

.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav li.current-menu-item a {
    color: var(--color-accent);
}

.primary-nav a:hover::after,
.primary-nav li.current-menu-item a::after {
    width: 100%;
}

.header-cta-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.header-btn-app {
    background: linear-gradient(180deg, #FFEAB5 0%, #FFDF94 100%);
    color: var(--color-primary) !important;
    padding: 0.55rem 1.25rem;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-pill);
    border: 1px solid rgba(226, 186, 96, 0.4);
    box-shadow: 0 4px 12px rgba(226, 186, 96, 0.25);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.header-btn-app:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(226, 186, 96, 0.35);
    background: linear-gradient(180deg, #FFF0C8 0%, #FFE5A3 100%);
    color: var(--color-primary) !important;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
}

.mobile-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-nav-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 82%;
    max-width: 360px;
    height: 100vh;
    background: linear-gradient(180deg, #fffcf5 0%, #fff7eb 100%);
    border-left: 1px solid rgba(40, 45, 76, 0.08);
    box-shadow: -10px 0 30px rgba(40, 45, 76, 0.1);
    z-index: 1001;
    padding: 6rem 2rem 2rem;
    flex-direction: column;
    justify-content: space-between;
    transition: right var(--transition-smooth);
}

.mobile-nav-drawer.is-open {
    right: 0;
}

.mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(40, 45, 76, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.mobile-nav-backdrop.is-open {
    display: block;
    opacity: 1;
}

.mobile-nav-drawer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-nav-drawer a {
    color: var(--color-primary);
    font-size: var(--text-lg);
    font-weight: var(--weight-medium);
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(40, 45, 76, 0.06);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, #fff8eb 100%);
    color: var(--color-text-body);
    position: relative;
    overflow: hidden;
    padding: 5rem 0 2rem;
    border-top: 1px solid rgba(40, 45, 76, 0.06);
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1.5px;
    background: radial-gradient(circle, rgba(226, 186, 96, 0.4) 0%, transparent 100%);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand img {
    height: 36px;
    margin-bottom: 1.25rem;
}

.footer-tagline {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: 1.6;
    max-width: 320px;
    margin-bottom: 1.5rem;
}

.footer-mandalora-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(40, 45, 76, 0.08);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    color: var(--color-text-dark);
}

.footer-mandalora-badge img {
    height: 18px;
    margin: 0;
}

.footer-column h5 {
    color: var(--color-primary);
    font-family: var(--font-base);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column a {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--color-accent);
}

.footer-social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(40, 45, 76, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary) !important;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.footer-social-icon:hover {
    background: var(--color-yellow);
    border-color: var(--color-yellow-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(226, 186, 96, 0.25);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(40, 45, 76, 0.06);
    font-size: var(--text-xs);
    color: var(--color-text-subtle);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: var(--color-text-subtle);
}

.footer-bottom-links a:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   GENERIC WORDPRESS TEMPLATES (Page, Single, 404)
   ========================================================================== */
.page-hero {
    background: linear-gradient(135deg, #E3FDF5 0%, #FFF8E8 50%, #FFE6FA 100%);
    color: var(--color-primary);
    padding: calc(var(--header-height) + 4rem) 0 4rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(40, 45, 76, 0.06);
}

.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.page-hero p {
    color: var(--color-text-body);
    font-size: var(--text-lg);
    max-width: 640px;
    margin: 0 auto;
}

.site-main-content {
    padding: 5rem 0;
    min-height: 50vh;
}

.entry-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    line-height: 1.8;
}

.entry-content h2,
.entry-content h3 {
    color: var(--color-primary);
    margin-top: 2rem;
}

/* 404 Page Styling */
.error-404-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + 2rem) 1.5rem 4rem;
    background: linear-gradient(135deg, #E3FDF5 0%, #FFF8E8 50%, #FFE6FA 100%);
    color: var(--color-primary);
}

.error-404-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid var(--glass-border-warm);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 4rem 2.5rem;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.error-404-code {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: var(--weight-bold);
    background: linear-gradient(135deg, #e2ba60 0%, #4DB6AC 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-404-title {
    font-size: var(--text-2xl);
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.error-404-desc {
    color: var(--color-text-body);
    font-size: var(--text-base);
    margin-bottom: 2rem;
}

.error-404-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.6rem;
        --text-2xl: 1.35rem;
        --header-height: 64px;
    }

    .primary-nav,
    .header-cta-group {
        display: none;
    }

    .mobile-nav-toggle,
    .mobile-nav-drawer {
        display: flex;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .entry-content {
        padding: 1.75rem 1.25rem;
    }
}