:root {
    /* Editorial Serenity Palette */
    --primary: #9d4042;
    --primary-rgb: 157, 64, 66;
    --primary-light: #d86c6e;
    --accent: #ff8c8c;
    --secondary: #67558c;
    --secondary-light: #8e7eb5;
    --surface: #f9f9fb;
    --surface-dark: #f0f0f3;
    --on-surface: #1a1c1d;
    --on-surface-medium: #4a4c4e;
    --white: #ffffff;

    /* Typography */
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Be Vietnam Pro', sans-serif;

    /* Layout & Spacing */
    --header-height: 92px;
    --border-radius-card: 32px;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 15px 40px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: var(--surface);
    color: var(--on-surface);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* --- HEADER --- */
.hub-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.menu-toggle {
    cursor: pointer;
    color: var(--on-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Only visible on mobile/tablet */
    z-index: 1001;
    transition: transform 0.2s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }
}

.header-menu,
.header-user {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-menu:hover,
.header-user:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Social Links - Mobile Default (Menu) */
.header-socials {
    display: none;
    /* Hidden by default on mobile */
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 20px;
    flex-direction: row;
    justify-content: center;
    gap: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.header-socials.active {
    display: flex;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (min-width: 1024px) {
    .header-socials {
        display: flex;
        position: static;
        padding: 0;
        box-shadow: none;
        background: none;
        gap: 12px;
    }
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.05);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-logo-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo {
    height: 80px;
    /* Reduced to fit neatly within the fixed header */
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-dark);
    overflow: hidden;
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- BACKGROUND --- */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background-color: var(--surface);
    /* Subtle peach glow on the left center */
    background-image: radial-gradient(circle at 0% 40%, #fff0f0 0%, var(--surface) 60%);
}

.hero-background img {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    /* Mobile: low opacity and bottom fade for readability */
    opacity: 0.25;
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.hero-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(249, 249, 251, 0) 70%, var(--surface) 100%);
    pointer-events: none;
}

/* --- MAIN CONTENT --- */
.content-wrapper {
    padding: calc(var(--header-height) + 24px) 20px 60px;
    max-width: 600px;
    margin: 0 auto;
}

/* Manifesto */
.manifesto-section {
    padding: 10px 0 40px;
}

.manifesto-title {
    font-family: var(--font-display);
    font-size: 2.15rem;
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: 28px;
    color: var(--on-surface);
    letter-spacing: -0.04em;
}

.manifesto-text p {
    font-size: 1.05rem;
    margin-bottom: 24px;
    color: var(--on-surface-medium);
    line-height: 1.6;
}

.manifesto-text .stat-paragraph {
    font-size: 1.35rem;
    line-height: 1.45;
    color: var(--on-surface);
}

.manifesto-text .stat-paragraph strong {
    color: var(--primary);
    font-weight: 800;
    display: inline-block;
    background: rgba(var(--primary-rgb), 0.12);
    padding: 2px 8px;
    margin: 0 2px;
    border-radius: 8px;
    line-height: 1.1;
}

.manifesto-text .quote-paragraph {
    font-style: italic;
    font-weight: 300;
    font-size: 1.1rem;
    opacity: 0.9;
    color: var(--secondary);
}

/* Cards Section */
.portal-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 48px;
}

.portal-card {
    display: flex;
    align-items: stretch;
    /* Change from flex-start to allow inner expansion */
    justify-content: space-between;
    padding: 28px;
    border-radius: var(--border-radius-card);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    height: 100%;
    /* Ensure all cards in the grid row have same height */
}

.portal-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

.portal-card:active {
    transform: scale(0.97);
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.15em;
    margin-bottom: 6px;
    display: block;
    opacity: 0.8;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    display: block;
    letter-spacing: -0.01em;
}

.card-desc {
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
    opacity: 0.95;
    font-weight: 400;
    margin-bottom: 24px;
}

.card-cta {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.portal-card:hover .card-cta {
    transform: translateX(5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 20px;
    transition: transform 0.3s;
    /* Remove align-self: center to let it respect top alignment if needed, 
       but we want it centered relative to the top text content, not the whole card */
    margin-top: 10px;
}

.portal-card:hover .card-icon {
    transform: rotate(10deg);
}

/* Specific Card Styles */
.card-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #ff7a7c 100%);
    color: var(--white);
}

.card-primary .card-icon {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

.card-secondary {
    background: var(--white);
    color: var(--secondary);
}

.card-secondary .card-tag {
    color: var(--secondary-light);
}

.card-secondary .card-title {
    color: var(--secondary);
}

.card-secondary .card-desc {
    color: var(--on-surface-medium);
}

.card-secondary .card-icon {
    background: #f1edff;
    color: var(--secondary);
}

/* Releases Section */
.releases-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.releases-line {
    height: 2px;
    width: 28px;
    background: var(--primary);
    border-radius: 1px;
}

.releases-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--primary);
    text-transform: uppercase;
}

.releases-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.release-item {
    background: var(--white);
    padding: 20px 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.release-item:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-medium);
}

.release-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.release-icon {
    width: 44px;
    height: 44px;
    background: #f5f5f9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-light);
}

.release-info .release-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #a0a0b0;
    display: block;
    margin-bottom: 2px;
}

.release-info .release-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--on-surface);
}

.release-badge {
    background: #9d9db0;
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mission-phrase-small {
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    color: var(--primary);
    margin: 80px auto 20px;
    font-weight: 800;
    font-style: italic;
    max-width: 800px;
    line-height: 1.25;
    letter-spacing: -0.02em;
    position: relative;
    padding: 50px 30px 40px;
    background: rgba(103, 85, 140, 0.08);
    /* Lavanda (secondary) em alpha */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(103, 85, 140, 0.15);
}


/* --- DESKTOP ADJUSTMENTS --- */
@media (min-width: 1024px) {
    .content-wrapper {
        max-width: 1100px;
        padding-top: 120px;
    }

    .hero-background img {
        width: 60%;
        opacity: 1;
        /* Fully visible on desktop */
        object-position: center right;
        /* Fade the left 40% of the image to transparent to blend seamlessly */
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
        mask-image: linear-gradient(to right, transparent 0%, black 40%);
    }

    .manifesto-section {
        max-width: 650px;
        /* Restrict text to the left side */
    }

    .header-socials {
        display: flex;
        gap: 10px;
        margin-right: 8px;
    }

    .manifesto-title {
        font-size: 4rem;
        max-width: 100%;
    }

    .manifesto-text .stat-paragraph {
        font-size: 1.6rem;
        max-width: 100%;
    }

    .portal-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .card-title {
        white-space: nowrap;
    }

    .card-title.allow-wrap {
        white-space: nowrap;
    }

    .releases-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

.hub-footer {
    padding: 32px 20px 60px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    margin-top: 60px;
}

.hub-footer p {
    font-size: 0.75rem;
    color: var(--on-surface-low);
    font-weight: 500;
    letter-spacing: 0.02em;
}