:root {
    color-scheme: dark;
    color: #f4eddd;
    background: #101d1c;
    font: 16px/1.55 system-ui, sans-serif;
    --paper: #f4eddd;
    --quiet: #c9c4ae;
    --gold: #efcf97;
    --line: #ffffff25;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--gold); }
button, input, select { font: inherit; }
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: .62rem 1.15rem;
    color: #17211d;
    background: var(--gold);
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}
button:hover:enabled, .button:hover { background: #ffe5b6; }
button:disabled { opacity: .58; cursor: default; }
:focus-visible { outline: 2px solid #fff0cb; outline-offset: 3px; }

.hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(32rem, 76svh, 57rem);
    display: grid;
    place-items: end center;
    overflow: hidden;
    background: #384b3d;
    text-align: center;
}
.temple-art, .temple-scene, .temple-layer, .temple-pointer, .hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.temple-art { z-index: 0; }
.temple-scene { pointer-events: none; }
.temple-layer { object-fit: cover; object-position: center center; }
.temple-layer--tree {
    transform-origin: 12% 81%;
    animation: foliage-sway 7.5s ease-in-out infinite alternate;
    --leaf-turn: .7deg;
}
.temple-layer--palms {
    transform-origin: 83% 81%;
    animation: foliage-sway 6s ease-in-out -2.2s infinite alternate;
    --leaf-turn: -.85deg;
}
@keyframes foliage-sway {
    from { rotate: calc(-1 * var(--leaf-turn)); }
    to { rotate: var(--leaf-turn); }
}
.temple-cloud, .temple-mist {
    position: absolute;
    pointer-events: none;
    width: 125%;
    left: -12%;
}
.temple-cloud {
    top: 4%;
    height: 24%;
    opacity: .20;
    background:
        radial-gradient(ellipse at 25% 44%, #f5f2d6 0%, transparent 28%),
        radial-gradient(ellipse at 73% 33%, #f5f2d6 0%, transparent 28%);
    animation: cloud-drift 23s ease-in-out infinite alternate;
}
.temple-mist {
    bottom: 17%;
    height: 22%;
    opacity: .38;
    background:
        radial-gradient(ellipse at 27% 64%, #b8c5a771 0%, transparent 29%),
        radial-gradient(ellipse at 56% 43%, #d2d7b16b 0%, transparent 32%),
        radial-gradient(ellipse at 81% 69%, #cbd6c165 0%, transparent 28%);
    animation: mist-drift 12s ease-in-out infinite alternate;
}
@keyframes cloud-drift { from { translate: -4% 0; } to { translate: 4% 1%; } }
@keyframes mist-drift { from { translate: -4% 2%; } to { translate: 5% -5%; } }
.hero-shade {
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(0deg, #0d1919 0%, #0d1919b8 24%, #0e1a1b12 59%, transparent 76%);
}
.hero-copy {
    position: relative;
    z-index: 2;
    pointer-events: none;
    padding: 2rem 1.1rem 2.8rem;
}
.hero-copy a, .hero-copy button { pointer-events: auto; }
.orientation-control { position: absolute; inset: auto 0 .25rem; }
.orientation-control button {
    background: none;
    color: var(--paper);
    min-height: 34px;
    padding: 0 .8rem;
    font-size: .88rem;
    text-decoration: underline;
}
.orientation-control button:hover:enabled { color: #17211d; }
.orientation-control span { position: absolute; bottom: -.3rem; left: 0; right: 0; font-size: .72rem; color: var(--gold); }
.hero h1, .invitation h2, .admin h1 {
    margin: 0;
    font-family: Baskerville, Georgia, serif;
    font-weight: 400;
    line-height: .96;
}
.hero h1 {
    font-size: clamp(5rem, 13vw, 9.5rem);
    letter-spacing: -.055em;
    text-shadow: 0 2px 24px #121c1b86;
}
.hero-copy p { margin: .4rem 0 1.35rem; color: var(--paper); font-size: clamp(1rem, 2.4vw, 1.2rem); }
.invitation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: clamp(2rem, 8vw, 7rem);
    max-width: 70rem;
    margin: auto;
    padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 7vw, 5rem) 2.5rem;
    scroll-margin-top: 1rem;
}
.invitation h2 { font-size: clamp(2.6rem, 4vw, 3.65rem); max-width: 12ch; }
.invitation-copy p { color: var(--quiet); max-width: 36ch; margin: 1.05rem 0 0; }
label { display: block; font-size: .94rem; font-weight: 600; margin-bottom: .35rem; }
input:not([type="checkbox"]), select {
    width: 100%;
    min-height: 46px;
    padding: .55rem .7rem;
    color: var(--paper);
    background: #0e1919;
    border: 1px solid #8a938577;
    border-radius: 6px;
}
input::placeholder { color: #bdc3b39c; }
input[type="checkbox"] { width: 1rem; height: 1rem; margin: .18rem 0 0; accent-color: var(--gold); }
.checkbox { display: flex; align-items: flex-start; gap: .55rem; margin: .8rem 0 1.05rem; font-weight: 400; }
.status { min-height: 2.9em; margin: .45rem 0 0; color: var(--gold); }
footer { margin: 0 auto; padding: 1rem clamp(1.25rem, 7vw, 5rem); max-width: 70rem; border-top: 1px solid var(--line); color: var(--quiet); }
.fallback { display: grid; align-content: end; min-height: 60vh; padding: 2rem; background: linear-gradient(transparent, #101d1c), url('/art/reference.webp') center / cover; }

.admin { margin: auto; width: min(72rem, 100%); padding: 1.5rem clamp(1rem, 4vw, 3rem) 4rem; }
.admin-header { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-bottom: 1.6rem; }
.admin h1 { font-size: clamp(2.65rem, 6vw, 4rem); }
.admin-header-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.admin-sign-in { max-width: 32rem; margin-top: clamp(2rem, 13vh, 8rem); }
.admin-sign-in h1 { margin-bottom: 1.25rem; }
.admin-sign-in form button { margin-top: .9rem; }
.admin h2 { font-size: 1.25rem; margin: 0 0 1rem; }
.admin-panel { background: #172623; border: 1px solid var(--line); border-radius: 9px; padding: clamp(1rem, 3vw, 1.6rem); margin-bottom: 1rem; }
.admin-form { display: grid; grid-template-columns: 2fr 1fr auto; align-items: end; gap: .75rem; }
.admin-form button { justify-self: start; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .6rem .8rem; border-top: 1px solid var(--line); }
thead th { font-size: .89rem; color: var(--quiet); }
.qr { white-space: nowrap; }
.qr img { display: inline-block; vertical-align: middle; object-fit: contain; margin-right: .55rem; }
.pagination { display: flex; align-items: center; gap: .65rem; margin-top: 1rem; }
.pagination button { background: #0e1919; color: var(--paper); border-color: var(--line); }
.pagination button:hover:enabled { background: #223b35; }

@media (max-width: 42rem) {
    .hero { min-height: max(29rem, 70svh); }
    .invitation, .admin-form { grid-template-columns: 1fr; }
    .invitation { gap: 1.5rem; }
    .status { min-height: 3.1em; }
}
@media (prefers-reduced-motion: reduce) {
    .temple-layer { animation: none; transform: scale(1.045) !important; }
    .temple-cloud, .temple-mist { animation: none; }
}
