/*
    The Cosmic Nest - Confetti Pink Palette
    Vivid red, bubblegum pink, pale blush, and crisp white.
*/

:root {
    /* Exact swatches from the reference */
    --color-hot-pink: #DF0714;
    --color-electric-red: #DF0714;
    --color-vibrant-plum: #A40012;
    --color-romantic-red: #DF0714;
    --color-accent-coral: #FFB5CD;
    --color-gold-accent: #FFFFFF;
    --color-cream-white: #FFFFFF;

    /* 60% pale blush, 30% pink/white, 10% vivid red */
    --color-dominant: #DF0714;
    --color-supporting: #A40012;
    --color-accent: #FFB5CD;
    --color-background: #FFD2E1;
    --color-surface: #FFFFFF;
    --color-surface-warm: #FFF0F5;
    --color-text: #4D2028;
    --color-text-muted: #70434B;

    --color-primary: #DF0714;
    --color-primary-dark: #A40012;
    --color-primary-rgb: 223, 7, 20;
    --color-primary-dark-rgb: 164, 0, 18;
    --color-light: rgba(255, 181, 205, 0.38);
    --color-pale: rgba(255, 210, 225, 0.72);

    /* RGB variants for transparency */
    --color-dominant-rgb: 223, 7, 20;
    --color-supporting-rgb: 164, 0, 18;
    --color-accent-rgb: 255, 181, 205;
    --color-text-rgb: 77, 32, 40;

    /* Layout */
    --sidebar-width: 180px;
    --page-width: 1000px;

    /* Shadows and effects */
    --shadow-retro: 4px 4px 0 rgba(223, 7, 20, 0.14);
    --shadow-deep: 6px 8px 20px rgba(164, 0, 18, 0.14);

    /* Typography */
    --font-display: "Georgia", "Times New Roman", serif;
    --font-body: "Verdana", "Geneva", sans-serif;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

/* Decorative background pattern (hidden by default) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(223, 7, 20, 0.04) 35px, rgba(223, 7, 20, 0.04) 70px);
    z-index: 0;
    display: none;
}

/* ===== SIDEBAR NAVIGATION ===== */
.sidebar-nav {
    grid-column: 1;
    grid-row: 1 / -1;
    position: relative;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-supporting);
    border-right: 4px solid var(--color-accent);
    padding: 1.5rem 1rem;
    overflow-y: auto;
    z-index: 999;
    box-shadow: var(--shadow-deep);
}

.nav-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px dashed var(--color-accent);
    padding-bottom: 1rem;
}

.nav-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--color-cream-white);
    font-style: italic;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.main-nav a {
    display: block;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--radius-sm);
    color: var(--color-cream-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    transition: all 200ms ease;
    box-shadow: 2px 2px 0 rgba(var(--color-supporting-rgb), 0.2);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    background: var(--color-primary);
    border-color: var(--color-accent);
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 rgba(var(--color-accent-rgb), 0.6);
    color: #fff;
}

.nav-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
}

.footer-text {
    margin: 0;
    font-size: 0.75rem;
    color: #FFD2E1;
    text-align: center;
    font-style: italic;
    line-height: 1.3;
}

/* ===== MAIN CONTENT AREA ===== */
main {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    z-index: 1;
}

.site-header {
    grid-column: 2;
    grid-row: 1;
    background: var(--color-primary);
    border-bottom: 3px solid var(--color-accent);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-deep);
}

.site-logo {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    text-shadow: 2px 2px 0 rgba(var(--color-primary-dark-rgb), 0.35);
    letter-spacing: 1px;
}

a {
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--color-supporting);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    font-family: var(--font-display);
    margin: 0 0 0.8rem 0;
    line-height: 1.1;
}

h1 {
    font-size: 2.8rem;
    color: var(--color-hot-pink);
    text-shadow: 2px 2px 0 rgba(var(--color-accent-rgb), 0.55);
}

h2 {
    font-size: 2rem;
    color: var(--color-dominant);
}

