
/* =========================================
   ANNIE'S FINDS — HOMEPAGE
   Quiet Sage Theme
========================================= */


/* =========================================
   1. COLORS AND GLOBAL STYLES
========================================= */

:root {
    --cream: #f8f6f1;
    --ink: #30332e;
    --sage: #a4b69b;
    --rose: #c88c9b;
    --mauve: #674e5a;
    --blue: #879ca1;
    --line: #deded6;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #e9e9e4;
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    transition: background-color 0.7s ease, color 0.7s ease;
}

button,
input,
a {
    font: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
}

.site {
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--cream);
    transition: background-color 0.7s ease;
}


/* =========================================
   2. TOP ANNOUNCEMENT
========================================= */

.topline {
    text-align: center;
    font-size: 10px;
    letter-spacing: 2px;
    padding: 11px;
    background: #e8ebe3;
    color: #586457;
    transition: background-color 0.7s ease, color 0.7s ease;
}


/* =========================================
   3. NAVIGATION
========================================= */

.nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 86px;
    gap: 20px;
    padding: 14px 9%;
    border-bottom: 1px solid var(--line);
    transition: border-color 0.55s ease;
}

.nav .brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    white-space: nowrap;
    font-family: "DM Serif Display", serif;
    font-size: 30px;
    letter-spacing: -0.7px;
    line-height: 1;
}

.brand span {
    color: var(--rose);
}

.nav .navlinks {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: clamp(15px, 2.3vw, 32px);
    white-space: nowrap;
    font-size: 12px;
    color: #656963;
}

.navlinks a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navlinks a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 100%;
    height: 1px;
    background: var(--rose);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.navlinks a:hover {
    transform: translateY(-2px);
}

.navlinks a:hover::after {
    transform: scaleX(1);
}

.nav .navright {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 10px;
    margin-left: auto;
}


/* =========================================
   4. PINTEREST BUTTON
========================================= */

.pinterest-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    transition:
        transform 0.3s ease,
        background-color 0.35s ease,
        border-color 0.35s ease,
        color 0.35s ease;
}

.pinterest-link:hover {
    transform: translateY(-3px) scale(1.07);
    background: var(--sage);
    border-color: var(--sage);
}


/* =========================================
   5. LIGHT / DARK MODE BUTTON
========================================= */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: transparent;
    color: var(--ink);
    font-size: 12px;
    white-space: nowrap;
    transition:
        background-color 0.45s ease,
        color 0.45s ease,
        border-color 0.45s ease,
        transform 0.3s ease;
}

.theme-toggle:hover {
    background: var(--sage);
    border-color: var(--sage);
    color: #30332e;
    transform: translateY(-3px) scale(1.07);
}

.theme-toggle:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 4px;
}


/* =========================================
   6. HERO SECTION
========================================= */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 570px;
    gap: 7%;
    padding: 70px 10% 80px;
}

.eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: #7e897b;
}

.hero h1 {
    margin: 22px 0;
    font-family: "DM Serif Display", serif;
    font-size: clamp(50px, 5.5vw, 83px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -1.6px;
}

.hero h1 em {
    font-weight: 400;
    color: #9e7683;
}

.hero p {
    max-width: 440px;
    font-size: 15px;
    line-height: 1.95;
    color: #666b64;
}


/* =========================================
   7. EXPLORE BUTTON
========================================= */

.cta {
    display: inline-block;
    margin-top: 22px;
    padding: 16px 27px;
    border-radius: 3px;
    background: #63745f;
    color: #ffffff;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background-color 0.45s ease,
        color 0.45s ease;
}

.cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px #1b2b1c29;
}


/* =========================================
   8. HERO MASCOT AND BACKGROUND
========================================= */

.visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 410px;
}

.visual::before {
    content: "";
    position: absolute;
    width: 85%;
    height: 93%;
    background: #e4e8df;
    border-radius: 48% 48% 9px 9px;
    transform: rotate(-5deg);
    transition: background-color 0.7s ease;
}

