/* ===================================================================
   THOT-ECOSYSTEM — Tema elegante (dorado / negro / egipcio)
   Rediseño visual 2026-08-28. Paleta preservada: dorado #FFD700,
   ámbar #f59e0b, negro #111, marfil #FFF8DC, cian #00E5FF.
   Mantiene TODAS las clases/IDs usadas por app.js y las páginas internas.
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #111111;
  --bg-2: #17181d;
  --bg-3: #1d1f26;
  --fg: #fff8dc;
  --muted: #a89f86;
  --gold: #ffd700;
  --gold-light: #fff3c4;
  --amber: #f59e0b;
  --cyan: #00e5ff;
  --accent: #ffd700;       /* acento principal: dorado */
  --accent-2: #f59e0b;     /* secundario: ámbar */
  --danger: #e53e3e;
  --success: #38a169;
  --warn: #d69e2e;
  --info: #00e5ff;
  --border: rgba(255, 216, 150, 0.14);

  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --grad-gold: linear-gradient(135deg, #ffd700 0%, #fff3c4 45%, #f59e0b 100%);
  --grad-gold-h: linear-gradient(90deg, #ffd700 0%, #f59e0b 100%);
  --grad-gold-soft: linear-gradient(135deg, rgba(255, 215, 0, 0.55) 0%, rgba(245, 158, 11, 0.12) 50%, rgba(255, 215, 0, 0.55) 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image: url('/static/img/pattern-egyptian.svg');
  color: var(--fg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(255, 215, 0, 0.28); color: #fff; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------------------------------------------------------------
   Cabecera
   --------------------------------------------------------------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.75rem;
  background: rgba(17, 17, 17, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.14);
}
header.nav::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.55), transparent);
  pointer-events: none;
}
header.nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  line-height: 1;
}
header.nav .brand .brand-logo { height: 2.3rem; width: auto; display: block; }
header.nav .brand .brand-mark { height: 2.05rem; width: auto; display: block; }
header.nav .brand span { color: var(--gold); font-weight: 800; }
header.nav nav { display: flex; gap: 2.2rem; align-items: center; }
#auth-links { display: inline-flex; align-items: center; gap: 1.1rem; margin-left: .6rem; padding-left: 1.4rem; border-left: 1px solid var(--border); }
header.nav nav a {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.25s ease;
}
header.nav nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1.5px;
  width: 0;
  background: var(--grad-gold-h);
  border-radius: 2px;
  transition: width 0.3s ease;
}
header.nav nav a:hover { color: var(--fg); }
header.nav nav a:hover::after { width: 100%; }
header.nav nav a.btn {
  padding: 0.5rem 1.15rem;
  font-size: 0.9rem;
  border-radius: 999px;
  background: var(--grad-gold-h);
  color: #16130a;
  font-weight: 700;
}
header.nav nav a.btn::after { display: none; }
header.nav nav a.btn:hover { color: #16130a; filter: brightness(1.06); }

/* ---------------------------------------------------------------
   Layout
   --------------------------------------------------------------- */
main { flex: 1; }
.container { max-width: 1120px; margin: 0 auto; padding: 3rem 1.5rem; }
.container.narrow { max-width: 560px; }

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero {
  position: relative;
  text-align: center;
  padding: 5.5rem 1.5rem 4.5rem;
  overflow: hidden;
  background:
    radial-gradient(920px 500px at 50% -10%, rgba(255, 215, 0, 0.14), transparent 62%),
    radial-gradient(720px 420px at 50% 118%, rgba(245, 158, 11, 0.08), transparent 60%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/static/img/pattern-egyptian.svg');
  opacity: 0.5;
  pointer-events: none;
}
.hero > * { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.eyebrow::before, .eyebrow::after {
  content: '';
  width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6.5vw, 4.8rem);
  line-height: 1.06;
  margin: 0 0 1.2rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.hero p.lead {
  font-size: 1.22rem;
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto 2.4rem;
  line-height: 1.75;
}

.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Divisor jeroglífico */
.hieroglyph-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 2.8rem;
}
.hieroglyph-divider::before,
.hieroglyph-divider::after {
  content: '';
  flex: 0 0 150px;
  max-width: 28vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hieroglyph-divider .glyph {
  color: rgba(255, 215, 0, 0.75);
  font-size: 1.5rem;
  line-height: 1;
}

/* ---------------------------------------------------------------
   Tipografía
   --------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--fg); }
h1 {
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  margin: 0.2rem 0 1rem;
  letter-spacing: 0.01em;
}
h2 {
  position: relative;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  padding-top: 1.1rem;
  letter-spacing: 0.01em;
}
h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3.2rem;
  height: 2px;
  background: var(--grad-gold-h);
  border-radius: 2px;
}
h3 { font-weight: 700; letter-spacing: 0.03em; }

/* Texto con gradiente dorado (para los <span> de acento) */
h1 span, h2 span, .hero h1 span, .pg-hero h1 span { color: var(--gold); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 span, h2 span, .hero h1 span, .pg-hero h1 span {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

p.sub { color: var(--muted); font-size: 1.05rem; max-width: 760px; }

section { margin: 4.5rem 0; }

/* ---------------------------------------------------------------
   Botones
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  border: none;
  background: var(--grad-gold-h);
  color: #16130a;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.42);
  filter: brightness(1.06);
  text-decoration: none;
}
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: transparent;
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: var(--fg);
  box-shadow: none;
}
.btn.secondary:hover {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.2), 0 10px 30px rgba(245, 158, 11, 0.18);
  filter: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------------------------------------------------------------
   Features / Cards / Grid
   --------------------------------------------------------------- */
.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1.6rem; }
.feature {
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad-gold-soft) border-box;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(245, 158, 11, 0.14); }
.feature strong { color: var(--gold); font-weight: 600; font-family: var(--font-display); letter-spacing: 0.02em; }

.grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 1.6rem; }
.card {
  position: relative;
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad-gold-soft) border-box;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 52px rgba(245, 158, 11, 0.16); }
.card h3 { margin: 0; font-size: 1.25rem; }
.card .card-mark {
  font-size: 1.7rem;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.5);
}
.card .stack { color: var(--muted); font-size: 0.85rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.card .desc { color: var(--fg); opacity: 0.82; font-size: 0.97rem; flex: 1; }
.card .actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.6rem; }
.card .actions a { color: var(--gold); font-weight: 600; }
.card .actions a::after { content: ' \2192'; opacity: 0; transition: opacity 0.25s ease; }
.card .actions a:hover::after { opacity: 1; }

