:root {
    --ink: #171817;
    --ink-soft: #51534f;
    --paper: #f6f0e6;
    --paper-bright: #fffaf1;
    --paper-deep: #e4d6c4;
    --claret: #7b2735;
    --claret-dark: #571a25;
    --sage: #607264;
    --line: rgba(23, 24, 23, 0.17);
    --shadow: 0 24px 70px rgba(44, 31, 20, 0.16);
    --radius-small: 0.6rem;
    --radius-medium: 1.25rem;
    --page-width: 76rem;
    --focus: #175e9c;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(rgba(94, 72, 48, 0.035) 1px, transparent 1px),
        var(--paper);
    background-size: 100% 1.5rem;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

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

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.65rem 0.9rem;
    background: var(--paper-bright);
    border: 2px solid var(--ink);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header,
.hero,
.principle-strip,
.journey,
.build-status,
.site-footer {
    width: min(100% - 2rem, var(--page-width));
    margin-inline: auto;
}

.site-header {
    min-height: 4.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 760;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 1.75rem;
    aspect-ratio: 4 / 3;
    position: relative;
    background: var(--claret);
    border-radius: 0.18rem;
    box-shadow: inset 0 -1px rgba(0, 0, 0, 0.18);
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, 50% 58%, 100% 0);
    background: #a64757;
}

.header-link {
    font-size: 0.9rem;
    font-weight: 700;
    text-underline-offset: 0.2em;
}

.hero {
    display: grid;
    gap: 2.5rem;
    padding-block: clamp(3.5rem, 11vw, 7rem);
}

.hero-copy {
    align-self: center;
}

.eyebrow {
    margin: 0 0 0.85rem;
    color: var(--claret-dark);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    text-wrap: pretty;
}

h1,
h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

h1 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(3rem, 12vw, 6.6rem);
}

h2 {
    max-width: 15ch;
    margin: 0;
    font-size: clamp(2.3rem, 8vw, 4.7rem);
}

h3 {
    margin: 0 0 0.35rem;
    font-size: 1.08rem;
    line-height: 1.2;
}

.hero-summary {
    max-width: 38rem;
    margin: 1.5rem 0 0;
    color: var(--ink-soft);
    font-size: clamp(1rem, 3vw, 1.22rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.button {
    min-height: 3.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.15rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 780;
    text-decoration: none;
}

.button-primary {
    color: white;
    background: var(--ink);
}

.button-primary:hover {
    background: var(--claret-dark);
}

.button-secondary {
    color: var(--ink);
    background: transparent;
}

.button-secondary:hover {
    background: var(--paper-bright);
}

.status-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.3rem 0 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.status-line span {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--sage);
    box-shadow: 0 0 0 0.3rem rgba(96, 114, 100, 0.13);
}

.delivery-stage {
    min-height: 27rem;
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1.25rem;
    padding: 2rem 1rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-medium);
    background:
        radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.8), transparent 45%),
        linear-gradient(155deg, #d9e0dc, #ede0cf 72%);
    box-shadow: var(--shadow);
    isolation: isolate;
}

.stage-sky {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0.4;
}

.flight-line {
    width: 55%;
    height: 20%;
    position: absolute;
    top: 20%;
    left: -20%;
    border-top: 1px dashed rgba(23, 24, 23, 0.35);
    border-radius: 50%;
    transform: rotate(8deg);
}

.envelope {
    width: min(70vw, 17rem);
    aspect-ratio: 1.42;
    position: relative;
    filter: drop-shadow(0 1.5rem 1.6rem rgba(53, 37, 24, 0.18));
    transform-origin: center;
}

.envelope-back,
.envelope-front,
.envelope-flap,
.envelope-letter {
    position: absolute;
}

.envelope-back {
    inset: 0;
    border-radius: 0.4rem;
    background: #d6a989;
}

