/* © 2026 Sofía Aljure — RolloFest. Todos los derechos reservados. Prohibida su copia o uso sin autorización. */
:root {
  --orange: #E1360C;
  --orange-dark: #B82A08;
  --cream: #F4E7CE;
  --cream-2: #FBF5EA;
  --ink: #2A140B;
  --ink-2: #6B5348;
  --line: #E8D9C0;
  --white: #fff;
  --star: #F2A900;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(42, 20, 11, .14);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--cream-2); line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--orange); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; }
.muted { color: var(--ink-2); font-weight: 400; }
[hidden] { display: none !important; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 0; border-radius: 999px; padding: .8em 1.4em; font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-small { padding: .6em 1em; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--orange); color: var(--cream); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-cream { background: var(--cream); color: var(--orange); }
.btn-cream:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px var(--cream); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: var(--line); }
:focus-visible { outline: 3px solid var(--star); outline-offset: 2px; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, env(safe-area-inset-left)); background: var(--orange); color: var(--cream); box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font: 800 1.25rem var(--display); }
.brand img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--cream); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--cream); text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: rgba(255,255,255,.15); }
.auth { margin-left: 8px; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 0; background: rgba(255,255,255,.15); color: var(--cream); padding: 4px 12px 4px 4px; border-radius: 999px; font: 700 .9rem var(--body); cursor: pointer; }
.user-btn img, .avatar-fallback { width: 32px; height: 32px; border-radius: 50%; }
.avatar-fallback { display: grid; place-items: center; background: var(--cream); color: var(--orange); text-transform: uppercase; }
.demo-banner { background: #FFF3C4; color: #5A4500; font-size: .85rem; padding: 8px 16px; text-align: center; }
.demo-banner code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }

