/* =========================================================
   FeriaDias — Festive Minimalist + Bento Grid
   Hand-written CSS (no build, no Tailwind runtime) for speed.
   ========================================================= */

:root {
  --bg: #090d16;
  --bg-2: #0f1522;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #e8ecf4;
  --muted: #9aa6bb;
  --dim: #6b778c;
  --gold: #f59e0b;
  --gold-2: #fbbf24;
  --emerald: #10b981;
  --emerald-2: #34d399;
  --rose: #fb7185;
  --sky: #38bdf8;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(245, 158, 11, 0.13), transparent 60%),
    radial-gradient(800px 500px at -10% 20%, rgba(16, 185, 129, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--gold); color: #111; padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.wrap { position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 13, 22, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), #b45309); color: #1a1205; box-shadow: 0 6px 20px -6px rgba(245, 158, 11, .6); }
.logo b { color: var(--gold-2); font-weight: 800; }
.nav-links { display: none; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: .88rem; font-weight: 600; padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
.nav-links a:hover { color: var(--text); background: var(--glass-2); text-decoration: none; }
.badge-live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 700; color: var(--gold-2); border: 1px solid rgba(251, 191, 36, .35); background: rgba(245, 158, 11, .08); padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 0 0 rgba(251, 191, 36, .7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(251, 191, 36, 0); } 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); } }
@media (min-width: 1100px) { .nav-links { display: flex; } .badge-live { margin-left: 8px; } }

/* ---------- Generic ---------- */
section { padding: 64px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--emerald-2); margin-bottom: 12px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 12px; }
h1 { font-size: clamp(2.1rem, 6vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 680px; margin: 0 0 24px; }
.grad { background: linear-gradient(90deg, var(--gold-2), #fde68a 40%, var(--emerald-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.note { font-size: .8rem; color: var(--dim); margin-top: 14px; }
.note a { color: var(--muted); text-decoration: underline; }

.card {
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card:hover { border-color: var(--line-2); }
.card.lift:hover { transform: translateY(-3px); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: .95rem; border-radius: 12px; padding: 12px 18px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, filter .2s ease, background .2s ease; color: inherit; }
.btn:active { transform: scale(.97); }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1205; box-shadow: 0 10px 30px -10px rgba(245, 158, 11, .7); }
.btn-gold:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: var(--glass-2); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--muted); white-space: nowrap; }
.chip-gold { color: var(--gold-2); border-color: rgba(251, 191, 36, .35); background: rgba(245, 158, 11, .09); }
.chip-green { color: var(--emerald-2); border-color: rgba(52, 211, 153, .35); background: rgba(16, 185, 129, .09); }
.chip-rose { color: var(--rose); border-color: rgba(251, 113, 133, .35); background: rgba(251, 113, 133, .08); }
.chip-sky { color: var(--sky); border-color: rgba(56, 189, 248, .35); background: rgba(56, 189, 248, .08); }

/* Segmented tabs */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.tab { font: inherit; font-size: .9rem; font-weight: 700; color: var(--muted); background: transparent; border: 0; padding: 8px 14px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tab[aria-selected="true"] { background: linear-gradient(135deg, rgba(251, 191, 36, .2), rgba(245, 158, 11, .12)); color: var(--gold-2); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .35); }
.tab:hover { color: var(--text); }
.tab .soon { font-size: .65rem; color: var(--dim); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; text-align: center; }
.hero .lead { margin: 0 auto 28px; }
.counter-card { max-width: 860px; margin: 0 auto; padding: 28px 20px; }
.counter-title { font-weight: 700; color: var(--muted); margin: 18px 0 16px; font-size: .95rem; }
.counter-title strong { color: var(--text); }
.counter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.unit { background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 16px; padding: 16px 6px 12px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: clamp(2rem, 8vw, 4rem); line-height: 1; color: #fff; text-shadow: 0 0 30px rgba(251, 191, 36, .25); }
.lbl { margin-top: 8px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.progress { margin-top: 24px; text-align: left; }
.progress-top { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.progress-top span:last-child { font-family: var(--mono); color: var(--gold-2); }
.bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--emerald), var(--gold-2)); transition: width .6s ease; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.done-msg { display: none; font-size: 1.3rem; font-weight: 800; margin: 10px 0; }

/* ---------- Bento ---------- */
.bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .b-main { grid-column: span 4; grid-row: span 2; }
  .b-side { grid-column: span 2; }
  .b-wide { grid-column: span 3; }
}
.b-main h3 { font-size: 1.4rem; }
.stat { font-family: var(--mono); font-size: 2.6rem; font-weight: 700; color: var(--emerald-2); line-height: 1; }
.profile-out { margin-top: 18px; padding: 18px; border-radius: 16px; background: rgba(16, 185, 129, .07); border: 1px solid rgba(52, 211, 153, .25); }
.profile-out h4 { margin: 0 0 6px; font-size: 1.05rem; }
.profile-out ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.profile-out li { margin: 4px 0; }
.window { font-family: var(--mono); color: var(--gold-2); font-weight: 700; }

/* ---------- Holidays ---------- */
.hol-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.hol-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.hol { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.datebox { flex: none; width: 62px; text-align: center; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); padding: 8px 0 6px; }
.datebox .d { font-family: var(--mono); font-size: 1.55rem; font-weight: 700; line-height: 1; }
.datebox .m { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); font-weight: 800; margin-top: 4px; }
.hol h3 { font-size: 1rem; margin: 0 0 2px; }
.hol .wd { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.hol .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hol.past { opacity: .45; }
.soon-box { padding: 28px; }
.soon-box ul { color: var(--muted); padding-left: 18px; }
.summary-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }

