/* =========================================================
   Dramatails Selkirk Rex - shared site stylesheet
   One file controls the look of every page.
   Colors live in :root below - change them here.
   ========================================================= */

:root {
    --bg: #f6efe6;          /* page background around the content (banner cream) */
    --surface: #ffffff;     /* content area and cards */
    --surface-alt: #fbf7f1; /* subtle panels */
    --ink: #2f241d;         /* main text (deep brown-black) */
    --muted: #7a6657;       /* secondary text */
    --line: #eadfd1;        /* borders and dividers */
    --brand: #6b4228;       /* Dramatails brown - matches the banner title */
    --brand-dark: #4b2d1b;
    --brand-tint: #f5ebdf;
    --gold: #b98a52;        /* award stars and accents (caramel) */
    --radius: 10px;
    --shadow: 0 1px 2px rgba(43, 37, 34, 0.05), 0 4px 16px rgba(43, 37, 34, 0.06);
    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans: 'Source Sans 3', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --page-width: 1140px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
}

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

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

/* ---------- Page frame ---------- */
#wrapper {
    max-width: var(--page-width);
    margin: 24px auto;
    background: var(--surface);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}

/* ---------- Banner ---------- */
.banner { background: var(--surface); }
.banner img { display: block; width: 100%; height: auto; }

/* ---------- Main navigation ---------- */
nav.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.nav-container { display: flex; justify-content: center; }
.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 4px;
}
.nav-links li { position: relative; }
.nav-links a {
    display: block;
    padding: 16px 22px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 3px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover { color: var(--brand); }
.nav-links a.current { color: var(--brand); border-bottom-color: var(--brand); }
.dropdown > a::after { content: " \25BE"; font-size: 12px; }

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 6px 0;
}
.dropdown-content a {
    padding: 10px 20px;
    border-bottom: none;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    font-size: 16px;
    white-space: nowrap;
}
.dropdown-content a:hover { background: var(--brand-tint); }
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content { display: block; }

.menu-toggle {
    display: none;
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: none;
    color: var(--brand);
    font: 600 16px var(--sans);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    text-align: left;
}

/* ---------- Page heading ---------- */
.page-title {
    text-align: center;
    padding: 44px 24px 8px;
}
.page-title h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.2;
    color: var(--brand);
}
.page-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin: 18px auto 0;
    background: var(--gold);
    border-radius: 2px;
}

main { padding: 32px 40px 56px; }

.intro {
    max-width: 720px;
    margin: 0 auto 28px;
    text-align: center;
    color: var(--muted);
}

/* ---------- Home page announcement ---------- */
.alert-box {
    max-width: 760px;
    margin: 8px auto 0;
    padding: 32px 36px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand);
    border-radius: var(--radius);
    text-align: center;
}
.alert-box h2 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 26px;
    color: var(--brand);
    margin-bottom: 12px;
}
.alert-box p { font-size: 18px; color: var(--ink); }

/* ---------- Two-column layout (sidebar + content) ---------- */
.content-layout {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 32px;
    align-items: start;
}
.content-layout.no-sidebar { grid-template-columns: 1fr; }

.sidebar {
    position: sticky;
    top: 76px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}
