/* ChalknCheese Studio. All colours, type and spacing are set here. */

@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/bricolage-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/bricolage-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/bricolage-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/instrument-sans-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/instrument-sans-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Patrick Hand'; src: url('/fonts/patrick-hand-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
    --red: #8e1b2b;
    --red-dark: #6f1320;
    --yellow: #ffd21e;
    --yellow-deep: #e6ae12;
    --white: #ffffff;
    --tint: #faf6ec;
    --charcoal: #24282b;
    --charcoal-soft: #4b5257;
    --line: #e6e1d6;
    --chalk: #f4f1e8;
    --chalk-dim: #c9c8c0;
    --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
    --body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
    --hand: 'Patrick Hand', 'Segoe Print', cursive;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --section: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--white);
    color: var(--charcoal);
    font: 400 1.0625rem/1.65 var(--body);
    overflow-x: hidden;
}

h1, h2, h3 {
    margin: 0 0 0.5em;
    font-family: var(--display);
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 7.2vw, 5.1rem); font-weight: 800; }
h2 { font-size: clamp(1.85rem, 4.2vw, 3rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

a { color: var(--red); text-underline-offset: 3px; }

img, svg { display: block; max-width: 100%; }

:focus-visible { outline: 3px solid var(--yellow-deep); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--charcoal);
    color: var(--white);
}

.skip-link:focus { top: 0.5rem; }

/* ---- Logo ---- */
.brand { display: inline-block; color: var(--charcoal); text-decoration: none; }

.logo { display: inline-flex; align-items: center; gap: 0.6rem; }

.logo-mark { width: 44px; height: 39px; flex: none; }

.logo-text { display: flex; flex-direction: column; line-height: 1; }

.logo-word { font-family: var(--display); font-size: 1.32rem; font-weight: 800; letter-spacing: -0.02em; }

.logo-word b { color: var(--red); font-weight: 800; }

.logo-studio {
    margin-top: 0.22rem;
    padding-top: 0.2rem;
    border-top: 2px dashed var(--yellow-deep);
    color: var(--charcoal-soft);
    font-size: 0.68rem;
    letter-spacing: 0.42em;
}

.brand-on-dark { color: var(--white); }
.brand-on-dark .logo-word b { color: var(--yellow); }
.brand-on-dark .logo-studio { color: var(--yellow); }

/* ---- Header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 74px; }

.site-nav ul { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }

.site-nav a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--charcoal);
    font-weight: 600;
    text-decoration: none;
}

.site-nav a:hover { color: var(--red); }

.site-nav a[aria-current="page"] {
    color: var(--red);
    box-shadow: inset 0 -3px 0 var(--yellow);
}

.menu-button { display: none; }

@media (max-width: 760px) {
    .menu-button {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        min-height: 44px;
        padding: 0 0.75rem;
        border: 2px solid var(--charcoal);
        border-radius: 4px;
        background: none;
        color: var(--charcoal);
        font: 600 0.95rem var(--body);
        cursor: pointer;
    }

    .menu-bars, .menu-bars::before, .menu-bars::after {
        display: block;
        width: 18px;
        height: 2px;
        background: currentColor;
    }

    .menu-bars { position: relative; }
    .menu-bars::before, .menu-bars::after { content: ''; position: absolute; left: 0; }
    .menu-bars::before { top: -6px; }
    .menu-bars::after { top: 6px; }

    .js .site-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--white);
        border-bottom: 3px solid var(--red);
    }

    .js .site-nav.open { display: block; }

    .site-nav ul { flex-direction: column; padding: 0.5rem var(--gutter) 1rem; }

    .site-nav a { padding: 0.75rem 0.25rem; font-size: 1.1rem; }

    .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--yellow); padding-left: 0.75rem; }

    html:not(.js) .header-row { flex-wrap: wrap; }
    html:not(.js) .menu-button { display: none; }
}

/* ---- Hero ---- */
.hero, .page-hero { position: relative; overflow: hidden; background: var(--red); color: var(--white); }

.hero-inner { position: relative; padding-top: clamp(3.5rem, 9vw, 7rem); padding-bottom: clamp(3.5rem, 9vw, 7.5rem); }

.hero h1 { max-width: 13em; margin-bottom: 0.45em; }

.hero-wedge {
    position: absolute;
    right: -4%;
    bottom: -16%;
    width: min(46vw, 600px);
}

.chalk-note {
    margin: 0 0 0.6rem;
    color: var(--yellow);
    font: 400 clamp(1.4rem, 3vw, 1.8rem)/1.1 var(--hand);
    transform: rotate(-2deg);
    transform-origin: left;
}

.lead { max-width: 35em; font-size: clamp(1.1rem, 2vw, 1.28rem); line-height: 1.55; }

.underlined { position: relative; display: inline-block; }

.underlined svg { position: absolute; left: 0; bottom: -0.2em; width: 100%; height: 0.24em; overflow: visible; }

.underlined path {
    fill: none;
    stroke: var(--yellow);
    stroke-width: 5;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.underlined svg { transform-origin: left; animation: draw 0.8s 0.25s ease-out backwards; }

@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.page-hero .wrap { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }

.page-hero h1 { max-width: 15em; font-size: clamp(2.3rem, 6vw, 4.2rem); }

.page-hero::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(38vw, 420px);
    height: 100%;
    background: var(--yellow);
    clip-path: polygon(100% 18%, 100% 100%, 0 100%);
}

.page-hero .wrap { position: relative; z-index: 1; }

/* ---- Buttons ---- */
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.button {
    display: inline-block;
    padding: 0.8rem 1.4rem;
    border: 2px solid transparent;
    border-radius: 4px;
    font: 700 1rem/1.2 var(--display);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--charcoal); }

