/* Coworky — estilos públicos compartidos (landing + legales)
   Sin dependencias externas. Migración a coworky.com = solo cambiar el dominio. */

:root {
  /* Paleta EXACTA de la app (App.css + office/theme.ts) para que web y producto sean uno. */
  --bg: #0f172a;          /* slate-navy de la app */
  --bg-soft: #0b1220;     /* panel-2 / pared */
  --card: #1e293b;        /* panel */
  --card-2: #243049;      /* panel un punto más claro */
  --line: #2a3650;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --brand: #6366f1;       /* acento índigo de la app */
  --brand-2: #8b5cf6;     /* violeta (icono / Pro) */
  --accent: #22c55e;      /* verde "ok/hecho" de la app (sí / checks) */
  --gold: #f0a85f;        /* dorado de la hora dorada (acento de marca) */
  --terracotta: #b96f53;
  --warn: #f59e0b;
  --monitor-on: #38bdf8;  /* cian del monitor encendido */
  --radius: 16px;
  --maxw: 1080px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(240, 168, 95, 0.12), transparent 60%),
    radial-gradient(1200px 600px at 80% -8%, rgba(99, 102, 241, 0.20), transparent 62%),
    radial-gradient(900px 500px at -10% 10%, rgba(139, 92, 246, 0.16), transparent 55%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(12, 16, 32, 0.72);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand .logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-size: 18px;
}
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 10px 30px rgba(108, 139, 255, 0.35); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-lg { padding: 15px 28px; font-size: 17px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; text-align: center; }
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(99, 102, 241, 0.14); border: 1px solid var(--line);
  color: #c7b8ff; font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.brand-logo { height: 34px; width: auto; display: block; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; margin: 0 0 18px; letter-spacing: -0.02em; }
