/* Nicefind.uk — workshop catalogue
   Layout helpers live at the bottom: .section-full, .section-two, .section-three,
   .wrap-left, .wrap-right, .dropdown, .clean-list */

:root {
    --ink: #1c1410;
    --ink-soft: #4a3b32;
    --paper: #f4efe6;
    --paper-deep: #e7dfd2;
    --card: #fbf7f1;
    --walnut: #7a4e32;
    --brass: #a68456;
    --sage: #3e5140;
    --line: rgba(28, 20, 16, 0.14);
    --shadow: 0 18px 40px rgba(28, 20, 16, 0.08);
    --side: 1.4rem;
    --header: 4.6rem;
    --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
    --sans: "Source Sans 3", "Segoe UI", sans-serif;
    --old: "UnifrakturCook", "Old English Text MT", serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(1200px 420px at 10% -10%, rgba(166, 132, 86, 0.16), transparent 60%),
        var(--paper);
    font-family: var(--sans);
    font-size: 1.05rem;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

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

a {
    color: var(--walnut);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--ink);
}

h1, h2, h3, p {
    margin-top: 0;
}

h1, h2, .section-kicker {
    font-family: var(--serif);
    font-weight: 560;
    letter-spacing: -0.02em;
    line-height: 1.12;
}

.old-english {
    font-family: var(--old);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.15;
    color: var(--ink);
}

.skip {
    position: absolute;
    left: var(--side);
    top: -4rem;
    background: var(--ink);
    color: var(--paper);
    padding: 0.4rem 0.7rem;
    z-index: 20;
}

.skip:focus {
    top: 0.4rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header ---------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(244, 239, 230, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header);
    margin: 0 var(--side);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--ink);
    border-radius: 50%;
    font-family: var(--serif);
    font-size: 0.95rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-name {
    font-family: var(--serif);
    font-size: 1.25rem;
}

.brand-domain {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.nav-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--line);
    background: transparent;
    border-radius: 999px;
    padding: 0;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
    display: block;
    width: 1rem;
    height: 1.5px;
    background: var(--ink);
    position: relative;
    margin: 0 auto;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-lines::before { top: -5px; }
.nav-toggle-lines::after { top: 5px; }

.nav-list {
    display: flex;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-list a {
    display: block;
    color: var(--ink);
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
}

.nav-list a:hover,
.nav-list a.is-current {
    background: var(--paper-deep);
}

.has-dropdown {
    position: relative;
}

.dropdown {
    display: none;
    position: absolute;
    top: calc(100% - 0.2rem);
    left: 0;
    min-width: 12.5rem;
    margin: 0;
    padding: 0.4rem;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    box-shadow: var(--shadow);
}

.dropdown a {
    border-radius: 0.5rem;
    padding: 0.5rem 0.7rem;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.is-open .dropdown {
    display: block;
}

/* Sections and layout helpers ------------------------------- */

.section {
    margin: 0 var(--side) 2.2rem;
}

.section-full,
.section-two,
.section-three {
    margin-left: var(--side);
    margin-right: var(--side);
}

.section-full {
    padding: 1.4rem 0 0.4rem;
}

.section-two {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.6rem;
    align-items: start;
}

.section-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.section-kicker {
    margin: 0 0 0.35rem;
    color: var(--walnut);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-family: var(--sans);
    font-weight: 600;
}

.lede {
    font-size: 1.22rem;
    max-width: 42rem;
    color: var(--ink-soft);
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1.15rem 1.15rem 1.2rem;
}

.panel-sage {
    background: var(--sage);
    color: #f6f1e7;
    border-color: transparent;
}

.panel-sage a {
    color: #f3e2c4;
}

/* Carousel -------------------------------------------------- */

.hero {
    margin: 0.8rem var(--side) 1.6rem;
}

.carousel {
    position: relative;
    overflow: hidden;
    min-height: 28rem;
    border-radius: 1.2rem;
    background: var(--ink);
    color: #f7f1e8;
}

.slide {
    display: none;
    min-height: 28rem;
    background-size: cover;
    background-position: center;
}

.slide.is-active {
    display: grid;
    align-items: end;
}

.slide-copy {
    max-width: 36rem;
    margin: 1.2rem;
    padding: 1.2rem 1.25rem;
    background: rgba(28, 20, 16, 0.72);
    border-radius: 0.9rem;
}

.slide-copy h1,
.slide-copy p {
    margin-bottom: 0.45rem;
}

.slide-copy h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.carousel-controls {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    gap: 0.4rem;
}

.carousel-controls button,
.dot {
    border: 0;
    background: rgba(244, 239, 230, 0.88);
    color: var(--ink);
    border-radius: 999px;
    min-width: 2.2rem;
    height: 2.2rem;
    cursor: pointer;
}

.dot.is-active {
    background: var(--brass);
    color: white;
}

/* Cards ----------------------------------------------------- */

.piece-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 1rem;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    min-height: 100%;
}

.piece-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.piece-card img {
    width: 100%;
    height: 14rem;
    object-fit: cover;
}

.piece-card div {
    padding: 0.9rem 1rem 1rem;
}

.piece-card h3 {
    font-family: var(--old);
    font-size: 1.7rem;
    margin: 0.15rem 0 0.35rem;
}

.meta {
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.price {
    font-family: var(--serif);
    margin: 0.45rem 0 0;
}

/* Text wrap ------------------------------------------------- */

.wrap-left,
.wrap-right {
    overflow: auto;
}

.wrap-left img,
.wrap-right img {
    width: min(46%, 22rem);
    border-radius: 0.9rem;
    margin-bottom: 0.6rem;
}

.wrap-left img {
    float: left;
    margin-right: 1.1rem;
}

.wrap-right img {
    float: right;
    margin-left: 1.1rem;
}

/* Lists and buttons ----------------------------------------- */

.clean-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.clean-list li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.4rem;
    border-bottom: 1px solid var(--line);
}

.clean-list li::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--brass);
    position: absolute;
    left: 0;
    top: 0.85rem;
}

