* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-sans);
    font-size: var(--text-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    caret-color: var(--green-ink);
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--print-mint);
    color: var(--charcoal);
}

h1,
h2,
h3 {
    font-weight: 800;
    color: var(--ink);
    text-wrap: balance;
}

h1 {
    font-size: var(--text-display);
    line-height: 1.04;
    letter-spacing: -0.025em;
}

h2 {
    font-size: var(--text-h2);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h3 {
    font-size: var(--text-h3);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

p {
    text-wrap: pretty;
}

a {
    color: var(--green-ink);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--green-ink-hover);
}

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

[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Inline icons from src/_includes/icons/ ({% icon %}), sized to the text and colored by it */
.icon {
    display: inline-block;
    flex: none;
    width: 1em;
    height: 1em;
}

.icon-ne {
    transform: rotate(-45deg);
}

.icon-w {
    transform: rotate(180deg);
}

:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: 3px;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: 24px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    user-select: none;
    -webkit-user-select: none;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 12px 24px;
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--focus-ring-color);
    border-radius: var(--radius-control);
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 10px;
    outline: none;
}

.preview-ribbon {
    padding: 6px 24px;
    background: var(--wash-warm);
    color: var(--ink-muted);
    font-size: var(--text-legal);
    text-align: center;
}

/* Charcoal chrome */

.site-header,
.site-footer,
.on-charcoal {
    background: var(--charcoal);
    color: var(--print-cream);
    caret-color: var(--print-mint);
    --focus-ring-color: var(--print-mint);
    --focus-halo: var(--focus-halo-on-charcoal);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.wordmark {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    color: var(--print-cream);
    text-decoration: none;
}

.wordmark:hover {
    color: var(--print-cream);
}

.wordmark-name {
    font-size: 1.375rem;
    font-weight: 800;
    font-stretch: var(--stretch-condensed);
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

/* The Earthly Lunar logo, copied from earthly-website. This version is for dark grounds only. */
.lunar-logo {
    display: block;
    width: auto;
    height: 20px;
}

.wordmark-byline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: var(--print-cream-soft);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: var(--radius-control);
    color: var(--print-cream-soft);
    font-size: var(--text-small);
    font-weight: 700;
    text-decoration: none;
}

.site-nav-link:hover,
.site-nav-link[aria-current='page'] {
    color: var(--print-cream);
}

.site-nav-link[aria-current='page'] {
    background: var(--charcoal-raised);
}

@media (max-width: 599px) {
    .site-nav-link {
        display: none;
    }
}

.site-footer {
    padding-block: 40px;
    font-size: var(--text-small);
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 40px;
}

.site-footer p {
    margin-top: 10px;
    color: var(--print-cream-soft);
}

.footer-signoff {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.footer-signoff .lunar-logo {
    height: 22px;
}

.site-footer a {
    color: var(--print-cream-soft);
}

.site-footer a:hover {
    color: var(--print-cream);
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.2s var(--ease-out),
        box-shadow 0.2s var(--ease-out),
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.btn-primary {
    background: var(--print-mint);
    color: var(--charcoal);
}

.btn-primary:hover {
    color: var(--charcoal);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary {
    background: var(--paper-white);
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-secondary:hover {
    border-color: var(--ink);
    color: var(--ink);
}

:is(.site-header, .on-charcoal) .btn-secondary {
    background: transparent;
    border-color: var(--print-cream-soft);
    color: var(--print-cream);
}

:is(.site-header, .on-charcoal) .btn-secondary:hover {
    border-color: var(--print-cream);
    color: var(--print-cream);
}

.btn-sm {
    min-height: 40px;
    padding: 8px 16px;
    font-size: var(--text-small);
}

.btn .icon {
    transition: transform 0.2s var(--ease-out);
}

.btn:hover .icon {
    transform: translateX(3px);
}

.btn:hover .icon-ne {
    transform: rotate(-45deg) translateX(3px);
}

/* A small bold link with an arrow. The back link turns the arrow around (icon-w). */
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-small);
    font-weight: 700;
    text-decoration: none;
}

.text-link .icon {
    transition: transform 0.2s var(--ease-out);
}

.text-link:hover .icon {
    transform: translateX(3px);
}

.text-link:hover .icon-w {
    transform: rotate(180deg) translateX(3px);
}

/* Lunar band: the one section about Lunar, set in Lunar's own colors */

.lunar-band {
    background: var(--lunar-night);
    color: var(--lunar-text-soft);
    --focus-ring-color: var(--lunar-cyan);
}

.lunar-band :is(h2, h3) {
    color: var(--lunar-text);
}

.lunar-band .lunar-logo {
    height: 28px;
}

.btn-lunar {
    border: 0;
    background: var(--lunar-gradient-cta);
    color: var(--lunar-night);
}

.btn-lunar:hover {
    color: var(--lunar-night);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* The band's layout: copy beside the button, stacked below 960px */
.lunar-cta {
    padding-block: clamp(48px, 7vw, 80px);
}

.lunar-cta .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px 64px;
}

.lunar-cta h2 {
    margin-top: 20px;
    max-width: 18em;
}

.lunar-cta-copy p {
    margin-top: 14px;
    max-width: 62ch;
}

.lunar-cta-action {
    display: grid;
    justify-items: center;
    gap: 12px;
    font-size: var(--text-small);
}

@media (max-width: 959px) {
    .lunar-cta .container {
        grid-template-columns: 1fr;
    }

    .lunar-cta-action {
        justify-items: start;
    }
}

.btn:disabled,
.btn[aria-disabled='true'] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Chips (filters) and tags (labels) */

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: var(--paper-white);
    color: var(--ink-soft);
    font: inherit;
    font-size: var(--text-small);
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.chip:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.chip[aria-pressed='true'] {
    background: var(--charcoal);
    border-color: var(--charcoal);
    color: var(--print-cream);
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--wash-mint);
    color: var(--green-ink);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.tag-draft {
    background: var(--wash-warm);
    color: var(--ink-muted);
}

/* Stands in for art that doesn't exist yet. Only dev and preview builds render it. */
.placeholder {
    display: grid;
    place-content: center;
    gap: 4px;
    padding: 16px;
    border: 1.5px dashed var(--line-input);
    border-radius: var(--radius-card);
    background: var(--wash-warm);
    color: var(--ink-muted);
    font-size: var(--text-legal);
    text-align: center;
    text-wrap: balance;
}

.placeholder strong {
    color: var(--ink);
    font-size: var(--text-small);
}

/* Step markers, only where the steps are filled or happen in order */
.step-num {
    display: grid;
    flex: none;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-pill);
    background: var(--charcoal);
    color: var(--print-cream);
    font-size: var(--text-small);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

/* Form fields */

.field {
    display: grid;
    align-content: start;
    gap: 6px;
}

.field label {
    font-size: var(--text-small);
    font-weight: 700;
    color: var(--ink);
}

.field-optional {
    font-weight: 400;
    color: var(--ink-muted);
}

.field-hint {
    margin-top: -2px;
    font-size: var(--text-legal);
    color: var(--ink-muted);
}

.input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line-input);
    border-radius: var(--radius-control);
    background: var(--paper-white);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.input::placeholder {
    color: var(--ink-muted);
}

select.input {
    appearance: none;
    padding-right: 44px;
    background-image: url('/svg/chevron-down.svg');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
}

.input:hover {
    border-color: var(--ink-muted);
}

.input:focus-visible {
    outline: none;
    border-color: var(--focus-ring-color);
    box-shadow: 0 0 0 3px var(--focus-halo);
}

.input[aria-invalid='true'] {
    border-color: var(--error);
}

/* Autofilled text fields keep the palette instead of the browser's blue. Selects keep the default,
   because the inset fill would cover their arrow. */
input.input:-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    box-shadow: inset 0 0 0 100px var(--wash-mint);
}

input.input:-webkit-autofill:focus-visible {
    box-shadow:
        inset 0 0 0 100px var(--wash-mint),
        0 0 0 3px var(--focus-halo);
}

/* Fields on charcoal, like the size picker in the order summary */
.on-charcoal .field label {
    color: var(--print-cream);
}

.on-charcoal .input {
    background-color: var(--charcoal-raised);
    color: var(--print-cream);
    color-scheme: dark;
}

.on-charcoal .input:hover:not(:focus-visible) {
    border-color: var(--print-cream-soft);
}

.on-charcoal select.input {
    background-image: url('/svg/chevron-down-cream.svg');
}

.field-error {
    font-size: var(--text-legal);
    color: var(--error);
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: var(--text-small);
    color: var(--ink-soft);
}

.check input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--green-ink);
}

