/* micasa.andresflorez.ca : dirección visual "Cabinet" (arena, piedra, charcoal, cobre) */
@font-face { font-family: 'Newsreader'; src: url('/assets/fonts/newsreader-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('/assets/fonts/public-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --arena: #FDFDFA; --piedra: #E6E6E1; --tarjeta: #F1F1EC; --tinta: #1B1D22; --suave: #4A4D55; --tenue: #6B6E76;
  --cobre: #A42D06; --cobre-claro: #F3A17F; --error: #9B1C1C;
  --ancho: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--arena); color: var(--tinta); font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 18px; line-height: 1.55; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--cobre); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: 'Newsreader', Georgia, serif; font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 7.2vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.45rem; font-weight: 600; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--cobre); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

.salto { position: absolute; left: -9999px; top: 0; background: var(--tinta); color: #fff; padding: 12px 16px; z-index: 10; }
.salto:focus { left: 8px; top: 8px; }

.sobre { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cobre); margin: 0 0 0.9rem; }
.letra { font-size: 0.85rem; line-height: 1.5; color: var(--tenue); }
.opc { font-weight: 400; color: var(--tenue); }

.btn { display: inline-block; background: var(--cobre); color: #fff; font: inherit; font-weight: 700; text-decoration: none; text-align: center; border: 0; border-radius: 3px; padding: 15px 26px; min-height: 48px; cursor: pointer; transition: background 0.15s ease, transform 0.15s ease; }
.btn:hover { background: #8A2505; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn.chico { padding: 10px 16px; min-height: 44px; font-size: 0.95rem; }
.btn.grande { width: 100%; font-size: 1.1rem; padding: 17px 26px; }
.btn.sec { background: transparent; color: var(--cobre); box-shadow: inset 0 0 0 2px var(--cobre); }
.btn.sec:hover { background: #FBEFEA; }

/* Barra superior */
.barra { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px clamp(16px, 4vw, 40px); background: rgba(253, 253, 250, 0.94); border-bottom: 1px solid var(--piedra); }
@supports (backdrop-filter: blur(8px)) { .barra { backdrop-filter: blur(8px); } }
.marca-sitio { display: flex; align-items: center; gap: 10px; color: var(--tinta); text-decoration: none; font-family: 'Newsreader', Georgia, serif; font-size: 1.2rem; font-weight: 600; }
.marca-sitio svg { color: var(--cobre); }
.marca-sitio, .btn.chico { white-space: nowrap; }
@media (max-width: 420px) { .marca-sitio svg { width: 40px; } .marca-sitio { font-size: 1.08rem; gap: 8px; } }

main > section { padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 40px); }
main > section > *, .pie > * { max-width: var(--ancho); margin-left: auto; margin-right: auto; }

/* Portada */
.hero { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; padding-top: clamp(32px, 6vw, 72px); }
.hero > * { max-width: none; margin: 0; }
.bajada { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--suave); margin: 1.2rem 0 1.6rem; max-width: 34em; }
.datos { list-style: none; padding: 0; margin: 0 0 1.8rem; display: grid; gap: 0; border-top: 1px solid var(--piedra); }
.datos li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--piedra); }
.datos li div { display: flex; flex-direction: column; }
.datos .ico { color: var(--cobre); flex: none; }
.legal { font-weight: 600; margin-bottom: 10px; }
.datos b { font-size: 1.1rem; }
.datos span { color: var(--suave); font-size: 0.98rem; }
.video { margin: 0; }
.video video { width: 100%; aspect-ratio: 16 / 9; background: var(--tinta); border-radius: 4px; box-shadow: 0 18px 50px -24px rgba(27, 29, 34, 0.55); }
.marco-video { position: relative; }
.sonido { position: absolute; right: 12px; top: 12px; background: rgba(20, 22, 27, 0.86); color: #fff; font: inherit; font-weight: 700; font-size: 0.95rem; border: 2px solid #fff; border-radius: 999px; padding: 9px 16px; min-height: 44px; cursor: pointer; }
.sonido:hover { background: var(--cobre); }
.video figcaption { font-size: 0.9rem; color: var(--tenue); margin-top: 10px; }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); max-width: calc(var(--ancho) + 80px); margin: 0 auto; }
}

