/* ------------------------------------------------------------------
   Patitus — stylesheet publico de patit.us
   Branding: paleta y tipografias alineadas con la app Flutter.
   - Fondo ink:        #13131F  (PatitusTheme.ink)
   - Duck primario:    #F5C518  (PatitusTheme.duck)
   - Texto primario:   #FFFFFF
   - Texto secundario: #B0B0C0
   - Borde sutil:      #2A2A40
   Categorias (root) — match exacto con lib/config/theme.dart::categoryColor:
     music   #FF3D71   sport      #00E676   gaming     #AA00FF
     food    #FFAB40   art        #FF6D00   social     #2979FF
     experience #EC4899  mindfulness #7DD3C0  comedy   #FBBF24
     other   #888888
   Tipografias: Space Grotesk (display) + Plus Jakarta Sans (body),
   importadas en _layout.php. Match con la app Flutter.
------------------------------------------------------------------ */

:root {
    --accent: #F5C518;
    --accent-dim: #C9A000;
    --bg: #13131F;
    --bg-elev: #1A1A2A;
    --bg-card: #202032;
    --text: #FFFFFF;
    --text-muted: #B0B0C0;
    --border: #2A2A40;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

/* ----------------------------- Header ----------------------------- */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(19, 19, 31, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.site-header .brand img {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 8px rgba(245, 197, 24, 0.25));
}

.site-header .brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    color: var(--accent);
    letter-spacing: 0.2px;
}

.site-header .site-nav { display: flex; gap: 8px; }

/* ----------------------------- Wrap ------------------------------- */

.wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px 96px;
}

/* ----------------------------- Buttons ---------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.08s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    font-size: 15px;
    font-family: var(--font-body);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--accent);
    color: #1a1300;
    box-shadow: 0 4px 14px rgba(245, 197, 24, 0.35);
}
.btn-primary:hover { background: #ffd630; }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
    padding: 9px 16px;
    font-size: 14px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-block {
    display: flex;
    width: 100%;
}

.cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0 24px;
}
.cta-row .btn { flex: 1 1 auto; min-width: 160px; }

.link-muted {
    color: var(--text-muted);
    text-decoration: underline;
    font-size: 14px;
}

/* ----------------------------- Hero (homepage) ------------------- */

.hero {
    padding: 56px 0 24px;
    text-align: center;
}
.hero h1 {
    font-size: clamp(36px, 7vw, 60px);
    line-height: 1.05;
    margin: 16px 0 8px;
    font-weight: 800;
    font-family: var(--font-display);
    letter-spacing: -0.025em;
}
.hero .accent { color: var(--accent); }
.hero .lead {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 560px;
    margin: 0 auto 24px;
}
.hero-logo {
    margin: 0 auto;
    filter: drop-shadow(0 8px 24px rgba(245, 197, 24, 0.4));
}
.hero-inner { max-width: 720px; margin: 0 auto; }

.sub-cta { margin-top: 8px; }

/* ----------------------------- Feature grid ---------------------- */

.feat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 40px;
}
.feat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.feat h3 {
    margin: 12px 0 6px;
    font-size: 17px;
    font-weight: 700;
}
.feat p {
    color: var(--text-muted);
    margin: 0;
    font-size: 14px;
}
.feat .dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
}

/* ----------------------------- Event detail ---------------------- */

.event-detail { max-width: 760px; margin: 0 auto; }

.event-cover {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-elev);
    margin-bottom: 24px;
    aspect-ratio: 16 / 9;
    position: relative;
    box-shadow: var(--shadow);
}
.event-cover img {
    width: 100%; height: 100%; object-fit: cover;
}
.event-cover::after {
    /* Gradient overlay para que el chip de categoría se vea bien */
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 60%;
    background: linear-gradient(180deg, transparent 0%, rgba(19, 19, 31, 0.65) 100%);
    pointer-events: none;
}

.event-head { margin-bottom: 18px; }
.event-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.5vw, 42px);
    line-height: 1.1;
    margin: 14px 0 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.event-meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 24px;
    color: var(--text-muted);
    font-size: 15px;
}
.event-meta strong {
    color: var(--text);
    font-weight: 600;
    margin-right: 4px;
}
.event-meta li {
    padding: 4px 0;
}

.chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-family: var(--font-body);
}

.event-desc {
    margin: 28px 0;
    padding: 22px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.event-desc h2 {
    font-family: var(--font-body);
    font-size: 13px;
    margin: 0 0 12px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.event-desc p {
    margin: 0;
    line-height: 1.65;
    color: var(--text);
    font-size: 15px;
}

.event-funcs { margin: 24px 0; }
.event-funcs h2 {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 12px;
    font-weight: 700;
}
.event-funcs ul {
    list-style: none; padding: 0; margin: 0;
    display: grid; gap: 8px;
}
.event-funcs li {
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
}

.event-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.event-list a {
    display: block;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
}
.event-list a:hover { border-color: var(--accent); }

.download-cta {
    margin-top: 48px;
    padding: 28px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background:
        radial-gradient(circle at top right, rgba(245, 197, 24, 0.12), transparent 60%),
        linear-gradient(180deg, var(--bg-card), var(--bg));
    text-align: center;
}
.download-cta-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    filter: drop-shadow(0 6px 18px rgba(245, 197, 24, 0.4));
}
.download-cta h2 {
    margin: 0 0 8px;
    font-size: 24px;
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.01em;
}
.download-cta p {
    color: var(--text-muted);
    margin: 0 0 18px;
    font-size: 15px;
}
.download-cta .cta-row { justify-content: center; }

/* ----------------------------- User profile ---------------------- */

.user-profile { max-width: 560px; margin: 0 auto; text-align: center; }
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.avatar {
    width: 120px; height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}
.avatar-placeholder {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-card);
    font-size: 48px;
    font-weight: 800;
    color: var(--accent);
    font-family: var(--font-display);
}
.profile-info h1 {
    font-size: 30px; margin: 0 0 4px; font-weight: 800;
    font-family: var(--font-display);
}
.handle { color: var(--text-muted); margin: 0 0 12px; }
.counts {
    display: flex; gap: 28px; list-style: none; padding: 0; margin: 0 0 18px;
    justify-content: center;
    color: var(--text-muted);
}
.counts strong {
    color: var(--text);
    font-weight: 700;
    font-family: var(--font-display);
}
.bio { color: var(--text); line-height: 1.6; }

/* ----------------------------- Footer ----------------------------- */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 20px 48px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.site-footer a { color: var(--text-muted); text-decoration: underline; }
.site-footer a:hover { color: var(--accent); }

/* ----------------------------- Errors ----------------------------- */

.state-error {
    text-align: center;
    padding: 80px 20px;
    max-width: 520px;
    margin: 0 auto;
}
.state-error h1 {
    font-size: 30px;
    margin-bottom: 12px;
    font-family: var(--font-display);
}
.state-error p { color: var(--text-muted); margin-bottom: 16px; }

/* ----------------------------- Mobile tweaks ---------------------- */

@media (max-width: 640px) {
    .site-header { padding: 12px 16px; }
    .site-header .brand-name { display: none; }  /* solo logo en mobile */
    .wrap { padding: 24px 16px 80px; }
    .cta-row .btn { flex: 1 1 100%; min-width: 0; }
    .event-cover { border-radius: var(--radius-sm); margin-bottom: 18px; }
    .event-meta { grid-template-columns: 1fr; gap: 6px; }
}