.grad { background: linear-gradient(110deg, var(--gold), var(--brand-2) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(17px, 2.4vw, 21px); color: var(--muted); max-width: 720px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; color: var(--muted); font-size: 14px; }
.soon { color: var(--brand-2); font-weight: 600; }

/* ---------- Showreel: ventana de la app con la oficina dentro ---------- */
.showreel {
  margin: 46px auto 0; max-width: 920px;
  border-radius: 18px; border: 1px solid var(--line);
  background: var(--bg-soft); box-shadow: var(--shadow); overflow: hidden;
}
/* Barra de ventana estilo app (topbar de Coworky) */
.showreel-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
.showreel-bar .dots { display: flex; gap: 7px; }
.showreel-bar .dots i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.showreel-bar .dots i:nth-child(1) { background: #ff5f57; }
.showreel-bar .dots i:nth-child(2) { background: #febc2e; }
.showreel-bar .dots i:nth-child(3) { background: #28c840; }
.showreel-bar .title { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.showreel-bar .title b { color: var(--text); font-weight: 600; }
.showreel-bar .live { margin-left: auto; font-size: 12px; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.showreel-bar .live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Metraje real opcional (si existe assets/coworky-demo.mp4 se muestra encima de la escena). */
.showreel-real { display: block; width: 100%; height: auto; }

/* ---------- Escena de oficina recreada (fiel a office/theme.ts) ---------- */
.office-scene {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--bg);
}
/* Pared con la gran ventana a hora dorada (mismos tonos que la app) */
.os-window {
  position: absolute; left: 0; right: 0; top: 0; height: 50%;
  background:
    linear-gradient(180deg, #2b303b 0%, #2b303b 8%, transparent 8%),
    linear-gradient(180deg, #3b4a6e 8%, #b96f53 70%, #f0a85f 100%);
  border-bottom: 3px solid #12161d;
}
.os-sun {
  position: absolute; top: 20%; left: 64%; width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle, #fff3da 0%, #ffd9a0 45%, rgba(255,217,160,0) 72%);
  animation: sunGlow 6s ease-in-out infinite;
}
@keyframes sunGlow { 0%,100% { transform: scale(1); opacity: .95; } 50% { transform: scale(1.06); opacity: 1; } }
/* Skyline: edificios oscuros con ventanas encendidas, pegados al alféizar */
.os-skyline { position: absolute; left: 0; right: 0; top: calc(50% - 4px); height: 0; }
.os-bld {
  position: absolute; bottom: 0; background: #241f33;
  box-shadow:
    6px -10px 0 -4px #ffce7a, 18px -10px 0 -4px #ffce7a,
    6px -26px 0 -4px #ffce7a, 18px -34px 0 -4px #ffce7a;
}
/* Marco/parteluces de la ventana */
.os-mullion-v, .os-mullion-h { position: absolute; background: rgba(248,250,252,.92); }
.os-mullion-v { top: 0; width: 4px; height: 50%; }
.os-mullion-h { left: 0; right: 0; height: 4px; top: 25%; }

/* Suelo de parquet de nogal (roomFloor / roomFloorPlank) */
.os-floor {
  position: absolute; left: 0; right: 0; top: 50%; bottom: 0;
  background:
    repeating-linear-gradient(90deg, #3a2e24 0 46px, #2b211a 46px 49px),
    linear-gradient(180deg, #3a2e24, #2b211a);
}
.os-rug {
  position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%);
  width: 64%; height: 26%; border-radius: 50%;
  background: radial-gradient(ellipse, #2a4a57 0%, #2a4a57 60%, #3c6c7e 62%, transparent 64%);
  opacity: .85;
}

/* Fila de puestos de trabajo (delante de la mesa de reunión) */
.os-desks {
  position: absolute; left: 0; right: 0; bottom: 5%; z-index: 2;
  display: flex; justify-content: center; gap: clamp(10px, 2.6vw, 30px);
}
.os-emp { position: relative; width: 104px; display: flex; flex-direction: column; align-items: center; }

/* Glifo de estado sobre la cabeza (los mismos de STATUS_GLYPH) */
.os-glyph {
  position: absolute; top: -30px; width: 30px; height: 30px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow);
}
.os-glyph .g {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 17px; line-height: 1; opacity: 0;
  animation: glyphCycle 7.5s steps(1, end) infinite;
}
/* Tres estados que se turnan sobre la cabeza, como en la app */
.os-glyph .g:nth-child(1) { animation-delay: 0s; }
.os-glyph .g:nth-child(2) { animation-delay: 2.5s; }
.os-glyph .g:nth-child(3) { animation-delay: 5s; }
@keyframes glyphCycle { 0%, 33.33% { opacity: 1; } 33.34%, 100% { opacity: 0; } }

/* Persona: cabeza + torso con camiseta de color (ROLE_RAMP) */
.os-person { display: flex; flex-direction: column; align-items: center; animation: bob 3.4s ease-in-out infinite; }
.os-head { width: 26px; height: 26px; border-radius: 50%; background: var(--skin, #f1c27d); border: 2px solid rgba(0,0,0,.15); }
.os-body { width: 52px; height: 34px; margin-top: -3px; border-radius: 16px 16px 7px 7px; background: var(--shirt, #6366f1); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.os-emp.typing .os-person { animation: typing 0.5s ease-in-out infinite; }
@keyframes typing { 0%,100% { transform: translateY(0); } 50% { transform: translateY(1.5px); } }

/* Monitor del escritorio con pantalla encendida (cian) */
.os-monitor {
  width: 84px; height: 50px; margin-top: 6px;
  background: #0b1220; border: 3px solid #334155; border-radius: 7px;
  position: relative; box-shadow: 0 0 22px rgba(56,189,248,.18);
}
.os-monitor::before {
  content: ''; position: absolute; inset: 5px; border-radius: 3px;
  background: linear-gradient(180deg, rgba(56,189,248,.55), rgba(56,189,248,.12));
}
.os-monitor::after { /* líneas de "texto" que crecen como si escribiera */
  content: ''; position: absolute; left: 10px; top: 11px; height: 3px; border-radius: 2px;
  background: rgba(226,232,240,.85); animation: scan 2.2s ease-in-out infinite;
}
@keyframes scan { 0% { width: 8px; } 50% { width: 52px; } 100% { width: 8px; } }
.os-desk-top { width: 100px; height: 8px; background: #475569; border-radius: 3px; margin-top: 4px; }
.os-name { margin-top: 8px; font-size: 11px; color: var(--muted); }

/* Burbuja de diálogo de la app sobre un empleado.
   Las burbujas se turnan (cada una con su animation-delay inline) para dar vida. */
.os-bubble {
  position: absolute; top: -64px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 12px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 10px; box-shadow: var(--shadow); opacity: 0; z-index: 4;
  animation: bubble 16s ease-in-out infinite;
}
.os-bubble::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 8px; height: 8px; background: var(--card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@keyframes bubble { 0%, 3% { opacity: 0; transform: translateX(-50%) translateY(4px); } 6%, 18% { opacity: 1; transform: translateX(-50%) translateY(0); } 22%, 100% { opacity: 0; } }

/* ---------- Mesa de reunión: el equipo colaborando (como en la app) ---------- */
.os-meeting {
  position: absolute; left: 50%; top: 52%; transform: translateX(-50%);
  width: 230px; display: flex; flex-direction: column; align-items: center; z-index: 1;
}
.os-team-bubble {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 12px; color: var(--text);
  background: var(--card); border: 1px solid var(--brand); border-radius: 10px;
  padding: 6px 11px; box-shadow: var(--shadow); opacity: 0;
  animation: bubble 16s ease-in-out infinite; animation-delay: -1.5s;
}
.os-team-bubble::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 8px; height: 8px; background: var(--card); border-right: 1px solid var(--brand); border-bottom: 1px solid var(--brand); }
/* Avatares pequeños sentados alrededor de la mesa (perspectiva: más lejos = más arriba) */
.os-table {
  position: relative; width: 150px; height: 56px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #2b3a5e 0%, #1f2a44 70%);
  box-shadow: 0 10px 22px rgba(0,0,0,.35); margin-top: 26px;
}
.os-seat { position: absolute; display: flex; flex-direction: column; align-items: center; animation: bob 3.4s ease-in-out infinite; }
.os-seat .h { width: 17px; height: 17px; border-radius: 50%; background: var(--skin, #f1c27d); border: 2px solid rgba(0,0,0,.15); }
.os-seat .b { width: 32px; height: 20px; margin-top: -2px; border-radius: 11px 11px 5px 5px; background: var(--shirt, #6366f1); }
.os-seat--1 { top: -30px; left: 50%; transform: translateX(-50%); }
.os-seat--2 { top: -6px; left: -6px; }
.os-seat--3 { top: -6px; right: -6px; }
.os-seat--2, .os-seat--3 { animation-delay: -1.1s; }
.os-seat--3 { animation-delay: -2.2s; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-title { text-align: center; margin: 0 0 12px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.01em; }
.section-sub { text-align: center; color: var(--muted); max-width: 680px; margin: 0 auto 44px; font-size: 17px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--brand); transform: translateY(-2px); }
.card .ico { font-size: 28px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 19px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Etiquetas «Gratis / Sin clave / Pro» (mismos colores que los badges de la app) */
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .01em; border: 1px solid transparent; white-space: nowrap; }
.pill-free { background: rgba(34, 197, 94, 0.14); color: #4ade80; border-color: rgba(34, 197, 94, 0.35); }
.pill-nokey { background: rgba(56, 189, 248, 0.14); color: var(--monitor-on); border-color: rgba(56, 189, 248, 0.35); }
.pill-pro { background: rgba(139, 92, 246, 0.16); color: #c4b5fd; border-color: rgba(139, 92, 246, 0.4); }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.step .n {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Comparison ---------- */
.compare { overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; min-width: 640px; }
table.cmp th, table.cmp td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; }
table.cmp thead th { color: var(--muted); font-weight: 600; font-size: 14px; }
table.cmp tbody th { font-weight: 600; color: var(--text); }
table.cmp .yes { color: var(--accent); font-weight: 600; }
table.cmp .no { color: var(--muted); }
table.cmp .col-us { background: rgba(108, 139, 255, 0.07); }
table.cmp thead .col-us { background: rgba(108, 139, 255, 0.12); color: var(--brand); border-radius: 10px 10px 0 0; }

/* ---------- Pricing ---------- */
.prices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 760px; margin: 0 auto; }
.price {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 32px;
  display: flex; flex-direction: column;
}
.price.featured { border-color: var(--brand); box-shadow: 0 16px 50px rgba(108, 139, 255, 0.22); position: relative; }
.price .tag { position: absolute; top: -12px; right: 22px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.price h3 { margin: 0 0 6px; font-size: 22px; }
.price .amt { font-size: 40px; font-weight: 700; margin: 8px 0 2px; }
.price .amt small { font-size: 16px; color: var(--muted); font-weight: 500; }
.price ul { list-style: none; padding: 0; margin: 18px 0 24px; }
.price li { padding: 7px 0; color: var(--muted); font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.price li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.price .btn { width: 100%; justify-content: center; margin-top: auto; }

/* ---------- Security ---------- */
.security { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.sec-item { display: flex; gap: 14px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.sec-item .ico { font-size: 24px; }
.sec-item h3 { margin: 0 0 4px; font-size: 16px; }
.sec-item p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .box {
  background: linear-gradient(135deg, rgba(108, 139, 255, 0.16), rgba(138, 108, 255, 0.16));
  border: 1px solid var(--line); border-radius: 22px; padding: 52px 28px;
}
.cta-band h2 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 12px; }
.cta-band p { color: var(--muted); margin: 0 0 26px; font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
.foot-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; align-items: center; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--text); }

/* ---------- Legal pages ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: 48px 0; }
.legal h1 { font-size: 34px; margin: 0 0 8px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.legal h2 { font-size: 22px; margin: 36px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.legal h3 { font-size: 17px; margin: 22px 0 8px; }
.legal p, .legal li { color: #c7cdea; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.legal th, .legal td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal thead th { background: var(--card); }
.legal strong { color: var(--text); }
.legal .back { display: inline-block; margin-bottom: 24px; color: var(--brand); }

/* ---------- Captura de email (novedades) ---------- */
.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; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.news .news-box { max-width: 640px; margin: 0 auto; text-align: center; }
.news-form { display: flex; gap: 10px; justify-content: center; max-width: 520px; margin: 8px auto 0; }
.news-form input[type="email"] {
  flex: 1; min-width: 0; padding: 13px 16px; font-size: 16px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
}
.news-form input[type="email"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); }
.news-form .btn { white-space: nowrap; }
.news-msg { min-height: 20px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.news-msg.ok { color: var(--accent); }
.news-msg.err { color: #f87171; }
.news-legal { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .cards, .steps, .sec-grid { grid-template-columns: 1fr; }
  .prices { grid-template-columns: 1fr; }
  .nav { display: none; }
  .os-name, .os-bubble { display: none; }
  .os-monitor { width: 64px; height: 38px; }
  .os-emp { width: 84px; }
  .news-form { flex-direction: column; }
}
@media (max-width: 560px) {
  /* En móvil deja 3 puestos como mucho para que respire */
  .os-emp:nth-child(n+4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
  /* Congela la oficina: se ve la escena pero sin movimiento. Los glifos quedan fijos. */
  .os-person, .os-seat, .os-monitor::after, .os-sun, .showreel-bar .live::before { animation: none; }
  .os-team-bubble { animation: none; }
  .os-bubble { animation: none; opacity: 0; }
  .os-glyph .g { animation: none; }
  .os-glyph .g:nth-child(1) { opacity: 1; }
  .os-glyph .g:nth-child(2), .os-glyph .g:nth-child(3) { opacity: 0; }
}
