@charset "utf-8";

/* =========================================================================
   Kersvader.co.za — SiteV3
   Pure CSS, no frameworks, no external requests.
   ========================================================================= */

/* --- Handwriting font (local, already licensed with the site) ------------ */
@font-face {
    font-family: 'Kersfees Hand';
    src: url('font/bradley_hand_itc.woff') format('woff'),
         url('font/bradley_hand_itc.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* --- Design tokens ------------------------------------------------------ */
:root {
    --night-0: #050d20;
    --night-1: #0c1a3a;
    --night-2: #16305e;
    --night-3: #1e4278;

    --red: #c8102e;
    --red-deep: #8d0a20;
    --red-glow: #ff2b48;
    --green: #1e7a46;
    --green-light: #35a862;
    --gold: #f6c453;
    --gold-deep: #d79b1e;

    --cream: #fdf6e8;
    --cream-2: #f6ebd6;
    --ink: #3a2a1b;
    --ink-soft: #6b5842;

    --text: #f3f6ff;
    --text-soft: #b9c6e4;

    --radius-s: 10px;
    --radius-m: 18px;
    --radius-l: 28px;

    --shadow-s: 0 2px 6px rgba(0, 0, 0, .25);
    --shadow-m: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-l: 0 24px 60px rgba(0, 0, 0, .45);

    --font-ui: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-hand: 'Kersfees Hand', "Segoe Script", "Bradley Hand", cursive;

    --maxw: 1080px;
}

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

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

body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font-ui);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--night-0);
    background-image:
        radial-gradient(1100px 620px at 12% -8%, rgba(53, 168, 98, .22), transparent 60%),
        radial-gradient(900px 560px at 88% 4%, rgba(200, 16, 46, .28), transparent 62%),
        linear-gradient(180deg, var(--night-2) 0%, var(--night-1) 46%, var(--night-0) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

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

h1, h2, h3 {
    line-height: 1.15;
    margin: 0 0 .4em;
    font-weight: 700;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 2px solid rgba(246, 196, 83, .35);
    transition: color .18s ease, border-color .18s ease;
}

a:hover,
a:focus-visible {
    color: #ffdc8a;
    border-bottom-color: #ffdc8a;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
    border-radius: 4px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* --- Snow canvas -------------------------------------------------------- */
#snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* --- Shell -------------------------------------------------------------- */
.page {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px 64px;
}

/* --- Site header -------------------------------------------------------- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 26px 0 18px;
    text-align: center;
}

.site-header__sleigh {
    width: 110px;
    flex: none;
    border-radius: 14px;
    border: 2px solid rgba(246, 196, 83, .55);
    box-shadow: var(--shadow-s), 0 0 22px rgba(246, 196, 83, .2);
    animation: sleigh-drift 6s ease-in-out infinite;
}

.site-header__title {
    font-family: var(--font-hand);
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 400;
    margin: 0;
    color: var(--gold);
    letter-spacing: .5px;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 0 34px rgba(246, 196, 83, .35);
}

.site-header__title a {
    color: inherit;
    border: 0;
}

.site-header__tagline {
    display: block;
    font-family: var(--font-ui);
    font-size: .72rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--text-soft);
    text-shadow: none;
    margin-top: 6px;
}

/* Candy-cane rule, drawn in CSS so it stays crisp at any size */
.candy-rule {
    height: 10px;
    border: 0;
    margin: 0 0 32px;
    border-radius: 999px;
    background: repeating-linear-gradient(
        115deg,
        var(--red) 0 14px,
        #fff 14px 28px
    );
    box-shadow: var(--shadow-s), inset 0 0 0 1px rgba(0, 0, 0, .12);
}

/* --- Cards -------------------------------------------------------------- */
.card {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius-l);
    padding: 28px;
    box-shadow: var(--shadow-m);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* --- Hero --------------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 36px;
}

.hero__eyebrow {
    display: inline-block;
    font-size: .74rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #ffd98a;
    background: rgba(246, 196, 83, .12);
    border: 1px solid rgba(246, 196, 83, .35);
    border-radius: 999px;
    padding: 6px 14px;
    margin-bottom: 14px;
}

.hero__title {
    font-family: var(--font-hand);
    font-weight: 400;
    font-size: clamp(2rem, 5.2vw, 3.1rem);
    color: #fff;
    text-shadow: 0 3px 16px rgba(0, 0, 0, .5);
}

.hero__lead {
    color: var(--text-soft);
    font-size: 1.05rem;
    max-width: 46ch;
}

.hero__art {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero__art img {
    width: 100%;
    max-width: 340px;
    filter: drop-shadow(0 26px 34px rgba(0, 0, 0, .55));
    animation: bob 5s ease-in-out infinite;
}

/* --- Countdown ---------------------------------------------------------- */
.countdown {
    margin: 22px 0 8px;
}

.countdown__label {
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 10px;
}

.countdown__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-width: 420px;
}

.countdown__cell {
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-m);
    padding: 12px 6px 10px;
    text-align: center;
    box-shadow: var(--shadow-s);
}

