/* Trabajadores IA — Agencia de Marketing y Automatizacion
   Hoja base: variables, fondo, botones, tarjeta, secciones, header y footer.
   Pensada primero para celular. */

/* ── Variables ─────────────────────────────────────────── */
:root {
  /* Paleta */
  --tia-navy: #0a1628;
  --tia-blue: #1a6bff;
  --tia-blue-dark: #0d4ecc;
  --tia-blue-light: #4d8fff;
  --tia-ink: #0a1628;
  --tia-ink-soft: #5f6571;
  --tia-ink-mist: #8b919e;
  --tia-line: #e4e7eb;
  --tia-paper: #f5f7fb;
  --tia-white: #ffffff;

  /* Tipografias */
  --tia-font-display: 'Sora', system-ui, sans-serif;
  --tia-font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Formas y sombras */
  --tia-radius: 18px;
  --tia-radius-sm: 12px;
  --tia-shadow-card: 0 20px 60px rgba(13, 17, 23, 0.12);
  --tia-shadow-card-hover: 0 22px 48px rgba(15, 18, 34, 0.16);
  --tia-shadow-btn: 0 10px 32px rgba(26, 107, 255, 0.35), 0 4px 16px rgba(13, 78, 204, 0.22);
  --tia-shadow-btn-hover: 0 16px 40px rgba(26, 107, 255, 0.45), 0 8px 24px rgba(26, 107, 255, 0.28);

  /* Layout */
  --tia-max: 1200px;
  --tia-gutter: 20px;
  --tia-header-h: 64px;
  /* Espacio reservado abajo cuando haya botones flotantes (WhatsApp, CTA fijo) */
  --tia-floating-space: calc(88px + env(safe-area-inset-bottom, 0px));

  /* Degradado del fondo */
  --tia-bg-gradient:
    radial-gradient(ellipse 90% 70% at 12% 18%, rgba(26, 107, 255, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 60% at 88% 22%, rgba(77, 148, 255, 0.28), transparent 52%),
    radial-gradient(ellipse 80% 55% at 50% 98%, rgba(255, 255, 255, 0.08), transparent 58%);
}

/* ── Reset y base ──────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--tia-header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--tia-font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tia-white);
  background-color: var(--tia-navy);
  background-image: var(--tia-bg-gradient);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

a { color: inherit; }

button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--tia-font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: break-word;
}

p { overflow-wrap: break-word; }

:focus-visible {
  outline: 2px solid var(--tia-blue-light);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Cuando la pagina tenga botones flotantes, el body reserva su espacio */
body.tia-has-floating {
  padding-bottom: var(--tia-floating-space);
}

/* ── Fondo shader de pagina completa ───────────────────── */
.tia-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--tia-navy);
  background-image: var(--tia-bg-gradient);
}

.tia-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tia-bg--ready .tia-bg-canvas { opacity: 1; }

.tia-bg--static .tia-bg-canvas { display: none; }

.tia-bg-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 65% at 50% 42%, rgba(10, 22, 40, 0.45) 0%, rgba(10, 22, 40, 0.15) 50%, transparent 75%);
}

/* Todo el contenido va por encima del fondo */
.tia-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tia-main {
  flex: 1;
  width: 100%;
}

/* ── Contenedor y secciones ────────────────────────────── */
.tia-container {
  width: 100%;
  max-width: var(--tia-max);
  margin: 0 auto;
  padding-left: var(--tia-gutter);
  padding-right: var(--tia-gutter);
}

.tia-section {
  padding: 56px 0;
}

.tia-section--alt {
  background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tia-section--light {
  background: var(--tia-paper);
  color: var(--tia-ink);
}

.tia-section-head {
  max-width: 680px;
  margin: 0 auto 32px;
  text-align: center;
}

.tia-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 16px;
  margin-bottom: 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.tia-eyebrow-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
}

.tia-section--light .tia-eyebrow {
  color: var(--tia-blue);
  background: rgba(26, 107, 255, 0.08);
  border-color: rgba(26, 107, 255, 0.2);
}

.tia-section--light .tia-eyebrow-dot {
  background: var(--tia-blue);
  box-shadow: 0 0 8px rgba(26, 107, 255, 0.6);
}

.tia-section-title {
  font-size: clamp(24px, 6vw, 36px);
  margin-bottom: 12px;
}

.tia-section-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
}

.tia-section--light .tia-section-sub { color: var(--tia-ink-soft); }