h3 {
    font-size: 1.3rem;
    color: var(--color-supporting);
}

p {
    margin: 0 0 1rem 0;
}

.eyebrow {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.intro-text {
    max-width: 65ch;
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-warm));
    border: 4px dashed var(--color-accent-coral);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    margin: 1.5rem 1.5rem 0 1.5rem;
    max-width: calc(100% - 3rem);
    box-shadow: var(--shadow-retro);
    position: relative;
}

.hero-text h1 {
    margin-bottom: 1rem;
}

.button-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.3rem;
    background: var(--color-primary);
    border: 3px solid var(--color-accent);
    border-radius: var(--radius-md);
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: var(--shadow-retro);
    transition: all 150ms ease;
}

.button:hover {
    background: var(--color-primary-dark);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(var(--color-accent-rgb), 0.2);
}

.button-soft {
    background: var(--color-primary);
    color: white;
}

.button-soft:hover {
    background: var(--color-primary-dark);
    color: white;
}

/* ===== PAGE SECTIONS ===== */
.page-section {
    background: rgba(255, 255, 255, 0.92);
    border: 3px dashed var(--color-accent-coral);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    margin: 1.5rem 1.5rem;
    max-width: calc(100% - 3rem);
    box-shadow: var(--shadow-retro);
}

.section-heading {
    margin-bottom: 2rem;
}

/* ===== CARDS ===== */
.card-grid,
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.note-card,
.resource-card {
    background: var(--color-surface);
    border: 3px dashed var(--color-accent-coral);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-retro);
    transition: transform 150ms ease;
}

.note-card:nth-child(2n),
.resource-card:nth-child(2n) {
    background: #FFF0F5;
    border-color: #FFB5CD;
}

.note-card:hover,
.resource-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(var(--color-accent-rgb), 0.2);
}

.note-card h3,
.resource-card h2 {
    margin-top: 0;
}

.note-card p,
.resource-card p {
    flex: 1;
    margin-bottom: 1rem;
}

.note-card a,
.resource-card a {
    font-weight: 900;
    align-self: flex-start;
}

.resource-card ul {
    margin: 0;
    padding-left: 1.3rem;
}

/* ===== GARDEN ROW ===== */
.garden-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.garden-row span {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1rem;
    background: #FFD2E1;
    border: 2px solid var(--color-dominant);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 2px 2px 0 rgba(var(--color-accent-rgb), 0.15);
}

/* ===== TWO COLUMN LAYOUT ===== */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 2rem;
    align-items: start;
}

/* ===== FOOTER ===== */
.site-footer {
    grid-column: 2;
    grid-row: 3;
    background: var(--color-primary-dark);
    color: white;
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 3px dashed var(--color-accent);
    font-size: 0.9rem;
}

.site-footer p {
    margin: 0;
}

/* ===== UTILITY ===== */
.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 100;
    padding: 0.7rem 1rem;
    background: var(--color-background);
    border: 2px solid var(--color-accent);
    border-radius: 999px;
    text-decoration: none;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Hide old unused classes */
.site-mark,
.hero-graphic,
.moon,
.star,
.nest-ring,
.page-hero {
    display: none !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 900px) {
    :root {
        --sidebar-width: 0px;
    }

    body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto;
    }

    .sidebar-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        position: fixed;
        left: -200px;
        width: 180px;
        height: auto;
        border-right: none;
        border-bottom: 4px solid var(--color-accent);
        z-index: 1001;
    }

    .sidebar-nav.open {
        left: 0;
    }

    .site-header {
        grid-column: 1;
        grid-row: 1;
    }

    main {
        grid-column: 1;
        grid-row: 3;
    }

    .site-footer {
        grid-column: 1;
        grid-row: 4;
    }

    .hero,
    .page-section {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 1rem;
    }

    .site-header {
        padding: 1rem;
    }

    .site-logo {
        font-size: 1.4rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero,
    .page-section {
        padding: 1.5rem;
        border-width: 2px;
        margin: 1rem;
    }

    .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