.countdown__num {
    display: block;
    font-size: clamp(1.5rem, 4.6vw, 2.1rem);
    font-weight: 800;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.countdown__unit {
    display: block;
    font-size: .64rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-top: 2px;
}

/* --- Info strip --------------------------------------------------------- */
.info-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.info-strip .card {
    padding: 22px 24px;
}

.info-strip h2,
.info-strip h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: .35em;
}

.info-strip p {
    margin: 0;
    color: var(--text-soft);
    font-size: .97rem;
}

/* --- The letter (paper) ------------------------------------------------- */
.letter {
    position: relative;
    background: var(--cream);
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 120px),
        repeating-linear-gradient(180deg, transparent 0 37px, rgba(58, 42, 27, .07) 37px 38px);
    color: var(--ink);
    border-radius: var(--radius-l);
    padding: 40px clamp(20px, 5vw, 56px) 44px;
    box-shadow: var(--shadow-l);
    overflow: hidden;
}

/* torn / tape detail at the top of the sheet */
.letter::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(115deg, var(--red) 0 12px, #fff 12px 24px);
    opacity: .85;
}

.letter__stockings {
    position: absolute;
    top: 14px;
    right: clamp(12px, 4vw, 40px);
    width: clamp(110px, 20vw, 190px);
    pointer-events: none;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18));
}

.letter__greeting {
    font-family: var(--font-hand);
    font-size: clamp(1.7rem, 4.6vw, 2.4rem);
    color: var(--red-deep);
    margin: 0 0 24px;
    max-width: 60%;
}

.letter__sign-off {
    font-family: var(--font-hand);
    font-size: 1.5rem;
    color: var(--red-deep);
    margin-top: 28px;
}

/* --- Form --------------------------------------------------------------- */
.field {
    margin-bottom: 26px;
}

.field__label {
    display: block;
    font-family: var(--font-hand);
    font-size: 1.35rem;
    color: var(--ink);
    margin-bottom: 8px;
}

.field__hint {
    display: block;
    font-family: var(--font-ui);
    font-size: .82rem;
    color: var(--ink-soft);
    margin-top: 4px;
}

/* Handwriting-on-a-line inputs */
.input-line,
.input-area,
.input-select {
    font-family: var(--font-hand);
    font-size: 1.45rem;
    color: #17418a;
    width: 100%;
    max-width: 460px;
    background: transparent;
    border: 0;
    border-bottom: 2px dashed rgba(58, 42, 27, .38);
    padding: 4px 6px 6px;
    transition: border-color .18s ease, background-color .18s ease;
}

.input-line::placeholder,
.input-area::placeholder {
    color: rgba(58, 42, 27, .3);
    font-family: var(--font-ui);
    font-size: .95rem;
}

.input-line:hover,
.input-area:hover,
.input-select:hover {
    border-bottom-color: var(--red);
}

.input-line:focus,
.input-area:focus,
.input-select:focus {
    outline: none;
    border-bottom: 2px solid var(--red);
    background: rgba(200, 16, 46, .06);
    border-radius: 6px 6px 0 0;
}

.input-select {
    max-width: 160px;
    border: 2px solid rgba(58, 42, 27, .25);
    border-radius: var(--radius-s);
    background: #fff;
    padding: 8px 12px;
    cursor: pointer;
}

.input-area {
    max-width: 100%;
    min-height: 140px;
    resize: vertical;
    border: 2px dashed rgba(58, 42, 27, .3);
    border-radius: var(--radius-m);
    padding: 14px 16px;
    line-height: 1.5;
    background: rgba(255, 255, 255, .55);
}

.input-area:focus {
    border-style: solid;
    border-color: var(--red);
    border-radius: var(--radius-m);
}

.field--inline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
}

.field--inline .field__label {
    margin-bottom: 0;
}

