/* ---------- Fonts (self-hosted, SIL Open Font License; see fonts/) ---------- */

@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Cormorant Garamond";
    font-style: italic;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
}

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/montserrat-latin-500-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2");
}

:root {
    /* Pulled from the logo. Text colors pass WCAG AA on cream; pink, gold
       and tan are too light for text, so use them only for decoration. */
    --cream: #F8F3E9;
    --paper: #FFFCF6;
    --ink: #3A2418;
    /* "COTTAGE" lettering */
    --ink-soft: #6B5446;
    --green: #287838;
    /* vines / green yarn ball */
    --green-dk: #1C5A25;
    --rose: #A84D6C;
    /* deepened "Crafters" pink, for text and focus rings */
    --pink: #D993A7;
    /* "Crafters" lettering / pink yarn ball */
    --gold: #CFA61A;
    /* "The" / window light */
    --tan: #A6794E;
    /* tan yarn ball */
    --line: rgba(58, 36, 24, 0.12);

    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Montserrat", Arial, sans-serif;
}

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

html {
    background: var(--cream);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
}

/* ---------- Hero ---------- */

.hero {
    text-align: center;
}

.hero h1 {
    margin: 0;
    line-height: 0;
}

.logo {
    width: min(420px, 78vw);
    height: auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.75rem 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green);
}

.eyebrow::before,
.eyebrow::after {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

.tagline {
    margin: 0 auto;
    max-width: 640px;
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 2.9rem);
    font-weight: 600;
    line-height: 1.15;
}

.tagline em {
    font-style: italic;
    font-weight: 500;
    color: var(--rose);
}

.intro {
    max-width: 560px;
    margin: 1rem auto 0;
    font-size: 1rem;
    color: var(--ink-soft);
}

/* ---------- Yarn divider ---------- */

.divider {
    display: block;
    width: min(360px, 80%);
    height: auto;
    margin: 2.5rem auto;
}

/* ---------- Signup ---------- */

.signup {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem 1.75rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 30px -18px rgba(58, 36, 24, 0.35);
    text-align: center;
}

.signup h2 {
    margin: 0 0 0.35rem;
    font-family: var(--serif);
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.signup p {
    margin: 0 0 1.25rem;
    font-size: 0.92rem;
    color: var(--ink-soft);
}


.email-row {
    display: flex;
    gap: 0.5rem;
}

.email-row input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 0.95rem;
    color: var(--ink);
}

.email-row input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(40, 120, 56, 0.15);
}

.btn {
    padding: 0.85rem 1.4rem;
    border: 0;
    border-radius: 10px;
    background: var(--green);
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s;
}

.btn:hover {
    background: var(--green-dk);
}

.btn:active {
    transform: translateY(1px);
}

/* Visible ring for keyboard users only */
.btn:focus-visible,
a:focus-visible {
    outline: 3px solid var(--rose);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Hidden on screen, still read by screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.fine {
    margin: 0.85rem 0 0 !important;
    font-size: 0.78rem !important;
}

/* .signup scope beats the generic .signup p sizing */
.signup .thanks {
    display: none;
    margin: 0;
    outline: none;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--green);
}

.signup.done form {
    display: none;
}

.signup.done .thanks {
    display: block;
}

/* ---------- What's inside ---------- */

.section-title {
    margin: 4rem 0 0.5rem;
    text-align: center;
    font-family: var(--serif);
    font-size: clamp(1.9rem, 4vw, 2.4rem);
    font-weight: 600;
}

.section-sub {
    margin: 0 auto 2rem;
    max-width: 520px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
}

.card {
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--accent);
}


.card h3 {
    margin: 0 0 0.35rem;
    font-family: var(--serif);
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.2;
}

.card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.card .brand {
    font-weight: 600;
    color: var(--ink);
}

.card.yarn {
    --accent: var(--pink);
}

.card.tools {
    --accent: var(--green);
}

.card.handmade {
    --accent: var(--gold);
}

.card.community {
    --accent: var(--tan);
}

/* ---------- Welcome band ---------- */

.welcome {
    margin: 4rem 0 0;
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.welcome blockquote {
    margin: 0 auto;
    max-width: 640px;
    font-family: var(--serif);
    font-size: clamp(1.4rem, 3.4vw, 1.85rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.35;
}

/* ---------- Footer ---------- */

footer {
    padding: 2rem 0 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

footer a {
    color: var(--green);
    font-weight: 500;
    text-decoration: none;
}

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

.footer-place {
    margin: 0 0 0.35rem;
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink);
}

.footer-note {
    margin: 0;
}

.footer-email {
    margin: 0.9rem 0 0;
}

.socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 3rem;
    margin: 1.75rem 0 0;
}

.social-label {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.socials ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.copyright {
    margin-top: 1.75rem;
    font-size: 0.75rem;
}

/* ---------- Signup extras ---------- */

.signup a {
    color: var(--green);
}

.form-error {
    margin: 0.85rem 0 0 !important;
    padding: 0.65rem 0.9rem;
    border-left: 3px solid #A8432F;
    border-radius: 6px;
    background: #FBEDE8;
    color: #7A2E1F !important;
    font-size: 0.88rem !important;
    text-align: left;
}

.form-error[hidden] {
    display: none;
}

.email-row input[aria-invalid="true"] {
    border-color: #A8432F;
}

.btn:disabled {
    cursor: progress;
    opacity: 0.75;
}

/* ---------- Text pages (privacy, 404) ---------- */

.page-head {
    text-align: center;
}

.page-head .home-logo img {
    width: 120px;
    height: auto;
}

.prose {
    max-width: 640px;
    margin: 0 auto;
}

.prose h1 {
    margin: 1rem 0 0.25rem;
    text-align: center;
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 2.6rem);
    font-weight: 600;
    line-height: 1.15;
}

.prose .updated {
    margin: 0 0 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.prose h2 {
    margin: 2.25rem 0 0.4rem;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.2;
}

.prose p,
.prose li {
    color: var(--ink-soft);
}

.prose a {
    color: var(--green);
    font-weight: 500;
}

.prose .center {
    text-align: center;
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
    .wrap {
        padding: 2rem 1rem 1.5rem;
    }

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

    .signup {
        padding: 1.6rem 1.1rem;
    }

    .email-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section-title {
        margin-top: 3rem;
    }

    .eyebrow {
        font-size: 0.7rem;
        letter-spacing: 0.12em;
    }

    .eyebrow::before,
    .eyebrow::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
