/* Shuffler Poker Awards — public styles */
:root {
    --baize: #0E1310;
    --felt: #15241C;
    --felt-2: #101B15;
    --gold: #C9A227;
    --gold-hi: #F1D583;
    --gold-dim: #8A7118;
    --cream: #F6F0E2;
    --cream-dim: #E5DCC6;
    --ink: #1C1710;
    --suit-red: #B3282D;
    --foil: linear-gradient(115deg, #8A7118 0%, #C9A227 30%, #F1D583 50%, #C9A227 70%, #8A7118 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
    background: var(--baize);
    color: var(--cream);
    font-family: 'Spectral', Georgia, serif;
    font-weight: 300;
    line-height: 1.65;
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -10%, rgba(201,162,39,.07), transparent 60%),
        radial-gradient(ellipse 100% 60% at 50% 110%, rgba(21,36,28,.9), transparent 70%);
}

a { color: var(--gold-hi); text-decoration: none; }
img { max-width: 100%; }
.red { color: var(--suit-red); }

/* ---------- Nav ---------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 60;
    display: flex; align-items: center; justify-content: space-between;
    padding: .9rem 1.4rem;
    background: linear-gradient(rgba(14,19,16,.92), rgba(14,19,16,.75) 70%, transparent);
    backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: baseline; gap: .45rem; }
.brand-pip { color: var(--gold); font-size: 1.25rem; }
.brand-word {
    font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.3rem; letter-spacing: .06em;
    background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { color: var(--cream-dim); font-size: .8rem; font-style: italic; }
.nav-right { display: flex; align-items: center; gap: 1.1rem; }
.nav-link { color: var(--cream-dim); font-size: .95rem; }
.nav-link:hover { color: var(--gold-hi); }
.badge { font-size: .75rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid; }
.badge-open { color: #8fce9f; border-color: rgba(143,206,159,.4); }
.badge-closed { color: #d98b8b; border-color: rgba(217,139,139,.4); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; cursor: pointer; border: none;
    font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .08em;
    padding: .8rem 1.8rem; border-radius: 4px; font-size: .95rem;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-gold {
    background: var(--foil); background-size: 200% 100%; color: var(--ink);
    box-shadow: 0 2px 14px rgba(201,162,39,.35), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-gold:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 6px 22px rgba(201,162,39,.5); }
.btn-gold:disabled { filter: grayscale(.7); cursor: not-allowed; transform: none; }
.btn-lg { padding: 1rem 2.4rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
    min-height: 100svh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    padding: 6.5rem 1.2rem 4rem; position: relative;
}
.hero-kicker { color: var(--gold); font-style: italic; font-size: 1.05rem; margin-bottom: .8rem; }
.hero-title {
    font-family: 'Cinzel', serif; font-weight: 900;
    font-size: clamp(3rem, 9vw, 6.5rem); line-height: 1.02; letter-spacing: .02em;
    background: var(--foil); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shimmer 6s linear infinite;
    filter: drop-shadow(0 3px 12px rgba(201,162,39,.25));
}
@keyframes shimmer { to { background-position: 200% 0; } }
.hero-lede { max-width: 34rem; margin: 1.4rem auto 2.2rem; color: var(--cream-dim); font-size: 1.1rem; }

.hero-fan { position: relative; width: 300px; height: 175px; margin: 0 auto 2.6rem; perspective: 900px; }
.fan-card {
    position: absolute; left: 50%; bottom: 0; width: 108px; height: 152px;
    margin-left: -54px; border-radius: 9px;
    background: var(--cream); color: var(--ink);
    border: 2px solid var(--gold); box-shadow: 0 8px 24px rgba(0,0,0,.55), inset 0 0 0 5px rgba(201,162,39,.25);
    transform-origin: 50% 135%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; animation: deal .7s cubic-bezier(.2,.8,.3,1.1) forwards;
}
.fc-rank { font-family: 'Cinzel', serif; font-weight: 900; font-size: 2.3rem; line-height: 1; }
.fc-suit { font-size: 2rem; line-height: 1; }
/* Stacked A-K-Q-J: Ace always on top (highest z), Jack dealt first at the back */
.fc1 { --rot: -9deg; --tx: -30px; --hrot: -32deg; --htx: -96px; z-index: 4; animation-delay: .6s; }
.fc2 { --rot: -3deg; --tx: -10px; --hrot: -11deg; --htx: -33px; z-index: 3; animation-delay: .45s; }
.fc3 { --rot: 3deg;  --tx: 10px;  --hrot: 11deg;  --htx: 33px;  z-index: 2; animation-delay: .3s; }
.fc4 { --rot: 9deg;  --tx: 30px;  --hrot: 32deg;  --htx: 96px;  z-index: 1; animation-delay: .15s; }
@keyframes deal {
    from { opacity: 0; transform: translate(0, 70px) rotate(0deg) scale(.7); }
    to   { opacity: 1; transform: translate(var(--tx), 0) rotate(var(--rot)) scale(1); }
}
.fan-card.dealt {
    animation: none; opacity: 1;
    transform: translate(var(--tx), 0) rotate(var(--rot));
    transition: transform .45s cubic-bezier(.2, .9, .3, 1.1);
}
.hero-fan:hover .fan-card.dealt {
    transform: translate(var(--htx), -8px) rotate(var(--hrot));
}

