/* Home page (front-page.php): split stage. One side holds the object (the bauble, the photograph),
   the other a calm reading column. Loaded on the front page only; every rule is scoped to .gpw-home
   so the theme's header, footer and shared components are untouched. Light colours only, like the
   rest of the site. */

/* The page's paper and pine ink, shared with the theme header, phone menu and cookie banner on this
   page so the header sits on the same ground as the hero. */
body.home {
    --bg: #f4f6f1;
    --surface: #e7ebe3;
    --ink: #15301f;
    --muted: #405546;
}

.gpw-home {
    --accent: #c12e1f;
    --accent-ink: #ffffff;
    --field: #1d4529;
    --field-ink: #f4f6f1;
    --field-muted: #c9d6cb;
    --field-2: #24543a;
    --slip: #ffffff;
    --slip-ink: #15301f;
    /* filament colours: the real plastic */
    --f-red: #c12e1f;
    --f-white: #f2f2ee;
    --f-green: #00ae42;
    --f-mist: #3f8e43;
    --f-blue: #0a2989;
    --f-gold: #e4bd68;
    --f-brown: #9d432c;
    --f-black: #1b1b1b;
    --s-small: clamp(.875rem, .85rem + .1vw, .9375rem);
    --s-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
    --s-lead: clamp(1.25rem, 1.1rem + .7vw, 1.625rem);
    --s-head: clamp(2rem, 1.3rem + 3vw, 3.75rem);
    --s-display: clamp(2.9rem, 1.6rem + 5.6vw, 6.75rem);
    --h-gutter: clamp(16px, 3vw, 40px);
    --ease: cubic-bezier(.2, .7, .1, 1);

    background: var(--bg);
    color: var(--ink);
    font-size: var(--s-body);
    line-height: 1.5;
    letter-spacing: -.01em;
}

html:has(body.home) {
    scroll-behavior: smooth;
}

/* Theme defaults that would otherwise reach into this page. */
.gpw-home img,
.gpw-home svg {
    display: block;
    max-width: 100%;
}

.gpw-home a {
    color: inherit;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
}

.gpw-home h1,
.gpw-home h2,
.gpw-home h3 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.02;
    text-transform: none;
    text-wrap: balance;
}

.gpw-home p {
    margin: 0;
}

.gpw-home .wrap {
    padding-left: max(var(--h-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--h-gutter), env(safe-area-inset-right, 0px));
}

.gpw-home :focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.gpw-home .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 0;
    background: var(--accent);
    color: var(--accent-ink);
    font: 500 var(--s-body)/1 var(--font);
    letter-spacing: -.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s var(--ease), background-color .18s;
}

.gpw-home .btn:active {
    transform: scale(.97);
}

.gpw-home .tlink {
    font-weight: 500;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transition: color .15s;
}

@media (hover: hover) and (pointer: fine) {
    .gpw-home .btn:hover {
        background: color-mix(in srgb, var(--accent) 86%, #000);
        color: var(--accent-ink);
    }

    .gpw-home .tlink:hover {
        color: var(--accent);
    }
}

/* ---------- hero: statement beside specimen mosaic ---------- */
.gpw-home .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: min(88svh, 880px);
}

.gpw-home .hero-l {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding-block: clamp(40px, 7vh, 88px) clamp(32px, 6vh, 64px);
}

.gpw-home .hero h1 {
    max-width: 9ch;
    font-size: var(--s-display);
}

.gpw-home .hero-sub {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 40ch;
}

.gpw-home .hero-sub p {
    font-size: var(--s-lead);
    line-height: 1.35;
}

.gpw-home .hero-sub .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 26px;
}

.gpw-home .deadline {
    font-weight: 500;
}

.gpw-home .deadline b {
    color: var(--accent);
}

.gpw-home .hero-r {
    position: relative;
    overflow: hidden;
    background: var(--surface);
}

