:root {
    --bg: #F2EBDD;
    --bg-deep: #E8DEC9;
    --ink: #1A1612;
    --ink-muted: rgba(26, 22, 18, 0.65);
    --ink-faint: rgba(26, 22, 18, 0.28);
    --terracotta: #C2552D;
    --terracotta-soft: #E89578;
    --sage: #6F7A60;
    --gold: #B89348;
    --serif: 'Fraunces', 'Times New Roman', Georgia, serif;
    --sans: 'Manrope', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'Courier New', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    background-image:
        radial-gradient(1000px circle at 0% 100%, rgba(194, 85, 45, 0.08), transparent 55%),
        radial-gradient(900px circle at 100% 0%, rgba(111, 122, 96, 0.06), transparent 50%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10 0 0 0 0 0.085 0 0 0 0 0.07 0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-attachment: fixed;
}

::selection { background: var(--terracotta); color: var(--bg); }

.page {
    max-width: 640px;
    margin: 0 auto;
    padding: 56px 24px 80px;
    position: relative;
}
@media (max-width: 480px) {
    .page { padding: 40px 22px 56px; }
}
.hero + .page,
.hero-banner + .page { padding-top: 36px; }
@media (max-width: 480px) {
    .hero + .page,
    .hero-banner + .page { padding-top: 28px; }
}

/* ===== HERO (info page) ===== */
.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--ink);
    animation: fadein 0.9s ease forwards;
}
.hero-frame {
    position: relative;
    width: 100%;
    height: 39vh;
    max-height: 320px;
    min-height: 180px;
}
.hero-frame img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: saturate(0.92) contrast(1.03);
}
.hero-frame::after {
    content: "";
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, transparent 55%, rgba(242, 235, 221, 0.35) 82%, var(--bg) 100%),
        radial-gradient(900px 400px at 50% 100%, rgba(194, 85, 45, 0.10), transparent 65%);
    pointer-events: none;
}
.hero-meta {
    position: absolute;
    bottom: 22px; left: 22px; right: 22px;
    color: #fff;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
    pointer-events: none;
}
.hero-meta .dot { opacity: 0.55; }

@media (min-width: 720px) {
    .hero-frame {
        height: 260px;
        max-height: 260px;
    }
}

/* ===== HERO BANNER (form page) ===== */
.hero-banner {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: var(--ink);
    animation: fadein 0.8s ease forwards;
}
.hero-banner img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 38%;
    display: block;
    filter: saturate(0.92);
}
.hero-banner::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.10) 0%, transparent 35%, rgba(242, 235, 221, 0.55) 100%);
    pointer-events: none;
}

/* Graceful fallback when /static/hero.webp is missing.
   The <img>'s onerror flips a class on the section. */
.hero.hero-missing,
.hero-banner.hero-missing {
    background:
        radial-gradient(60% 60% at 25% 75%, rgba(194, 85, 45, 0.55), transparent 70%),
        radial-gradient(60% 60% at 75% 30%, rgba(184, 147, 72, 0.45), transparent 70%),
        radial-gradient(80% 80% at 50% 50%, rgba(111, 122, 96, 0.30), transparent 70%),
        var(--bg-deep);
}
.hero.hero-missing .hero-frame img,
.hero-banner.hero-missing img { display: none; }
.hero.hero-missing .hero-frame::after,
.hero-banner.hero-missing::after { display: none; }
.hero.hero-missing .hero-meta { color: var(--ink); text-shadow: none; }

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .hero, .hero-banner { animation: none; }
}

.eyebrow {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
    flex-shrink: 0;
}

h1.title {
    font-family: var(--serif);
    font-weight: 350;
    font-variation-settings: 'opsz' 144, 'SOFT' 80;
    font-size: clamp(3rem, 13vw, 5.75rem);
    line-height: 0.92;
    letter-spacing: -0.025em;
    margin: 0 0 24px;
    color: var(--ink);
}
h1.title .accent {
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    color: var(--terracotta);
    display: inline-block;
}