.field--inline .input-line {
    max-width: 320px;
    flex: 1 1 200px;
}

/* Choice chips (radio buttons) */
.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border: 0;
    margin: 0;
    padding: 0;
}

.choices--stack {
    flex-direction: column;
    align-items: flex-start;
}

.choice {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 14px;
    background: #fff;
    border: 2px solid rgba(58, 42, 27, .2);
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    transition: transform .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.choice:hover {
    transform: translateY(-2px);
    border-color: var(--red);
    box-shadow: 0 6px 16px rgba(200, 16, 46, .18);
}

.choice input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.choice__dot {
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 50%;
    border: 2px solid rgba(58, 42, 27, .35);
    background: #fff;
    position: relative;
    transition: border-color .15s ease, background-color .15s ease;
}

.choice__dot::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--red);
    transform: scale(0);
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}

.choice input:checked ~ .choice__dot {
    border-color: var(--red);
}

.choice input:checked ~ .choice__dot::after {
    transform: scale(1);
}

.choice:has(input:checked) {
    background: linear-gradient(180deg, #fff, #ffeef1);
    border-color: var(--red);
    box-shadow: 0 6px 18px rgba(200, 16, 46, .22);
}

.choice input:focus-visible ~ .choice__dot {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* Gift wish list */
.wishlist {
    display: grid;
    gap: 14px;
    max-width: 560px;
}

.wish {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wish__num {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    box-shadow: var(--shadow-s);
}

.wish .input-line {
    max-width: none;
    flex: 1;
}

.gifts-art {
    float: right;
    width: clamp(110px, 18vw, 170px);
    margin: 0 0 12px 22px;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .2));
}

/* Validation */
.field-error {
    display: none;
    font-family: var(--font-ui);
    font-size: .86rem;
    font-weight: 600;
    color: var(--red);
    margin-top: 6px;
}

.field.is-invalid .field-error {
    display: block;
}

.field.is-invalid .input-line,
.field.is-invalid .input-area,
.field.is-invalid .input-select {
    border-color: var(--red);
    background: rgba(200, 16, 46, .07);
}

.field.is-invalid .choice {
    border-color: rgba(200, 16, 46, .55);
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-ui);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .01em;
    padding: 14px 32px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, var(--red-glow), var(--red) 55%, var(--red-deep));
    box-shadow: 0 10px 24px rgba(200, 16, 46, .38), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(200, 16, 46, .45), inset 0 1px 0 rgba(255, 255, 255, .45);
    filter: saturate(1.08);
}

.btn:active {
    transform: translateY(0);
}

