/* =========================================
   ZETAROPY
   Main stylesheet
   ========================================= */


/*
   Fonts are loaded from each page's <head> with
   preconnect + <link>, not @import -- an @import
   here stalls font discovery behind the CSS fetch.
*/


/* ---------- Variables ---------- */

:root {
    --cream: #f7f3eb;
    --cream-dark: #ebe4d7;

    --ink: #20201d;
    --muted: #716f68;

    /*
       Accent. Slate blue, drawn from Entropy's coat.
       Every accent use goes through these four, so a
       page can retheme itself by overriding them --
       see PER-CAT ACCENTS near the end of this file.
    */

    --accent: #456079;
    --accent-dark: #2f4658;
    --accent-soft: rgba(69, 96, 121, 0.10);
    --accent-glow: rgba(69, 96, 121, 0.35);

    /*
       Accent text on the dark-green band. The main
       accent is tuned for cream and lands at 2:1 on
       the dark green; this tint clears 6.8:1 there.
    */
    --accent-on-dark: #a8c0d4;

    --sage: #a9b7a0;
    --dark-green: #26352d;

    --white: #ffffff;

    --max-width: 1180px;

    --radius: 24px;
}


/* ---------- Reset ---------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    color: var(--ink);
    background: var(--cream);

    font-family: "DM Sans", sans-serif;
    line-height: 1.6;
}

img {
    display: block;
    width: 100%;

    /*
       Keep the aspect ratio from the width/height
       attributes. Without this, CSS overrides the
       width but the height attribute still applies
       literally, distorting any image whose height
       is not otherwise constrained.
    */
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================
   BACKGROUND
   ========================================= */

body {
    background-color: var(--cream);

    /*
       Subtle organic background pattern.
       No image file required.
    */

    background-image:
        radial-gradient(
            circle at 10% 10%,
            var(--accent-soft) 0,
            var(--accent-soft) 2px,
            transparent 3px
        ),
        radial-gradient(
            circle at 90% 30%,
            rgba(169, 183, 160, 0.16) 0,
            rgba(169, 183, 160, 0.16) 3px,
            transparent 4px
        );

    background-size:
        90px 90px,
        140px 140px;
}


/* =========================================
   HEADER
   ========================================= */

.site-header {
    position: relative;
    z-index: 10;

    padding: 22px 5%;
}

.navbar {
    max-width: var(--max-width);
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.logo::before {
    /*
       The favicon's mark -- the stepped Z that reads
       as an E, wearing cat ears -- as a CSS mask
       painted with the accent, so it matches the
       brand color and retunes itself on the per-cat
       profile pages. Geometry mirrors favicon.svg
       (single color here; the favicon's two-tone
       ears and black middle bar need the full SVG).
    */
    content: "";

    display: inline-block;

    width: 1.05em;
    height: 1.05em;

    margin-right: 9px;

    vertical-align: -0.14em;

    background: var(--accent);

    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpolygon points='16,20 18,5 28,19'/%3E%3Cpolygon points='48,20 46,5 36,19'/%3E%3Crect x='13' y='20' width='36' height='7'/%3E%3Cpolygon points='41,27 49,27 43,35 35,35'/%3E%3Crect x='19' y='35' width='24' height='7'/%3E%3Cpolygon points='19,42 27,42 21,50 13,50'/%3E%3Crect x='13' y='50' width='36' height='7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpolygon points='16,20 18,5 28,19'/%3E%3Cpolygon points='48,20 46,5 36,19'/%3E%3Crect x='13' y='20' width='36' height='7'/%3E%3Cpolygon points='41,27 49,27 43,35 35,35'/%3E%3Crect x='19' y='35' width='24' height='7'/%3E%3Cpolygon points='19,42 27,42 21,50 13,50'/%3E%3Crect x='13' y='50' width='36' height='7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nav-links {
    display: flex;
    gap: 30px;

    font-size: 0.9rem;
    font-weight: 600;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent);
}


/* =========================================
   HERO
   ========================================= */

.hero {
    max-width: var(--max-width);

    margin: auto;
    padding: 90px 5% 110px;

    display: grid;
    justify-items: center;

    text-align: center;
}

.eyebrow {
    display: inline-block;

    margin-bottom: 18px;

    color: var(--accent);

    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 0.16em;
}

.hero h1 {
    margin: 0;

    font-family: "Playfair Display", serif;

    font-size: clamp(2.6rem, 5vw, 4.6rem);
    line-height: 0.95;

    letter-spacing: -0.055em;
}

.hero h1 span,
.section-heading h2 span {
    color: var(--accent);
}

/* On the dark band the accent needs its lighter tint. */
.cta h2 span,
.cta .eyebrow {
    color: var(--accent-on-dark);
}

.hero-text {
    max-width: 520px;

    margin: 30px auto;

    color: var(--muted);

    font-size: 1.15rem;
}


/* ---------- Buttons ---------- */

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;

    justify-content: center;
}

