/* Estilo ZephyrOS: tokens alineados con ZephyrOS/src/index.css (prefijo --color-*).
   Tema por atributo data-theme en <html>; clave localStorage compartida: zephyros_theme. */
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/dm-sans-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/dm-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/dm-sans-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/dm-sans-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/dm-sans-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: 'Clash Display'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/clash-display-600.woff2') format('woff2'); }
@font-face { font-family: 'Clash Display'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/clash-display-700.woff2') format('woff2'); }

:root, :root[data-theme="dark"] {
  --color-background: #00001e;
  --color-background-light: #1a1a2e;
  --color-background-lighter: #252540;
  --color-accent: #66D3C8;
  --color-accent-hover: #55c2b7;
  --color-text: #e0e0e0;
  --color-text-secondary: #a0a0a0;
  --color-border: #2c2c2c;
  --color-error: #ff6b6b;
  --color-success: #22c55e;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --color-background: #ffffff;
  --color-background-light: #f1f5f9;
  --color-background-lighter: #e2e8f0;
  --color-accent: #0d9488;
  --color-accent-hover: #0f766e;
  --color-text: #16213a;
  --color-text-secondary: #5a6576;
  --color-border: #e2e8f0;
  --color-error: #dc3545;
  --color-success: #0f766e;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  background-color: var(--color-background);
  color: var(--color-text);
}

/* Cabecera */
header {
  padding: 24px 32px;
  background: #00001e; /* siempre oscuro: el logo de Vertiports Network lleva texto blanco */
  border-bottom: 1px solid #2c2c2c;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 52px; width: auto; display: block; }
.brand span { color: #a0a0a0; font-size: .95rem; padding-left: 14px; border-left: 1px solid #2c2c2c; }
header .btn-secondary { color: #e0e0e0; border-color: #2c2c2c; }
header .btn-secondary:hover { color: #66D3C8; border-color: #66D3C8; }

/* Titular */
.hero { text-align: center; padding: 16px 0 0; }
.hero h1 {
  margin: 0; font-family: 'Clash Display', 'DM Sans', sans-serif; font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.1; color: var(--color-text);
}
.hero h1 em { font-style: normal; color: var(--color-accent); }
h1, h2 { font-family: 'Clash Display', 'DM Sans', sans-serif; }
.header-actions { display: flex; align-items: center; gap: 8px; }

main { max-width: 1040px; margin: 0 auto; padding: 24px; display: grid; gap: 24px; }

/* Tarjetas */
.card { background: var(--color-background-light); border: 1px solid var(--color-border); border-radius: 12px; padding: 20px; }
.card h2 { margin: 0 0 16px; font-size: 1.15rem; font-weight: 600; color: var(--color-accent); }

/* Cuenta atrás */
.countdown { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.countdown div {
  min-width: 76px; padding: 12px 8px; border-radius: 12px; display: grid; gap: 2px;
  background: var(--color-background-light); border: 1px solid var(--color-border);
}
.countdown b {
  font-family: 'Clash Display', 'DM Sans', sans-serif; font-weight: 700; font-size: 2rem;
  line-height: 1; color: var(--color-accent); font-variant-numeric: tabular-nums;
}
.countdown small { color: var(--color-text-secondary); font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; }
.countdown-end { margin: 20px 0 0; color: var(--color-accent); font-family: 'Clash Display', 'DM Sans', sans-serif; font-size: 1.4rem; font-weight: 600; }

.empty { color: var(--color-text-secondary); text-align: center; padding: 24px; }

/* Formularios */
form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: .85rem; color: var(--color-text-secondary); }
input {
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--color-border);
  background: var(--color-background); color: var(--color-text);
  font-family: inherit; font-size: .95rem;
}
input:focus { outline: none; border-color: var(--color-accent); }


/* Botones */
button { font-family: inherit; font-size: .95rem; cursor: pointer; }
button[type="submit"], .btn-primary {
  padding: 10px 20px; border: 1px solid transparent; border-radius: 8px;
  background: var(--color-accent); color: var(--color-background); font-weight: 600;
}
button[type="submit"]:hover, .btn-primary:hover { background: var(--color-accent-hover); }
.btn-secondary {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 8px;
  background: transparent; color: var(--color-text); border: 1px solid var(--color-border);
  text-decoration: none; font-size: .9rem; font-weight: 500;
}
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
button.link { background: none; border: 0; color: var(--color-error); padding: 0; font-size: .85rem; font-weight: 500; }

.msg { min-height: 1.2em; font-size: .9rem; }
.msg.err { color: var(--color-error); }
.msg.ok { color: var(--color-success); }
.hidden { display: none !important; }
.stack { display: grid; gap: 24px; }

@media (max-width: 600px) {
  header, main { padding: 12px; }
  .brand span { display: none; }
  .brand img { height: 36px; }
  .countdown { gap: 8px; }
  .countdown div { min-width: 0; flex: 1; }
  .countdown b { font-size: 1.5rem; }
}

/* Llamada a la acción */
.cta { text-align: center; margin-top: 28px; }
.cta p { margin: 0 0 16px; font-family: 'Clash Display', 'DM Sans', sans-serif; font-weight: 600; font-size: 1.6rem; color: var(--color-text); }
.cta p.cta-va { margin-top: -8px; font-size: 1.25rem; font-weight: 500; color: var(--color-text-secondary); }
.cta .hashtag { display: block; font-size: 1.15rem; font-weight: 700; color: var(--color-accent); text-decoration: none; }
.cta .hashtag:hover { text-decoration: underline; }
.hero { padding-top: 12vh; }
.hero.post { padding-top: 6vh; }
[hidden] { display: none !important; }

/* Landing posterior al evento: carrusel de Instagram */
.post-lead { margin: 16px 0 28px; font-size: 1.15rem; color: var(--color-text-secondary); }
.carousel { position: relative; max-width: 960px; margin: 0 auto 28px; }
.car-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: 12px; outline-offset: 4px;
}
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 calc((100% - 24px) / 3); scroll-snap-align: start; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--color-background-light); border: 1px solid var(--color-border); }
.car-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.car-slide:hover img { transform: scale(1.04); }
.car-btn {
  position: absolute; top: calc(50% - 22px); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--color-border);
  background: var(--color-background-light); color: var(--color-text); font-size: 1.6rem; line-height: 1; z-index: 1;
}
.car-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.car-btn.prev { left: -12px; } .car-btn.next { right: -12px; }
.car-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.car-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border); cursor: pointer; }
.car-dots span.on { background: var(--color-accent); }
.ig-link { text-decoration: none; padding: 12px 24px; }
@media (max-width: 800px) { .car-slide { flex-basis: calc((100% - 12px) / 2); } }
@media (max-width: 500px) { .car-slide { flex-basis: 100%; } .car-btn.prev { left: 4px; } .car-btn.next { right: 4px; } }

