/* ============================================
   TOKENS
   ============================================ */
:root {
    --cream: #FAF6ED;
    --cream-2: #F1E8D8;
    --tan: #E4D3B4;
    --brown-dark: #3A2A20;
    --brown-mid: #6E5642;
    --rust: #B2673E;
    --rust-dark: #8F4E2E;
    --line: rgba(58, 42, 32, 0.14);

    --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
    --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --wrap: 1120px;
    --radius: 14px;
    --speed: 0.35s;
}

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--brown-dark);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--brown-dark);
    color: var(--cream);
    padding: 10px 16px;
    z-index: 200;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
}

:focus-visible {
    outline: 3px solid var(--rust);
    outline-offset: 3px;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    color: var(--brown-dark);
    line-height: 1.1;
    margin: 0 0 0.5em;
    font-weight: 600;
}

h1 {
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    font-weight: 400;
}

h1 em {
    font-style: italic;
    font-weight: 500;
    color: var(--rust);
}

h2 {
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.4em;
}

.eyebrow {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--rust);
    margin: 0 0 0.8em;
}

.lede {
    font-size: 1.1rem;
    color: var(--brown-mid);
    max-width: 62ch;
    margin-bottom: 2.2rem;
}

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 246, 237, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    text-decoration: none;
    color: var(--brown-dark);
    font-weight: 600;
}

.logo span {
    color: var(--rust);
}

.primary-nav {
    display: flex;
    gap: 28px;
}

.primary-nav a {
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--brown-mid);
    position: relative;
    padding: 6px 0;
    transition: color var(--speed);
}

.primary-nav a:hover,
.primary-nav a.is-active {
    color: var(--rust-dark);
}

.primary-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--rust);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--brown-dark);
    transition: transform var(--speed), opacity var(--speed);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 999px;
    transition: transform var(--speed), background var(--speed), box-shadow var(--speed);
}

.btn-primary {
    background: var(--rust);
    color: var(--cream);
    box-shadow: 0 8px 24px rgba(178, 103, 62, 0.35);
}

.btn-primary:hover {
    background: var(--rust-dark);
    transform: translateY(-2px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: var(--cream);
}

.hero-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 35%;
    background-color: var(--tan);
    transform: scale(1.05);
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(58, 42, 32, 0.15) 0%, rgba(58, 42, 32, 0.35) 55%, rgba(41, 29, 22, 0.86) 100%);
}

.hero-content {
    position: relative;
    padding-bottom: 96px;
    padding-top: 140px;
    max-width: 780px;
}

.hero .eyebrow {
    color: var(--tan);
}

.hero-lede {
    font-size: 1.1rem;
    max-width: 56ch;
    margin: 1.2rem 0 2rem;
    color: rgba(250, 246, 237, 0.92);
}

/* wool divider signature element */
.wool-divider {
    width: 100%;
    line-height: 0;
    margin-top: -2px;
    position: relative;
    z-index: 2;
}

.wool-divider svg {
    width: 100%;
    height: 44px;
    display: block;
}

.wool-thread {
    fill: none;
    stroke: var(--rust);
    stroke-width: 2.5;
    stroke-linecap: round;
    opacity: 0.55;
    stroke-dasharray: 12 10;
    animation: threadFlow 7s linear infinite;
}

.wool-divider.alt .wool-thread {
    stroke: var(--brown-mid);
    opacity: 0.4;
}

@keyframes threadFlow {
    to {
        stroke-dashoffset: -220;
    }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 96px 0;
}

.section-tan {
    background: var(--cream-2);
}

.two-col {
    display: grid;
    gap: 48px;
}

/* reveal on scroll */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* ============================================
   TIMELINE (history)
   ============================================ */
.timeline {
    display: grid;
    gap: 28px;
    border-left: 2px solid var(--line);
    padding-left: 28px;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -34px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rust);
}

.timeline-era {
    display: block;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--rust-dark);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.timeline-item p {
    margin: 0;
    color: var(--brown-mid);
    max-width: 60ch;
}