/* ---------------------------------------------------------------
   Badges
   --------------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 0.24rem 0.68rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.badge-ok { background: rgba(56, 161, 105, 0.16); color: #7fd6a7; border: 1px solid rgba(56, 161, 105, 0.3); }
.badge-warn { background: rgba(214, 158, 46, 0.16); color: #ecc679; border: 1px solid rgba(214, 158, 46, 0.3); }
.badge-info { background: rgba(0, 229, 255, 0.12); color: #7feaff; border: 1px solid rgba(0, 229, 255, 0.25); }
.badge-muted { background: rgba(168, 159, 134, 0.14); color: var(--muted); border: 1px solid rgba(168, 159, 134, 0.2); }

/* ---------------------------------------------------------------
   Formularios
   --------------------------------------------------------------- */
form.form { display: flex; flex-direction: column; gap: 1rem; }
label { font-size: 0.9rem; color: var(--fg); display: flex; flex-direction: column; gap: 0.4rem; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
  padding: 0.85rem 1.05rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input::placeholder, textarea::placeholder { color: rgba(255, 248, 220, 0.55); }
.form .checklist label { color: var(--fg); }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.14);
}

/* ---------------------------------------------------------------
   Alertas
   --------------------------------------------------------------- */
.alert { padding: 0.9rem 1rem; border-radius: 0.6rem; margin: 1rem 0; display: none; }
.alert.show { display: block; }
.alert.error { background: rgba(229, 62, 62, 0.12); border: 1px solid var(--danger); color: #feb2b2; }
.alert.ok { background: rgba(56, 161, 105, 0.12); border: 1px solid var(--success); color: #9ae6b4; }
.alert.info { background: rgba(0, 229, 255, 0.1); border: 1px solid var(--info); color: #a8f0ff; }

/* ---------------------------------------------------------------
   Dashboard / KV / skills / checklist (compat con páginas internas)
   --------------------------------------------------------------- */
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; text-align: right; }

.dashboard-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.skill-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.skill-item {
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
}
.skill-item .tier { color: var(--gold); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }

.checklist { display: flex; flex-direction: column; gap: 0.5rem; max-height: 320px; overflow-y: auto; }
.checklist label { flex-direction: row; align-items: center; gap: 0.5rem; color: var(--fg); }

/* ---------------------------------------------------------------
   Utilidades
   --------------------------------------------------------------- */
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------------------------------------------------------------
   Pie
   --------------------------------------------------------------- */
footer {
  padding: 2.6rem 1.5rem;
  border-top: 1px solid rgba(255, 215, 0, 0.16);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
}

/* ---------------------------------------------------------------
   Páginas de producto
   --------------------------------------------------------------- */
.pg-hero {
  position: relative;
  padding: 4.5rem 1rem 2.2rem;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(820px 460px at 50% -12%, rgba(255, 215, 0, 0.14), transparent 62%),
    radial-gradient(640px 380px at 50% 120%, rgba(245, 158, 11, 0.08), transparent 60%);
}
.pg-hero h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  margin: 0 0 0.8rem;
}
.pg-hero .badge { vertical-align: middle; margin-left: 0.5rem; }
.pg-hero .lead { font-size: 1.22rem; color: var(--fg); opacity: 0.9; max-width: 760px; margin: 0 auto 1rem; }
.pg-hero .sub { margin: 0 auto 1.6rem; }

.plans { display: flex; gap: 1.1rem; margin-top: 1.4rem; flex-wrap: wrap; align-items: stretch; }
.plan {
  flex: 1;
  min-width: 220px;
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad-gold-soft) border-box;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 1.4rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.plan:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(245, 158, 11, 0.14); }
.plan.hl {
  background: linear-gradient(var(--bg-3), var(--bg-3)) padding-box, var(--grad-gold-h) border-box;
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.3), 0 20px 48px rgba(245, 158, 11, 0.2);
}
.plan .p-name { color: var(--gold); font-weight: 700; font-family: var(--font-display); letter-spacing: 0.04em; }
.plan .p-price { font-size: 1.6rem; font-weight: 800; margin: 0.45rem 0; }
.plan .p-setup { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.6rem; }
.plan ul { margin: 0.4rem 0 0; padding-left: 1.15rem; color: var(--muted); font-size: 0.9rem; }
.plan li { margin: 0.28rem 0; }
.plan li::marker { color: var(--gold); }