/* Stories y reels */
.block { max-width: 960px; margin: 0 auto 36px; text-align: left; }
.block h2, .block-title { margin: 0 0 14px; font-size: 1.3rem; font-weight: 600; color: var(--color-accent); }
.block-title { max-width: 960px; margin: 0 auto 14px; text-align: left; }
.story-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.story {
  position: relative; flex: 0 0 150px; aspect-ratio: 9 / 16; padding: 0; border-radius: 14px; overflow: hidden;
  border: 2px solid var(--color-accent); background: var(--color-background-light); scroll-snap-align: start;
}
.story img, .story video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.story .tag {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; background: rgba(0, 0, 30, .75); color: #66D3C8;
}
.story:hover { filter: brightness(1.1); }

/* Visor */
#viewer { width: min(420px, 100vw); height: min(100dvh, 780px); max-height: none; padding: 0; border-radius: 14px; background: #000; overflow: hidden; position: relative; }
#viewer::backdrop { background: rgba(0, 0, 30, .9); }
.v-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.v-stage img, .v-stage video { width: 100%; height: 100%; object-fit: contain; }
.v-bars { position: absolute; top: 10px; left: 10px; right: 56px; display: flex; gap: 4px; z-index: 3; }
.v-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.v-bars span.done i { width: 100%; }
.v-bars i { display: block; height: 100%; width: 0; background: #fff; }
@keyframes vfill { to { width: 100%; } }
.v-close { position: absolute; top: 2px; right: 8px; z-index: 3; background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; padding: 4px 8px; }
.v-nav { position: absolute; top: 40px; bottom: 56px; width: 40%; z-index: 2; background: none; border: 0; }
.v-prev { left: 0; } .v-next { right: 0; }
.v-open { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 3; padding: 8px 16px; border-radius: 999px; background: rgba(0, 0, 30, .8); color: #66D3C8; font-size: .85rem; text-decoration: none; }
@media (max-width: 500px) { #viewer { width: 100vw; height: 100dvh; border-radius: 0; } .story { flex-basis: 120px; } }

/* Instrucciones (modal) */
.post-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.post-actions .btn-primary { cursor: pointer; font-size: .95rem; padding: 12px 24px; }
dialog {
  width: min(520px, calc(100vw - 32px)); padding: 24px; color: var(--color-text);
  background: var(--color-background-light); border: 1px solid var(--color-border); border-radius: 12px;
}
dialog::backdrop { background: rgba(0, 0, 30, .7); }
#viewer { border: 0; color: #fff; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 1.4rem; font-weight: 600; color: var(--color-accent); }
.modal-close { background: none; border: 0; color: var(--color-text-secondary); font-size: 1.8rem; line-height: 1; padding: 0 4px; }
.modal-close:hover { color: var(--color-accent); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 16px; text-align: left; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; }
.steps li::before {
  content: counter(step); grid-row: span 2; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  background: rgba(102, 211, 200, .15); color: var(--color-accent); border: 1px solid var(--color-accent);
}
.steps strong { font-weight: 600; }
.steps span { color: var(--color-text-secondary); font-size: .9rem; }

.post-rules { margin: 20px 0 0; }
.post-rules .btn-primary { cursor: pointer; font-size: 1rem; padding: 12px 28px; }

/* Bases legales */
main.legal { display: block; max-width: 760px; line-height: 1.6; }
.legal h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 8px 0 4px; }
.legal h2 { font-size: 1.15rem; font-weight: 600; color: var(--color-accent); margin: 28px 0 8px; }
.legal p, .legal li { font-size: .95rem; color: var(--color-text); }
.legal li { margin: 6px 0; }
.legal ol, .legal ul { padding-left: 22px; }
.legal a { color: var(--color-accent); }
.legal-meta { color: var(--color-text-secondary); font-size: .85rem; }
mark.ph { background: rgba(245, 197, 66, .25); color: inherit; padding: 0 4px; border-radius: 4px; outline: 1px dashed #f5c542; }

/* Enlace a las bases */
.legal-link { text-align: center; margin: 32px 0 8px; font-size: .85rem; }
.legal-link a { color: var(--color-text-secondary); }
.legal-link a:hover { color: var(--color-accent); }

/* Admin: formulario Tally empotrado */
.hint { margin: 0 0 16px; font-size: .9rem; color: var(--color-text-secondary); }
.hint a { color: var(--color-accent); }
#tally { width: 100%; height: 900px; border: 0; border-radius: 8px; background: #fff; }
button.link { background: none; border: 0; color: var(--color-error); padding: 0; font-size: .85rem; font-weight: 500; }

/* Botones con icono */
.ico { flex: none; margin-right: 8px; }