.gpw-home .mosaic {
    position: absolute;
    inset: clamp(20px, 3vw, 40px) -12% clamp(20px, 3vw, 40px) clamp(20px, 3vw, 40px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 14px;
}

.gpw-home .tile {
    position: relative;
    margin: 0;
    overflow: hidden;
}

.gpw-home .tile.big {
    grid-column: span 2;
    grid-row: span 2;
}

.gpw-home .tile img,
.gpw-home .tile svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gpw-home .tile figcaption {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 6px 10px;
    background: var(--bg);
    color: var(--ink);
    font-size: var(--s-small);
    font-weight: 500;
}

.gpw-home .t-red { background: var(--f-red); }
.gpw-home .t-white { background: var(--f-white); }
.gpw-home .t-green { background: var(--f-mist); }
.gpw-home .t-blue { background: var(--f-blue); }
.gpw-home .t-gold { background: var(--f-gold); }
.gpw-home .t-brown { background: var(--f-brown); }

.gpw-home .shutter {
    animation: gpw-shutter 1.1s var(--ease) both;
}

.gpw-home .shutter img,
.gpw-home .shutter svg {
    animation: gpw-settle 1.1s var(--ease) both;
}

.gpw-home .mosaic .tile:nth-child(2) { animation-delay: .08s; }
.gpw-home .mosaic .tile:nth-child(3) { animation-delay: .16s; }
.gpw-home .mosaic .tile:nth-child(4) { animation-delay: .24s; }
.gpw-home .mosaic .tile:nth-child(5) { animation-delay: .32s; }
.gpw-home .mosaic .tile:nth-child(6) { animation-delay: .4s; }

@keyframes gpw-shutter {
    from { clip-path: inset(100% 0 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

@keyframes gpw-settle {
    from { transform: scale(1.12); }
    to { transform: scale(1); }
}

@media (max-width: 820px) {
    .gpw-home .hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .gpw-home .hero h1 {
        font-size: clamp(2.6rem, 12vw, 4rem);
    }

    .gpw-home .hero-l {
        gap: 28px;
        padding-block: 28px 36px;
    }

    .gpw-home .hero-r {
        height: 118vw;
        max-height: 620px;
    }

    .gpw-home .mosaic {
        inset: 16px -28% 0 16px;
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- live bauble: square plate, spare text ---------- */
.gpw-home .section {
    padding-block: clamp(96px, 14vh, 180px);
}

.gpw-home .plate {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 80px);
    align-items: stretch;
}

.gpw-home .plate-art {
    position: relative;
    display: grid;
    place-items: center;
    max-width: 100%;
    aspect-ratio: 1;
    background: var(--surface);
}

.gpw-home .plate-art svg {
    width: 78%;
    height: auto;
    transition: transform .4s var(--ease);
}

.gpw-home .plate-art .note {
    position: absolute;
    left: 16px;
    bottom: 14px;
    color: var(--muted);
    font-size: var(--s-small);
}

.gpw-home .plate-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    min-width: 0;
}

.gpw-home .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gpw-home .tab {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 12px 14px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    color: var(--ink);
    font: 500 var(--s-small)/1 var(--font);
    cursor: pointer;
    transition: background-color .15s, transform .15s;
}

.gpw-home .tab:active {
    transform: scale(.97);
}

.gpw-home .tab .sw {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 22px;
    height: 22px;
}

.gpw-home .tab[aria-pressed="true"] {
    background: var(--ink);
    color: var(--bg);
}

.gpw-home .plate h2 {
    font-size: var(--s-head);
}

.gpw-home .plate-mid {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 38ch;
}

.gpw-home .field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gpw-home .field label {
    font-weight: 500;
}

.gpw-home .field input {
    width: 100%;
    min-height: 0;
    padding: 14px 14px 12px;
    border: 0;
    border-bottom: 3px solid var(--ink);
    border-radius: 0;
    background: var(--surface);
    color: var(--ink);
    font: 500 var(--s-lead)/1.2 var(--font);
    cursor: text;
}

.gpw-home .field input:focus {
    outline: none;
    border-bottom-color: var(--accent);
}

.gpw-home .field small {
    color: var(--muted);
    font-size: var(--s-small);
}

.gpw-home .field small.err {
    color: var(--accent);
    font-weight: 500;
}

.gpw-home .cells {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gpw-home .cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 72px;
    padding: 0 20px;
    font-weight: 500;
    text-decoration: none;
    transition: transform .18s var(--ease), background-color .18s;
}

.gpw-home .cell:active {
    transform: scale(.98);
}

.gpw-home .cell.primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.gpw-home .cell.second {
    background: var(--surface);
    color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
    .gpw-home .cell.primary:hover {
        background: color-mix(in srgb, var(--accent) 86%, #000);
    }

    .gpw-home .cell.second:hover {
        background: color-mix(in srgb, var(--surface) 82%, var(--ink));
    }
}

.gpw-home .price {
    font-size: var(--s-lead);
    font-weight: 700;
}

@media (max-width: 820px) {
    .gpw-home .plate {
        grid-template-columns: 1fr;
    }

    .gpw-home .cells {
        grid-template-columns: 1fr;
    }

    .gpw-home .cell {
        min-height: 60px;
    }
}

/* ---------- range: sticky photograph, active list, on the green field ---------- */
.gpw-home .range {
    background: var(--field);
    color: var(--field-ink);
}

.gpw-home .range-in {
    display: grid;
    grid-template-columns: 5fr 1fr 6fr;
    padding-block: clamp(96px, 14vh, 180px);
}

.gpw-home .range-pic {
    position: sticky;
    top: 12vh;
    grid-column: 1;
    align-self: start;
    max-width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--field-2);
}

.gpw-home .range-pic figure {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity .35s ease;
}

.gpw-home .range-pic figure.on {
    opacity: 1;
}

.gpw-home .range-pic img,
.gpw-home .range-pic svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: gpw-drift 18s ease-in-out infinite alternate;
}

@keyframes gpw-drift {
    from { transform: scale(1.02) translate(0, 0); }
    to { transform: scale(1.09) translate(-2%, -1.5%); }
}

.gpw-home .range-list {
    grid-column: 3;
    min-width: 0;
}

.gpw-home .range h2 {
    margin-bottom: 20px;
    font-size: var(--s-head);
}

.gpw-home .range-intro {
    max-width: 46ch;
    margin-bottom: 48px;
    color: var(--field-muted);
}

.gpw-home .range-intro b {
    color: var(--field-ink);
}

.gpw-home .items {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gpw-home .item {
    position: relative;
    padding: 22px 0 22px 26px;
    cursor: default;
}

.gpw-home .item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 34px;
    width: 10px;
    height: 10px;
    background: var(--field-2);
    transition: background-color .2s, transform .2s;
}

.gpw-home .item.on::before {
    background: var(--accent);
    transform: scale(1.3);
}

.gpw-home .item-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
}

.gpw-home .item h3 {
    font-size: var(--s-lead);
    letter-spacing: -.03em;
}

.gpw-home .item .p {
    font-size: var(--s-lead);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Rows open with grid-template-rows (no height animation). Without the script every row stays open. */
.gpw-home .item-body {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows .35s var(--ease);
}

.gpw-home.is-ready .item-body {
    grid-template-rows: 0fr;
}

.gpw-home.is-ready .item.on .item-body {
    grid-template-rows: 1fr;
}

.gpw-home .item-body > div {
    overflow: hidden;
}

.gpw-home .item-body p {
    max-width: 40ch;
    padding-top: 10px;
    color: var(--field-muted);
}

.gpw-home .item-body a {
    display: inline-block;
    margin-top: 14px;
    color: var(--field-ink);
}

@media (hover: hover) and (pointer: fine) {
    .gpw-home .item-body a:hover {
        color: var(--f-gold);
    }
}

@media (max-width: 820px) {
    .gpw-home .range-in {
        grid-template-columns: 1fr;
    }

    .gpw-home .range-pic {
        position: relative;
        top: auto;
        width: 100%;
        aspect-ratio: 4 / 3;
    }

    .gpw-home .range-list {
        grid-column: 1;
        padding-top: 32px;
    }
}

/* ---------- delivery: itinerary on a slip ---------- */
.gpw-home .trip {
    background: var(--surface);
}

.gpw-home .trip-in {
    display: grid;
    grid-template-columns: 5fr 1fr 6fr;
    align-items: start;
    padding-block: clamp(96px, 14vh, 180px);
}

.gpw-home .trip-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 30ch;
}

.gpw-home .trip h2 {
    font-size: var(--s-head);
}

.gpw-home .trip-text p {
    color: var(--muted);
}

.gpw-home .trip-text .big {
    color: var(--ink);
    font-size: var(--s-display);
    font-weight: 700;
    letter-spacing: -.05em;
    line-height: .9;
}

.gpw-home .slip {
    grid-column: 3;
    width: 100%;
    max-width: 480px;
    padding: 36px 32px 64px;
    background: var(--slip);
    color: var(--slip-ink);
    font-size: var(--s-small);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 96% 100%, 92% calc(100% - 14px), 88% 100%, 84% calc(100% - 14px), 80% 100%, 76% calc(100% - 14px), 72% 100%, 68% calc(100% - 14px), 64% 100%, 60% calc(100% - 14px), 56% 100%, 52% calc(100% - 14px), 48% 100%, 44% calc(100% - 14px), 40% 100%, 36% calc(100% - 14px), 32% 100%, 28% calc(100% - 14px), 24% 100%, 20% calc(100% - 14px), 16% 100%, 12% calc(100% - 14px), 8% 100%, 4% calc(100% - 14px), 0 100%);
}

.gpw-home .slip h3 {
    margin: 28px 0 10px;
    font-size: var(--s-body);
    letter-spacing: -.01em;
}

.gpw-home .slip h3:first-child {
    margin-top: 0;
}

.gpw-home .leg {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 5px 0;
}

.gpw-home .leg span:first-child {
    flex: 0 1 auto;
}

.gpw-home .leg i {
    flex: 1 1 20px;
    min-width: 20px;
    border-bottom: 4px dotted color-mix(in srgb, var(--slip-ink) 45%, transparent);
    transform: translateY(-4px);
}

.gpw-home .leg span:last-child {
    font-weight: 500;
    white-space: nowrap;
}

.gpw-home .leg.total {
    margin: 28px -32px 0;
    padding: 12px 32px;
    background: var(--ink);
    color: var(--bg);
    font-weight: 700;
}

.gpw-home .leg.total i {
    border-color: color-mix(in srgb, var(--bg) 50%, transparent);
}

@media (max-width: 820px) {
    .gpw-home .trip-in {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .gpw-home .slip {
        grid-column: 1;
        padding: 28px 20px 56px;
    }

    .gpw-home .leg.total {
        margin: 24px -20px 0;
        padding: 12px 20px;
    }
}

/* ---------- custom printing: capabilities as a menu ---------- */
.gpw-home .custom-in {
    display: grid;
    grid-template-columns: 5fr 1fr 6fr;
    align-items: center;
}

.gpw-home .custom-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 36ch;
}

.gpw-home .custom h2 {
    font-size: var(--s-head);
}

.gpw-home .custom-text p {
    color: var(--muted);
}

.gpw-home .custom-pics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.gpw-home .custom-pics figure {
    margin: 0;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--surface);
}