.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.9rem; margin-top: 1.3rem; }
.feat-box {
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad-gold-soft) border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 1.1rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feat-box:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(245, 158, 11, 0.13); }
.feat-box strong { color: var(--gold); }

/* ---------------------------------------------------------------
   Animaciones
   --------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hero > *, .pg-hero > * { animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero > *:nth-child(1), .pg-hero > *:nth-child(1) { animation-delay: 0.05s; }
.hero > *:nth-child(2), .pg-hero > *:nth-child(2) { animation-delay: 0.15s; }
.hero > *:nth-child(3), .pg-hero > *:nth-child(3) { animation-delay: 0.25s; }
.hero > *:nth-child(4), .pg-hero > *:nth-child(4) { animation-delay: 0.35s; }
.hero > *:nth-child(5), .pg-hero > *:nth-child(5) { animation-delay: 0.45s; }

/* Revelado al hacer scroll (progresivo, solo si el navegador lo soporta) */
@supports (animation-timeline: view()) {
  .reveal {
    animation: fadeUp 0.9s ease-out both;
    animation-timeline: view();
    animation-range: entry 0% entry 32%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 640px) {
  .hero { padding: 4rem 1.25rem 3.2rem; }
  .hero h1 { font-size: 2.3rem; }
  .hero p.lead { font-size: 1.08rem; }
  header.nav { flex-direction: column; gap: 0.6rem; padding: 0.9rem 1.25rem; }
  header.nav nav { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .container { padding: 2.2rem 1.25rem; }
  section { margin: 3rem 0; }
}

/* --- Dashboard compacto (2026-08-28) --- */
.dash { max-width: 1280px; margin: 0 auto; padding: 1rem 1.2rem 2rem; }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.dash-top h1 { font-size: 1.35rem; margin: 0; }
.dash-top .sub { margin: .15rem 0 0; font-size: .85rem; }
.dash .dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .7rem; }
.dash .card { padding: .75rem .85rem; border-radius: 8px; margin: 0; }
.dash .card h3 { font-size: .95rem; margin: 0 0 .3rem; }
.dash .card p, .dash .card li { font-size: .82rem; }
.dash .kv { margin: .15rem 0; font-size: .82rem; }
.dash .kv .k { color: var(--muted); }
.dash .kv .v { font-weight: 600; }
.dash .skill-list { margin: .2rem 0; padding-left: 0; list-style: none; }
.dash .skill-item { font-size: .8rem; padding: .2rem .4rem; margin: .15rem 0; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); }
.dash .tier { font-size: .7rem; padding: .05rem .4rem; }
.dash .checklist li { font-size: .82rem; }
.dash .alert { margin: .5rem 0; font-size: .85rem; }
.dash .cta-row { margin-top: .6rem; }
.dash .btn { padding: .4rem .8rem; font-size: .85rem; }
.dash footer { margin-top: 1.5rem; }