/* ---------- Forms / calculator ---------- */
.calc { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .calc { grid-template-columns: 1.1fr .9fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .legend { font-size: .82rem; font-weight: 700; color: var(--muted); }
.row2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 480px) { .row2 { grid-template-columns: 1fr 1fr; } }
.calc > *, .row2 > *, .city-grid > *, .bento > *, .field { min-width: 0; }
input[type="date"] { min-width: 0; max-width: 100%; }
input[type="date"], input[type="number"], input[type="email"], input[type="text"], select {
  font: inherit; color: var(--text); background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 12px; width: 100%; min-height: 46px; color-scheme: dark;
}
input:focus, select:focus { border-color: var(--gold-2); outline: none; box-shadow: 0 0 0 3px rgba(251, 191, 36, .18); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 8px 0; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--gold); width: 16px; height: 16px; flex: none; }
.result-big { font-family: var(--mono); font-size: 3.2rem; font-weight: 700; color: var(--gold-2); line-height: 1; }
.result-list { list-style: none; padding: 0; margin: 14px 0 0; font-size: .88rem; color: var(--muted); max-height: 220px; overflow: auto; }
.result-list li { padding: 6px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.result-list li span:first-child { font-family: var(--mono); color: var(--text); }

/* ---------- Cities ---------- */
.city-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .city-grid { grid-template-columns: .9fr 1.1fr; } }
.why-list { display: grid; gap: 12px; margin: 16px 0 0; }
.why { display: flex; gap: 12px; align-items: flex-start; }
.why .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(245, 158, 11, .1); color: var(--gold-2); border: 1px solid rgba(251, 191, 36, .25); }
.why p { margin: 0; color: var(--muted); font-size: .92rem; }
.why strong { color: var(--text); display: block; }
.city-results { margin-top: 14px; display: grid; gap: 10px; }
.city-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.city-item .datebox { width: 54px; }
.city-item .datebox .d { font-size: 1.25rem; }
.city-item h4 { margin: 0 0 4px; font-size: .95rem; }
.city-item .src { font-size: .75rem; color: var(--dim); margin-top: 6px; word-break: break-word; }
.city-item .src a { color: var(--muted); text-decoration: underline; }
.legend-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- What's open ---------- */
.open-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.open-card .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 12px; background: rgba(16, 185, 129, .1); color: var(--emerald-2); border: 1px solid rgba(52, 211, 153, .25); }
.open-card p { color: var(--muted); font-size: .9rem; margin: 6px 0 10px; }
.open-card .src { font-size: .75rem; color: var(--dim); }
.open-card .src a { color: var(--muted); text-decoration: underline; }