.sidebar h3 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--ink);
    text-decoration: none;
}
.sidebar a:hover { background: var(--brand-tint); color: var(--brand); }
.sidebar a.current { background: var(--brand); color: #fff; }

/* ---------- Cat cards ---------- */
.cat-showcase {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 28px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.cat-showcase:hover { box-shadow: var(--shadow); border-color: #dccbb7; }

.cat-content {
    display: grid;
    grid-template-columns: 120px minmax(0, 320px) 1fr;
    gap: 28px;
    align-items: start;
}
.cat-thumbnail { text-align: center; }
.cat-thumbnail img {
    display: block;
    width: 110px;
    height: auto;
    margin: 0 auto 10px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.pedigree-link {
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid var(--brand);
    border-radius: 999px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.pedigree-link:hover { background: var(--brand); color: #fff; }

.cat-image-section a { display: block; }
.cat-image-section img {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 8px;
}

.cat-info h2 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 24px;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: 10px;
}
.cat-parents { color: var(--brand); font-weight: 600; margin-bottom: 6px; }
.cat-description {
    font-family: var(--serif);
    font-style: italic;
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 6px;
}
.breeder-info {
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 12px;
}
.achievements {
    list-style: none;
    margin-top: 6px;
    padding: 14px 16px;
    background: var(--surface-alt);
    border-radius: 8px;
}
.achievements li {
    position: relative;
    padding-left: 24px;
    margin: 4px 0;
    font-weight: 600;
    font-size: 15px;
}
.achievements li::before {
    content: "\2605";
    position: absolute;
    left: 0;
    color: var(--gold);
}

/* ---------- Our Cats overview cards ---------- */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.nav-card {
    display: block;
    padding: 32px 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand);
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.nav-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.nav-card h3 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 24px;
    color: var(--brand);
    margin-bottom: 8px;
}
.nav-card p { color: var(--muted); }

/* ---------- Show season picker ---------- */
.seasons {
    margin: 0 0 32px;
    padding: 20px 24px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.seasons-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
.season-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}
.season-row:first-of-type { border-top: none; }
.season-decade {
    flex: 0 0 56px;
    font-family: var(--serif);
    font-style: italic;
    color: var(--muted);
}
.season-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* season and year buttons share one look */
.season, .year {
    display: inline-block;
    padding: 5px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}
a.season:hover, a.year:hover { border-color: var(--brand); color: var(--brand); }
.season.current, .year.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}
.season.current:hover, .year.current:hover { color: #fff; }
.year.none,
.season.disabled { color: #b3aaa2; background: transparent; cursor: default; }

/* ---------- Litter history ---------- */
.years {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}
.litters {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-collapse: collapse;
}
.litters th {
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 2px solid var(--line);
}
.litters td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.litters tbody tr:hover { background: var(--surface-alt); }
.litters td.photo { width: 130px; text-align: center; }
.litters td.photo img {
    display: block;
    width: 100px;
    height: auto;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.photo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 76px;
    margin: 0 auto;
    border: 1px dashed #d5c6b4;
    border-radius: 6px;
    color: #a39a92;
    font-size: 13px;
}
.photo-box.none { border-style: solid; border-color: var(--line); background: var(--surface-alt); }
.litters td.born { width: 96px; text-align: center; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.litters .kitten-name { font-family: var(--serif); font-weight: 600; font-size: 18px; }
.litters .parents { color: var(--brand); }
.litters tr.placeholder td { color: #a39a92; font-style: italic; }
.litters tr.placeholder .parents { color: #b59a84; }

/* ---------- Footer ---------- */
footer {
    background: var(--surface-alt);
    border-top: 1px solid var(--line);
    padding: 32px 24px;
    text-align: center;
}
footer p { margin-bottom: 8px; font-size: 15px; color: var(--muted); }
footer p:last-child { margin-bottom: 0; }
footer a {
    margin: 0 10px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}
footer a:hover { color: var(--brand); }

/* ---------- Tablet ---------- */
@media (max-width: 1180px) {
    #wrapper { margin: 0 auto; border-radius: 0; }
}
@media (max-width: 960px) {
    main { padding: 28px 24px 48px; }
    .content-layout { grid-template-columns: 1fr; gap: 20px; }
    .sidebar { position: static; padding: 14px 16px; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .sidebar a { border: 1px solid var(--line); background: var(--surface); }
    .cat-content { grid-template-columns: 1fr; gap: 18px; text-align: center; }
    .cat-thumbnail { display: flex; align-items: center; justify-content: center; gap: 16px; }
    .cat-thumbnail img { width: 80px; margin: 0; }
    .cat-image-section img { margin: 0 auto; }
    .achievements { text-align: left; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
    body { font-size: 16px; }
    .menu-toggle { display: block; }
    .nav-container { display: block; }
    .nav-links { display: none; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
    .nav-links.active { display: flex; }
    .nav-links a { padding: 14px 20px; border-bottom: 1px solid var(--line); }
    .nav-links a.current { border-bottom-color: var(--line); border-left: 4px solid var(--brand); }
    .dropdown > a::after { content: ""; }
    .dropdown-content {
        display: block;
        position: static;
        transform: none;
        min-width: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        background: var(--surface-alt);
    }
    .dropdown-content a { padding-left: 40px; border-bottom: 1px solid var(--line); }
    .page-title { padding: 32px 16px 4px; }
    main { padding: 24px 16px 40px; }
    .alert-box { padding: 24px 20px; }
    .cat-showcase { padding: 20px 16px; }
    .seasons { padding: 16px; }
    .season-row { flex-direction: column; gap: 6px; }
    .season-decade { flex: none; }
    .litters th { display: none; }
    .litters tr {
        display: grid;
        grid-template-columns: 112px 1fr;
        border-bottom: 1px solid var(--line);
        padding: 12px 0;
    }
    .litters td { border: none; padding: 2px 8px; }
    .litters td.photo { grid-row: span 2; width: auto; }
    .litters td.born { width: auto; text-align: left; }
    footer a { display: inline-block; margin: 4px 8px; }
}
