/* ═══════════════════════════════════════════════════════════
   PIXELIA LAB · Dev App · Estilos compartidos
   Coherente con pixelia-lab.html y biblioteca
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #080c0a;
  --bg-card: #0d1a10;
  --bg-elev: #0f2114;
  --border: #1a3d22;
  --border-dim: #152219;
  --accent: #22c55e;
  --accent-dim: #0d3d1a;
  --accent-mid: #1a5c2a;
  --text: #c8d5cb;
  --text-bright: #e8f5ec;
  --text-mid: #6b8f72;
  --text-dim: #4d7a57;
  --cream: #f5f1e8;
  --warn: #f59e0b;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ─── Helpers tipográficos ─────────────────────────────────── */

.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.font-serif { font-family: 'Cormorant Garamond', Georgia, serif; }

.text-accent { color: var(--accent); }
.text-bright { color: var(--text-bright); }
.text-mid { color: var(--text-mid); }
.text-dim { color: var(--text-dim); }

.term-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: lowercase;
}

.cursor-blink::after {
  content: '▊';
  animation: blink 1.1s step-end infinite;
  color: var(--accent);
  margin-left: 4px;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-mid);
  transition: border-color 0.2s ease;
}
a:hover { border-bottom-color: var(--accent); }

/* ─── Canvas background ────────────────────────────────────── */

#pixelia-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

/* ─── Layout shell ─────────────────────────────────────────── */

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-link {
  color: var(--text-bright);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border: none;
  transition: color 0.2s ease;
}

.logo-link:hover {
  color: var(--accent);
  border: none;
}

.logo-svg {
  height: 22px;
  width: auto;
  fill: currentColor;
  transition: fill 0.2s ease;
  display: block;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
  flex-shrink: 0;
}

.brand-tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 1.8px;
  text-transform: lowercase;
  margin-top: 4px;
  margin-left: 19px;
}

.shell-status {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  display: flex;
  gap: 16px;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1.2px;
}

.shell-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.shell-footer {
  border-top: 1px solid var(--border-dim);
  padding: 20px 24px;
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  background: rgba(8, 12, 10, 0.65);
  position: relative;
  z-index: 1;
}

/* ─── Hero ──────────────────────────────────────────────────── */

.hero {
  width: 100%;
  max-width: 540px;
  text-align: left;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 28px;
}

.hero-eyebrow .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(48px, 9vw, 80px);
  line-height: 1.0;
  color: var(--text-bright);
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 32px;
}

.hero-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-text strong {
  color: var(--text-bright);
  font-weight: 500;
}

/* ─── Card ──────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 28px;
  position: relative;
  z-index: 2;
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--accent-mid);
}

.card-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: lowercase;
  margin-bottom: 14px;
}

.card-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  color: var(--text-bright);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.card-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 22px;
}

.card-text strong {
  color: var(--text-bright);
  font-weight: 500;
}

/* ─── Form ──────────────────────────────────────────────────── */

.field {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--text-dim);
  text-transform: lowercase;
  margin-bottom: 8px;
}

.field-input,
.field-textarea {
  width: 100%;
  background: rgba(8, 12, 10, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text-bright);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.field-input:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: var(--text-dim);
}

.field-input:disabled,
.field-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.field-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.field-help {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.5;
}

.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
}

/* ─── Botón estilo terminal ─────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 22px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-mid);
  border-radius: 8px;
  color: var(--accent);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.btn:hover:not(:disabled) {
  background: var(--accent-mid);
  border-color: var(--accent);
  transform: translateY(-1px);
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--text-mid);
  border-color: var(--border);
}

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

/* ─── Estados (alerts) ──────────────────────────────────────── */

.alert {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid;
}

.alert-success {
  background: rgba(34, 197, 94, 0.05);
  border-color: var(--accent-mid);
  color: var(--accent);
}

.alert-error {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

.alert-info {
  background: rgba(34, 197, 94, 0.025);
  border-color: var(--border);
  color: var(--text-mid);
}

/* ─── Spinner ───────────────────────────────────────────────── */

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-mid);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Responsive ────────────────────────────────────────────── */

@media (max-width: 640px) {
  .shell-header {
    padding: 14px 18px;
  }
  .shell-main {
    padding: 32px 20px;
  }
  .shell-status {
    display: none;
  }
  .card {
    padding: 26px 22px;
  }
  .hero-title {
    font-size: clamp(34px, 10vw, 48px);
  }
  .hero-subtitle {
    font-size: 18px;
  }
}