.btn--green {
    background: linear-gradient(180deg, var(--green-light), var(--green) 60%, #146034);
    box-shadow: 0 10px 24px rgba(30, 122, 70, .38), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn--green:hover {
    box-shadow: 0 16px 32px rgba(30, 122, 70, .45), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.btn--gold {
    background: linear-gradient(180deg, #ffd97a, var(--gold) 55%, var(--gold-deep));
    color: #4a3106;
    box-shadow: 0 10px 24px rgba(214, 155, 30, .38), inset 0 1px 0 rgba(255, 255, 255, .55);
}

.btn--ghost {
    background: transparent;
    color: var(--gold);
    border: 2px solid rgba(246, 196, 83, .5);
    box-shadow: none;
}

.btn--ghost:hover {
    background: rgba(246, 196, 83, .12);
    box-shadow: none;
}

/* A button that happens to be a link must keep its own colour: the generic
   a:hover rule above is more specific than .btn, and would otherwise wash the
   label out to pale gold on hover. */
a.btn,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:focus,
a.btn:focus-visible,
a.btn:active {
    color: #fff;
    border-bottom: 0;
    text-decoration: none;
}

a.btn--gold,
a.btn--gold:link,
a.btn--gold:visited,
a.btn--gold:hover,
a.btn--gold:focus,
a.btn--gold:focus-visible,
a.btn--gold:active {
    color: #4a3106;
}

a.btn--ghost,
a.btn--ghost:link,
a.btn--ghost:visited,
a.btn--ghost:hover,
a.btn--ghost:focus,
a.btn--ghost:focus-visible,
a.btn--ghost:active {
    color: var(--gold);
}

.btn--lg {
    font-size: 1.2rem;
    padding: 18px 44px;
}

.btn__icon {
    font-size: 1.1em;
    line-height: 1;
}

.form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 34px;
    text-align: center;
}

.form-actions .field__hint {
    color: var(--ink-soft);
}

/* --- Sending page ------------------------------------------------------- */
.sending {
    text-align: center;
    padding: 24px 0 60px;
}

.sending__stage {
    position: relative;
    max-width: 460px;
    margin: 0 auto 28px;
    height: min(62vh, 440px);
    display: grid;
    place-items: center;
}

.sending__stage img {
    grid-area: 1 / 1;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 34px rgba(0, 0, 0, .5));
    border-radius: var(--radius-m);
    opacity: 0;
    transform: scale(.96);
    transition: opacity .6s ease, transform .6s ease;
}

.sending__stage img.is-visible {
    opacity: 1;
    transform: scale(1);
}

.sending__msg {
    font-family: var(--font-hand);
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    color: #fff;
    min-height: 1.4em;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .5);
    transition: color .5s ease;
}

.progress {
    width: min(420px, 100%);
    height: 12px;
    margin: 22px auto 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    overflow: hidden;
}

.progress__bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: repeating-linear-gradient(115deg, var(--red) 0 12px, #fff 12px 24px);
    transition: width .4s linear;
}

/* --- Reply page --------------------------------------------------------- */
.reply {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(230px, .7fr);
    gap: 28px;
    align-items: start;
}

.reply__seal {
    display: block;
    width: calc(100% + 2 * clamp(20px, 5vw, 56px));
    margin: -40px 0 28px calc(-1 * clamp(20px, 5vw, 56px));
    max-width: none;
}

.reply__body {
    font-family: var(--font-hand);
    font-size: clamp(1.15rem, 2.4vw, 1.4rem);
    line-height: 38px;          /* matches the ruling drawn on .letter */
    color: var(--ink);
}

.reply__body p {
    margin: 0 0 38px;
}

.reply__body ol {
    margin: 0 0 38px;
    padding-left: 1.4em;
}

.reply__body li {
    margin-bottom: 0;
}

.reply__body i,
.reply__body em {
    color: var(--red-deep);
}

.audio-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 20px 22px;
    margin-bottom: 26px;
    background: linear-gradient(180deg, rgba(30, 122, 70, .22), rgba(30, 122, 70, .1));
    border: 1px solid rgba(53, 168, 98, .4);
    border-radius: var(--radius-m);
}

.audio-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.reply__aside {
    position: sticky;
    top: 22px;
    display: grid;
    gap: 18px;
}

.reply__aside img {
    width: 100%;
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-m);
}

.aside-note {
    font-size: .92rem;
    color: var(--text-soft);
}

.loading-note {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--ink-soft);
}

/* --- Footer ------------------------------------------------------------- */
.site-footer {
    position: relative;
    z-index: 2;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 28px 20px 40px;
    text-align: center;
    color: var(--text-soft);
    font-size: .88rem;
}

.site-footer a {
    font-weight: 600;
}

/* --- Animations --------------------------------------------------------- */
@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

@keyframes sleigh-drift {
    0%, 100% { transform: translateX(0) rotate(-1deg); }
    50%      { transform: translateX(8px) rotate(1deg); }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
    animation: fade-up .6s ease both;
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__lead {
        margin-left: auto;
        margin-right: auto;
    }

    .countdown__grid {
        margin: 0 auto;
    }

    .hero__art {
        order: -1;
    }

    .hero__art img {
        max-width: 250px;
    }

    .reply {
        grid-template-columns: 1fr;
    }

    .reply__aside {
        position: static;
    }
}

@media (max-width: 620px) {
    body {
        font-size: 16px;
    }

    .site-header {
        flex-direction: column;
        gap: 10px;
        padding-top: 20px;
    }

    .site-header__sleigh {
        width: 92px;
    }

    .letter {
        padding: 34px 18px 36px;
    }

    .letter__greeting {
        max-width: 100%;
    }

    .letter__stockings {
        position: static;
        width: 160px;
        margin: 0 auto 16px;
    }

    .gifts-art {
        float: none;
        margin: 0 auto 16px;
    }

    .countdown__grid {
        gap: 7px;
    }

    .btn--lg {
        width: 100%;
        padding: 16px 20px;
    }
}

/* --- Motion / print preferences ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    #snow {
        display: none;
    }
}

@media print {
    body {
        background: #fff;
        color: #000;
    }

    #snow,
    .site-header__sleigh,
    .reply__aside,
    .audio-card,
    .btn {
        display: none !important;
    }

    .letter {
        box-shadow: none;
    }
}