/* ---------- LatAm ---------- */
.latam { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.flag { font-size: 1.6rem; line-height: 1; margin-bottom: 8px; }

/* ---------- Newsletter ---------- */
.news { text-align: center; padding: 40px 24px; background: radial-gradient(500px 200px at 50% 0%, rgba(245, 158, 11, .14), transparent 70%), linear-gradient(180deg, var(--glass-2), var(--glass)); }
.news form { max-width: 520px; margin: 18px auto 0; text-align: left; }
.news .inline { display: flex; gap: 8px; flex-wrap: wrap; }
.news .inline input { flex: 1 1 240px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1.4em; margin-top: 10px; font-weight: 700; font-size: .92rem; }
.form-msg.ok { color: var(--emerald-2); }
.form-msg.err { color: var(--rose); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; margin-top: 40px; color: var(--muted); font-size: .9rem; position: relative; z-index: 1; }
.foot { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .foot { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot h4 { color: var(--text); margin: 0 0 10px; font-size: .95rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 6px 0; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--gold-2); }
.xmas { color: var(--gold-2); font-weight: 700; }

/* ---------- Legal page ---------- */
.legal { max-width: 760px; padding: 48px 20px 20px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 28px; }
.legal p, .legal li { color: var(--muted); }

/* ===== Subpages (generated: cities, months, feriadões) ===== */
.page-top { padding-top: 28px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted, #94a3b8); margin-bottom: 18px; }
.crumbs a { color: inherit; }
.crumbs a:hover { color: #FBBF24; }
.sec-title { margin-top: 40px; font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 6px; }
.toolbar .btn { font-size: .92rem; }
.share-box { margin-top: 16px; padding: 14px 18px; }
.share-box summary { cursor: pointer; font-weight: 700; }
.share-pre { white-space: pre-wrap; word-break: break-word; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .85rem; line-height: 1.6; margin: 12px 0 0; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 14px; }
.link-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.link-grid a { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); font-size: .88rem; color: inherit; text-decoration: none; }
.link-grid a:hover { border-color: #F59E0B; color: #FBBF24; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hub-item { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; color: inherit; text-decoration: none; }
.answer .result-big { margin-bottom: 8px; }
.answer p { margin: 8px 0; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-family: "JetBrains Mono", ui-monospace, monospace; }
.cal > div { padding: 10px 0; border-radius: 10px; font-size: .95rem; }
.cal .cal-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; opacity: .6; padding: 4px 0; }
.cal .cal-ok, .sw-ok { background: rgba(16,185,129,.14); }
.cal .cal-we, .sw-we { background: rgba(255,255,255,.04); opacity: .7; }
.cal .cal-hol, .sw-hol { background: rgba(245,158,11,.28); color: #FBBF24; font-weight: 700; }
.cal .cal-fac, .sw-fac { background: rgba(56,189,248,.18); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.plain-list { padding-left: 18px; line-height: 1.9; }
.plain-list .chip { font-size: .72rem; padding: 2px 8px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 36px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.07); }
.tbl th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.tbl tfoot td { font-weight: 700; border-bottom: 0; }
.open-mini p { margin: 8px 0; }
.home-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 480px) { .cal > div { padding: 8px 0; font-size: .85rem; } .toolbar .btn { width: 100%; justify-content: center; } }
/* long chip labels must wrap on small screens */
.hol > div, .city-item > div, .hol-grid > *, .city-results > *, .hub-grid > * { min-width: 0; }
.tags .chip, .legend-row .chip { white-space: normal; max-width: 100%; }