.gpw-home .custom-pics img,
.gpw-home .custom-pics svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gpw-home .menu {
    grid-column: 3;
    width: 100%;
    max-width: 600px;
    padding: 52px clamp(20px, 4vw, 52px) 60px;
    background: var(--field);
    color: var(--field-ink);
    clip-path: polygon(0 12px, 4% 0, 8% 12px, 12% 0, 16% 12px, 20% 0, 24% 12px, 28% 0, 32% 12px, 36% 0, 40% 12px, 44% 0, 48% 12px, 52% 0, 56% 12px, 60% 0, 64% 12px, 68% 0, 72% 12px, 76% 0, 80% 12px, 84% 0, 88% 12px, 92% 0, 96% 12px, 100% 0, 100% calc(100% - 12px), 96% 100%, 92% calc(100% - 12px), 88% 100%, 84% calc(100% - 12px), 80% 100%, 76% calc(100% - 12px), 72% 100%, 68% calc(100% - 12px), 64% 100%, 60% calc(100% - 12px), 56% 100%, 52% calc(100% - 12px), 48% 100%, 44% calc(100% - 12px), 40% 100%, 36% calc(100% - 12px), 32% 100%, 28% calc(100% - 12px), 24% 100%, 20% calc(100% - 12px), 16% 100%, 12% calc(100% - 12px), 8% 100%, 4% calc(100% - 12px), 0 100%);
}