.envelope-front {
    inset: 0;
    clip-path: polygon(0 22%, 50% 64%, 100% 22%, 100% 100%, 0 100%);
    border-radius: 0.4rem;
    background: linear-gradient(145deg, #d5a27d, #c98d66);
}

.envelope-flap {
    z-index: 4;
    inset: 0;
    clip-path: polygon(0 0, 100% 0, 50% 62%);
    background: #e3b99a;
    transform-origin: top;
    transition: transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.seal {
    width: 2.5rem;
    aspect-ratio: 1;
    position: absolute;
    z-index: 5;
    top: 47%;
    left: 50%;
    border-radius: 50%;
    background: var(--claret);
    transform: translate(-50%, -50%);
    box-shadow: inset 0 -0.2rem rgba(0, 0, 0, 0.18);
    transition: opacity 180ms ease;
}

.envelope-letter {
    z-index: 2;
    inset: 8% 9% 6%;
    padding: 2.8rem 1.8rem 1.2rem;
    border-radius: 0.2rem;
    background: var(--paper-bright);
    transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.letter-mark,
.letter-line {
    display: block;
    background: var(--claret);
}

.letter-mark {
    width: 2.4rem;
    height: 0.35rem;
    margin-bottom: 1.2rem;
}

.letter-line {
    width: 75%;
    height: 0.25rem;
    margin-top: 0.55rem;
    opacity: 0.35;
}

.letter-line-short {
    width: 48%;
}

.stage-caption {
    min-height: 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.text-button {
    min-height: 2.75rem;
    padding: 0.45rem 0.75rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.delivery-stage.is-arriving .envelope {
    animation: arrive 1.1s cubic-bezier(0.16, 0.75, 0.25, 1) both;
}

.delivery-stage.is-opening .envelope-flap,
.delivery-stage.is-revealed .envelope-flap {
    transform: rotateX(180deg);
}

.delivery-stage.is-opening .seal,
.delivery-stage.is-revealed .seal {
    opacity: 0;
}

.delivery-stage.is-revealed .envelope-letter {
    transform: translateY(-44%) scale(1.06);
}

@keyframes arrive {
    from {
        opacity: 0;
        transform: translate(65%, -55%) rotate(12deg) scale(0.55);
    }
    to {
        opacity: 1;
        transform: translate(0, 0) rotate(0) scale(1);
    }
}

.principle-strip {
    display: grid;
    border-block: 1px solid var(--line);
}

.principle-strip p {
    margin: 0;
    padding: 1rem 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.04rem;
}

.principle-strip p + p {
    border-top: 1px solid var(--line);
}

.journey {
    padding-block: clamp(5rem, 13vw, 9rem);
}

.section-heading {
    margin-bottom: 3rem;
}

.journey-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.journey-list li {
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 1rem;
    padding-block: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.journey-list li > span {
    color: var(--claret-dark);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.journey-list p,
.build-status p {
    margin: 0;
    color: var(--ink-soft);
}

.build-status {
    display: grid;
    gap: 2.5rem;
    margin-bottom: clamp(4rem, 10vw, 7rem);
    padding: clamp(1.5rem, 6vw, 4rem);
    color: var(--paper-bright);
    border-radius: var(--radius-medium);
    background: var(--ink);
}

.build-status .eyebrow {
    color: #e7b5bd;
}

.build-status p {
    max-width: 42rem;
    margin-top: 1.2rem;
    color: #cbc9c2;
}

.status-list {
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.status-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.status-list dt {
    color: #aaa9a4;
}

.status-list dd {
    margin: 0;
    text-align: right;
    font-weight: 750;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    padding-block: 1.5rem 2.5rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.site-footer p {
    margin: 0;
}

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.error-page main {
    width: min(100%, 42rem);
}

.error-page h1 {
    margin-bottom: 1.5rem;
}

.error-page .button {
    margin-top: 1rem;
}

@media (min-width: 46rem) {
    .site-header,
    .hero,
    .principle-strip,
    .journey,
    .build-status,
    .site-footer {
        width: min(100% - 4rem, var(--page-width));
    }

    .hero {
        grid-template-columns: minmax(0, 1.08fr) minmax(19rem, 0.92fr);
        align-items: center;
    }

    .principle-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .principle-strip p {
        padding: 1rem;
        text-align: center;
    }

    .principle-strip p + p {
        border-top: 0;
        border-left: 1px solid var(--line);
    }

    .journey {
        display: grid;
        grid-template-columns: minmax(16rem, 0.8fr) minmax(24rem, 1.2fr);
        gap: clamp(3rem, 8vw, 7rem);
    }

    .section-heading {
        position: sticky;
        top: 2rem;
        align-self: start;
        margin-bottom: 0;
    }

    .build-status {
        grid-template-columns: 1.2fr 0.8fr;
        align-items: end;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

