/* Carl's Cactus Club — shared layout and components */

:root {
    --forest: #1b3022;
    --forest-light: #2a4a36;
    --cream: #f5f1e3;
    --cream-dark: #e8e2d0;
    --ink: #1a1f1c;
    --muted: #4a564f;
    --sun: #f4b942;
    --coral: #e8784a;
    --radius-lg: 1.25rem;
    --radius-full: 9999px;
    --shadow: 0 8px 32px rgba(27, 48, 34, 0.12);
    --shadow-sm: 0 2px 12px rgba(27, 48, 34, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    background: var(--forest);
    color: var(--cream);
    padding: 0.75rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    position: relative;
    max-width: 975px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Mobile menu toggle (hidden on wide screens) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--cream);
    border-radius: var(--radius-lg);
    transition: background 0.2s;
}

.nav-toggle:hover {
    background: rgba(245, 241, 227, 0.12);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--sun);
    outline-offset: 2px;
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.25s ease;
    transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.brand img {
    height: 52px;
    width: auto;
    display: block;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav a {
    color: var(--cream);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-full);
    transition: background 0.2s, color 0.2s;
}

@media (min-width: 1150px) {
    .nav a {
        font-size: 0.95rem;
        padding: 0.5rem 0.85rem;
    }
}

.nav a:hover {
    background: rgba(245, 241, 227, 0.15);
}

@media (max-width: 1149px) {
    .header-inner {
        flex-wrap: nowrap;
    }

    .nav-toggle {
        display: flex;
    }

    /* Dropdown below header bar (out of flow — no in-header growth / layout shift) */
    .nav {
        --nav-ease: cubic-bezier(0.33, 1, 0.68, 1);
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        z-index: 60;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.1rem;
        margin: 0;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        padding: 0 0.35rem;
        pointer-events: none;
        background: var(--forest-light);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        box-shadow: var(--shadow);
        transform: translateY(-6px);
        transition:
            max-height 0.42s var(--nav-ease),
            opacity 0.32s ease,
            transform 0.35s var(--nav-ease),
            padding 0.35s var(--nav-ease),
            box-shadow 0.35s ease;
    }

    .nav.nav--open {
        max-height: 22rem;
        opacity: 1;
        padding: 0.65rem 0.35rem 0.85rem;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav a {
        text-align: center;
        font-size: 0.95rem;
        padding: 0.65rem 1rem;
        border-radius: var(--radius-lg);
    }
}

@media (min-width: 1150px) {
    .nav {
        position: static;
        z-index: auto;
        max-height: none;
        opacity: 1;
        overflow: visible;
        transform: none;
        padding: 0;
        margin: 0;
        pointer-events: auto;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}

@media (max-width: 1149px) and (prefers-reduced-motion: reduce) {
    .nav {
        transition-duration: 0.01ms;
        transform: none;
    }

    .nav-toggle-bar {
        transition-duration: 0.01ms;
    }
}

main {
    flex: 1;
}

main:not(.main--home) {
    padding: 1.25rem 1rem 2rem;
}

/* ——— Home ——— */

.hero-wrap {
    background: linear-gradient(165deg, var(--cream) 0%, var(--cream-dark) 45%, var(--cream) 100%);
    padding: 2.5rem 1.25rem 3rem;
}

.hero {
    max-width: 975px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-copy {
        order: 2;
    }

    .hero-visual {
        order: 1;
    }
}

.eyebrow {
    text-align: center;
    font-family: Fredoka, system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--coral);
    margin: 0 0 2rem;
}

.hero h1 {
    font-family: Fredoka, system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    color: var(--forest);
}

.hero-lede {
    font-size: 1.1rem;
    color: var(--muted);
    margin: 0 0 1.5rem;
    max-width: 32ch;
}

@media (max-width: 768px) {
    .hero-lede {
        max-width: none;
    }
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-visual img {
    width: min(100%, 340px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 4px solid white;
}

.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
}

.section h2 {
    font-family: Fredoka, system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.65rem;
    color: var(--forest);
    margin: 0 0 1rem;
    text-align: center;
}

.section-intro {
    text-align: center;
    color: var(--muted);
    max-width: 52ch;
    margin: 0 auto 1.75rem;
}

.topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.topic-pill {
    font-family: Fredoka, system-ui, sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.55rem 1.1rem;
    background: white;
    color: var(--forest);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.15s;
}

button.topic-pill {
    cursor: pointer;
    font: inherit;
    margin: 0;
    appearance: none;
    text-align: center;
}

.topic-pill:hover {
    border-color: var(--sun);
    transform: translateY(-2px);
}

.fact-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 560px;
    margin: 0 auto;
    box-shadow: var(--shadow);
    text-align: center;
}

.fact-card h3 {
    font-family: Fredoka, system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--forest);
    margin: 0 0 1rem;
}