.scroll-cue { position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); width: 24px; height: 40px; border: 2px solid var(--gold-dim); border-radius: 12px; }
.scroll-cue span { position: absolute; top: 6px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(14px); opacity: 0; } }

/* ---------- Sections & watermarks ---------- */
.section-title {
    font-family: 'Cinzel', serif; font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: var(--gold-hi); text-align: center; margin-bottom: 2.4rem;
}
.watermark {
    position: absolute; font-size: clamp(16rem, 34vw, 30rem); line-height: 1;
    color: rgba(201,162,39,.05); pointer-events: none; user-select: none; z-index: 0;
    will-change: transform;
}
.wm-left { left: -6rem; top: 8%; }
.wm-right { right: -6rem; top: 8%; }
.wm-club { right: -4rem; top: -20%; }

/* ---------- How it works ---------- */
.how { position: relative; overflow: hidden; padding: 5rem 1.4rem; background: linear-gradient(var(--felt-2), var(--baize)); }
.how-inner { position: relative; z-index: 1; max-width: 62rem; margin: 0 auto; }
.how-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.6rem; }
.how-steps li { padding: 1.6rem 1.4rem; border: 1px solid rgba(201,162,39,.25); border-radius: 10px; background: rgba(21,36,28,.5); }
.how-chip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; margin-bottom: .9rem;
    background: var(--foil); color: var(--ink);
    font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.1rem;
    box-shadow: 0 0 0 3px var(--baize), 0 0 0 5px var(--gold-dim), 0 4px 10px rgba(0,0,0,.4);
}
.how-steps h3 { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.08rem; color: var(--gold-hi); margin-bottom: .4rem; }
.how-steps p { color: var(--cream-dim); font-size: .96rem; }

/* ---------- Categories ---------- */
.category { position: relative; overflow: hidden; padding: 4.5rem 1.4rem; }
.category:nth-child(even) { background: linear-gradient(rgba(21,36,28,.45), rgba(16,27,21,.45)); }
.cat-head {
    position: relative; z-index: 1; display: flex; align-items: center; gap: 1.1rem;
    max-width: 74rem; margin: 0 auto 2.2rem; flex-wrap: wrap;
}
.cat-pip {
    font-size: 2.6rem; line-height: 1; color: var(--cream);
    width: 72px; height: 72px; flex: none; display: flex; align-items: center; justify-content: center;
    background: var(--cream); color: var(--ink); border-radius: 8px;
    border: 2px solid var(--gold); box-shadow: inset 0 0 0 4px rgba(201,162,39,.25), 0 6px 16px rgba(0,0,0,.45);
}
.cat-pip.red { color: var(--suit-red); }
.cat-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.2rem); color: var(--gold-hi); }
.cat-desc { color: var(--cream-dim); max-width: 40rem; }
.cat-total { margin-left: auto; color: var(--gold); font-style: italic; font-size: .95rem; }

.card-grid {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 1.5rem; max-width: 74rem; margin: 0 auto;
}

