/* Home and /christmas/: the object, large. */

/* ---------- 1. Hero: the object cropped by three edges ---------- */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    align-items: center;
    min-height: calc(100svh - var(--header-h));
    min-height: max(620px, calc(100svh - var(--header-h)));
    overflow: hidden;
    background: var(--bg);
}

.hero__object {
    position: absolute;
    inset: 0 30% 0 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
    mix-blend-mode: multiply;
    animation: shutter 1.1s var(--ease-out) both;
}

.hero__img {
    position: absolute;
    top: -61%;
    left: -35%;
    width: auto;
    max-width: none;
    height: 230%;
    aspect-ratio: 1;
    object-fit: contain;
    transform: rotate(14deg);
    animation: settle 1.1s var(--ease-out) both;
}

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

@keyframes settle {
    from { transform: rotate(14deg) scale(1.12); }
    to { transform: rotate(14deg) scale(1); }
}

.hero__text {
    grid-column: 6 / -1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: var(--margin);
    text-align: right;
}

.hero__title {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.3;
}

.hero__display {
    position: relative;
    z-index: 1;
    font-size: var(--step-display);
}

.hero__display > span {
    display: block;
}

.hero__sentence {
    position: relative;
    z-index: 3;
    display: block;
    max-width: 28ch;
    margin: clamp(24px, 3vw, 40px) 0 28px;
    letter-spacing: -.01em;
}

.hero__action {
    position: relative;
    z-index: 3;
}

@media (max-width: 900px) {
    .hero {
        display: block;
        min-height: 0;
        padding-top: 52svh;
        padding-bottom: 40px;
    }

    .hero__object {
        inset: 0 0 auto 0;
        height: 52svh;
    }

    .hero__img {
        top: -62%;
        left: -62vw;
        width: 230vw;
        height: auto;
    }

    .hero__text {
        padding-right: var(--margin);
    }

    .hero__display {
        margin-top: -4vw;
        font-size: 19vw;
    }

    .hero__sentence {
        margin: 20px 0 0;
        font-size: var(--step-body);
    }

    .hero__object {
        inset: 0 0 auto 0;
    }

    /* The action docks at the bottom-right while the hero is on screen. */
    .hero__action {
        position: fixed;
        right: var(--margin);
        bottom: calc(16px + env(safe-area-inset-bottom));
        z-index: 25;
        transition: opacity .2s ease, translate .2s var(--ease-out), transform .12s var(--ease-out);
    }

    /* Above the cookie banner while it is open. */
    html.consent-open .hero__action {
        bottom: calc(var(--consent-h, 200px) + 16px + env(safe-area-inset-bottom));
    }

    .hero.is-past .hero__action {
        opacity: 0;
        pointer-events: none;
        translate: 0 12px;
    }
}

/* ---------- 2. Showcase and the live preview ---------- */
.showcase {
    margin-top: var(--section-gap);
    overflow: hidden;
}

.preview {
    align-items: center;
    row-gap: 32px;
}

.preview__figure {
    grid-column: 1 / span 7;
    margin: 0;
    padding: clamp(16px, 3vw, 48px);
    background: var(--surface);
    border-radius: var(--radius);
}

.preview__bauble {
    width: min(100%, 560px);
    margin: 0 auto;
}

.preview__name {
    font-family: var(--font);
    font-weight: 800;
    letter-spacing: -.03em;
}

.preview__bauble [data-detail-fill],
.preview__bauble [data-detail-stroke],
.preview__bauble [data-ground] {
    transition: fill .25s, stroke .25s;
}

.preview__caption {
    margin-top: 12px;
    color: var(--muted);
    font-size: var(--step-small);
    text-align: center;
}

.preview__controls {
    grid-column: 8 / -1;
}

.preview__title {
    margin-bottom: 28px;
    font-size: var(--step-head);
    text-transform: lowercase;
}

.preview__label {
    display: block;
    margin-bottom: 8px;
}

.preview__input {
    font-size: var(--step-lead);
    font-weight: 600;
}

.preview__limit {
    margin: 8px 0 24px;
    color: var(--muted);
    font-size: var(--step-small);
}