#fact-text {
    margin: 0 0 1.25rem;
    font-size: 1.05rem;
    color: var(--muted);
}

.btn {
    font-family: Fredoka, system-ui, sans-serif;
    font-weight: 600;
    font-size: 1rem;
    background: linear-gradient(180deg, var(--coral) 0%, #d9653a 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 14px rgba(232, 120, 74, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 120, 74, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.tone-strip {
    background: var(--forest);
    color: var(--cream);
    text-align: center;
    padding: 2rem 1.25rem;
}

.tone-strip p {
    max-width: 40rem;
    margin: 0 auto;
    font-size: 1.1rem;
    opacity: 0.95;
}

.tone-strip a {
    color: var(--sun);
    font-weight: 600;
    text-decoration: none;
}

.tone-strip a:hover {
    text-decoration: underline;
}

/* ——— Subpages: content shell ——— */

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 1.75rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.container--wide {
    max-width: 1000px;
}

.container--narrow {
    max-width: 720px;
}

.container h1 {
    font-family: Fredoka, system-ui, sans-serif;
    font-weight: 700;
    color: var(--forest);
    margin-top: 0;
}

.container--narrow h1,
.container--wide > h1:first-child {
    text-align: center;
}

.listing-page > h1,
.listing-page > .lede {
    text-align: center;
}

.listing-page > .lede {
    color: var(--muted);
    margin-top: 0;
}

/* Section listing heroes — wide PNGs; cap height so banners don’t eat the viewport */
.section-hero-wrap {
    position: relative;
    width: 100%;
    margin: 0 0 1.25rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 3168 / 1344;
    max-height: min(38vh, 360px);
}

.section-hero {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.lede {
    text-align: center;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.container a:not(.back-link) {
    color: var(--coral);
    font-weight: 500;
}

.container a:not(.back-link):hover {
    color: var(--forest);
}

.category {
    margin: 2rem 0;
    text-align: left;
}

.category h2 {
    font-family: Fredoka, system-ui, sans-serif;
    color: var(--forest);
    border-bottom: 2px solid var(--forest);
    padding-bottom: 0.5rem;
    font-size: 1.15rem;
}

.category-blurb {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0.75rem 0 1rem;
    line-height: 1.65;
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--cream-dark);
}

.article-list li:last-child {
    border-bottom: none;
}

.article-list a {
    color: var(--ink);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.article-list a:hover {
    color: var(--coral);
}

.article-date {
    color: var(--muted);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

/* ——— Article post ——— */

.article-content {
    text-align: left;
    padding: 0.25rem 0;
}

.article-content h1 {
    font-family: Fredoka, system-ui, sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.article-meta {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.inspired-from {
    font-size: 0.875rem;
    color: var(--muted);
    margin: -0.35rem 0 1.15rem;
    line-height: 1.5;
}

.reader-submitted {
    background: rgba(27, 48, 34, 0.06);
    border-radius: var(--radius-lg);
    padding: 1rem 1.15rem;
    margin: 1rem 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.65;
}

.reader-submitted h2 {
    margin-top: 0;
    font-size: 1.05rem;
}

.carl-verdict {
    border-left: 4px solid var(--coral);
    padding: 0.35rem 0 0.35rem 1rem;
    margin: 1.25rem 0;
    font-size: 0.98rem;
    line-height: 1.7;
}

.article-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-family: Fredoka, system-ui, sans-serif;
    font-size: 1.2rem;
    color: var(--forest);
    margin: 1.65rem 0 0.6rem;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.1rem;
    padding-left: 1.35rem;
    line-height: 1.75;
}

.article-content li {
    margin-bottom: 0.35rem;
}

.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--forest);
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    color: var(--coral);
}

/* ——— Shop ——— */

.shop-intro {
    text-align: center;
    color: var(--muted);
}

.notice {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 1px solid var(--sun);
    color: var(--forest);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    text-align: left;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    padding: 1rem 0 0;
}

.product {
    background: var(--cream);
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
}

.product img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background-color: white;
}

.product img.product-img--promo {
    object-fit: contain;
}

.product h3 {
    font-family: Fredoka, system-ui, sans-serif;
    color: var(--forest);
    margin: 0.75rem 0 0.5rem;
}

.product p {
    color: var(--muted);
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.product-price {
    font-family: Fredoka, system-ui, sans-serif;
    font-weight: 600;
    color: var(--forest);
    margin: 0.25rem 0 0.5rem;
    font-size: 1rem;
}

.coming-soon {
    background: white;
    color: var(--muted);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5rem;
    border: 1px solid var(--cream-dark);
}

/* ——— Footer ——— */

.site-footer {
    background: var(--forest-light);
    color: var(--cream);
    text-align: center;
    padding: 1.25rem;
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--sun);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}
