:root {
    color-scheme: light;
    --paper: #f5f4eb;
    --white: #fffdf7;
    --pine: #143d34;
    --ink: #18352f;
    --subtle: #4b6157;
    --berry: #a5273c;
    --berry-dark: #822034;
    --line: #deded0;
    --serif: Georgia, "Times New Roman", serif;
    font-family: system-ui, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    padding-bottom: clamp(2.5rem, 6vw, 5rem);
    color: var(--ink);
    background:
        radial-gradient(ellipse at 12% 4%, #fbfaf3 0, transparent 42rem),
        radial-gradient(ellipse at 93% 33%, #e8eee2 0, transparent 38rem),
        var(--paper);
    line-height: 1.55;
}

a { color: var(--pine); text-underline-offset: .2em; }
button, input, textarea { font: inherit; }

:focus-visible {
    outline: 3px solid #166a56;
    outline-offset: 3px;
}

.page-width { width: min(74rem, calc(100% - 5rem)); margin-inline: auto; }

.site-header {
    min-height: 6.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: var(--pine);
    text-decoration: none;
    font-weight: 750;
    letter-spacing: -.02em;
}

.brand-mark, .step-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: .9rem;
    width: 2.6rem;
    height: 2.6rem;
}

.brand-mark { color: #fff6dc; background: var(--pine); }

.envelope {
    position: relative;
    display: inline-block;
    width: 1.125rem;
    height: .84rem;
    overflow: hidden;
    border: 1.5px solid currentColor;
    border-radius: .18rem;
}

.envelope::before {
    position: absolute;
    top: -.46rem;
    left: .13rem;
    width: .67rem;
    height: .67rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    border-radius: 0 0 .1rem 0;
    transform: rotate(45deg);
    content: "";
}

.header-link {
    color: var(--pine);
    padding: .52rem .85rem;
    border: 1px solid #d4dbcd;
    border-radius: 1.5rem;
    text-decoration: none;
    font-size: .875rem;
    font-weight: 650;
    text-align: center;
}

.header-link:hover { background: #e5ecdf; }

.skip-link {
    position: absolute;
    z-index: 2;
    top: .5rem;
    left: .5rem;
    padding: .5rem;
    background: var(--white);
    transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: clamp(34rem, 49vw, 39rem);
    border-radius: 2rem;
    overflow: hidden;
    background: var(--white);
    border: 1px solid #e2e3d7;
    box-shadow: 0 1.25rem 3.5rem #153e3410;
}

.hero-content {
    align-self: center;
    min-width: 0;
    padding: clamp(2rem, 4.3vw, 4.6rem);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 1.25rem;
    color: var(--berry-dark);
    font-size: .875rem;
    font-weight: 730;
    letter-spacing: .035em;
}

.eyebrow span { font-size: 1.15rem; line-height: 1; }

h1, h2, h3 { color: var(--pine); }

h1 {
    margin: 0;
    font: 700 clamp(2.6rem, 5.15vw, 4.9rem) / .99 var(--serif);
    letter-spacing: -.052em;
    text-wrap: balance;
}

.heading-dot { color: var(--berry); }

.lede {
    max-width: 30ch;
    margin: 1.4rem 0 1.8rem;
    font-size: clamp(1rem, 1.4vw, 1.16rem);
    color: var(--subtle);
}

.hero-art {
    position: relative;
    min-width: 0;
    min-height: 0;
    margin: .55rem .55rem .55rem 0;
    overflow: hidden;
    border-radius: 1.55rem;
    background: #1d4e51;
}

.hero-art img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 54% 56%; }

.snow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.snow i {
    position: absolute;
    top: 5%;
    width: .24rem;
    height: .24rem;
    border-radius: 100%;
    background: #fff9ef;
    animation: snowfall 15s linear infinite;
}

.snow i:nth-child(1) { left: 12%; animation-delay: -6s; }
.snow i:nth-child(2) { left: 29%; animation-delay: -1s; animation-duration: 17s; }
.snow i:nth-child(3) { left: 45%; animation-delay: -9s; }
.snow i:nth-child(4) { left: 62%; animation-delay: -4s; animation-duration: 19s; }
.snow i:nth-child(5) { left: 77%; animation-delay: -12s; }
.snow i:nth-child(6) { left: 90%; animation-delay: -11s; animation-duration: 18s; }

@keyframes snowfall {
    0% { transform: translate(0, -1rem); opacity: 0; }
    16%, 77% { opacity: .62; }
    100% { transform: translate(-1.75rem, 21rem); opacity: 0; }
}

label {
    display: block;
    margin-bottom: .42rem;
    color: var(--pine);
    font-weight: 680;
    font-size: .9rem;
}

.creator-fields { display: flex; gap: .65rem; align-items: stretch; }
.creator-fields input { flex: 1 1 0; }

input:not([type="hidden"]), textarea {
    width: 100%;
    min-width: 0;
    padding: .75rem .9rem;
    border: 1px solid #bfc9bd;
    border-radius: .7rem;
    background: #fff;
    color: var(--ink);
    line-height: 1.4;
}

input::placeholder, textarea::placeholder { color: #65726a; }
textarea { display: block; min-height: 7.5rem; resize: vertical; }

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 3.1rem;
    padding: .72rem 1.15rem;
    border: 1px solid transparent;
    border-radius: .7rem;
    background: var(--berry);
    box-shadow: 0 .2rem 0 #7f1d30;
    color: #fff;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: background .2s, transform .2s, box-shadow .2s;
}

.button:hover { background: var(--berry-dark); }
.button:active { transform: translateY(.12rem); box-shadow: 0 .08rem 0 #7f1d30; }

.form-note { margin: .8rem 0 0; color: var(--subtle); font-size: .875rem; }

.form-error {
    margin: 0 0 1rem;
    padding: .7rem .8rem;
    border-left: 3px solid var(--berry);
    border-radius: .25rem;
    background: #f9e9e9;
    color: var(--berry-dark);
    font-size: .9375rem;
}

.inbox-notice {
    padding: 1rem 1.1rem;
    border-radius: .8rem;
    border: 1px solid #cbdcca;
    background: #eef5e9;
}

.inbox-notice strong { font-size: 1.125rem; }
.inbox-notice p { margin: .35rem 0 .55rem; }
.inbox-notice a { font-size: .9rem; font-weight: 650; }

.steps { margin-top: clamp(2.5rem, 5.5vw, 4.5rem); scroll-margin-top: 2rem; }

.steps h2 {
    margin: 0 0 1.1rem;
    font: 700 clamp(1.8rem, 3vw, 2.5rem) / 1.15 var(--serif);
    letter-spacing: -.035em;
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps-list li {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fffdf7e6;
}

.steps-list h3 { margin: 0 0 .25rem; font-size: 1.04rem; line-height: 1.3; }
.steps-list p { margin: 0; color: var(--subtle); font-size: .9375rem; }
.step-icon { font-size: 1.25rem; font-weight: 700; }
.step-mail { background: #e6efe5; color: #215743; }
.step-share { background: #f8edd6; color: #745426; }
.step-heart { background: #f8e8e7; color: var(--berry); }

.hero-family .hero-content { padding-block: clamp(2rem, 4vw, 3.6rem); }
.hero-family .lede { margin-bottom: 1.35rem; }
.letter-form .field { margin-bottom: .85rem; }
.letter-form .form-note { margin: 0 0 1rem; }

.state-card {
    max-width: 40rem;
    margin: 1rem auto 0;
    padding: clamp(1.55rem, 5vw, 4rem);
    border: 1px solid #e2e3d7;
    border-radius: 1.7rem;
    background: var(--white);
    box-shadow: 0 1.25rem 3.5rem #153e3410;
    text-align: center;
}

.state-card h1 { font-size: clamp(2.25rem, 6vw, 4rem); overflow-wrap: anywhere; }
.state-card > p { max-width: 38ch; margin: 1.15rem auto 1.55rem; color: var(--subtle); }

.state-icon {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1.15rem;
    border-radius: 50%;
    background: #e6efe5;
    color: var(--pine);
    font-size: 1.55rem;
}

.state-success .state-icon { animation: stamp-in .48s cubic-bezier(.2, .8, .3, 1.25) both; }

@keyframes stamp-in {
    from { opacity: .45; transform: scale(.76) rotate(-12deg); }
    to { opacity: 1; transform: scale(1); }
}

.share-form { margin: 1.6rem auto 0; text-align: left; }
.copy-status { min-height: 1.35rem; }
.text-link { display: inline-block; margin-top: .35rem; font-weight: 650; }

@media (max-width: 64rem) {
    .creator-fields { flex-wrap: wrap; }
    .creator-fields input { flex-basis: 100%; }
    .creator-fields .button { width: 100%; }
    .steps-list li { padding: 1rem; }
}

@media (max-width: 48rem) {
    .page-width { width: calc(100% - 2rem); }
    .site-header { min-height: 4.7rem; }
    .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 1.4rem; }
    .hero-content { padding: clamp(1.25rem, 5vw, 2.3rem); }
    h1 { font-size: clamp(2.55rem, 8.8vw, 4.3rem); }
    .hero-art { aspect-ratio: 4 / 3; margin: .45rem; border-radius: 1rem; }
    .hero-family .hero-art { aspect-ratio: 3 / 2; }
    .steps-list { grid-template-columns: 1fr; gap: .65rem; }
    .letter-form .button { width: 100%; }
}

@media (max-width: 25rem) {
    .page-width { width: calc(100% - 1.5rem); }
    .brand { gap: .4rem; font-size: .875rem; }
    .brand-mark { width: 2.25rem; height: 2.25rem; }
    .header-link { max-width: 8rem; }
    .hero-content { padding-inline: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .snow { display: none; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