.portrait {
    position: relative;
    z-index: 1;
    width: 72%;
    max-width: 355px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
    border-radius: 180px 180px 12px 12px;
    filter: saturate(0.72);
    box-shadow: 0 20px 50px #262b2420;
    transition:
        transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
        box-shadow 0.55s ease;
}

.visual:hover .portrait {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 0 26px 56px #262b2429;
}

.sticker {
    position: absolute;
    z-index: 2;
    bottom: 20px;
    right: 0;
    padding: 17px 22px;
    background: #faf9f5;
    color: #916e7c;
    box-shadow: 0 6px 25px #0000000c;
    font-family: "DM Serif Display", serif;
    font-size: 22px;
    font-style: italic;
    transform: rotate(6deg);
    transition:
        background-color 0.7s ease,
        color 0.7s ease;
}


/* =========================================
   9. SECTION SEPARATORS
========================================= */

.section-separator {
    display: block;
    width: 100%;
    height: 1px;
    margin: 0;
    background: var(--line);
    opacity: 1;
}

main > .section-separator + .category-search-wrap {
    margin-top: 35px;
}


/* =========================================
   10. CATEGORY SEARCH
========================================= */

.category-search-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 8px 24px 12px;
    text-align: center;
}

.category-search-label {
    display: block;
    margin-bottom: 15px;
    font-family: "DM Serif Display", serif;
    font-size: 23px;
    font-weight: 400;
}

.category-search-field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 17px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f0f0e9;
    color: #687866;
    transition:
        border-color 0.55s ease,
        background-color 0.65s ease,
        box-shadow 0.55s ease,
        transform 0.55s ease;
}

.category-search-field:hover,
.category-search-field:focus-within {
    border-color: #879e83;
    box-shadow: 0 7px 22px rgba(42, 68, 44, 0.09);
    transform: translateY(-2px);
}

.category-search-field:focus-within {
    outline: 2px solid #9eae98;
    outline-offset: 2px;
}

.category-search-field svg {
    flex: none;
}

.category-search-field input {
    width: 100%;
    min-width: 0;
    padding: 12px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
}

.category-search-field input::placeholder {
    color: #898e83;
    opacity: 1;
}

.category-search-hint {
    margin: 10px 0 0;
    color: #858a7f;
    font-size: 11px;
}

.category-search-empty {
    margin: 24px 0 0;
    color: var(--ink);
    font-size: 13px;
}

.category-search-empty[hidden],
.cat[hidden] {
    display: none !important;
}


/* =========================================
   11. CATEGORY CARDS
========================================= */

.categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    padding: 20px 9% 90px;
}

#categories {
    scroll-margin-top: 190px;
}

.cat {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 330px;
    padding: 35px;
    border-radius: 5px;
    background: var(--category-color, #ede2d9);
    cursor: pointer;
    transform-origin: center;
    transition:
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.65s ease,
        background-color 0.6s ease,
        color 0.6s ease;
}

.cat .number {
    font-size: 12px;
    color: #92958d;
    margin-bottom: 18px;
}

.cat h3 {
    margin: 0 0 18px;
    font-family: "DM Serif Display", serif;
    font-size: 31px;
    font-weight: 400;
}

.cat p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #777b73;
}

.cat .arrow {
    align-self: flex-end;
    margin-top: auto;
    font-size: 24px;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.cat:hover,
.cat:focus-visible {
    transform: translateY(-10px) scale(1.025);
    box-shadow: 0 22px 42px rgba(34, 51, 38, 0.17);
}

.cat:hover .arrow {
    transform: translate(5px, -5px);
}


/* =========================================
   12. ABOUT SECTION
========================================= */

.intro {
    padding: 67px 20px 55px;
    text-align: center;
}

.intro h2 {
    margin: 12px 0;
    font-family: "DM Serif Display", serif;
    font-size: 39px;
    font-weight: 400;
}

.intro p {
    max-width: 550px;
    margin: 0 auto;
    color: #74766f;
    font-size: 14px;
    line-height: 1.9;
}


/* =========================================
   13. FOOTER
========================================= */

.bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 30px 9%;
    border-top: 1px solid var(--line);
    color: #85877e;
    font-size: 11px;
    transition:
        background-color 0.7s ease,
        color 0.7s ease,
        border-color 0.55s ease;
}