.gpw-home .menu h3 {
    margin: 44px 0 14px;
    font-size: var(--s-body);
    letter-spacing: -.02em;
}

.gpw-home .menu h3:first-child {
    margin-top: 0;
}

.gpw-home .mi {
    padding: 9px 0;
}

.gpw-home .mi .leg {
    padding: 0;
}

.gpw-home .mi .leg i {
    border-color: color-mix(in srgb, var(--field-ink) 40%, transparent);
}

.gpw-home .mi small {
    display: block;
    max-width: 34ch;
    margin-top: 2px;
    color: var(--field-muted);
    font-size: var(--s-small);
}

@media (max-width: 820px) {
    .gpw-home .custom-in {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .gpw-home .menu {
        grid-column: 1;
        padding: 40px 20px 48px;
    }
}

/* ---------- questions beside a tall photograph ---------- */
.gpw-home .faq-in {
    display: grid;
    grid-template-columns: 5fr 1fr 6fr;
    align-items: start;
}

.gpw-home .faq h2 {
    margin-bottom: 28px;
    font-size: var(--s-head);
}

.gpw-home .facts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 40px;
    padding: 0;
    font-weight: 500;
    list-style: none;
}

.gpw-home .facts li {
    display: flex;
    gap: 12px;
}

.gpw-home .facts li::before {
    content: "";
    flex: 0 0 8px;
    height: 8px;
    background: var(--accent);
    transform: translateY(.55em);
}