.button {
    display: inline-flex;

    padding: 14px 24px;

    border-radius: 999px;

    font-weight: 700;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

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

.button-primary:hover {
    background: var(--accent-dark);
}

.button-secondary {
    border: 1px solid rgba(32, 32, 29, 0.2);
}


/* =========================================
   GENERAL SECTIONS
   ========================================= */

.section {
    max-width: var(--max-width);

    margin: auto;
    padding: 120px 5%;
}

.section-heading h2 {
    margin: 0;

    font-family: "Playfair Display", serif;

    font-size: clamp(2rem, 3.8vw, 3.4rem);
    line-height: 1;

    letter-spacing: -0.04em;
}

.section-heading.centered {
    text-align: center;
}

.section-heading.centered p {
    max-width: 520px;
    margin: 20px auto 0;

    color: var(--muted);
}


/* =========================================
   ABOUT
   ========================================= */

.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;

    align-items: center;
}

.about-text {
    color: var(--muted);

    font-size: 1.15rem;
}

.about-text p {
    margin-bottom: 25px;
}


/* =========================================
   CATS
   ========================================= */

.cats-section {
    padding-top: 80px;
}

.cat-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 35px;

    margin-top: 70px;
}

.cat-card {
    overflow: hidden;

    background: var(--white);

    border-radius: var(--radius);

    box-shadow:
        0 15px 45px rgba(32, 32, 29, 0.07);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.cat-card:hover {
    transform: translateY(-7px);

    box-shadow:
        0 25px 60px rgba(32, 32, 29, 0.12);
}

.cat-image {
    overflow: hidden;
}

.cat-image img {
    height: 360px;

    object-fit: cover;

    transition: transform 0.5s ease;
}

.cat-card:hover .cat-image img {
    transform: scale(1.04);
}

.cat-card-content {
    position: relative;

    padding: 28px 30px 32px;
}

.cat-number {
    color: var(--accent);

    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 0.12em;
}

.cat-card h3 {
    margin: 5px 0 8px;

    font-family: "Playfair Display", serif;

    font-size: 1.6rem;
}

.cat-card p {
    margin: 0;

    color: var(--muted);
}


/* =========================================
   CALL TO ACTION
   ========================================= */

.cta {
    margin-top: 80px;

    padding: 130px 5%;

    color: var(--white);

    background:
        radial-gradient(
            circle at 80% 20%,
            var(--accent-glow),
            transparent 30%
        ),
        var(--dark-green);
}

.cta-inner {
    max-width: 900px;
    margin: auto;
}

.cta h2 {
    margin: 0 0 40px;

    font-family: "Playfair Display", serif;

    font-size: clamp(2.2rem, 4.4vw, 3.9rem);

    line-height: 0.98;

    letter-spacing: -0.045em;
}

.button-light {
    color: var(--dark-green);
    background: var(--white);
}


/* =========================================
   FOOTER
   ========================================= */

.site-footer {
    max-width: var(--max-width);

    margin: auto;
    padding: 45px 5%;

    display: flex;
    justify-content: space-between;
    gap: 30px;

    color: var(--muted);

    font-size: 0.85rem;
}

.site-footer strong {
    display: block;

    color: var(--ink);

    font-size: 1rem;
}

.site-footer span {
    display: block;
}


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 800px) {

    .nav-links {
        gap: 15px;
    }

    .hero {
        padding-top: 50px;
    }

    .about {
        grid-template-columns: 1fr;

        gap: 40px;
    }

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

    .site-footer {
        flex-direction: column;
    }
}