/* ============================================
   STAT GRID (appearance)
   ============================================ */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.stat-card {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.7rem;
    color: var(--rust-dark);
    margin-bottom: 6px;
}

.stat-label {
    color: var(--brown-mid);
    font-size: 0.95rem;
}

/* ============================================
   TABS (breeds)
   ============================================ */
.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.tab-btn {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--brown-mid);
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--speed);
}

.tab-btn:hover {
    border-color: var(--rust);
    color: var(--rust-dark);
}

.tab-btn.is-active {
    background: var(--brown-dark);
    border-color: var(--brown-dark);
    color: var(--cream);
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.tab-panel p {
    color: var(--brown-mid);
    max-width: 68ch;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   TRAIT LIST (character)
   ============================================ */
.trait-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.trait-list li {
    background: var(--cream);
    border-left: 3px solid var(--rust);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    color: var(--brown-mid);
}

.trait-list strong {
    color: var(--brown-dark);
}

/* ============================================
   ACCORDION (care)
   ============================================ */
.accordion {
    border-top: 1px solid var(--line);
}

.acc-item {
    border-bottom: 1px solid var(--line);
}

.acc-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    padding: 22px 4px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--brown-dark);
    text-align: left;
}

.acc-icon {
    font-size: 1.4rem;
    color: var(--rust);
    transition: transform var(--speed);
    flex-shrink: 0;
    margin-left: 16px;
}

.acc-item.is-open .acc-icon {
    transform: rotate(45deg);
}

.acc-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--speed) ease;
}

.acc-item.is-open .acc-panel {
    max-height: 400px;
}

.acc-panel p {
    margin: 0 4px 22px;
    color: var(--brown-mid);
    max-width: 68ch;
}

/* ============================================
   CARD GRID (health) & FACTS
   ============================================ */
.card-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

.info-card {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 26px;
    border: 1px solid var(--line);
}

.info-card p {
    color: var(--brown-mid);
    margin: 0;
}

.facts-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

.fact {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.fact-num {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.6rem;
    color: var(--tan);
    -webkit-text-stroke: 1px var(--rust);
    flex-shrink: 0;
    min-width: 46px;
}

.fact p {
    color: var(--brown-mid);
    margin: 0;
}

/* ============================================
   GALLERY + LIGHTBOX
   ============================================ */
.gallery-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.gallery-item {
    padding: 0;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--tan);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(41, 29, 22, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--speed);
    z-index: 300;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 100%;
    max-height: 86vh;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: 1px solid var(--cream);
    color: var(--cream);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--brown-dark);
    color: var(--cream-2);
    padding: 56px 0 32px;
}

.footer-inner {
    display: grid;
    gap: 32px;
}

.footer-logo {
    margin: 0 0 12px;
    color: var(--cream);
}

.footer-note {
    color: rgba(241, 232, 216, 0.65);
    max-width: 46ch;
    font-size: 0.92rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-nav a {
    text-decoration: none;
    color: rgba(241, 232, 216, 0.8);
    font-size: 0.92rem;
}

.footer-nav a:hover {
    color: var(--rust);
}

/* ============================================
   RESPONSIVE — TABLET (>= 640px)
   ============================================ */
@media (min-width: 640px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        padding-top: 160px;
    }
}

/* ============================================
   RESPONSIVE — DESKTOP (>= 1024px)
   ============================================ */
@media (min-width: 1024px) {
    .two-col {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: start;
    }

    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .facts-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 48px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   RESPONSIVE — MOBILE NAV (< 900px)
   ============================================ */
@media (max-width: 899px) {
    .nav-toggle {
        display: flex;
    }

    .primary-nav {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--cream);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        gap: 0;
        padding: 8px 24px 20px;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--speed), transform var(--speed);
    }

    .primary-nav.is-open {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .primary-nav a {
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* ============================================
   RESPONSIVE — SMALL PHONES (< 400px)
   ============================================ */
@media (max-width: 400px) {
    .wrap {
        padding: 0 16px;
    }

    .section {
        padding: 64px 0;
    }

    .hero-content {
        padding-top: 120px;
        padding-bottom: 64px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}