.lead {
    font-family: var(--serif);
    font-weight: 350;
    font-size: clamp(1.05rem, 2.6vw, 1.22rem);
    line-height: 1.55;
    color: var(--ink-muted);
    margin: 0 0 32px;
    max-width: 32em;
}

.note {
    background: var(--bg-deep);
    border-left: 3px solid var(--terracotta);
    padding: 22px 24px;
    margin-bottom: 40px;
    font-family: var(--serif);
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--ink);
}
.note .note-label {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--terracotta);
    margin-bottom: 10px;
    font-style: normal;
}
.note p { margin: 0; }

.alerts {
    background: rgba(194, 85, 45, 0.09);
    border-left: 3px solid var(--terracotta);
    padding: 16px 22px;
    margin-bottom: 28px;
    font-size: 0.95rem;
    color: var(--ink);
}
.alerts ul { margin: 0; padding-left: 18px; }
.alerts li { margin: 4px 0; }

.form-section {
    margin-top: 8px;
}
.field {
    border-bottom: 1px solid var(--ink-faint);
    padding: 22px 0 14px;
    transition: border-color 0.2s;
}
.field:focus-within { border-color: var(--terracotta); }

.field-row {
    display: flex; align-items: flex-start; gap: 14px;
}
.field-num {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--terracotta);
    opacity: 0.85;
    letter-spacing: 0.1em;
    flex-shrink: 0;
    min-width: 32px;
    padding-top: 2px;
}
.field-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.field-label {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-muted);
    letter-spacing: 0.05em;
}
.field-label .req { color: var(--terracotta); margin-left: 2px; }
.field-label .opt {
    font-weight: 400;
    color: var(--ink-faint);
    font-size: 0.72rem;
    margin-left: 4px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-family: var(--serif);
    font-weight: 350;
    font-size: 1.2rem;
    line-height: 1.4;
    color: var(--ink);
    min-height: 32px;
}
.field input:focus { outline: none; }
.field input::placeholder { color: var(--ink-faint); }

.file-block { padding: 12px 0 4px; }
.file-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 1px dashed var(--ink-faint);
    background: transparent;
    color: var(--ink-muted);
    font-family: var(--sans);
    font-size: 0.94rem;
    cursor: pointer;
    transition: all 0.2s;
}
.file-trigger:hover { border-color: var(--terracotta); color: var(--ink); }
.file-trigger.has-file {
    color: var(--ink);
    border-color: var(--terracotta);
    border-style: solid;
    background: rgba(194, 85, 45, 0.04);
}
.file-trigger .icon {
    color: var(--terracotta);
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.15rem;
}
.file-text {
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    margin-right: 12px; flex: 1;
}
.file-hint {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--ink-muted);
    font-family: var(--mono);
    letter-spacing: 0.05em;
}

.submit-wrap { margin-top: 44px; }
.submit {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 14px;
    padding: 22px 32px;
    background: var(--ink);
    color: var(--bg);
    border: none;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.15s ease;
    position: relative;
    overflow: hidden;
}
.submit:hover { background: var(--terracotta); }
.submit:active { transform: translateY(1px); }
.submit:disabled { opacity: 0.7; cursor: wait; background: var(--terracotta); }
.submit .arrow { display: inline-block; transition: transform 0.3s ease; font-family: var(--serif); }
.submit:hover .arrow { transform: translateX(6px); }

.info-block {
    border-left: 3px solid var(--terracotta);
    padding: 4px 24px;
    margin: 32px 0;
    font-family: var(--serif);
    font-weight: 350;
    font-size: 1.06rem;
    line-height: 1.62;
    color: var(--ink);
}
.info-block em {
    font-style: italic;
    color: var(--terracotta);
}
.info-block p { margin: 0; }

.section-eyebrow {
    font-family: var(--mono);
    font-size: 1rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin: 48px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ink-faint);
}