/* =========================================
   14. DARK MODE
========================================= */

body[data-theme="dark"] {
    --cream: #171e1b;
    --ink: #f0eee7;
    --line: #3b4b40;

    background: #101612;
    color: var(--ink);
    color-scheme: dark;
}

body[data-theme="dark"] .site {
    background: var(--cream);
}

body[data-theme="dark"] .topline {
    background: #29382f;
    color: #b3c4b2;
}

body[data-theme="dark"] .navlinks {
    color: #bdc7bc;
}

body[data-theme="dark"] .eyebrow {
    color: #b0c4a7;
}

body[data-theme="dark"] .hero h1 em {
    color: #d4a7b4;
}

body[data-theme="dark"] .hero p,
body[data-theme="dark"] .intro p,
body[data-theme="dark"] .cat p {
    color: #b8c1b6;
}

body[data-theme="dark"] .visual::before {
    background: #314339;
}

body[data-theme="dark"] .sticker {
    background: #394b40;
    color: #f0eee7;
}

body[data-theme="dark"] .cta {
    background: #b0c4a7;
    color: #19251d;
}

body[data-theme="dark"] .cat {
    background: var(--category-dark-color, #25332b);
}

body[data-theme="dark"] .cat .number,
body[data-theme="dark"] .bottom {
    color: #aeb9ac;
}

body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .pinterest-link {
    background: #243129;
    color: #f0eee7;
}

body[data-theme="dark"] .theme-toggle:hover,
body[data-theme="dark"] .pinterest-link:hover {
    background: #526b55;
    border-color: #526b55;
    color: #ffffff;
}

body[data-theme="dark"] .category-search-field {
    background: #243129;
    color: #c5d4c1;
}

body[data-theme="dark"] .category-search-field:hover,
body[data-theme="dark"] .category-search-field:focus-within {
    border-color: #839e83;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .category-search-field input::placeholder {
    color: #a4b3a4;
}

body[data-theme="dark"] .category-search-hint {
    color: #abb7a8;
}


/* =========================================
   15. GENTLE ENTRANCE ANIMATIONS
========================================= */

@keyframes af-enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes af-card-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.topline,
.nav,
.hero .copy,
.hero .visual,
.intro {
    animation: af-enter 2.1s both cubic-bezier(0.22, 1, 0.36, 1);
}

.nav,
.hero .visual {
    animation-delay: 0.12s;
}

.intro {
    animation-delay: 0.14s;
}

.cat {
    animation: af-card-fade 2s ease-in-out both;
}

.cat:nth-child(2) {
    animation-delay: 0.16s;
}

.cat:nth-child(3) {
    animation-delay: 0.32s;
}


/* =========================================
   16. TABLET RESPONSIVENESS
========================================= */

@media (max-width: 1050px) {
    .nav {
        padding-left: 5%;
        padding-right: 5%;
    }

    .nav .navlinks {
        gap: 15px;
    }

    .brand {
        font-size: 25px;
    }
}

@media (max-width: 850px) {
    .nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 10px;
        row-gap: 14px;
        min-height: 0;
        padding: 20px 7% 17px;
    }

    .nav .brand {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
        text-align: center;
        font-size: clamp(23px, 5.8vw, 29px);
    }

    .nav .navlinks {
        position: static;
        transform: none;
        grid-column: 1;
        grid-row: 2;
        justify-content: flex-start;
        width: auto;
        gap: clamp(12px, 3.3vw, 24px);
        font-size: clamp(10px, 2.7vw, 12px);
    }

    .nav .navright {
        grid-column: 2;
        grid-row: 2;
        align-self: center;
        justify-self: end;
        gap: 7px;
        margin: 0;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 24px;
        min-height: 0;
        padding: 36px 8% 62px;
    }

    .hero .copy {
        grid-row: 2;
        min-width: 0;
    }

    .hero .visual {
        grid-row: 1;
    }

    .hero h1 {
        font-size: clamp(40px, 9vw, 65px);
        line-height: 1.1;
        overflow-wrap: break-word;
    }

    .hero p {
        max-width: 100%;
    }

    .visual {
        width: 100%;
        min-height: 300px;
    }

    .visual::before {
        width: min(70%, 320px);
        height: 88%;
    }

    .portrait {
        width: min(60%, 255px);
    }

    .sticker {
        right: 4%;
        bottom: 12px;
        max-width: 65%;
        padding: 12px 15px;
        font-size: 16px;
    }

    .intro {
        padding: 55px 8% 32px;
    }

    .categories {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px 8% 65px;
    }

    .cat {
        min-height: 330px;
        padding: 26px;
    }

    .bottom {
        justify-content: center;
        flex-wrap: wrap;
        padding: 26px 8%;
        text-align: center;
    }

    .category-search-wrap {
        width: 100%;
        max-width: 520px;
        padding: 8px 8% 14px;
    }
}