.button[disabled] { opacity: 0.6; cursor: default; }

.button-yellow { background: var(--yellow); color: var(--charcoal); }
.button-red { background: var(--red); color: var(--white); }
.button-dark { background: var(--charcoal); color: var(--white); }
.button-dark:hover { box-shadow: 4px 4px 0 var(--red); }
.button-outline { border-color: var(--white); background: var(--red); color: var(--white); }

/* ---- Sections ---- */
.section { padding: var(--section) 0; }

.tinted { background: var(--tint); }

.section-head { max-width: 42rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

.eyebrow {
    margin-bottom: 0.5rem;
    color: var(--red);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }

.prose { max-width: 41rem; }

.prose h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }

.lead-dark { font-family: var(--display); font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }

.small-heading { margin-bottom: 0.75rem; font-size: 1.25rem; letter-spacing: -0.01em; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 4px solid var(--red); }

.trio article { padding: 1.6rem 1.75rem 0.5rem 0; }

.trio article + article { padding-left: 1.75rem; border-left: 1px solid var(--line); }

.trio p { margin: 0; color: var(--charcoal-soft); }

/* ---- Chalkboard ---- */
.board {
    position: relative;
    background-color: var(--charcoal);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
    color: var(--chalk);
}

.board .eyebrow { color: var(--yellow); }

.process {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.process li { position: relative; counter-increment: step; padding-top: 3.1rem; }

.process li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    color: var(--yellow-deep);
    font: 400 2.2rem/1 var(--hand);
}

.process li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 2.2rem;
    right: 0.5rem;
    top: 1.1rem;
    border-top: 2px dashed currentColor;
    opacity: 0.4;
}

.process h3 { font-family: var(--hand); font-size: 1.8rem; font-weight: 400; letter-spacing: 0; }

.process p { margin: 0; }

.section:not(.board) .process p { color: var(--charcoal-soft); }

.board .process p { color: var(--chalk-dim); }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 2.5rem; }

.values article { padding-top: 0.9rem; border-top: 2px dashed rgba(244, 241, 232, 0.4); }

.values h3 { color: var(--yellow); }

.values p { margin: 0; color: var(--chalk-dim); }

/* ---- Products ---- */
.product-list { display: grid; gap: 2rem; }

.product-card {
    display: grid;
    grid-template-columns: minmax(180px, 300px) 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(1rem, 3vw, 2rem);
    border: 2px solid var(--charcoal);
    background: var(--white);
    box-shadow: 6px 6px 0 var(--yellow);
    margin-right: 6px;
}

.product-logo img { width: 100%; height: auto; }

.product-body h3 { margin-bottom: 0.2rem; font-size: clamp(1.45rem, 6.5vw, 2.5rem); font-weight: 800; overflow-wrap: anywhere; }

.product-body h3 a { color: var(--charcoal); text-decoration: none; }

.product-body h3 a:hover { color: var(--red); }

.product-category { margin-bottom: 0.8rem; color: var(--charcoal-soft); font-weight: 600; }

.product-body .button { margin-top: 0.4rem; }

.detail-hero { display: grid; grid-template-columns: 1fr minmax(180px, 300px); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }

.detail-hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.9rem); overflow-wrap: anywhere; }

.detail-category { margin: 0; color: var(--yellow); font-weight: 600; }

.detail-logo { width: 100%; height: auto; box-shadow: 8px 8px 0 var(--charcoal); }

.page-hero:has(.detail-hero)::after { display: none; }

.tick-list, .plain-list { margin: 0; padding: 0; list-style: none; }

.tick-list li { position: relative; padding: 0.55rem 0 0.55rem 1.8rem; border-bottom: 1px solid var(--line); }

.tick-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 0.9rem;
    height: 0.7rem;
    background: var(--yellow-deep);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.commitment { max-width: 48rem; }

.commitment h2 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.5rem); }

.back-link { font-weight: 600; }

.muted-dark { color: var(--charcoal-soft); }

/* ---- Closing ---- */
.closing { position: relative; overflow: hidden; background: var(--yellow); color: var(--charcoal); }