.bank-card {
    background: var(--bg-deep);
    border: 1px solid var(--ink-faint);
    margin: 24px 0 8px;
    padding: 4px 0;
}
.bank-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 22px;
    border-bottom: 1px solid rgba(26, 22, 18, 0.10);
    gap: 16px;
}
.bank-row:last-child { border-bottom: none; }
.bank-row.highlight {
    background: rgba(194, 85, 45, 0.08);
}
.bank-label {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    flex-shrink: 0;
}
.bank-value {
    font-family: var(--serif);
    font-size: 1.05rem;
    color: var(--ink);
    text-align: right;
    word-break: break-word;
}
.bank-value.mono {
    font-family: var(--mono);
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.help {
    background: rgba(111, 122, 96, 0.10);
    border-left: 3px solid var(--sage);
    padding: 16px 20px;
    margin: 32px 0 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-family: var(--serif);
    font-size: 0.96rem;
    line-height: 1.55;
}
.help-icon {
    font-size: 1.05rem;
    flex-shrink: 0;
    line-height: 1.35;
}
.help p { margin: 0; }
.help a {
    color: var(--terracotta);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(194, 85, 45, 0.4);
    white-space: nowrap;
    transition: border-color 0.15s;
}
.help a:hover { border-bottom-color: var(--terracotta); }

.deadline {
    background: rgba(194, 85, 45, 0.08);
    border-left: 3px solid var(--terracotta);
    padding: 16px 20px;
    margin: 24px 0 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-family: var(--serif);
    font-size: 0.98rem;
    line-height: 1.55;
}
.deadline-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    line-height: 1.25;
}
.deadline p { margin: 0; }
.deadline strong { font-weight: 600; }

.warning {
    background: rgba(184, 147, 72, 0.14);
    border-left: 3px solid var(--gold);
    padding: 16px 20px;
    margin: 14px 0 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-family: var(--serif);
    font-size: 0.98rem;
    line-height: 1.55;
}
.warning-icon {
    color: var(--gold);
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1;
}
.warning p { margin: 0; }
.warning strong { font-weight: 600; }

.cta-wrap { margin: 28px 0 24px; }
.cta-link { text-decoration: none; color: var(--bg); }
.cta-link:hover { text-decoration: none; color: var(--bg); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-decoration: none;
    margin-bottom: 32px;
    padding: 6px 0;
    transition: color 0.15s;
}
.back-link:hover { color: var(--terracotta); text-decoration: none; }
.back-arrow { transition: transform 0.2s; display: inline-block; }
.back-link:hover .back-arrow { transform: translateX(-4px); }

.divider {
    display: flex; align-items: center; gap: 18px;
    margin: 36px 0;
    color: var(--ink-faint);
}
.divider .line { flex: 1; height: 1px; background: currentColor; }
.divider .ornament {
    color: var(--terracotta);
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.4rem;
}

footer {
    margin-top: 64px;
    padding-top: 28px;
    border-top: 1px solid var(--ink-faint);
    font-family: var(--mono);
    font-size: 0.66rem;
    color: var(--ink-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
footer .ornament { color: var(--terracotta); font-family: var(--serif); font-style: italic; font-size: 1rem; }

/* Standalone status pages (success, closed) */
.status {
    text-align: center;
    padding-top: 40px;
}
.status .title { text-align: center; }
.status .lead { margin-left: auto; margin-right: auto; }
.status .ornament-row {
    display: flex; align-items: center; justify-content: center; gap: 16px;
    color: var(--ink-faint);
    margin: 28px 0;
}
.status .ornament-row .line { width: 60px; height: 1px; background: currentColor; }
.status .ornament-row .ornament { color: var(--terracotta); font-family: var(--serif); font-style: italic; font-size: 1.5rem; }
.status .pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 28px;
    border: 1px solid var(--ink);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    margin-top: 8px;
}
.status .pill:hover {
    background: var(--ink);
    color: var(--bg);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reveal {
    opacity: 0;
    animation: rise 0.7s cubic-bezier(.2, .7, .2, 1) forwards;
}
.d1 { animation-delay: .05s; }
.d2 { animation-delay: .15s; }
.d3 { animation-delay: .3s; }
.d4 { animation-delay: .45s; }
.d5 { animation-delay: .6s; }
.d6 { animation-delay: .75s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { animation: none; opacity: 1; }
    .submit, .submit .arrow { transition: none; }
}