@media (max-width: 500px) {

    /*
       About and Contact are anchors on the home page,
       so they are the ones to drop when space is tight.
    */

    .nav-links a.nav-secondary {
        display: none;
    }

    /* Four primary links now; keep the bar on one line. */
    .logo {
        font-size: 1.15rem;
    }

    .nav-links {
        gap: 12px;

        font-size: 0.85rem;
    }

    .hero {
        padding-left: 7%;
        padding-right: 7%;
    }

    .section {
        padding-left: 7%;
        padding-right: 7%;
    }

    .hero h1 {
        font-size: 2.6rem;
    }

    .cat-image img {
        height: 280px;
    }
}


/* =========================================
   NAV STATE
   ========================================= */

.nav-links a.active {
    color: var(--accent);
}


/* =========================================
   PAGE HEADER

   The compact header used by every page that
   is not the home page.
   ========================================= */

.page-header {
    max-width: var(--max-width);

    margin: auto;
    padding: 60px 5% 20px;
}

.page-header h1 {
    margin: 0;

    font-family: "Playfair Display", serif;

    font-size: clamp(2.1rem, 4.4vw, 3.6rem);
    line-height: 0.98;

    letter-spacing: -0.05em;
}

.page-header h1 span {
    color: var(--accent);
}

.page-lead {
    max-width: 560px;

    margin: 22px 0 0;

    color: var(--muted);

    font-size: 1.15rem;
}

.back-link {
    /*
       Block, so the eyebrow that follows starts
       a new line -- but only as wide as its text,
       so the hover target stays on the label.
    */

    display: block;
    width: fit-content;

    margin-bottom: 26px;

    color: var(--muted);

    font-size: 0.85rem;
    font-weight: 600;

    transition: color 0.2s ease;
}

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


/* =========================================
   CARD LINKS

   .cat-card is an <a> on the index pages, so
   it needs to lay out as a block.
   ========================================= */

.cat-card {
    display: block;
}

.card-more {
    display: inline-block;

    margin-top: 14px;

    color: var(--accent);

    font-size: 0.85rem;
    font-weight: 700;
}

.cat-card:hover .card-more {
    text-decoration: underline;
}


/* =========================================
   CAT PROFILE
   ========================================= */

.profile {
    max-width: var(--max-width);

    margin: auto;
    padding: 50px 5% 110px;

    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 70px;

    align-items: start;
}

.profile-photos {
    display: grid;
    gap: 24px;
}

.photo-frame {
    overflow: hidden;

    background: var(--white);

    border-radius: var(--radius);

    box-shadow: 0 15px 45px rgba(32, 32, 29, 0.07);
}

.photo-frame img {
    height: 460px;

    object-fit: cover;
}

.photo-frame figcaption {
    padding: 16px 22px 20px;

    color: var(--muted);

    font-size: 0.85rem;
}

.profile-body {
    position: sticky;
    top: 40px;
}

.profile-body p {
    margin: 0 0 22px;

    color: var(--muted);

    font-size: 1.1rem;
}

.profile-body p.lead {
    color: var(--ink);

    font-size: 1.3rem;
}

.fact-list {
    margin: 34px 0 0;
    padding: 26px 0 0;

    border-top: 1px solid rgba(32, 32, 29, 0.12);

    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px 22px;

    font-size: 0.95rem;
}

.fact-list dt {
    color: var(--accent);

    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 0.12em;

    align-self: center;
}

.fact-list dd {
    margin: 0;

    color: var(--ink);
}


/* =========================================
   JOURNAL
   ========================================= */

.post-list {
    max-width: 820px;

    margin: auto;
    padding: 40px 5% 110px;
}

.post-item {
    display: block;

    padding: 38px 0;

    border-bottom: 1px solid rgba(32, 32, 29, 0.12);
}

.post-item:first-child {
    border-top: 1px solid rgba(32, 32, 29, 0.12);
}