/* =========================================
   17. MOBILE RESPONSIVENESS
========================================= */

@media (max-width: 720px) {
    #categories {
        scroll-margin-top: 165px;
    }

    .category-search-label {
        font-size: 21px;
    }

    .intro h2 {
        font-size: 34px;
    }
}

@media (max-width: 420px) {
    .topline {
        padding: 12px 10px;
        font-size: 9px;
        letter-spacing: 1.3px;
    }

    .nav {
        padding-left: 5%;
        padding-right: 5%;
        column-gap: 6px;
    }

    .nav .brand {
        font-size: clamp(18px, 5.2vw, 22px);
    }

    .nav .navright {
        gap: 6px;
    }

    .nav .pinterest-link {
        flex: none;
        width: 33px;
        height: 33px;
    }

    .nav .theme-toggle {
        min-height: 33px;
        padding: 7px 9px;
        font-size: 10px;
    }

    .nav .navlinks {
        gap: clamp(16px, 6vw, 26px);
        font-size: 11px;
    }

    .hero {
        padding-top: 26px;
    }

    .visual {
        min-height: 265px;
    }

    .visual::before {
        width: 72%;
    }

    .portrait {
        width: 62%;
    }

    .sticker {
        font-size: 14px;
    }

    .intro h2 {
        font-size: clamp(29px, 8vw, 34px);
    }

    .cat h3 {
        font-size: 28px;
    }
}

@media (max-width: 380px) {
    .nav {
        padding-left: 4%;
        padding-right: 4%;
        column-gap: 5px;
    }

    .nav .navlinks {
        gap: 10px;
        font-size: 10px;
    }

    .nav .navright {
        gap: 5px;
    }

    .nav .theme-toggle {
        padding: 6px 7px;
        font-size: 9px;
    }
}

@media (max-width: 340px) {
    .nav .brand {
        font-size: 17px;
    }

    .nav .theme-toggle {
        padding: 6px;
        font-size: 9px;
    }

    .nav .pinterest-link {
        width: 30px;
        height: 30px;
    }

    .nav .navlinks {
        gap: 15px;
    }

    .visual {
        min-height: 235px;
    }

    .sticker {
        font-size: 12px;
    }
}


/* =========================================
   18. ACCESSIBILITY AND REDUCED MOTION
========================================= */

@media (hover: none) {
    .cat:hover {
        transform: none;
        box-shadow: none;
    }

    .visual:hover .portrait {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================
   ANNIE'S FINDS — FULL HOMEPAGE GRADIENT
========================================= */

body:not([data-theme="dark"]) .site {
    background-color: #f8f6f1;

    background-image:
        radial-gradient(
            ellipse at 85% 10%,
            rgba(200, 140, 155, 0.11),
            transparent 42%
        ),
        radial-gradient(
            ellipse at 10% 90%,
            rgba(164, 182, 155, 0.16),
            transparent 46%
        );
}

/* Keep the hero background transparent */
body:not([data-theme="dark"]) .hero {
    background: transparent;
}
