/* Palette: old money */
:root {
    --ink: #2b2a26;
    --accent: #1f5c3a;      /* banknote green */
    --accent-hover: #2e7a50;
    --gold: #b8902f;
    --gold-light: #f3e6c0;
    --panel: #fbf8ef;
    --highlight: #f6efd9;
    --muted: #a9a49a;
}

/* Fonts */
h1, h2, h3, h4, h5, h6, dt { font-family: 'Eczar', serif; color: var(--accent); }
dt, .epithet > h1, .btn { font-family: 'Kalam', cursive; }
body { font-family: 'Merriweather', serif; font-weight: 300; }
a { color: var(--accent); }
a:hover { color: var(--gold); }

/* Body copy */
* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; background: #fff; color: var(--ink); line-height: 1.6; }
p { line-height: 2; text-indent: 1em; }
ul > li { line-height: 2; }
strong { background: var(--highlight); font-weight: 700; }
em { font-style: italic; }

/* Headings */
h1 { margin: 1em 0 0.5em; text-align: center; font-weight: 700; font-size: 2.2rem; line-height: 1.25; }
h2 { font-size: 1.6rem; line-height: 1.3; }
h3 { font-size: 1.3rem; }
dt { font-size: 1.45rem; line-height: 1.4; }
dd { margin: 0 0 2em 0; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 0 2em; align-items: start; }
.grid > .main { grid-column: 1; }
.grid > .side { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 991.98px) {
    html { font-size: 16px; }
    .grid { grid-template-columns: 1fr; }
    .grid > .side { grid-column: 1; grid-row: auto; }
}

.bgcol { background: var(--panel); border-radius: 5px; padding: 1em 2em; border: 1px solid var(--gold-light); }
.bgcol.nopadding { padding: 1em; }
@media (max-width: 991.98px) { .bgcol { padding: 1em 0.8em; } }

/* Masthead */
.masthead { text-align: center; padding: 2em 0 0; }
.masthead .crest { font-size: 4rem; line-height: 1; }
.masthead .title {
    font-family: 'Eczar', serif;
    font-weight: 800;
    color: var(--accent);
    font-size: clamp(2.2rem, 7vw, 4.6rem);
    line-height: 1.05;
    margin: 0.2em 0 0;
    letter-spacing: -0.01em;
    text-indent: 0;
}
.masthead .title .gilt {
    background: linear-gradient(180deg, #e8c766 0%, #b8902f 55%, #8a6a1f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.masthead .rule { color: var(--gold); letter-spacing: 0.5em; margin-top: 0.5em; }

/* Skewed highlight epithet */
div.epithet {
    margin: 1.5em auto 2em;
    max-width: 760px;
    transform: skew(-5deg, -3deg);
    text-align: center;
}
.epithet > h1 {
    font-size: 2.6rem; font-weight: 700;
    line-height: 1.6;
    display: inline;
    background: var(--highlight);
    box-shadow: -1em 0 0 0 var(--highlight), 1em 0 0 0 var(--highlight);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    padding: 0.1em;
}
@media (max-width: 991.98px) {
    .epithet > h1 { font-size: 1.8rem; }
}

/* Testimonials */
.testimonials { text-align: left; }
blockquote {
    background: #fff;
    border: 1px solid #ddd6c4;
    border-radius: 6px;
    margin: 0 auto 1em;
    padding: 0.9em 1.1em;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
}
blockquote p { text-indent: 0; line-height: 1.5; margin: 0 0 0.6em; }
blockquote .who { font-weight: 700; color: var(--ink); }
blockquote .handle { color: #777; font-weight: 400; }

.disclaimer {
    max-width: 760px;
    margin: 4em auto 0;
    padding: 1em 1.5em;
    border: 2px dashed #f5a9b8;
    border-radius: 10px;
    background: #f2fbfe;
}
.disclaimer h3 { margin: 0 0 0.3em; text-align: center; color: #c2577a; }
.disclaimer p { text-indent: 0; margin: 0; line-height: 1.8; }
.disclaimer a { color: #c2577a; }

footer { text-align: center; margin: 3em 0 6em; color: var(--muted); font-size: 0.85rem; line-height: 1.8; }
footer a { color: var(--muted); }

/* Buttons */
.btn {
    display: inline-block;
    background: #fff;
    border: solid 2px var(--accent);
    color: var(--accent);
    padding: 0.5em 1em;
    font-size: 1.4rem;
    border-radius: 20px;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { color: var(--accent-hover); border-color: var(--accent-hover); }
.btn.tmitb {
    background: var(--accent);
    border: 4px dashed var(--gold-light);
    color: #fff;
    box-shadow: 0 0 0 4px var(--accent), 2px 2px 15px 8px var(--gold-light);
    transform: skew(-10deg, -3deg);
    font-size: 2rem;
    margin: 1.2em auto;
}
.btn.tmitb:hover, .btn.tmitb:active {
    background: var(--accent-hover); color: #fff;
    box-shadow: 0 0 0 4px var(--accent-hover), 0 0 0 18px #fff;
}
.btn.tmitb.small { font-size: 1.6rem; }
@media (max-width: 991.98px) {
    .btn { font-size: 1.1rem; border-radius: 10px; }
    .btn.tmitb { font-size: 1.4rem; border-width: 2px; box-shadow: 0 0 0 2px var(--accent); padding: 0.5em 0.7em; }
    .btn.tmitb.small { font-size: 1.2rem; }
}

/* Confirm page states */
.state { display: none; }
.state.active { display: block; animation: fade-in 0.25s both ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.ornament { color: var(--gold); font-size: 2.6rem; transform: skew(-5deg, -3deg); text-align: center; margin: 0.5em 0; letter-spacing: 0.3em; }

.progress-wrap {
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 2em 16px;
}
.progress-wrap h1 { margin: 10px 0; }
.status-line { font-family: 'Kalam', cursive; color: var(--gold); font-size: 1.3rem; min-height: 2em; text-align: center; }
.coin-bar {
    margin: 2em 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4em;
    font-size: 2.2rem;
}
.coin { position: relative; display: inline-block; width: 1.2em; text-align: center; }
.coin .empty {
    display: inline-block;
    color: #c6d9cc;
    animation: popappear 1s ease-in-out both, sine 1s alternate infinite ease-in-out;
}
.coin .full { display: inline-block; animation: popappear 0.5s ease-out both; }
@keyframes popappear {
    0% { transform: scale(0); opacity: 0; }
    30% { transform: scale(2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes sine {
    from { translate: 0 -0.15em; }
    to { translate: 0 0.15em; }
}

/* Particles */
.particle-field { position: absolute; top: 50%; left: 50%; width: 0; height: 0; pointer-events: none; }
.particle-arm { position: absolute; top: 0; left: 0; }
.particle {
    position: absolute;
    width: 12px; height: 12px;
    margin-top: -6px; margin-left: -6px;
    border-radius: 100%;
    background: var(--gold);
    animation: burst 0.5s linear forwards;
}
@keyframes burst {
    0% { opacity: 0; }
    1% { opacity: 0; transform: scale(4, 0.1); }
    20% { opacity: 1; transform: translate(1.2em, 0) scale(4, 1); }
    90% { opacity: 0.2; transform: translate(2.6em, 0) scale(0.1, 1); }
    100% { opacity: 0; transform: translate(2.6em, 0) scale(0.1, 1); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