.post-date {
    color: var(--accent);

    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

.post-item h2 {
    margin: 10px 0 12px;

    font-family: "Playfair Display", serif;

    font-size: clamp(1.5rem, 2.7vw, 2.1rem);
    line-height: 1.05;

    letter-spacing: -0.03em;

    transition: color 0.2s ease;
}

.post-item:hover h2 {
    color: var(--accent);
}

.post-item p {
    margin: 0;

    max-width: 620px;

    color: var(--muted);
}


/* =========================================
   POST
   ========================================= */

.post {
    max-width: 720px;

    margin: auto;
    padding: 30px 5% 100px;
}

.post-body p {
    margin: 0 0 26px;

    color: var(--muted);

    font-size: 1.12rem;
}

.post-body p.lead {
    color: var(--ink);

    font-size: 1.3rem;
}

.post-body h2 {
    margin: 46px 0 18px;

    font-family: "Playfair Display", serif;

    font-size: 1.5rem;

    letter-spacing: -0.03em;
}

.post-body figure {
    margin: 40px 0;
}

.post-body figure img {
    border-radius: var(--radius);

    box-shadow: 0 15px 45px rgba(32, 32, 29, 0.07);
}

.post-body figcaption {
    margin-top: 14px;

    color: var(--muted);

    font-size: 0.85rem;

    text-align: center;
}

.post-footer {
    margin-top: 60px;
    padding-top: 30px;

    border-top: 1px solid rgba(32, 32, 29, 0.12);

    display: flex;
    justify-content: space-between;
    gap: 20px;

    font-size: 0.9rem;
    font-weight: 600;
}

.post-footer a {
    color: var(--muted);

    transition: color 0.2s ease;
}

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


/* =========================================
   RESPONSIVE — MULTI-PAGE
   ========================================= */

@media (max-width: 800px) {

    .profile {
        grid-template-columns: 1fr;

        gap: 40px;

        padding-bottom: 80px;
    }

    .profile-body {
        position: static;
    }

    .photo-frame img {
        height: 380px;
    }
}


@media (max-width: 500px) {

    .page-header,
    .profile,
    .post,
    .post-list {
        padding-left: 7%;
        padding-right: 7%;
    }

    .photo-frame img {
        height: 300px;
    }
}


/* =========================================
   HOME PAGE SECTIONS

   Small helpers for the previews on the home
   page, which reuse the cats and journal
   layouts at a reduced size.
   ========================================= */

.section-tight {
    padding-top: 0;
}

.center-actions {
    display: flex;
    justify-content: center;

    margin-top: 50px;
}

.post-list.embedded {
    padding-top: 10px;
    padding-bottom: 40px;
}


/* =========================================
   HERO CATS

   The row of small round portraits under the
   hero buttons, each linking to a profile.
   ========================================= */

.hero-cats {
    display: flex;
    justify-content: center;
    gap: 18px;

    margin-top: 44px;
}

.hero-cats a {
    display: block;

    width: 64px;
    height: 64px;

    overflow: hidden;

    border-radius: 50%;

    border: 3px solid var(--white);

    box-shadow: 0 6px 18px rgba(32, 32, 29, 0.18);

    transition: transform 0.2s ease;
}

.hero-cats a:hover {
    transform: translateY(-4px) scale(1.06);
}

.hero-cats img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

/* Nudge each crop toward the face. */
.hero-cats a:nth-child(1) img { object-position: 60% 35%; }  /* Zeta */
.hero-cats a:nth-child(2) img { object-position: 45% 30%; }  /* Entropy */
.hero-cats a:nth-child(3) img { object-position: 0% 40%; }   /* Paradox */
.hero-cats a:nth-child(4) img { object-position: 50% 28%; }  /* Howl */


/* =========================================
   GRID-ONLY SECTION

   cats.html has no section heading between the
   page header and the grid, so the grid's usual
   clearance would just be dead air.
   ========================================= */

.cats-section.grid-only {
    padding-top: 30px;
}

.grid-only .cat-grid {
    margin-top: 0;
}


/* =========================================
   SLIM CTA

   The closing band for index pages -- same dark
   green as the home CTA, half the ceremony.
   ========================================= */

.cta.cta-slim {
    margin-top: 40px;

    padding: 70px 5%;
}

.cta-slim h2 {
    margin-bottom: 30px;

    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}


/* =========================================
   PER-CAT ACCENTS

   Each profile page carries a body class and
   overrides the accent variables. Nothing else
   in the stylesheet needs to know -- every
   accent use already reads var(--accent).

   All four clear 4.5:1 against the cream
   background, so the small bold eyebrow text
   stays legible.
   ========================================= */

/* Zeta -- long black coat */
.cat-zeta {
    --accent: #33383d;
    --accent-dark: #22262a;
    --accent-soft: rgba(51, 56, 61, 0.10);
    --accent-glow: rgba(51, 56, 61, 0.35);
}

/* Entropy -- the blue coat the site accent came from */
.cat-entropy {
    --accent: #456079;
    --accent-dark: #2f4658;
    --accent-soft: rgba(69, 96, 121, 0.10);
    --accent-glow: rgba(69, 96, 121, 0.35);
}

/* Paradox -- deep ginger, warmer and darker than the old orange */
.cat-paradox {
    --accent: #9c5228;
    --accent-dark: #7a3f1e;
    --accent-soft: rgba(156, 82, 40, 0.10);
    --accent-glow: rgba(156, 82, 40, 0.35);
}

/* Howl -- warm sand, from the pale cream coat */
.cat-howl {
    --accent: #7d5f3d;
    --accent-dark: #5f482e;
    --accent-soft: rgba(125, 95, 61, 0.10);
    --accent-glow: rgba(125, 95, 61, 0.35);
}


/* =========================================
   GALLERY

   Per-cat gallery wings. On wide screens the
   works hang on one long wall walked by
   horizontal scroll; on small screens the
   wall folds into a vertical stroll.
   ========================================= */

.gallery-wall {
    display: flex;
    align-items: center;
    gap: 4vw;

    overflow-x: auto;
    scroll-snap-type: x proximity;

    padding: 70px 6vw 90px;

    background:
        linear-gradient(
            180deg,
            var(--cream) 0%,
            var(--cream-dark) 100%
        );

    /* the picture rail */
    border-top: 5px solid rgba(32, 32, 29, 0.18);
}

.artwork {
    margin: 0;

    flex: 0 0 auto;

    scroll-snap-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/*
   The frame is a button so every work is
   keyboard-operable; the layered borders are
   walnut, fillet, and mat.
*/
.artwork-frame {
    display: block;
    padding: clamp(14px, 2.2vw, 30px);

    background: var(--white);

    border: 14px solid #433124;
    outline: 1px solid rgba(0, 0, 0, 0.4);

    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.12),
        0 22px 45px rgba(32, 32, 29, 0.3);

    cursor: pointer;

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.artwork-frame:hover,
.artwork-frame:focus-visible {
    transform: translateY(-6px);

    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.12),
        0 30px 60px rgba(32, 32, 29, 0.38);
}

.artwork-frame img {
    display: block;

    height: min(48vh, 520px);
    width: auto;
    max-width: 76vw;
}

/* Museum label */
.placard {
    width: min(320px, 80vw);

    padding: 14px 18px;

    background: var(--white);

    border: 1px solid rgba(32, 32, 29, 0.14);

    box-shadow: 0 6px 18px rgba(32, 32, 29, 0.08);

    font-size: 0.85rem;
    line-height: 1.45;
}

.placard span {
    display: block;
}

.placard-no {
    color: var(--accent);

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 0.14em;
}

.placard-title {
    margin: 4px 0 2px;

    font-family: "Playfair Display", serif;
    font-size: 1.05rem;
    font-style: italic;
}

.placard-medium {
    color: var(--muted);
}

.placard-note {
    margin-top: 6px;

    color: var(--muted);

    font-style: italic;
}

.wall-hint {
    max-width: var(--max-width);

    margin: 0 auto;
    padding: 18px 5% 12px;

    color: var(--muted);

    font-size: 0.8rem;
    font-weight: 700;

    letter-spacing: 0.14em;
}


/* ---------- Lightbox (the close look) ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;

    padding: 4vh 5vw;

    background: rgba(28, 38, 33, 0.95);
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-height: 72vh;
    width: auto;
    max-width: 92vw;

    border: 10px solid var(--white);

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox .placard {
    border: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    color: var(--white);
    background: rgba(255, 255, 255, 0.12);

    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;

    font-size: 1.2rem;

    cursor: pointer;

    transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.28);
}

.lightbox-close {
    top: 22px;
    right: 22px;
}

.lightbox-prev {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

body.lightbox-open {
    overflow: hidden;
}


/* ---------- Gallery responsive ---------- */

@media (max-width: 800px) {

    /* The wall folds vertical: a stroll, not a scroll. */
    .gallery-wall {
        flex-direction: column;
        gap: 70px;

        overflow-x: visible;
        scroll-snap-type: none;

        padding: 60px 7% 80px;
    }

    .artwork-frame {
        border-width: 10px;
    }

    .artwork-frame img {
        height: auto;
        width: 100%;
        max-width: 100%;
    }

    .wall-hint {
        display: none;
    }

    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 18px;
    }
}
