@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
    --ink: #eee8dc;
    --muted: #9e988e;
    --line: rgba(225, 194, 131, .25);
    --gold: #d5a953;
    --orange: #e37a28;
    --green: #879d37;
    --panel: rgba(19, 16, 14, .94);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    color: var(--ink);
    background: #0d0b0a url('capycraft-bg.png') center / cover fixed no-repeat;
    font-family: 'Noto Sans SC', system-ui, sans-serif;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 8, 7, .24), rgba(8, 7, 6, .88) 88%), radial-gradient(circle at 50% 37%, transparent 0 18%, rgba(0, 0, 0, .62) 88%);
    pointer-events: none;
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--orange); }

.landing-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100svh;
    padding: clamp(46px, 9vh, 110px) 20px 28px;
}

.brand-block { text-align: center; animation: rise-in .7s ease both; }
.brand-logo-frame {
    position: relative;
    display: grid;
    place-items: center;
    width: min(410px, 88vw);
    aspect-ratio: 1106 / 947;
    margin: 0 auto;
    overflow: visible;
    filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .58));
}
.brand-logo { width: 100%; height: 100%; object-fit: contain; filter: saturate(.92) contrast(1.06); }
.brand-kicker, .panel-eyebrow, .site-footer { letter-spacing: .24em; font: 500 11px Cinzel, serif; }
.brand-kicker { margin: 0 0 9px; color: var(--gold); }
h1 { margin: 0; font: 600 clamp(34px, 6vw, 66px) Cinzel, serif; letter-spacing: .08em; text-shadow: 0 5px 18px #000; }
h1 em { color: var(--gold); font-style: normal; }
.brand-subtitle { margin: 12px 0 0; color: #c5bfb3; font-size: 15px; letter-spacing: .16em; }

.action-stack { width: min(410px, 100%); margin: clamp(32px, 7vh, 82px) auto auto; display: grid; grid-template-columns: 1fr; gap: 16px; animation: rise-in .7s .12s ease both; }
.portal-button {
    position: relative;
    width: 100%;
    aspect-ratio: 344 / 75;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45));
    transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.portal-button--register { background-image: url('button-register.png'); }
.portal-button--sponsor { background-image: url('button-sponsor.png'); }
.portal-button--download { background-image: url('button-download.png'); }
.portal-button:hover, .portal-button:focus-visible { transform: translateY(-3px) scale(1.015); outline: none; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .58)); }
.portal-button:active { transform: translateY(0) scale(.995); }
.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; }
.site-footer { display: flex; gap: 12px; align-items: center; margin-top: auto; padding-top: 72px; color: #81776d; font-size: 9px; }
.footer-dot { width: 4px; height: 4px; background: var(--gold); border-radius: 50%; }

.modal { display: none; position: fixed; inset: 0; z-index: 5; padding: 22px; overflow-y: auto; }
.modal.is-open { display: grid; place-items: center; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(3, 3, 3, .75); backdrop-filter: blur(6px); }
.register-panel { position: relative; width: min(600px, 100%); margin: auto; padding: clamp(28px, 5vw, 52px); border: 1px solid rgba(205, 179, 129, .18); background: var(--panel); box-shadow: 0 25px 80px rgba(0,0,0,.65); animation: modal-in .24s ease both; }
.register-panel::before { content: ''; position: absolute; inset: 9px; border: 1px solid rgba(205, 179, 129, .09); pointer-events: none; }
.modal-close { position: absolute; z-index: 1; top: 13px; right: 17px; border: 0; background: transparent; color: #888078; font-size: 28px; line-height: 1; }
.modal-close:hover { color: var(--ink); }
.panel-heading { position: relative; text-align: center; margin-bottom: 28px; }
.panel-eyebrow { margin: 0 0 9px; color: var(--orange); font-size: 10px; }
h2 { margin: 0; font-size: 25px; font-weight: 500; }
.panel-heading p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.register-form { position: relative; display: grid; gap: 12px; }
.field { display: grid; gap: 7px; }
.field > span { color: #a9a096; font-size: 12px; }
.field input { width: 100%; height: 48px; padding: 0 15px; border: 1px solid rgba(211, 185, 132, .12); border-radius: 0; background: rgba(7, 7, 7, .76); color: var(--ink); outline: none; }
.field input:focus { border-color: rgba(227, 122, 40, .78); box-shadow: 0 0 0 3px rgba(227, 122, 40, .1); }
.field input::placeholder { color: #5f5a55; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 5px; color: #aaa39a; font-size: 12px; line-height: 1.6; }
.check-row input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--orange); }
.check-row a, .form-note a { color: var(--orange); text-decoration: none; }
.submit-button { height: 52px; margin-top: 9px; border: 1px solid rgba(227, 122, 40, .45); background: linear-gradient(90deg, rgba(81, 45, 20, .3), rgba(145, 73, 24, .28)); color: #e6a257; letter-spacing: .18em; transition: .2s ease; }
.submit-button:hover:not(:disabled), .submit-button:focus-visible { background: rgba(193, 91, 24, .42); color: #fff1de; outline: none; }
.submit-button:disabled { cursor: wait; opacity: .65; }
.form-note, .form-message { text-align: center; font-size: 12px; }
.form-note { margin: 5px 0 0; color: #77716a; }
.form-message { min-height: 18px; margin: 0; color: #d2aa62; }
.form-message.is-error { color: #d87962; }
.sponsor-panel { width: min(520px, 100%); }
.amount-field { min-width: 0; padding: 0; border: 0; }
.amount-field legend { margin-bottom: 9px; color: #a9a096; font-size: 12px; }
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.amount-option { position: relative; }
.amount-option input { position: absolute; opacity: 0; pointer-events: none; }
.amount-option span { display: grid; place-items: center; height: 44px; border: 1px solid rgba(211, 185, 132, .16); background: rgba(7, 7, 7, .62); color: #b6aea2; cursor: pointer; font-size: 14px; transition: .2s ease; }
.amount-option input:checked + span { border-color: var(--orange); background: rgba(193, 91, 24, .25); color: #f0b36b; box-shadow: 0 0 0 1px rgba(227, 122, 40, .16); }
.amount-option span:hover { border-color: rgba(227, 122, 40, .65); color: #e8c08a; }
.amount-option--custom { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 9px; align-items: center; }
.amount-option--custom .custom-amount-input { position: static; width: 100%; height: 44px; box-sizing: border-box; padding: 0 12px; border: 1px solid rgba(211, 185, 132, .16); background: rgba(7, 7, 7, .62); color: #e8c08a; font: inherit; opacity: 1; pointer-events: auto; outline: none; }
.custom-amount-input:focus { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(227, 122, 40, .13); }
.custom-amount-input:disabled { cursor: not-allowed; opacity: .48; }
.return-shell { padding-top: 12vh; }
.return-panel { width: min(560px, 100%); text-align: center; }
.return-link { display: inline-block; margin-top: 8px; color: #e6a257; text-decoration: none; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 25px; max-width: calc(100% - 40px); padding: 11px 18px; border: 1px solid rgba(213,169,83,.38); background: rgba(18,15,12,.96); color: #e7d5b6; font-size: 13px; opacity: 0; transform: translate(-50%, 15px); pointer-events: none; transition: .22s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 560px) {
    .landing-shell { padding-top: 62px; }
    .brand-logo-frame { width: min(350px, 92vw); }
    .brand-subtitle { font-size: 12px; letter-spacing: .1em; }
    .action-stack { width: 100%; margin-top: 42px; gap: 12px; }
    .field-row { grid-template-columns: 1fr; }
    .register-panel { padding: 34px 22px 27px; }
    .amount-grid { gap: 7px; }
    .amount-option--custom { gap: 7px; }
}