.preview__colours {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

.preview__colours legend {
    margin-bottom: 8px;
    padding: 0;
    font-weight: 600;
}

.preview__text {
    max-width: 44ch;
}

@media (max-width: 900px) {
    .preview__figure,
    .preview__controls {
        grid-column: 1 / -1;
    }

    /* Keep the preview's button clearly apart from the next section's heading. */
    .preview__action {
        margin-bottom: 32px;
    }
}

/* ---------- 3. How it works: tiles that grow ---------- */
.tiles {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    margin-top: var(--section-gap);
}

.tiles__title {
    grid-column: 1 / span 7;
    grid-row: 1;
    align-self: start;
    font-size: var(--step-head);
    text-transform: lowercase;
}

.tiles__row {
    display: contents;
    list-style: none;
}

.tile {
    grid-row: 1;
    align-self: end;
}

.tile--1 { grid-column: 1 / span 3; }
.tile--2 { grid-column: 4 / span 4; }
.tile--3 { grid-column: 8 / span 5; }

.tile__box {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
}

.tile--1 .tile__box { height: 22vh; min-height: 200px; }
.tile--2 .tile__box { height: 30vh; min-height: 260px; }
.tile--3 .tile__box { height: 40vh; min-height: 320px; }

.tile__box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6%;
    mix-blend-mode: multiply;
}

.tile__box--photo img {
    padding: 0;
    object-fit: cover;
    mix-blend-mode: normal;
}

.tile__name {
    margin: 18px 0 6px;
    font-size: var(--step-lead);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.tile__text {
    max-width: 36ch;
}

/* The "Typed" tile: a phone-sized crop of the name box on the product page. */
.tile__phone {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 82%;
    padding: 18px;
    border-radius: 14px;
    background: var(--bg);
    font-size: var(--step-small);
}

.tile__phone-label {
    font-weight: 600;
}

.tile__phone-input {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius);
    background: var(--surface);
    font-size: var(--step-body);
    font-weight: 600;
}

.tile__caret {
    width: 2px;
    height: 1.2em;
    margin-left: 2px;
    background: var(--ink);
    animation: caret 1s steps(1) infinite;
}

@keyframes caret {
    50% { opacity: 0; }
}

.tile__phone-help {
    color: var(--muted);
}

@media (max-width: 900px) {
    .tiles {
        display: block;
    }

    .tiles__title {
        margin-bottom: 28px;
    }

    .tiles__row {
        display: grid;
        gap: 28px;
        margin: 0;
        padding: 0;
    }

    .tile,
    .tile--1,
    .tile--2,
    .tile--3 {
        grid-column: auto;
        grid-row: auto;
    }

    .tile--1 .tile__box { height: 34vw; min-height: 180px; }
    .tile--2 .tile__box { height: 46vw; min-height: 220px; }
    .tile--3 .tile__box { height: 62vw; min-height: 260px; }

    .tile__phone {
        width: min(82%, 320px);
    }
}

/* ---------- 4. The Christmas range: one composition, products whole ---------- */
.range {
    margin-top: var(--section-gap);
}

.range__title {
    margin-bottom: clamp(24px, 3vw, 48px);
    font-size: var(--step-head);
    text-transform: lowercase;
}