/* Cinco preguntas */
.franja { background: var(--tarjeta); }
.preguntas { list-style: none; counter-reset: p; padding: 0; margin-top: 0; margin-bottom: 0; display: grid; gap: 16px; }
.preguntas li { counter-increment: p; background: var(--arena); border-top: 4px solid var(--cobre); padding: 22px 22px 8px; }
.preguntas li::before { content: counter(p); display: block; font-family: 'Newsreader', Georgia, serif; font-size: 1.6rem; color: var(--cobre); margin-bottom: 6px; }
.preguntas h3 { margin-bottom: 8px; }
.preguntas p { color: var(--suave); font-size: 1rem; }
@media (min-width: 640px) { .preguntas { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .preguntas { grid-template-columns: repeat(5, 1fr); } }

/* Equipo */
.personas { display: grid; gap: 28px; }
.personas article { display: grid; grid-template-columns: 112px 1fr; column-gap: 18px; align-items: start; }
.personas img { grid-row: span 3; width: 112px; height: 134px; object-fit: cover; object-position: top; background: var(--piedra); border-radius: 3px; }
.personas h3 { align-self: end; }
.personas .titulo { font-weight: 600; margin: 4px 0 6px; font-size: 0.98rem; }
.personas p:last-child { color: var(--suave); font-size: 1rem; margin: 0; }
@media (min-width: 900px) {
  .personas { grid-template-columns: repeat(3, 1fr); }
  .personas article { grid-template-columns: 1fr; }
  .personas img { grid-row: auto; width: 100%; height: auto; aspect-ratio: 5 / 6; margin-bottom: 16px; }
}

/* Sorteo */
.sorteo { background: var(--tinta); color: var(--arena); display: grid; gap: 28px; }
.sorteo > * { max-width: none; margin: 0; }
.sorteo .sobre { color: var(--cobre-claro); }
.sorteo p { color: #D9D9D2; max-width: 36em; }
.sorteo .letra { color: #A9AAA8; }
.premios { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-self: center; }
.premios li { border: 1px solid #3A3D45; border-top: 4px solid var(--cobre-claro); padding: 20px 12px; text-align: center; }
.premios b { display: block; font-size: clamp(1.5rem, 4.6vw, 2.6rem); line-height: 1.1; font-weight: 600; color: #fff; }
.premios span { font-size: 0.9rem; color: #C9C9C2; }
@media (min-width: 900px) { .sorteo { grid-template-columns: 1.1fr 1fr; max-width: none; } .sorteo > * { max-width: 560px; } .sorteo > div { justify-self: end; } }

/* Inscripción */
.inscripcion { display: grid; gap: 28px; scroll-margin-top: 70px; }
.inscripcion > * { max-width: none; margin: 0; }
.cupo { font-family: 'Newsreader', Georgia, serif; font-size: 1.5rem; color: var(--cobre); font-weight: 600; }
.lista { padding-left: 1.1em; margin: 0 0 1rem; color: var(--suave); }
.lista li { margin-bottom: 6px; }
.formulario, .gracias { background: var(--tarjeta); border-top: 5px solid var(--cobre); padding: clamp(20px, 4vw, 34px); }
.campo { margin-bottom: 16px; }
.campo label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.98rem; }
input, select { font: inherit; color: var(--tinta); }
.campo input, .campo select { width: 100%; min-height: 50px; padding: 11px 13px; background: #fff; border: 1.5px solid #B9B9B2; border-radius: 3px; }
.campo input:focus, .campo select:focus { border-color: var(--cobre); outline: 3px solid rgba(164, 45, 6, 0.22); outline-offset: 0; }
.campo input[aria-invalid="true"], .campo select[aria-invalid="true"] { border-color: var(--error); background: #FFF6F5; }
.dos { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .dos { grid-template-columns: 1fr 1fr; } }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; line-height: 1.45; margin: 0 0 14px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--cobre); }
.estado { min-height: 1.4em; margin: 12px 0 8px; font-weight: 600; }
.estado.error { color: var(--error); }
.gracias h3 { font-size: 1.9rem; margin-bottom: 12px; }
@media (min-width: 960px) {
  .inscripcion { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); max-width: calc(var(--ancho) + 80px); margin: 0 auto; align-items: start; }
  .gracias { grid-column: 2; }
}

/* Preguntas frecuentes */
.faq { background: var(--tarjeta); }
.faq details { border-bottom: 1px solid #D4D4CD; }
.faq summary { cursor: pointer; padding: 18px 28px 18px 0; font-weight: 600; font-size: 1.08rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 1.6rem; font-weight: 400; color: var(--cobre); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--suave); max-width: 46em; padding-bottom: 8px; }

/* Pie */
.pie { padding: 40px clamp(16px, 4vw, 40px) 56px; border-top: 1px solid var(--piedra); }
.contactos { display: grid; gap: 28px; margin-bottom: 28px; }
.contactos h3 { font-size: 1.35rem; margin-bottom: 6px; }
.contactos p { margin: 0 0 14px; color: var(--suave); line-height: 1.6; }
.pie .logo-socios { width: 260px; margin: 0; }
.pie .logo-exp { width: 96px; margin: 0; }
.pie .logo-wfg { width: 84px; margin: 0; }
.contactos a { overflow-wrap: anywhere; }
@media (min-width: 800px) { .contactos { grid-template-columns: repeat(3, 1fr); } }
.pie p { margin-left: auto; margin-right: auto; }

@media (prefers-reduced-motion: no-preference) {
  .hero-texto > * { animation: subir 0.6s ease both; }
  .hero-texto > :nth-child(2) { animation-delay: 0.06s; }
  .hero-texto > :nth-child(3) { animation-delay: 0.12s; }
  .hero-texto > :nth-child(4) { animation-delay: 0.18s; }
  .hero-texto > :nth-child(5) { animation-delay: 0.24s; }
  .video { animation: subir 0.7s 0.2s ease both; }
}
@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Páginas simples (bajas, entrada del panel) */
body.simple { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--tarjeta); }
.caja { background: var(--arena); border-top: 5px solid var(--cobre); padding: 32px; max-width: 480px; width: 100%; }
.caja h1 { font-size: 2rem; margin-bottom: 16px; }
.caja form { margin: 20px 0; display: grid; gap: 10px; }
.caja input { min-height: 50px; padding: 11px 13px; border: 1.5px solid #B9B9B2; border-radius: 3px; background: #fff; }
.error { color: var(--error); font-weight: 600; }

/* Panel */
body.panel { padding: 20px clamp(12px, 3vw, 32px) 60px; font-size: 16px; }
.panel h1 { font-size: 2rem; }
.panel h2 { font-size: 1.4rem; margin-bottom: 12px; }
.panel-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.aviso { background: #FBEFEA; border-left: 4px solid var(--cobre); padding: 12px 16px; font-weight: 600; }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.cifras div { background: var(--tarjeta); padding: 16px; border-top: 4px solid var(--cobre); }
.cifras b { display: block; font-size: 2rem; line-height: 1.1; }
.cifras span { color: var(--suave); font-size: 0.9rem; }
.bloques { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 32px; align-items: start; }
.bloque { background: var(--tarjeta); padding: 20px; display: grid; gap: 8px; }
.bloque label { font-weight: 600; font-size: 0.92rem; }
.bloque input[type="number"], .bloque input:not([type]), .bloque input[type="email"] { min-height: 44px; padding: 8px 10px; border: 1.5px solid #B9B9B2; border-radius: 3px; background: #fff; width: 100%; }
.bloque .check { margin: 4px 0; font-weight: 400; }
.nota { font-size: 0.88rem; color: var(--tenue); margin: 0; }
.enlace { background: none; border: 0; padding: 8px 4px; font: inherit; color: var(--cobre); text-decoration: underline; cursor: pointer; min-height: 40px; }
.tabla { overflow-x: auto; }
.tabla table { border-collapse: collapse; width: 100%; min-width: 860px; }
.tabla th, .tabla td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--piedra); vertical-align: top; }
.tabla th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--tenue); }
.tabla small { color: var(--tenue); }
.tabla tr.cancelada td { opacity: 0.5; }
.tabla tr.espera td:first-child { box-shadow: inset 4px 0 0 #C99A00; }
.tabla select { min-height: 40px; padding: 6px 8px; border: 1.5px solid #B9B9B2; border-radius: 3px; background: #fff; }
.marca { min-height: 40px; padding: 6px 14px; border: 1.5px solid #B9B9B2; background: #fff; border-radius: 3px; font: inherit; cursor: pointer; }
.marca.si { background: #1F6B3A; border-color: #1F6B3A; color: #fff; font-weight: 700; }
