/* ---------- Colour tokens ---------- */
:root {
    --bg: #F7C9D2;         /* butcher-paper pink */
    --ink: #5E0B19;        /* oxblood */
    --accent: #F2B400;     /* mustard */
    --shadow: #2E0409;     /* deep shadow under the steak */
    --focus: #1F5FD1;

    /* steak colours stay the same in light and dark themes */
    --fat: #FBE6D8;
    --meat: #B8283C;
    --sear: #7E1424;
    --char: #3B0710;
    --marble: #F6CFC6;
    --steak-text: #FFF7F2;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #3A0610;
        --ink: #F7C9D2;
        --accent: #F2B400;
        --shadow: #000000;
        --focus: #8FB4FF;
    }
}
:root[data-theme="dark"] {
    --bg: #3A0610;
    --ink: #F7C9D2;
    --accent: #F2B400;
    --shadow: #000000;
    --focus: #8FB4FF;
}

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

html, body { height: 100%; margin: 0; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    overflow-x: hidden;
    /* subtle butcher-paper grain made from stripes */
    background-image: repeating-linear-gradient(
            -45deg,
            transparent 0 22px,
            color-mix(in srgb, var(--ink) 5%, transparent) 22px 24px
    );
}

main {
    text-align: center;
    max-width: 100%;
}

/* ---------- The steak ---------- */
.steak {
    position: relative;
    display: inline-block;
    max-width: 100%;
    /* extra padding keeps the text inside the curved meat area */
    padding: clamp(3rem, 9vw, 5.5rem) clamp(3rem, 11vw, 7rem);
    transform: rotate(-3deg);
}

.steak-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(10px 12px 0 var(--shadow));
}

.steak-art .fat {
    fill: var(--fat);
}

.steak-art .meat {
    fill: var(--meat);
    stroke: var(--sear);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.steak-art .marbling path {
    fill: none;
    stroke: var(--marble);
    stroke-width: 3;
    stroke-linecap: round;
    opacity: 0.55;
    vector-effect: non-scaling-stroke;
}

.steak-art .grill line {
    stroke: var(--char);
    stroke-width: 11;
    stroke-linecap: round;
    opacity: 0.4;
    vector-effect: non-scaling-stroke;
}

.steak-art .outline {
    fill: none;
    stroke: var(--char);
    stroke-width: 4;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

h1 {
    position: relative; /* sits above the SVG */
    font-family: "Shrikhand", "Cooper Black", Georgia, serif;
    font-weight: 400;
    font-size: clamp(2.2rem, 9vw, 6rem);
    line-height: 1.02;
    margin: 0;
    color: var(--steak-text);
    text-shadow: 4px 4px 0 var(--char);
    overflow-wrap: anywhere;
}

h1 span { display: block; }

/* ---------- Button ---------- */
button {
    margin-top: 2.75rem;
    font-family: inherit;
    font-weight: 700;
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    color: #2E0409;
    background: var(--accent);
    border: 3px solid var(--ink);
    border-radius: 999px;
    padding: 0.9rem 2.2rem;
    cursor: pointer;
    box-shadow: 0 6px 0 var(--ink);
    transition: transform 80ms ease, box-shadow 80ms ease;
}
button:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
button:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 4px;
}

/* ---------- Confetti canvas ---------- */
#confetti {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

@media (prefers-reduced-motion: reduce) {
    button, button:hover, button:active { transition: none; }
}