.range__list {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: auto;
    column-gap: var(--gutter);
    row-gap: var(--gutter);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* The bauble leads: half the width, as tall as the three rows beside it. */
.range__item--lead {
    grid-column: 1 / span 6;
    grid-row: 1 / span 3;
}

.range__item:not(.range__item--lead) {
    grid-column: 7 / -1;
}

.range__link {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: center;
    gap: var(--gutter);
    height: 100%;
    color: var(--ink);
    text-decoration: none;
}

.range__item--lead .range__link {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    align-items: stretch;
}

.range__media {
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: var(--radius);
    background: var(--surface);
}

.range__item--lead .range__media {
    aspect-ratio: auto;
    min-height: 0;
}

.range__media img {
    width: 100%;
    height: 100%;
    padding: 8%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform .2s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .range__link:hover .range__media img {
        transform: scale(1.03);
    }
}

.range__name {
    margin: 0 0 6px;
    font-size: var(--step-lead);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.range__item--lead .range__name {
    margin-top: 16px;
}

@media (hover: hover) and (pointer: fine) {
    .range__link:hover .range__name {
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-underline-offset: .12em;
    }
}

.range__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.range__price {
    font-weight: 600;
}

.range__price .woocommerce-Price-amount,
.range__price bdi {
    color: var(--ink);
}

@media (max-width: 900px) {
    .range__item--lead,
    .range__item:not(.range__item--lead) {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .range__item--lead .range__media {
        aspect-ratio: 1;
    }
}

/* ---------- 5. Facts band ---------- */
.facts {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    margin-top: var(--section-gap);
    padding-top: clamp(64px, 7vw, 112px);
    padding-bottom: clamp(64px, 7vw, 112px);
    background: var(--field-1);
    color: var(--field-1-ink);
}

.facts__title {
    grid-column: 1 / span 5;
    font-size: var(--step-head);
    text-transform: lowercase;
}

.facts__list {
    grid-column: 7 / -1;
    display: grid;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--step-lead);
    font-weight: 600;
    line-height: 1.25;
}

@media (max-width: 900px) {
    .facts__title,
    .facts__list {
        grid-column: 1 / -1;
    }

    .facts__list {
        margin-top: 40px;
    }
}

/* ---------- 6. Custom printing ---------- */
.custom {
    align-items: center;
    row-gap: 32px;
    margin-top: var(--section-gap);
}

.custom__copy {
    grid-column: 1 / span 6;
}

.custom__copy p {
    max-width: 44ch;
}

.custom__title {
    margin-bottom: 28px;
    font-size: var(--step-head);
}

.custom__media {
    grid-column: 7 / -1;
    background: var(--surface);
    border-radius: var(--radius);
}

.custom__media img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 8%;
    mix-blend-mode: multiply;
}

@media (max-width: 900px) {
    .custom__copy,
    .custom__media {
        grid-column: 1 / -1;
    }
}

/* ---------- 7. CTA: the object returns ---------- */
.cta {
    position: relative;
    align-items: center;
    min-height: 70svh;
    margin-top: var(--section-gap);
    padding-right: var(--margin);
    overflow: hidden;
}

.cta__object {
    position: relative;
    grid-column: 1 / span 8;
    align-self: stretch;
    min-height: 70svh;
}

.cta__object img {
    position: absolute;
    left: -22%;
    bottom: -24%;
    width: 130%;
    max-width: none;
    height: auto;
    mix-blend-mode: multiply;
    transform: rotate(-8deg);
}

.cta__text {
    grid-column: 10 / -1;
}

.cta__title {
    margin-bottom: 20px;
    font-size: var(--step-head);
    text-transform: lowercase;
}

.cta__price {
    font-weight: 600;
}

@media (max-width: 900px) {
    .cta {
        display: flex;
        flex-direction: column-reverse;
        min-height: 0;
        padding-right: 0;
    }

    .cta__text {
        padding: 0 var(--margin);
    }

    .cta__text .btn {
        width: 100%;
    }

    .cta__object {
        width: 100%;
        min-height: 55svh;
        margin-top: 24px;
    }

    .cta__object img {
        left: auto;
        right: -40%;
        bottom: -30%;
        width: 130vw;
    }
}

/* ---------- 8. FAQ: wide heading, indented questions ---------- */
.faq {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    margin-top: var(--section-gap);
}

.faq__title {
    grid-column: 1 / -1;
    margin-bottom: 80px;
    font-size: var(--step-head);
    text-transform: lowercase;
}

.faq__list {
    grid-column: 5 / -1;
    display: grid;
    gap: 36px;
}

.faq__item {
    margin: 0 -24px;
    padding: 0 24px;
    border-radius: var(--radius);
    transition: background-color .2s;
}

.faq__item[open] {
    padding-top: 24px;
    padding-bottom: 24px;
    background: var(--surface);
}

.faq__item summary {
    position: relative;
    display: block;
    padding-right: 48px;
    font-size: var(--step-lead);
    line-height: 1.25;
    letter-spacing: -.02em;
    cursor: pointer;
    list-style: none;
}

@media (hover: hover) and (pointer: fine) {
    .faq__item summary:hover {
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-underline-offset: .18em;
    }
}

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

.faq__item summary::after {
    content: "";
    position: absolute;
    top: .35em;
    right: 8px;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: rotate(45deg);
    transition: transform .2s var(--ease-out);
}

.faq__item[open] summary::after {
    top: .55em;
    transform: rotate(-135deg);
}

.faq__item p {
    max-width: 48ch;
    margin: 16px 0 0;
}

/* Opening: the answer fades and rises into place (transform and opacity, no height animation). */
.faq__item[open] summary ~ * {
    animation: faq-in .2s var(--ease-out);
}

@keyframes faq-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@media (max-width: 900px) {
    .faq {
        display: block;
    }

    .faq__title {
        margin-bottom: 40px;
        font-size: 10vw;
    }

    .faq__list {
        gap: 28px;
    }

    .faq__item {
        margin: 0 calc(var(--margin) * -1);
        padding-left: var(--margin);
        padding-right: var(--margin);
    }

    .faq__item summary {
        font-size: 19px;
    }
}