.button {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    cursor: pointer;
    font: inherit;
}

.button:hover {
    background: var(--walnut);
    color: white;
}

.button-line {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}

/* Shop toolbar / custom dropdown ---------------------------- */

.toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin: 0 var(--side) 1rem;
}

.nice-select {
    position: relative;
    min-width: 14rem;
}

.nice-select button {
    width: 100%;
    text-align: left;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    padding: 0.65rem 0.8rem;
    font: inherit;
    cursor: pointer;
}

.nice-select ul {
    display: none;
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    margin: 0.3rem 0 0;
    padding: 0.35rem;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    box-shadow: var(--shadow);
}

.nice-select.is-open ul {
    display: block;
}

.nice-select a {
    display: block;
    padding: 0.4rem 0.55rem;
    border-radius: 0.4rem;
    color: var(--ink);
    text-decoration: none;
}

.nice-select a:hover,
.nice-select a.is-current {
    background: var(--paper-deep);
}

/* Forms ----------------------------------------------------- */

form label {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 0.7rem;
}

input,
textarea,
select {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    background: white;
    font: inherit;
    color: var(--ink);
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

.notice {
    background: #e7efe4;
    border: 1px solid #b7cbb8;
    padding: 0.8rem 1rem;
    border-radius: 0.7rem;
}

.field-error {
    color: #8a2f24;
    font-size: 0.85rem;
}

/* Piece page ------------------------------------------------ */

.piece-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.2rem;
    margin: 1rem var(--side) 1.4rem;
}

.piece-hero img {
    width: 100%;
    height: 100%;
    max-height: 36rem;
    object-fit: cover;
    border-radius: 1rem;
}

.piece-hero h1 {
    font-family: var(--old);
    font-size: clamp(2.4rem, 5vw, 4rem);
    margin-bottom: 0.2rem;
}

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

.site-footer {
    margin-top: 2rem;
    background: var(--ink);
    color: #efe6d8;
    padding: 2rem var(--side) 1.2rem;
}

.site-footer a {
    color: #f0d7b0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
    gap: 1.2rem;
}

.footer-brand {
    font-family: var(--serif);
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.footer-label {
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--brass);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a {
    text-decoration: none;
}

.footer-note {
    border-top: 1px solid rgba(243, 234, 220, 0.15);
    margin: 1.2rem 0 0;
    padding-top: 0.8rem;
    font-size: 0.88rem;
    color: #cbbba8;
}

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

@media (max-width: 860px) {
    :root { --side: 0.9rem; }

    .nav-toggle { display: inline-grid; place-items: center; }

    .site-nav {
        display: none;
        position: absolute;
        left: var(--side);
        right: var(--side);
        top: calc(var(--header) - 0.3rem);
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 0.9rem;
        padding: 0.4rem;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open { display: block; }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
    }

    .dropdown {
        position: static;
        box-shadow: none;
        display: none;
        margin: 0.2rem 0 0.4rem 0.6rem;
    }

    .section-two,
    .section-three,
    .piece-hero,
    .footer-grid,
    .toolbar {
        grid-template-columns: 1fr;
        display: grid;
    }

    .wrap-left img,
    .wrap-right img {
        float: none;
        width: 100%;
        margin: 0 0 0.8rem;
    }

    .carousel,
    .slide,
    .slide.is-active {
        min-height: 24rem;
    }
}