.gpw-home details {
    padding: 14px 0;
}

.gpw-home summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 44px;
    font-size: var(--s-body);
    font-weight: 500;
    letter-spacing: -.02em;
    list-style: none;
    cursor: pointer;
}

.gpw-home summary::-webkit-details-marker {
    display: none;
}

.gpw-home summary::after {
    content: "";
    flex: 0 0 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    transition: transform .2s;
}

.gpw-home details[open] summary::after {
    transform: rotate(-135deg);
}

.gpw-home details p {
    max-width: 48ch;
    padding-top: 6px;
    color: var(--muted);
}

.gpw-home .faq-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 28px;
    margin-top: 32px;
}

.gpw-home .faq-pics {
    position: relative;
    grid-column: 3;
    padding-bottom: 80px;
}

.gpw-home .faq-pics .tall {
    margin: 0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--surface);
}

.gpw-home .faq-pics .sq {
    position: absolute;
    left: -40px;
    bottom: 0;
    width: 38%;
    margin: 0;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--f-red);
}

.gpw-home .faq-pics img,
.gpw-home .faq-pics svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 820px) {
    .gpw-home .faq-in {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .gpw-home .faq-pics {
        grid-column: 1;
        order: -1;
        padding-bottom: 40px;
    }

    .gpw-home .faq-pics .sq {
        left: auto;
        right: 0;
        bottom: 0;
    }
}

/* ---------- closing sentence ---------- */
.gpw-home .close {
    padding-block: clamp(96px, 14vh, 180px) clamp(72px, 10vh, 120px);
}

.gpw-home .close .close-title {
    max-width: 34ch;
    margin-bottom: 24px;
    font-size: var(--s-lead);
    font-weight: 500;
    letter-spacing: -.02em;
    line-height: 1.3;
}

/* The theme footer follows straight on: the closing block already ends with its own space. */
body.home .site-footer {
    margin-top: 0;
}

/* ---------- entrances ----------
   Nothing is hidden until front.js has run and marked the page ready (.is-ready); anything already
   on screen at that moment is shown at once, so content never depends on the script. */
.gpw-home.is-ready .pre {
    opacity: 0;
    transform: translateY(24px);
}

.gpw-home .rise {
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

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

    .gpw-home *,
    .gpw-home *::before,
    .gpw-home *::after {
        animation: none !important;
        transition: none !important;
    }

    .gpw-home.is-ready .pre {
        opacity: 1;
        transform: none;
    }
}
