:root {
    --font-sans: 'MontserratLocal', ui-sans-serif, system-ui, sans-serif;
    --font-serif: 'MillerBannerLight', Georgia, serif;
    --font-display: 'MillerBannerBlack', Georgia, serif;
    --black: #040404;
    --ink: #2b2726;
    --gold: #d9bd83;
    --pink: #f7d7db;
    --rose: #f1aeba;
    --white: #fff7f8;
}

@font-face {
    font-family: 'MontserratLocal';
    src: url('/fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MillerBannerLight';
    src: url('/fonts/SVN-Miller Banner.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MillerBannerBlack';
    src: url('/fonts/SVN-Miller Banner.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RageItalic';
    src: url('/fonts/Rage Italic Std Regular.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'GabriolaLocal';
    src: url('/fonts/gabriola.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PFScandal';
    src: url('/fonts/PF Scandal Pro Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.font-miller-light {
    font-family: 'MillerBannerLight', Georgia, serif;
}

.font-miller-black {
    font-family: 'MillerBannerBlack', Georgia, serif;
}

.font-montserrat {
    font-family: 'MontserratLocal', ui-sans-serif, system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-sans);
}

button,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-shell {
    overflow: hidden;
    background: var(--black);
}

.hero-section {
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: start center;
    background: #e9a0ac;
    isolation: isolate;
}

.hero-video,
.hero-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-fallback {
    z-index: -2;
    background:
        radial-gradient(circle at 52% 32%, rgba(255, 247, 248, 0.52), transparent 28rem),
        linear-gradient(120deg, #f8d5d4 0%, #ed93a7 48%, #742b31 100%);
}

.hero-video {
    z-index: -1;
}

.hero-content {
    width: min(88vw, 24rem);
    padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.hero-logo {
    width: 100%;
    max-height: 5rem;
    object-fit: contain;
    filter: drop-shadow(0 0.25rem 0.6rem rgba(0, 0, 0, 0.2));
}

.hero-legal {
    position: absolute;
    left: 50%;
    bottom: 4.9rem;
    z-index: 1;
    width: min(88vw, 26rem);
    margin: 0;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.86);
    font-family: var(--font-sans);
    font-size: clamp(0.58rem, 1vw, 0.78rem);
    font-weight: 700;
    letter-spacing: 0;
    text-align: center;
}

.scroll-cue {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    width: 2rem;
    height: 2rem;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
}

.scroll-cue span {
    width: 1rem;
    height: 1rem;
    border-right: 0.16rem solid rgba(255, 255, 255, 0.82);
    border-bottom: 0.16rem solid rgba(255, 255, 255, 0.82);
    transform: rotate(45deg);
}

.dark-panel {
    position: relative;
    background: var(--black);
}

.section-inner {
    position: relative;
    width: min(100%, 86rem);
    margin: 0 auto;
    padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 4vw, 3rem);
    z-index: 1;
}

.section-copy {
    width: min(100%, 31rem);
    margin-bottom: clamp(2.2rem, 5vw, 3.8rem);
    color: rgba(255, 247, 248, 0.72);
    font-weight: 700;
    line-height: 1.75;
}

.section-copy h1 {
    margin: 0;
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    color: rgba(255, 247, 248, 0.7);
}

.section-copy p {
    margin: 0.45rem 0 0;
}

.gold-ribbon {
    position: absolute;
    width: min(82rem, 128vw);
    max-width: none;
    top: -4rem;
    left: 50%;
    transform: translateX(-44%);
    opacity: 0.88;
    pointer-events: none;
}

.slider {
    position: relative;
}

.slider-viewport {
    overflow: hidden;
}

.slider-track {
    --slide-size: calc((100% - (clamp(1.5rem, 5vw, 4rem) * 2)) / 3);
    display: flex;
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
    transition: transform 360ms ease;
    will-change: transform;
}

.slider-card {
    flex: 0 0 var(--slide-size);
    aspect-ratio: 1 / 1.34;
    display: grid;
    place-items: end center;
    background: #f7d9dd;
    overflow: hidden;
}

.slider-card img {
    width: 100%;
    /* height: 94%;
    object-fit: contain; */
    object-position: center bottom;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: clamp(2.5rem, 5vw, 4rem);
    height: clamp(2.5rem, 5vw, 4rem);
    border: 0;
    background: transparent;
    transform: translateY(-50%);
}

.slider-arrow-left {
    left: clamp(-3.25rem, -5vw, -1rem);
}

.slider-arrow-right {
    right: clamp(-3.25rem, -5vw, -1rem);
}

.slider-arrow span {
    display: block;
    width: 1.55rem;
    height: 1.55rem;
    border-top: 0.22rem solid var(--pink);
    border-left: 0.22rem solid var(--pink);
}

.slider-arrow-left span {
    transform: rotate(-45deg);
}

.slider-arrow-right span {
    transform: rotate(135deg);
}

.how-section {
    min-height: 40rem;
    padding: clamp(3.8rem, 6vw, 5.2rem) clamp(1.25rem, 3.5vw, 4rem) clamp(4.7rem, 7vw, 6.4rem);
    overflow: hidden;
}

.how-inner {
    position: relative;
    z-index: 1;
    width: min(100%, 86rem);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(20rem, 0.95fr) minmax(28rem, 1.05fr);
    gap: 0;
    align-items: start;
}

.how-section::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: clamp(4.8rem, 7vw, 5.8rem);
    background: var(--pink);
}

.how-art,
.how-content {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.how-art {
    align-self: stretch;
    min-height: 28rem;
}

.how-art img {
    /* position: absolute;
    left: 0;
    top: 0;
    width: min(46rem, 68vw);
    max-width: none;
    margin-left: clamp(-17rem, -18vw, -7rem);
    transform: translateY(clamp(-12rem, -17vw, -7rem)) rotate(-2deg);
    filter: drop-shadow(1rem 1.35rem 1.2rem rgba(0, 0, 0, 0.58)); */

position: absolute;
  left: -10%;
  top: 9%;
  max-width: none;
    z-index: 999;
    height: 100%;

}

.how-content {
    width: min(100%, 40rem);
    justify-self: center;
    padding-top: clamp(3.8rem, 6.5vw, 5.8rem);
}

.how-content h2 {
    position: relative;
    width: max-content;
    margin: 0 0 clamp(3.6rem, 6vw, 4.8rem) clamp(-7.2rem, -9vw, -3.5rem);
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 4.7vw, 4.15rem);
    color: var(--pink);
    text-align: center;
}

/* .how-content h2::before {
    content: '';
    position: absolute;
    left: clamp(-6.8rem, -9vw, -4.2rem);
    bottom: -1rem;
    width: clamp(4rem, 9vw, 8rem);
    height: clamp(4rem, 7vw, 5.8rem);
    border-top: 0.08rem solid rgba(255, 247, 248, 0.18);
    border-left: 0.08rem solid rgba(255, 247, 248, 0.18);
} */

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

.steps-list li {
    display: grid;
    grid-template-columns: 3.25rem 1fr;
    gap: 1.05rem;
    align-items: start;
    padding: 1.55rem 0 1.55rem 0.6rem;
    border-top: 0.08rem solid rgba(217, 189, 131, 0.48);
}

.steps-list li:first-child {
    border-top: 0;
}

.steps-list img,
.step-number-fallback {
    width: 2.35rem;
    height: 2.35rem;
}

.steps-list img {
    object-fit: contain;
}

.step-number-fallback {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--pink);
    color: #403736;
    font-family: var(--font-serif);
    font-size: 1.75rem;
    line-height: 1;
}

.steps-list p {
    margin: 0;
    color: rgba(255, 247, 248, 0.68);
    font-size: clamp(0.86rem, 1.2vw, 0.98rem);
    font-weight: 700;
    line-height: 1.75;
    min-width: 0;
}

.customizer-section {
    position: relative;
    background: linear-gradient(to bottom, var(--pink) 0 66%, var(--black) 66% 100%);
    color: var(--ink);
    padding: clamp(4rem, 9vw, 7rem) clamp(1.25rem, 5vw, 4rem) clamp(5rem, 8vw, 8rem);
}

.customizer-inner {
    width: min(100%, 86rem);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(26rem, 38rem) minmax(18rem, 1fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
}

.preview-picker > p {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    color: rgba(43, 39, 38, 0.74);
}

.customizer-stage {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.background-options {
    display: grid;
    gap: 0.65rem;
    justify-items: center;
}

.bottle-preview {
    position: relative;
    aspect-ratio: 773 / 1080;
    --background-opacity: 0.5;
    box-shadow: 0.55rem 0.55rem 0 var(--gold);
    overflow: hidden;
}

.bottle-preview::before,
.bottle-preview::after {
    content: '';
    position: absolute;
    inset: 0;
}

.bottle-preview::before {
    z-index: 0;
    background: var(--preview-background);
}

.bottle-preview::after {
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 28% 70%, rgba(120, 54, 70, 0.2)),
        linear-gradient(180deg, transparent 0 80%, rgba(112, 42, 48, 0.22));
    pointer-events: none;
}

.bg-blush {
    --preview-background: #ef9fac;
}

.bg-gold {
    --preview-background: #d1a35f;
}

.bg-garden {
    --preview-background: #d9899a;
}

.preview-bg,
.preview-bottle {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-bg {
    z-index: 1;
    opacity: var(--background-opacity);
}

.preview-bottle {
    z-index: 2;
    object-fit: cover;
}

.preview-message {
    z-index: 3;
    position: absolute;
    left: 37%;
    top: 47.5%;
    width: 30%;
    max-height: 23%;
    --message-size: 1.6rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-family: 'RageItalic', cursive;
    font-size: var(--message-size);
    font-weight: 400;
    line-height: 0.96;
    text-align: center;
    transform: rotate(-7deg);
    text-wrap: balance;
    text-shadow: 0 0.08rem 0.12rem rgba(0, 0, 0, 0.52);
    overflow: hidden;
}

.preview-message.font-gabriola {
    font-family: 'GabriolaLocal', cursive;
    --message-size: 1.7rem;
    line-height: 0.82;
}

.preview-message.font-pf {
    font-family: 'PFScandal', cursive;
    --message-size: 1.3rem;
    line-height: 0.86;
}

.message-panel {
    padding-block: 2.3rem 1rem;
}

.message-panel h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    color: rgba(43, 39, 38, 0.74);
}

.message-help {
    margin: 0.25rem 0 1rem;
    font-family: var(--font-serif);
    color: rgba(43, 39, 38, 0.58);
}

.message-field {
    display: block;
    position: relative;
}

.message-field span {
    position: absolute;
    left: 0;
    top: -0.55rem;
    z-index: 1;
    padding: 0.18rem 0.5rem;
    background: var(--black);
    color: var(--pink);
    font-size: 0.78rem;
    font-weight: 700;
}

.message-field textarea {
    display: block;
    width: 100%;
    min-height: 9.4rem;
    padding: 1.6rem 1.25rem 1rem;
    border: 0.16rem solid rgba(43, 39, 38, 0.72);
    background: #f4bac3;
    color: rgba(43, 39, 38, 0.68);
    font-size: clamp(1rem, 1.7vw, 1.35rem);
    font-weight: 700;
    line-height: 1.55;
    outline: none;
}

.message-field textarea:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 0.18rem rgba(255, 247, 248, 0.46);
}

.counter {
    margin: 0.5rem 0 1.4rem;
    text-align: right;
    font-size: 0.82rem;
    color: rgba(43, 39, 38, 0.62);
}

.font-options {
    margin: 0 0 clamp(2rem, 5vw, 3.7rem);
}

.font-options p {
    display: block;
    width: max-content;
    margin: 0 0 0.75rem;
    padding: 0.24rem 0.5rem;
    background: var(--black);
    color: var(--pink);
    font-size: 0.78rem;
    font-weight: 700;
}

.font-choice {
    width: 2.6rem;
    height: 2.6rem;
    margin-right: 0.4rem;
    border: 0.12rem solid transparent;
    border-radius: 50%;
    background: var(--black);
    color: var(--white);
    font-family: var(--choice-font), cursive;
    font-size: 1.28rem;
    line-height: 1;
}

.font-choice.is-active {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.12rem rgba(255, 247, 248, 0.48);
}

.background-thumb,
.upload-thumb {
    width: 3.6rem;
}

.background-thumb {
    height: 4.9rem;
    padding: 0;
    border: 0.12rem solid transparent;
    background: transparent;
    overflow: hidden;
}

.background-thumb.is-active {
    border-color: var(--black);
}

.background-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-thumb {
    display: grid;
    justify-items: center;
    gap: 0.2rem;
    margin-top: 0.7rem;
    color: var(--black);
    font-family: var(--font-serif);
    font-size: 0.68rem;
    text-align: center;
    text-decoration: underline;
    cursor: pointer;
}

.upload-thumb input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.upload-icon {
    width: 1.8rem;
    height: 1.8rem;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 16h2V7.8l3.1 3.1 1.4-1.4L12 4 6.5 9.5l1.4 1.4L11 7.8V16Zm-6 2h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.opacity-control {
    width: min(100%, calc(100% - 5.2rem));
    margin: 1.25rem 0 0 5.2rem;
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.55rem 0.6rem;
    align-items: center;
    justify-content: center;
    color: rgba(255, 247, 248, 0.78);
    font-size: 0.74rem;
    letter-spacing: 0;
    text-align: center;
}

.opacity-control input {
    grid-column: 1 / -1;
    width: 100%;
    height: 1rem;
    margin: 0;
    accent-color: var(--white);
}

.opacity-control span {
    justify-self: center;
}

.opacity-control output {
    justify-self: center;
    padding: 0.1rem 0.25rem;
    border: 0.08rem solid rgba(255, 247, 248, 0.62);
    color: rgba(255, 247, 248, 0.86);
}

.primary-action,
.export-actions button {
    min-height: 2.65rem;
    border: 0;
    border-radius: 0.5rem;
    font-family: var(--font-serif);
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    font-weight: 700;
}

.primary-action {
    padding: 0.45rem 1rem;
    background: var(--rose);
    color: var(--black);
    transition: all 0.3s ease;
}

.primary-action:hover {
    background: var(--black);
    color: var(--pink);
}

.primary-action[hidden],
.export-actions[hidden] {
    display: none;
}

.export-actions {
    margin-top: clamp(7rem, 7vw, 5rem);
    /* display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem); */
    color: var(--pink);
}

.export-actions button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
    background: transparent;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.divider {
    width: 0.08rem;
    height: 2.2rem;
    background: currentColor;
}

.download-icon,
.share-icon {
    display: inline-block;
    width: 1.45rem;
    height: 1.45rem;
    background: currentColor;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

.download-icon {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 3h2v9l3.2-3.2 1.4 1.4L12 15.8l-5.6-5.6 1.4-1.4L11 12V3Zm-6 14h2v2h10v-2h2v4H5v-4Z'/%3E%3C/svg%3E");
}

.share-icon {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 16.1c-.8 0-1.5.3-2 .8L8.9 12.8c.1-.3.1-.5.1-.8s0-.5-.1-.8L16 7.1c.5.5 1.2.8 2 .8 1.7 0 3-1.3 3-3s-1.3-3-3-3-3 1.3-3 3c0 .3 0 .5.1.8L8 9.9C7.5 9.4 6.8 9.1 6 9.1c-1.7 0-3 1.3-3 3s1.3 3 3 3c.8 0 1.5-.3 2-.8l7.1 4.2c-.1.2-.1.5-.1.7 0 1.6 1.3 2.9 3 2.9s3-1.3 3-3-1.3-3-3-3Z'/%3E%3C/svg%3E");
}

.status-message {
    min-height: 1.4rem;
    margin: 1rem 0 0;
    color: var(--pink);
    font-size: 0.9rem;
}

.export-canvas {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.site-footer {
    min-height: 30rem;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3rem;
    padding: 5rem 1.25rem;
    background: var(--black);
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-style: italic;
    font-weight: 700;
    text-transform: uppercase;
}

.footer-logo {
    width: min(75vw, 29rem);
    max-height: 7rem;
    object-fit: contain;
}

.social-links {
    display: flex;
    gap: 1.6rem;
    color: rgba(255, 247, 248, 0.78);
}

.social-links a {
    display: grid;
    place-items: center;
    color: inherit;
}

.social-links img {
    width: 1.45rem;
    height: 1.45rem;
    object-fit: contain;
}

@media (max-width: 900px) {
    .slider-track {
        --slide-size: min(74vw, 20rem);
    }

    .slider-viewport {
        width: min(74vw, 20rem);
        margin: 0 auto;
    }

    .slider-arrow-left {
        left: 0;
    }

    .slider-arrow-right {
        right: 0;
    }

    .how-inner,
    .customizer-inner {
        grid-template-columns: 1fr;
    }

    .how-section {
        min-height: auto;
        padding-top: clamp(4rem, 10vw, 6rem);
    }

    .how-art {
        min-height: clamp(25rem, 82vw, 31rem);
        overflow: hidden;
    }

    .how-art img {
        width: min(38rem, 142vw);
        margin-left: clamp(-14rem, -45vw, -8rem);
        transform: translateY(clamp(-6rem, -12vw, -3.5rem)) rotate(-2deg);
    }

    .how-content {
        width: 100%;
        padding-top: 0;
    }

    .how-content h2 {
        width: 100%;
        margin-inline: 0;
        text-align: left;
    }

    .how-content h2::before {
        left: 0;
        width: 5rem;
    }

    .customizer-section {
        background: linear-gradient(to bottom, var(--pink) 0 72%, var(--black) 72% 100%);
    }

    .bottle-preview {
        width: min(100%, 25rem);
    }

    .export-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .opacity-control {
        width: min(100%, 25rem);
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .section-inner,
    .how-section,
    .customizer-section {
        padding-inline: 1rem;
    }

    .steps-list li {
        grid-template-columns: 2.8rem 1fr;
        padding-left: 0;
        min-width: 0;
    }

    .how-content h2 {
        font-size: clamp(2.05rem, 10vw, 2.6rem);
    }

    .how-art {
        min-height: 23rem;
    }

    .how-art img {
        width: min(34rem, 150vw);
        margin-left: -12rem;
        transform: translateY(-4rem) rotate(-2deg);
    }

    .customizer-stage {
        grid-template-columns: 1fr;
    }

    .background-options {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .message-field textarea {
        min-height: 8rem;
    }

    .export-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .divider {
        display: none;
    }
}