/* ---------- hero ---------- */
.hero { background: var(--orange); color: var(--cream); padding: 48px 16px 64px; overflow: hidden; }
.hero-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -.02em; margin: 14px 0 16px; }
.lead { font-size: 1.15rem; max-width: 36em; margin: 0 0 24px; }
.status-chip { display: inline-block; margin: 0; background: rgba(255,255,255,.16); padding: 6px 14px; border-radius: 999px; font-weight: 700; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-logo img { width: 100%; height: auto; aspect-ratio: 1; max-width: 420px; margin: 0 auto; border-radius: 50%; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.passport { margin-top: 28px; background: rgba(0,0,0,.14); border-radius: var(--radius); padding: 14px 16px; max-width: 460px; }
.passport-title { font: 800 1rem var(--display); margin-bottom: 8px; }
.passport-dots { display: flex; gap: 8px; margin-bottom: 8px; }
.pdot { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255,255,255,.35); filter: grayscale(1); opacity: .55; }
.pdot.on { filter: none; opacity: 1; border-color: var(--cream); }
.pdot img { width: 100%; height: 100%; object-fit: cover; }
.passport-meta { font-size: .92rem; }

/* ---------- secciones ---------- */
.section { padding: 56px 16px; }
.section > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.section-alt { background: var(--cream); }
.section-orange { background: var(--orange); color: var(--cream); }
.section-head { margin-bottom: 24px; }
.section-head h2, .festival h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.section-head p { margin: 8px 0 0; color: var(--ink-2); }

/* ---------- mapa ---------- */
.map-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
.map-wrap { position: relative; }
#map { height: min(72vh, 640px); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 1; background: #e9e4da; }
.map-btn { position: absolute; z-index: 500; right: 12px; bottom: 28px; border: 0; background: #fff; color: var(--ink); font: 700 .9rem var(--body); padding: 10px 14px; border-radius: 999px; box-shadow: var(--shadow); cursor: pointer; }
.pin-wrap { background: none; border: 0; }
.pin { width: 52px; height: 52px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--orange); padding: 4px; box-shadow: 0 6px 14px rgba(0,0,0,.35); transition: transform .15s; }
.pin img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; transform: rotate(45deg); background: #fff; border: 2px solid var(--cream); }
.pin-wrap:hover .pin { transform: rotate(-45deg) scale(1.1); }
.pin-emoji { position: absolute; top: -8px; right: -10px; font-size: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.leaflet-tooltip { font-family: var(--body); border-radius: 10px; }
.leaflet-container a { color: var(--orange); }

.r-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: min(72vh, 640px); overflow: auto; }
.r-card { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; transition: box-shadow .15s, transform .15s; }
.r-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.r-logo { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); background: #fff; }
.r-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.r-name { font: 800 1.05rem var(--display); }
.r-sub { font-size: .88rem; color: var(--ink-2); }
.r-meta { font-size: .88rem; margin-top: 2px; }
.mine { color: var(--orange); font-weight: 700; }
.r-go { font-size: 1.6rem; color: var(--orange); }

/* ---------- ranking ---------- */
.ranking { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.rank-row button { width: 100%; display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.rank-row button:hover { box-shadow: var(--shadow); }
.rank-pos { width: 36px; text-align: center; font: 800 1.5rem var(--display); color: var(--orange); flex: none; }
.rank-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-stars { font-size: .9rem; }
.bar { height: 8px; background: var(--cream); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--orange); border-radius: 999px; transition: width .4s; }
.rank-votes { text-align: center; flex: none; min-width: 56px; }
.rank-votes strong { display: block; font: 800 1.6rem var(--display); color: var(--orange); }
.rank-votes small { color: var(--ink-2); }
.stars-static { color: var(--star); letter-spacing: 1px; }
.stars-static .off { color: #DDD0BA; }

/* ---------- pasos ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: var(--cream); font: 800 1.2rem var(--display); margin-bottom: 10px; }
.steps h3 { font-size: 1.3rem; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); }
.note { margin-top: 20px; background: var(--cream); border-radius: var(--radius); padding: 14px 18px; }

/* ---------- festival ---------- */
.festival { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; margin-bottom: 24px; }
.festival p { font-size: 1.08rem; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.facts div { background: rgba(0,0,0,.14); border-radius: var(--radius); padding: 14px 16px; }
.facts dt { font-size: .85rem; opacity: .85; }
.facts dd { margin: 4px 0 0; font: 800 1.1rem var(--display); }
.faq { background: rgba(0,0,0,.12); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 10px 0 0; }

.footer { text-align: center; padding: 32px 16px calc(32px + env(safe-area-inset-bottom)); color: var(--ink-2); font-size: .9rem; }
.footer img { margin: 0 auto 10px; border-radius: 50%; }
.footer p { margin: 4px 0; }

/* ---------- ficha (sheet) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(42,20,11,.5); z-index: 1100; animation: fade .2s; }
.sheet { position: fixed; z-index: 1101; background: var(--cream-2); overflow-y: auto; overscroll-behavior: contain;
  left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: pop .22s ease-out; }
.sheet-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); font-size: 1.1rem; cursor: pointer; }
.sheet-body { padding: 24px 24px 32px; }
.sh-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; padding-right: 40px; }
.sh-logo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--orange); flex: none; background: #fff; }
.sh-head h2 { font-size: 1.7rem; font-weight: 800; }
.sh-score { font-size: .92rem; margin-top: 4px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.badge { background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 700; }
.proposal { background: var(--orange); color: var(--cream); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.proposal.pending { background: repeating-linear-gradient(-45deg, var(--orange), var(--orange) 14px, #D93309 14px, #D93309 28px); }
.proposal-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; opacity: .85; margin-bottom: 6px; }
.proposal h3 { font-size: 1.4rem; margin-bottom: 6px; }
.proposal p { margin: 0; }
.proposal-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.price { background: var(--cream); color: var(--orange); font: 800 .95rem var(--body); padding: 2px 10px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.about { margin: 0 0 16px; }
.info-grid { display: grid; gap: 10px; margin-bottom: 18px; }
.info { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.info-ico { font-size: 1.3rem; }
.info-t { font-size: .8rem; color: var(--ink-2); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.info a { word-break: break-all; }
.sh-sub { font-size: 1.2rem; margin: 18px 0 10px; }
.locs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.loc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.loc-txt { display: flex; flex-direction: column; margin-bottom: 10px; }
.loc-txt span { color: var(--ink-2); font-size: .92rem; }
.loc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rate-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 18px; margin-top: 18px; }
.stars-input { display: flex; gap: 4px; }
.stars-input button { font-size: 2.6rem; line-height: 1; padding: 0 2px; background: none; border: 0; color: #DDD0BA; cursor: pointer; transition: transform .1s, color .1s; }
.stars-input button.on { color: var(--star); }
.stars-input button:hover { transform: scale(1.15); }
.hint { color: var(--ink-2); font-size: .88rem; margin: 6px 0 12px; }
.vote-done, .vote-other { border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.vote-done { background: #FFF1C2; color: #6A4A00; }
.vote-other { background: var(--cream); }
.comments { margin-top: 8px; }
.c-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px; font: inherit; resize: vertical; background: #fff; }
.c-form textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }
.c-form-row { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 14px; }
.c-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.c-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.c-top { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
.c-item p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- confirm / toast ---------- */
.confirm { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; background: rgba(42,20,11,.55); padding: 16px; }
.confirm-card { background: var(--cream-2); border-radius: 20px; padding: 22px; max-width: 420px; width: 100%; box-shadow: var(--shadow); }
.confirm-card p { margin: 0 0 18px; white-space: pre-line; font-size: 1.05rem; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.toast { position: fixed; z-index: 1300; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); width: max-content; font-weight: 500; animation: up .2s; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } }
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes sheetUp { from { transform: translateY(100%); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-logo { order: -1; }
  .hero-logo img { max-width: 220px; margin: 0; }
  .map-layout { grid-template-columns: 1fr; }
  .r-list { max-height: none; overflow: visible; }
  .steps { grid-template-columns: 1fr 1fr; }
  .festival { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .auth { margin-left: auto; }
  .hero { padding: 28px 16px 44px; }
  .hero-logo img { max-width: 150px; }
  .section { padding: 40px 16px; }
  #map { height: 58vh; }
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .rank-row button { gap: 10px; padding: 10px 12px; }
  .rank-row .r-logo { width: 44px; height: 44px; }
  .rank-pos { width: 26px; font-size: 1.2rem; }
  .user-name { display: none; }
  .user-btn { padding: 4px; }
  /* ficha como hoja inferior */
  .sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 90vh; border-radius: 24px 24px 0 0; animation: sheetUp .25s ease-out; padding-bottom: env(safe-area-inset-bottom); }
  .sheet-body { padding: 18px 16px 28px; }
  .sh-logo { width: 64px; height: 64px; }
  .sh-head h2 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.credit { font-size: .8rem; opacity: .8; margin-top: 10px !important; }
