/* ============================================================
   MultiSoftCreations Portfolio — Base styles
   Palette: deep black, crimson red, electric blue, navy
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --bg-elevated: #121216;
  --bg-card: #16161c;
  --bg-card-hover: #1c1c24;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --crimson: #c41e3a;
  --crimson-light: #e8364f;
  --crimson-dim: rgba(196, 30, 58, 0.18);

  --blue: #3b82f6;
  --blue-electric: #60a5fa;
  --navy: #1e3a5f;

  --text: #f0f0f5;
  --text-muted: #a0a0b0;
  --text-dim: #6b6b7b;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(196, 30, 58, 0.12);

  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", var(--font);

  --header-h: 68px;
  --container: 1120px;
  --transition: 0.22s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-img {
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

.logo-img-sm {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
}

.logo {
  max-width: 100%;
  overflow: hidden;
}

.logo-text {
  font-size: 0.95rem;
  color: var(--text);
}

.main-nav ul {
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.main-nav a.active {
  color: var(--crimson-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--crimson);
  color: #fff;
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.35);
}

.btn-primary:hover {
  background: var(--crimson-light);
  box-shadow: 0 6px 28px rgba(196, 30, 58, 0.45);
}

/* WhatsApp button — verde de marca */
.btn-whatsapp {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.btn-whatsapp:hover {
  background: #16a34a;
  box-shadow: 0 6px 28px rgba(34, 197, 94, 0.5);
}


.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}

.link-arrow {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--blue-electric);
  transition: color var(--transition);
}

.link-arrow:hover {
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4rem 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(196, 30, 58, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(59, 130, 246, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(30, 58, 95, 0.2), transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 680px;
}

.hero-label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--crimson-light);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero-brand {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero-brand strong {
  color: var(--text);
  font-weight: 600;
}

.hero-motto {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2.25rem;
  max-width: 28ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.section-intro {
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 2.5rem;
}

.page-hero {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 2.5rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 60ch;
}

.about-text strong {
  color: var(--text);
}

.about-highlights {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), background var(--transition);
}

.highlight-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.highlight-icon {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--crimson);
  margin-bottom: 0.75rem;
}

.highlight-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.highlight-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Projects grid (shared) ---------- */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}

.project-card:hover {
  border-color: rgba(196, 30, 58, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.project-card-image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, var(--navy), var(--bg-elevated));
  position: relative;
  overflow: hidden;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-image .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.05em;
}

.project-card-body {
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 4px;
}

.badge-category {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-electric);
}

.badge-status {
  background: var(--crimson-dim);
  color: var(--crimson-light);
}

.badge-status.released { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge-status.early_access { background: rgba(234, 179, 8, 0.15); color: #fbbf24; }
.badge-status.demo { background: rgba(59, 130, 246, 0.15); color: var(--blue-electric); }
.badge-status.development { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-card .brand {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.project-card .desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tech-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  color: var(--text-dim);
}

.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.project-card-actions .btn {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

.loading-msg,
.empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), background var(--transition);
}

.service-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(180deg, transparent, rgba(196, 30, 58, 0.06));
}

.cta-inner {
  text-align: center;
  max-width: 540px;
  margin-inline: auto;
}

.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  margin-bottom: 0.75rem;
}

.cta p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.contact-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.contact-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.placeholder-note {
  font-size: 0.85rem !important;
  color: var(--text-dim) !important;
  font-style: italic;
}

.contact-note {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 640px;
}

.contact-note h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.contact-note p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Legal ---------- */
.prose {
  max-width: 680px;
}

.prose h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p,
.prose li {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.prose ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal-disclaimer {
  margin-top: 2.5rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem !important;
  color: var(--text-dim) !important;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}


/* ---------- Contact form ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.contact-form .req { color: var(--crimson-light); }

.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(196, 30, 58, 0.35);
  border-color: rgba(196, 30, 58, 0.5);
}

.contact-form textarea { resize: vertical; min-height: 120px; }

.check-label {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.65rem !important;
  font-weight: 400 !important;
  font-size: 0.85rem !important;
}

.check-label input { margin-top: 0.2rem; }

.form-status {
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
}

.form-status.ok {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.form-status.error {
  background: rgba(196, 30, 58, 0.15);
  color: var(--crimson-light);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

/* ---------- Admin panel ---------- */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.admin-card.is-read { opacity: 0.85; }

.admin-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.admin-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 400;
  margin-top: 0.15rem;
}

.admin-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.admin-msg {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  white-space: pre-wrap;
}

.admin-contact {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.admin-reply {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-reply-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.btn-link {
  background: none;
  border: none;
  color: var(--blue-electric);
  cursor: pointer;
  font-size: inherit;
}

.reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.reply-form textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
}


/* ---------- Comments ---------- */
.comments-section { margin-top: 0.5rem; }
.comments-note { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 1rem; }
.comments-user { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.comments-auth-forms { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.25rem; }
.comments-auth-forms details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.comments-auth-forms summary { cursor: pointer; font-weight: 600; color: var(--text); }
.comment-form { margin-top: 0.75rem; }
.comments-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.comment-head { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.comment-body { color: var(--text-muted); white-space: pre-wrap; margin-bottom: 0.5rem; }
.comment-actions { display: flex; gap: 1rem; }


/* ---------- Rank badges ---------- */
.rank-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.rank-creador {
  background: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.4);
}
.rank-cocreador {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}
.rank-colaborador {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.rank-usuario {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.rank-select-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.rank-select-label select {
  font: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
}

.rank-cliente {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.rank-cliente-frecuente {
  background: rgba(249, 115, 22, 0.18);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}
.team-verify {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0.35rem;
  border: 1.5px solid rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}
.comment-identity {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.comment-username {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 400;
}
.comment-reply {
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
}
.back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.back-btn:hover { border-color: rgba(255,255,255,0.2); }
.back-arrow { font-size: 1.15rem; line-height: 1; }
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 90;
}
body.nav-open { overflow: hidden; }
