@font-face { font-family: "Overlock"; src: url("fonts/Overlock-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Overlock"; src: url("fonts/Overlock-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
    --red: #D71920;
    --red-dark: #b3141a;
    --dark: #231F20;
    --muted: #5d5758;
    --bg: #F0EEEE;
    --bg-darker: #DED9DA;
    --accent: #BDBCBC;
    --white: #FFFFFF;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(35, 31, 32, .04), 0 8px 24px rgba(35, 31, 32, .06);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--dark);
    font-family: "Poppins", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

h1, h2 { font-family: "Overlock", Georgia, serif; font-weight: 700; line-height: 1.15; margin: 0; }

main { flex: 1 0 auto; width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px 48px; }

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--bg-darker);
    display: flex;
    justify-content: center;
    padding: 18px 16px;
}
.logo { display: block; height: 64px; width: auto; }

/* Hero */
.hero { position: relative; padding: 40px 0 28px; overflow: hidden; }
.hero-flower {
    position: absolute;
    right: -60px;
    top: 10px;
    width: 260px;
    height: 210px;
    background: var(--red);
    opacity: .08;
    -webkit-mask: url("flower.svg") no-repeat center / contain;
    mask: url("flower.svg") no-repeat center / contain;
    pointer-events: none;
}
.eyebrow {
    margin: 0 0 8px;
    color: var(--red);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.hero h1 { font-size: clamp(32px, 7vw, 46px); max-width: 15ch; position: relative; }
.lead { color: var(--muted); margin: 16px 0 20px; max-width: 58ch; position: relative; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; position: relative; }
.perks li { position: relative; padding-left: 26px; font-size: 15px; }
.perks li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: .55em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--bg-darker);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 20px;
    margin-top: 20px;
}
.card h2 { font-size: 26px; display: flex; align-items: center; gap: 12px; }
.step {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--white);
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 600;
    flex: none;
}
.hint { color: var(--muted); font-size: 14px; margin: 8px 0 16px; }

/* Coupons */
.coupons { display: grid; gap: 10px; }
.coupon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--bg-darker);
    border-radius: 12px;
    transition: border-color .15s, background-color .15s;
}
.coupon.is-selected { border-color: var(--red); background: #fdf6f6; }
.coupons.has-error .coupon { border-color: var(--red); }
.coupon-info { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 10px; row-gap: 2px; }
.coupon-info label { grid-column: 1 / -1; cursor: pointer; }
.coupon-duration { display: block; font-family: "Overlock", serif; font-weight: 700; font-size: 20px; line-height: 1.2; }
.coupon-name { display: block; color: var(--muted); font-size: 14px; }
.coupon-price { color: var(--red); font-weight: 600; font-size: 17px; }
.badge {
    justify-self: start;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--dark);
    background: var(--bg);
    border-radius: 999px;
    padding: 2px 8px;
}
.coupon-qty { display: grid; justify-items: end; gap: 4px; flex: none; }
.coupon-total { font-size: 12px; color: var(--muted); min-height: 1.2em; }

.stepper {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--bg-darker);
    border-radius: 999px;
    background: var(--white);
    transition: border-color .15s;
}
.coupon.is-selected .stepper { border-color: var(--red); }
.stepper button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bg);
    color: var(--dark);
    font: 500 20px/1 "Poppins", sans-serif;
    cursor: pointer;
    transition: background-color .15s, color .15s, opacity .15s;
}
.stepper button:hover:not(:disabled) { background: var(--red); color: var(--white); }
.stepper button:disabled { opacity: .35; cursor: default; }
.coupon.is-selected .stepper .plus { background: var(--red); color: var(--white); }
.coupon.is-selected .stepper .plus:hover { background: var(--red-dark); }
.stepper input[type="number"] {
    width: 48px;
    min-height: 38px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: center;
    font-weight: 600;
    font-size: 17px;
    -moz-appearance: textfield;
    appearance: textfield;
}
.stepper input[type="number"]:focus-visible { outline: none; }
.stepper:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(215, 25, 32, .2); }
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Subscription */
.subscription { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--bg-darker); }
.subscription-message { margin-top: 12px; }
.js .subscription-message { display: none; }
.js .subscription.is-open .subscription-message { display: block; }

.summary {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--dark);
    color: var(--white);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
}
.summary strong { font-size: 22px; margin-left: auto; }
.summary small { flex-basis: 100%; text-align: right; color: var(--accent); }
.summary small:empty { display: none; }

/* Fields */
.grid { display: grid; gap: 14px; margin-top: 16px; }
.field label, .subscription-message label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.optional { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    background: var(--white);
    color: var(--dark);
    font: inherit;
}
textarea { resize: vertical; }
.coupon-qty > input[type="number"] { width: 88px; text-align: center; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, .check input:focus-visible {
    outline: 3px solid rgba(215, 25, 32, .35);
    outline-offset: 2px;
    border-color: var(--red);
}
[aria-invalid="true"] { border-color: var(--red) !important; }
.field-error { color: var(--red); font-size: 14px; font-weight: 500; margin: 6px 0 0; }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red); flex: none; }

.privacy { color: var(--muted); font-size: 13px; margin: 12px 0 18px; }
.cta {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
    font: 600 16px/1 "Poppins", sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .15s;
}
.cta:hover { background: var(--red-dark); }
.cta[disabled] { opacity: .7; cursor: progress; }
.reassure { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0 0; }

/* Notices */
.notice { border-radius: 12px; padding: 14px 16px; margin-top: 8px; font-size: 15px; }
.notice p { margin: 0 0 6px; }
.notice ul { margin: 0; padding-left: 20px; }
.notice a { color: inherit; }
.notice-error { background: #fdecec; border: 1px solid #f3b9bb; color: #8a1015; }
.notice-info { background: var(--white); border: 1px solid var(--bg-darker); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Thank-you page */
.thanks { text-align: center; padding: 56px 0 24px; }
.thanks h1 { font-size: clamp(30px, 7vw, 42px); margin-bottom: 12px; }
.thanks p { color: var(--muted); max-width: 52ch; margin: 0 auto 12px; }
.thanks .card { display: inline-block; max-width: 420px; margin-top: 12px; padding: 20px 28px; }
.thanks .card p { margin: 0; color: var(--dark); }

.site-footer {
    border-top: 1px solid var(--bg-darker);
    background: var(--white);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 24px 16px;
}
.site-footer p { margin: 2px 0; }
.site-footer strong { color: var(--dark); }

@media (min-width: 640px) {
    .card { padding: 32px; }
    .grid { grid-template-columns: 1fr 1fr; }
    .span-2 { grid-column: 1 / -1; }
    .logo { height: 76px; }
    .hero { padding: 56px 0 32px; }
    .hero-flower { right: -20px; width: 320px; height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* Desktop: wider page, vouchers on the left, address + send on the right.
   The send block sits at the bottom of the right column, aligned with the end of the vouchers card,
   so it follows when the subscription field opens. */
@media (min-width: 1024px) {
    main { max-width: 1280px; padding: 0 40px 64px; }
    .hero h1 { max-width: none; }
    .hero-flower { right: 0; width: 380px; height: 300px; }
    .notice { max-width: 760px; }
    .order-form {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        column-gap: 32px;
    }
    .card-coupons { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
    .card-address { grid-column: 2; grid-row: 1; align-self: start; margin-bottom: 20px; }
    .order-form .send { grid-column: 2; grid-row: 2; align-self: end; }
}