/* ---------- Player cards ---------- */
.pcard { perspective: 900px; cursor: pointer; outline: none; opacity: 0; transform: translateY(34px); transition: opacity .5s ease, transform .5s ease; }
.pcard.in { opacity: 1; transform: translateY(0); }
.pcard-face {
    position: relative; border-radius: 12px; padding: 2.2rem 1.1rem 1.3rem;
    background:
        radial-gradient(ellipse at 50% 0%, #FFFDF6, var(--cream) 55%);
    color: var(--ink); border: 2px solid var(--gold);
    box-shadow: inset 0 0 0 6px rgba(201,162,39,.22), 0 8px 22px rgba(0,0,0,.5);
    text-align: center; min-height: 100%;
    transition: transform .18s ease-out, box-shadow .25s ease;
    transform-style: preserve-3d;
}
.pcard:hover .pcard-face, .pcard:focus-visible .pcard-face {
    box-shadow: inset 0 0 0 6px rgba(201,162,39,.35), 0 14px 30px rgba(0,0,0,.6), 0 0 24px rgba(201,162,39,.25);
}
.pcard:focus-visible .pcard-face { outline: 3px solid var(--gold-hi); outline-offset: 3px; }
.corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .95; }
.corner b { font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.15rem; }
.corner i { font-style: normal; font-size: .95rem; }
.corner.tl { top: .55rem; left: .65rem; }
.corner.br { bottom: .55rem; right: .65rem; transform: rotate(180deg); }
.portrait-frame {
    width: 118px; height: 118px; margin: 0 auto .9rem; border-radius: 50%;
    overflow: hidden; border: 3px solid var(--gold);
    box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px rgba(201,162,39,.4), 0 5px 14px rgba(0,0,0,.25);
    display: flex; align-items: center; justify-content: center; background: #efe7d2;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.15) contrast(1.04); }
.portrait-blank { font-size: 3rem; opacity: .4; }
.pcard-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.06rem; letter-spacing: .01em; }
.pcard-nick { color: var(--gold-dim); font-style: italic; font-weight: 600; font-size: .95rem; margin: .1rem 0 .1rem; }
.pcard-town { font-size: .85rem; color: #6d6455; margin-bottom: .5rem; }
.pcard-bio { font-size: .86rem; color: #4c4436; line-height: 1.5; margin-bottom: .6rem; }
.result-bar { position: relative; height: 8px; border-radius: 4px; background: rgba(28,23,16,.12); margin: .5rem .3rem .9rem; }
.result-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--foil); transition: width .8s ease; }
.result-bar em { position: absolute; right: 0; top: -1.35rem; font-size: .75rem; font-style: normal; color: #6d6455; }
.stake-chip {
    position: absolute; top: -14px; right: -12px; width: 46px; height: 46px; border-radius: 50%;
    background: var(--foil); color: var(--ink); font-size: 1.25rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px var(--gold-dim), 0 6px 14px rgba(0,0,0,.5);
    transform: scale(0) rotate(-120deg); transition: transform .3s cubic-bezier(.2,1.6,.4,1);
}
.stake-label { display: block; font-size: .78rem; color: #8a7f6b; font-style: italic; }
.pcard.selected .pcard-face { box-shadow: inset 0 0 0 6px rgba(201,162,39,.6), 0 12px 28px rgba(0,0,0,.6), 0 0 34px rgba(241,213,131,.4); }
.pcard.selected .stake-chip { transform: scale(1) rotate(0deg); }
.pcard.selected .stake-label { color: var(--gold-dim); font-weight: 600; }

body.has-bar { padding-bottom: 10rem; }

/* ---------- Ballot bar ---------- */
.ballot-bar[hidden] { display: none; }
.ballot-bar {
    position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
    z-index: 70; width: min(94vw, 640px);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .8rem 1.1rem; border-radius: 12px;
    background: rgba(16,27,21,.94); border: 1px solid var(--gold-dim);
    box-shadow: 0 10px 34px rgba(0,0,0,.6);
    animation: barin .35s ease;
}
@keyframes barin { from { transform: translate(-50%, 120%); } to { transform: translate(-50%, 0); } }
.ballot-info { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.ballot-count { font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.5rem; color: var(--gold-hi); }
.ballot-of { color: var(--cream-dim); font-size: .9rem; }
.ballot-chips span { display: inline-block; margin-left: .25rem; color: var(--gold); font-size: .95rem; }

/* ---------- Modals ---------- */
.modal {
    position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
    background: rgba(8,11,9,.78); backdrop-filter: blur(4px); padding: 1rem;
}
.modal[hidden] { display: none; }
.modal-card {
    position: relative; width: min(94vw, 440px); max-height: 90svh; overflow: auto;
    background: var(--cream); color: var(--ink);
    border: 2px solid var(--gold); border-radius: 14px;
    box-shadow: inset 0 0 0 6px rgba(201,162,39,.22), 0 24px 60px rgba(0,0,0,.7);
    padding: 2rem 1.7rem 1.7rem;
    animation: cardin .35s cubic-bezier(.2,1.2,.4,1);
}
@keyframes cardin { from { transform: translateY(40px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-x {
    position: absolute; top: .6rem; right: .8rem; border: none; background: none;
    font-size: 1.6rem; color: #8a7f6b; cursor: pointer; line-height: 1;
}
.modal-title { font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.45rem; margin-bottom: .3rem; }
.modal-sub { color: #5c5343; font-size: .95rem; margin-bottom: 1.1rem; }
.ballot-review { list-style: none; margin-bottom: 1.1rem; }
.ballot-review li { display: flex; justify-content: space-between; gap: .8rem; padding: .35rem 0; border-bottom: 1px dashed rgba(28,23,16,.18); font-size: .92rem; }
.ballot-review li b { font-weight: 600; }
.modal form label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .8rem; }
.modal form input[type=text], .modal form input[type=email] {
    display: block; width: 100%; margin-top: .3rem; padding: .65rem .8rem;
    border: 1px solid rgba(28,23,16,.3); border-radius: 6px; background: #FFFDF6;
    font-family: inherit; font-size: 1rem;
}
.modal form input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.modal form .check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; font-size: .85rem; color: #5c5343; }
.modal form .check input { margin-top: .2rem; }
.form-msg { margin-top: .8rem; font-size: .92rem; min-height: 1.2em; }
.form-msg.ok { color: #2c7a43; }
.form-msg.err { color: var(--suit-red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.news-card { text-align: center; }
.news-pip { display: block; font-size: 2.6rem; color: var(--suit-red); line-height: 1; margin-bottom: .4rem; }
.news-card form label { text-align: left; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 5.4rem; transform: translateX(-50%);
    z-index: 95; padding: .8rem 1.4rem; border-radius: 8px;
    background: var(--foil); color: var(--ink); font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
    animation: toastin .3s ease;
}
@keyframes toastin { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 3.5rem 1.2rem 2.5rem; border-top: 1px solid rgba(201,162,39,.2); }
.footer-suits span { font-size: 1.2rem; margin: 0 .35rem; color: var(--cream-dim); }
.footer-name { font-family: 'Cinzel', serif; font-weight: 700; color: var(--gold-hi); margin: .5rem 0 .3rem; }
.footer-credit { color: #7d8a80; font-size: .85rem; }
.footer-credit a { color: var(--gold); }
.gear { margin-left: .6rem; font-size: 1rem; color: #55615a; }
.gear:hover { color: var(--gold-hi); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .nav-link { display: none; }
    .cat-total { margin-left: 0; width: 100%; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
    .pcard-bio { display: none; }
    .portrait-frame { width: 96px; height: 96px; }
    .ballot-bar { bottom: .6rem; padding: .65rem .8rem; }
    body.has-bar { padding-bottom: 12rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-title { animation: none; }
    .fan-card { animation-duration: .01s; }
    .fan-card.dealt { transition: none; }
    .scroll-cue span { animation: none; }
    .watermark { transform: none !important; }
    .pcard { opacity: 1; transform: none; transition: none; }
    .pcard-face { transition: box-shadow .2s ease; transform: none !important; }
}

/* ---------- Nominations ---------- */
.nominate-row { position: relative; z-index: 1; text-align: center; margin-top: 2rem; }
.btn-nominate {
    background: none; border: 1px dashed var(--gold-dim); color: var(--gold-hi);
    font-family: 'Spectral', Georgia, serif; font-style: italic; font-size: .98rem;
    padding: .6rem 1.4rem; border-radius: 999px; cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.btn-nominate:hover { border-color: var(--gold); background: rgba(201,162,39,.08); }
.modal form textarea {
    display: block; width: 100%; margin-top: .3rem; padding: .65rem .8rem;
    border: 1px solid rgba(28,23,16,.3); border-radius: 6px; background: #FFFDF6;
    font-family: inherit; font-size: 1rem; resize: vertical;
}
.modal form textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.modal form input[type=file] { display: block; margin-top: .35rem; font-size: .9rem; color: #5c5343; }