.closing-wedge { position: absolute; right: 0; bottom: 0; width: min(52vw, 560px); }

.closing-inner { position: relative; padding-top: var(--section); padding-bottom: var(--section); }

.closing h2 { max-width: 13em; }

.closing p { max-width: 32em; font-size: 1.15rem; }

/* ---- Forms ---- */
.site-form { padding: clamp(1.25rem, 3vw, 2rem); border: 2px solid var(--charcoal); background: var(--tint); }

.field { margin-bottom: 1.1rem; }

.field label { display: block; margin-bottom: 0.3rem; font-weight: 600; }

.optional { color: var(--charcoal-soft); font-weight: 400; }

.field input, .field select, .field textarea {
    width: 100%;
    min-height: 46px;
    padding: 0.6rem 0.75rem;
    border: 2px solid var(--charcoal);
    border-radius: 3px;
    background: var(--white);
    color: var(--charcoal);
    font: 400 1rem/1.4 var(--body);
}

.field textarea { resize: vertical; }

.field [aria-invalid="true"] { border-color: var(--red); }

.field-error { margin: 0.3rem 0 0; color: var(--red); font-size: 0.93rem; font-weight: 600; }

.form-status { margin: 1rem 0 0; }

.form-status:empty { display: none; }

.form-status.notice { padding: 0.75rem 1rem; border-left: 5px solid var(--yellow-deep); background: var(--white); }
.form-status.success { padding: 0.75rem 1rem; border-left: 5px solid #2e7d32; background: var(--white); }
.form-status.problem { padding: 0.75rem 1rem; border-left: 5px solid var(--red); background: var(--white); }

.contact-details h2:not(:first-child) { margin-top: 1.75rem; }

/* ---- Footer ---- */
.site-footer { padding: 3.5rem 0 1.5rem; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }

.footer-tagline { margin: 0.8rem 0 0; color: var(--yellow); font: 400 1.5rem var(--hand); }

.footer-heading { margin-bottom: 0.6rem; color: var(--yellow); font-size: 1rem; letter-spacing: 0; }

.site-footer ul { margin: 0; padding: 0; list-style: none; }

.site-footer li { padding: 0.15rem 0; }

.site-footer a:not(.brand) { color: var(--chalk); }

.muted { color: var(--chalk-dim); }

.footer-legal { margin-top: 2.5rem; color: var(--chalk-dim); font-size: 0.9rem; }

.footer-legal p { margin: 0; padding-top: 1rem; border-top: 1px solid rgba(244, 241, 232, 0.25); }

/* ---- Reveal ---- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }

.js .reveal.shown { opacity: 1; transform: none; }

/* ---- Smaller screens ---- */
@media (max-width: 980px) {
    .process { grid-template-columns: repeat(2, 1fr); }
    .process li:nth-child(2)::after { display: none; }
    .values { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .split, .trio, .footer-grid, .detail-hero, .product-card { grid-template-columns: minmax(0, 1fr); }
    .values { grid-template-columns: 1fr; }
    .trio article, .trio article + article { padding: 1.25rem 0; border-left: none; border-bottom: 1px solid var(--line); }
    .hero-inner { padding-bottom: 12rem; }
    .hero-wedge { width: 92vw; right: -8%; bottom: -8%; }
    .page-hero::after { width: 34vw; height: 45%; opacity: 0.95; }
    .page-hero .wrap { padding-bottom: 5.5rem; }
    .page-hero:has(.detail-hero) .wrap { padding-bottom: 3rem; }
    .detail-logo { max-width: 240px; }
    .product-logo { max-width: 240px; }
    .closing-inner { padding-bottom: 11rem; }
    .closing-wedge { width: 70vw; }
}

@media (max-width: 480px) {
    .process { grid-template-columns: 1fr; }
    .process li::after { display: none; }
    .button-row .button { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .button { transition: none; }
    .underlined svg { animation: none; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Get started ---- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 3.2rem 1.25rem 1.25rem; border-top: 4px solid var(--red); background: var(--white); counter-increment: step; }
.tinted .steps li { background: var(--white); }
.steps li::before { content: counter(step); position: absolute; top: 0.9rem; left: 1.25rem; font: 800 1.6rem var(--display); color: var(--red); }
.steps h3 { margin-bottom: 0.5rem; font-size: 1.15rem; }
.steps p { margin: 0; }
.faq { display: grid; gap: 0.75rem; max-width: 48rem; }
.faq details { border: 2px solid var(--charcoal); background: var(--tint); padding: 0.9rem 1.1rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 0.7rem 0 0; }
.donate { margin-top: 1rem; }
.donate-note { margin: 0.5rem 0 0; font-size: 0.92rem; color: var(--charcoal-soft); }
.site-footer .donate-note { color: var(--chalk-dim); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.price-list { margin: 0.6rem 0; padding-left: 1.2rem; }
.price-list li { margin-bottom: 0.35rem; }
