/* ============================================
   AXION PORTAL - Editorial Dark Theme
   ============================================ */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --bg-deep: #0f0f0f;
  --border: #2a2a2a;
  --text: #f5f1e8;
  --text-dim: #c4bba8;
  --text-muted: #8a8275;
  --accent: #d4af7a;
  --accent-soft: #e8c698;
  --success: #6b9b6b;
  --danger: #c94444;
  --info: #7a9bb8;
  --warm: #b87a7a;
}

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

html, body {
  min-height: 100%;
  background: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: 'Playfair Display', Georgia, serif; }

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ====================== HEADER ====================== */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.client-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0;
}

.campaign-label {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ====================== TABS ====================== */
.tabs {
  border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
  overflow-x: auto;
  scrollbar-width: thin;
}

.tabs-inner {
  display: flex;
  gap: 0;
  padding: 0 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 16px 24px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--accent);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: var(--accent);
}

.tab-btn:hover {
  color: var(--accent);
}

/* ====================== MAIN ====================== */
.main-content {
  padding: 48px;
  position: relative;
  z-index: 2;
}

.tab-content {
  display: none;
  animation: fadeIn 0.6s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-intro {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 700px;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* ====================== ORNAMENT ====================== */
.ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.ornament.mini {
  margin-bottom: 8px;
  max-width: 200px;
}

/* ====================== STATS ====================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top right, var(--accent-glow, rgba(212, 175, 122, 0.15)), transparent 70%);
}

.stat-icon {
  font-size: 22px;
  margin-bottom: 16px;
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ====================== TIMELINE ====================== */
.timeline-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 48px;
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  gap: 24px;
  position: relative;
  margin-bottom: 32px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot-col {
  position: relative;
  flex-shrink: 0;
}

.timeline-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  border: 2px solid var(--color);
  background: var(--dotBg);
  font-size: 16px;
}

.timeline-line {
  position: absolute;
  left: 19px;
  top: 40px;
  width: 2px;
  height: calc(100% + 32px);
  background: linear-gradient(180deg, var(--color) 0%, var(--border) 100%);
  z-index: 1;
}

.timeline-content {
  flex: 1;
  padding-top: 4px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.timeline-phase {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin: 0 0 4px 0;
}

.timeline-date {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.timeline-percentage {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 900;
}

.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar-fill {
  height: 100%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====================== CARDS GRID ====================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: 2px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.card-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ====================== TASK LIST ====================== */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 20px 24px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-left: 3px solid var(--color, var(--text-muted));
}

.task-item-icon {
  font-size: 22px;
  color: var(--color);
  flex-shrink: 0;
}

.task-item-content {
  flex: 1;
}

.task-item-text {
  font-size: 15px;
  margin-bottom: 4px;
}

.task-item.completed .task-item-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

.task-item-date {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ====================== NEEDS / CLIENT TASKS ====================== */
.category-section {
  margin-bottom: 48px;
}

.category-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 24px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.need-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: 2px;
  transition: all 0.3s;
}

.need-card.completed {
  opacity: 0.6;
}

.need-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-muted);
  font-size: 22px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.need-card.completed .toggle-btn {
  color: var(--accent);
}

.toggle-btn:hover {
  color: var(--accent);
}

.badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.badge {
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-danger {
  background: rgba(201, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.badge-success {
  background: rgba(107, 155, 107, 0.15);
  color: var(--success);
  border: 1px solid var(--success);
}

.badge-accent {
  background: rgba(212, 175, 122, 0.15);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.badge-warm {
  background: rgba(184, 122, 122, 0.15);
  color: var(--warm);
  border: 1px solid var(--warm);
}

.need-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  margin: 0 0 8px 0;
}

.need-card.completed .need-card-title {
  text-decoration: line-through;
}

.specs-box {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 2px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.specs-label {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.examples-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.example-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--border);
  transition: all 0.3s;
  cursor: pointer;
  background: var(--bg-deep);
}

.example-img:hover {
  border-color: var(--accent);
  transform: scale(1.02);
}

/* ====================== VIRAL ====================== */
.viral-card {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, #1a1614 100%);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.viral-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.viral-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(212, 175, 122, 0.15), transparent 70%);
}

.viral-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  position: relative;
  gap: 8px;
  flex-wrap: wrap;
}

.viral-trend {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.viral-format {
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  position: relative;
}

/* ====================== BUTTONS ====================== */
.btn-primary, .btn-ghost, .btn-danger {
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  padding: 10px 20px;
}

.btn-primary:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 16px;
}

.btn-ghost:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 6px 12px;
  font-size: 11px;
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ====================== CIRCLE PROGRESS ====================== */
.circle-progress-wrapper {
  position: relative;
  height: 80px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.circle-progress-wrapper svg {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.circle-progress-value {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 900;
}

/* ====================== IMAGE MODAL ====================== */
.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}

.image-modal.active {
  display: flex;
}

.image-modal img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

/* ====================== STAT CARD ACCENT LINE ====================== */
.stat-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--card-color, var(--accent));
  border-radius: 2px 2px 0 0;
}

/* ====================== MINI STATS (resumen de proceso) ====================== */
.process-summary {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  margin-bottom: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.mini-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  border-right: 1px solid var(--border);
}

.mini-stat:last-child { border-right: none; }

.mini-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
}

.mini-stat-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ====================== TIMELINE EXPANDIBLE (NIVELES) ====================== */
.timeline-header.expandable {
  cursor: pointer;
  user-select: none;
  border-radius: 2px;
  padding: 6px;
  margin: -6px;
  transition: background 0.2s;
}

.timeline-header.expandable:hover {
  background: rgba(212, 175, 122, 0.06);
}

.timeline-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.phase-chevron {
  font-size: 22px;
  color: var(--text-muted);
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.phase-chevron.open {
  transform: rotate(90deg);
}

.phase-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.phase-detail.open {
  max-height: 900px;
}

.phase-description {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.75;
  padding-top: 18px;
  margin-top: 10px;
  margin-bottom: 20px;
  border-top: 1px solid var(--border);
}

.phase-section-label {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.phase-deliverables {
  margin-bottom: 20px;
}

.deliverables-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deliverables-list li {
  background: rgba(212, 175, 122, 0.08);
  border: 1px solid rgba(212, 175, 122, 0.22);
  color: var(--text-dim);
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.phase-tasks-section {
  margin-bottom: 16px;
}

.phase-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phase-task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.phase-task-icon {
  flex-shrink: 0;
  font-size: 13px;
  margin-top: 1px;
}

.phase-task-text.done {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ====================== CLIENT UPLOAD (pestaña Necesitamos) ====================== */
.client-upload-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.client-upload-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.client-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px dashed var(--border);
  border-radius: 2px;
  padding: 14px 20px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  transition: all 0.2s;
  text-align: center;
}

.client-upload-zone:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(212, 175, 122, 0.04);
}

.cup-progress {
  font-size: 12px;
  color: var(--accent);
  margin-top: 6px;
  display: none;
}

.client-uploads-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.client-upload-file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 12px;
  color: var(--text-dim);
  gap: 12px;
}

.client-upload-view {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.2s;
}

.client-upload-view:hover { color: var(--accent-soft); }

/* ====================== FOOTER ====================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  margin-top: 64px;
  text-align: center;
  color: #555;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ====================== UTILITIES ====================== */
.loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-style: italic;
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .main-content { padding: 32px 24px; }
  .tabs-inner { padding: 0 24px; }
  .tab-btn { padding: 14px 16px; font-size: 11px; }
  .client-title { font-size: 22px; }
  .timeline-wrapper { padding: 28px; }
  .stat-value { font-size: 32px; }
  .category-title { font-size: 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 20px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}