@media (min-width: 768px) {
  :root { --tia-gutter: 24px; }
  .tia-section { padding: 80px 0; }
  .tia-section-head { margin-bottom: 44px; }
  .tia-section-sub { font-size: 17px; }
}

/* ── Tarjeta base ──────────────────────────────────────── */
.tia-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--tia-white);
  color: var(--tia-ink);
  border: 1px solid var(--tia-line);
  border-radius: 20px;
  box-shadow: var(--tia-shadow-card);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tia-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 20px;
}

.tia-card-title {
  font-size: 18px;
  color: var(--tia-ink);
}

.tia-card-text {
  font-size: 14px;
  color: var(--tia-ink-soft);
}

@media (hover: hover) {
  .tia-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tia-shadow-card-hover);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tia-card,
  .tia-card:hover { transition: none; transform: none; }
}

/* ── Botones ───────────────────────────────────────────── */
.tia-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--tia-radius-sm);
  font-family: var(--tia-font-ui);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

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

.tia-btn--sm {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
}

/* Boton premium: azul solido, brillo que cruza y elevacion al pasar el cursor */
.tia-btn--premium {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: var(--tia-blue);
  box-shadow: var(--tia-shadow-btn);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.tia-btn--premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.42) 48%, transparent 100%);
  transform: skewX(-18deg);
  animation: tia-btn-shine 4.5s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

.tia-btn--premium:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: var(--tia-shadow-btn-hover);
}

.tia-btn--premium:active:not(:disabled) {
  transform: translateY(0);
}

/* Boton secundario: contorno claro sobre fondo oscuro */
.tia-btn--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.tia-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
}

.tia-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@keyframes tia-btn-shine {
  0%, 72%, 100% { left: -120%; }
  78% { left: 140%; }
}

@media (prefers-reduced-motion: reduce) {
  .tia-btn--premium,
  .tia-btn--premium:hover:not(:disabled) {
    transition: none;
    transform: none;
  }
  .tia-btn--premium::before {
    animation: none;
    display: none;
  }
}

/* ── Header fijo con efecto vidrio ─────────────────────── */
.tia-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #e8eaf0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(10, 22, 40, 0.06);
}

.tia-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tia-header-h);
  padding-top: 8px;
  padding-bottom: 8px;
}

.tia-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: var(--tia-ink);
}

.tia-brand-logo {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(26, 107, 255, 0.28);
}

.tia-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tia-brand-name {
  font-family: var(--tia-font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tia-brand-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tia-ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tia-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .tia-brand-sub { display: none; }
  .tia-brand-logo { width: 38px; height: 38px; }
}

@media (min-width: 768px) {
  :root { --tia-header-h: 72px; }
  .tia-brand { gap: 12px; }
  .tia-brand-logo { width: 52px; height: 52px; border-radius: 12px; }
  .tia-brand-name { font-size: 19px; }
  .tia-brand-sub { font-size: 12px; }
}

/* ── Footer ────────────────────────────────────────────── */
.tia-footer {
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 8px rgba(15, 18, 34, 0.2);
}

.tia-footer-brand {
  font-family: var(--tia-font-display);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.tia-footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 12px;
  list-style: none;
  font-size: 12px;
}

.tia-footer-legal a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tia-footer-legal a:hover { opacity: 0.85; }

.tia-footer-copy {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Link "Curso" del header ───────────────────────────── */
.tia-header-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tia-ink);
  text-decoration: none;
  white-space: nowrap;
}

.tia-header-link:hover { color: var(--tia-blue); }

/* Pantallas angostas (360px): marca, Curso y Escribenos caben en una linea */
@media (max-width: 400px) {
  .tia-header-inner { gap: 8px; }
  .tia-brand { gap: 8px; }
  .tia-brand-name { font-size: 14px; }
  .tia-header-actions { gap: 6px; }
  .tia-header-actions .tia-btn--sm { padding: 8px 10px; }
}

/* ── Link "Plan de financiacion" del header ────────────── */
.tia-hl-short { display: none; }

@media (max-width: 640px) {
  .tia-hl-full { display: none; }
  .tia-hl-short { display: inline; }
}

/* En celular solo se ve el logo, para que quepan Curso, Financiacion y Escribenos */
@media (max-width: 560px) {
  .tia-brand-text { display: none; }
}

/* Linea legal del footer */
.tia-footer-legal-id {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  overflow-wrap: anywhere;
}