/* The order summary: the picked shirt over a charcoal ticket with the $0 lines. The order pages
   add the size picker; the thanks page shows it as the request's receipt. */

.summary {
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--charcoal);
}

.summary-photo {
    background: var(--linen);
}

/* The square photo cropped to 3:2, which keeps the summary short enough to stay on screen. Every
   print sits in the shirt's upper half, under the collar this keeps. */
.summary-photo img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: 50% 20%;
}

.summary-body {
    padding: 22px 24px 24px;
}

.summary-body .tag-draft {
    margin-bottom: 10px;
}

.summary h2 {
    color: var(--print-cream);
    font-size: var(--text-h3);
}

.summary-subline {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: var(--text-small);
    color: var(--print-cream-soft);
}

.summary-pick {
    display: grid;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--charcoal-line);
}

.summary-stickers {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: var(--text-small);
    color: var(--print-cream-soft);
}

.summary-stickers p strong {
    display: block;
    color: var(--print-cream);
}

.summary-stickers-art {
    flex: none;
    width: 52px;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-control);
    object-fit: cover;
}

.summary-stickers-art.placeholder {
    gap: 0;
    padding: 4px;
    font-size: 0.75rem;
}

.summary-receipt {
    margin-top: 20px;
}

.summary-lines {
    display: grid;
    gap: 8px;
    font-size: var(--text-small);
}

.summary-lines div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--print-cream-soft);
}

.summary-lines dd {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--print-cream);
}

.summary-lines .summary-total {
    align-items: baseline;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--charcoal-line);
    font-size: var(--text-body);
    font-weight: 800;
    color: var(--print-cream);
}

.summary-total dd {
    font-size: var(--text-figure);
    font-weight: 800;
    line-height: 1;
    color: var(--print-mint);
}

.summary-note {
    margin-top: 14px;
    font-size: var(--text-legal);
    color: var(--print-cream-soft);
}

@media (max-width: 599px) {
    .summary-body {
        padding: 20px 20px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0s !important;
        transition-duration: 0s !important;
    }
}
