:root {
  /* Paleta real de cuatrotintas.com.ar (relevada en vivo el 2026-09-17) */
  --carbon: #0f0f0f;
  --carbon-soft: #333333;
  --gold: #d9b34d;
  --gold-text: #7c5a1f;
  --paper: #f4f2ee;
  --line: #e2ded4;
  --muted: #999999;
  --ok: #3d6e4a;
  --warn: #d9b34d;
  --danger: #a13f3f;
  --info: #4a5568;
  --radius: 10px;
  --radius-pill: 999px;
  --radius-card: 22px;
  --shadow-card: 0 6px 20px rgba(15, 15, 15, 0.06);
  --shadow-card-hover: 0 14px 32px rgba(15, 15, 15, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--carbon);
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .brand-mark {
  font-family: "Clash Grotesk", "Inter", sans-serif;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Acento cálido de marca: Instrument Serif Italic en palabras sueltas,
   igual que se usa en cuatrotintas.com.ar (ej. "...diferente."). No usar
   como tipografía de párrafo ni de títulos completos. */
.accent-italic {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
}

.logo {
  height: 28px;
  width: auto;
  display: block;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

button, input, textarea {
  font-family: inherit;
}

@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    animation: fade-in 0.5s ease both;
  }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Gate de contraseña --- */
.gate {
  margin: auto 0;
  padding: 48px 0;
  text-align: center;
}

.brand-mark {
  font-size: 1.5rem;
  color: var(--carbon);
}

.logo-gate {
  height: 34px;
  margin: 0 auto 28px;
}

.gate p {
  color: var(--muted);
  margin: 12px 0 28px;
  font-size: 0.95rem;
}

.gate form {
  display: flex;
  gap: 8px;
  max-width: 340px;
  margin: 0 auto;
}

.gate input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 1rem;
  background: #fff;
  color: var(--carbon);
}

.gate input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(217 179 77 / 0.25);
}

.gate input::placeholder {
  color: #9a9689;
}

.error {
  color: var(--danger);
  margin-top: 18px;
  font-size: 0.88rem;
}

.loading, .empty {
  color: var(--muted);
  font-size: 0.92rem;
}

.state-screen {
  margin: auto 0;
  text-align: center;
  padding: 48px 0;
}

/* --- Botones: pastilla, con levantada al hover, igual que en cuatrotintas.com.ar --- */
.gate button,
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--carbon);
  color: #fdfcfa;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gate button:hover,
.cta-button:hover {
  background: var(--carbon-soft);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 15, 15, 0.18);
}

.gate button:active,
.cta-button:active {
  transform: scale(0.97);
}

.cta-button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.cta-button .ph {
  font-size: 1.05em;
}

/* --- Portal --- */
.portal {
  padding: 56px 0 64px;
}

.portal-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 6px;
}

.portal-header .logo {
  margin-bottom: 18px;
}

.portal-header h1 {
  font-size: 1.9rem;
  margin-bottom: 10px;
}

.header-intro {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 46ch;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge.ok { background: #e6efe8; color: var(--ok); }
.badge.warn { background: #f3e9d6; color: var(--gold-text); }
.badge.danger { background: #f4e3e3; color: var(--danger); }
.badge.info { background: #e7eaee; color: var(--info); }
.badge.muted { background: #ece9e2; color: var(--muted); }

.section {
  padding: 16px 0;
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .section {
    opacity: 0;
    animation: rise-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .section:nth-of-type(1) { animation-delay: 0.05s; }
  .section:nth-of-type(2) { animation-delay: 0.12s; }
  .section:nth-of-type(3) { animation-delay: 0.19s; }
  .section:nth-of-type(4) { animation-delay: 0.26s; }
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.section-heading .ph {
  color: var(--gold-text);
  font-size: 1.2rem;
}

.section-heading:has(+ .section-intro) {
  margin-bottom: 4px;
}

.section h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--carbon);
}

.section-intro {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* --- Tarjeta de estadística (Progreso) --- */
.stat-card {
  background: var(--carbon);
  color: #fdfcfa;
  border-radius: var(--radius-card);
  padding: 28px 26px;
}

.stat-number {
  font-family: "Clash Grotesk", sans-serif;
  font-size: 2.3rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  margin: 8px 0 20px;
  color: rgba(253, 252, 250, 0.55);
  font-size: 0.88rem;
}

.stat-card .progress-track {
  background: rgba(253, 252, 250, 0.16);
}

/* --- Tarjetas genéricas (Brief, Calendario) --- */
.card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 22px 22px;
  box-shadow: var(--shadow-card);
}

.card h2 {
  margin-bottom: 18px;
}

.progress-track {
  background: var(--line);
  border-radius: var(--radius-pill);
  height: 7px;
  overflow: hidden;
}

.progress-fill {
  background: var(--gold);
  height: 100%;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-label {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

/* --- Calendario: tarjetas en vez de lista con líneas --- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  background: #fff;
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  border-left: 4px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.timeline li.acento-warn {
  border-left-color: var(--gold);
}

.timeline-fecha {
  color: var(--muted);
  font-size: 0.85rem;
  padding-top: 2px;
}

.timeline-body strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.timeline-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.link-reunion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--carbon);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  transition: color 0.2s ease, gap 0.2s ease;
}

.link-reunion:hover {
  color: var(--gold-text);
  gap: 9px;
}

/* --- Skeleton de carga --- */
.skeleton {
  padding-top: 56px;
}

.skeleton-line {
  background: linear-gradient(90deg, var(--line) 25%, #ece8dd 50%, var(--line) 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  height: 14px;
  margin-bottom: 12px;
}

@media (prefers-reduced-motion: no-preference) {
  .skeleton-line {
    animation: shimmer 1.4s ease-in-out infinite;
  }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-line.w-40 { width: 40%; height: 22px; margin-bottom: 24px; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-90 { width: 90%; }

/* --- Documentos: chips en vez de lista subrayada --- */
.documentos-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 10px 18px 10px 14px;
  box-shadow: var(--shadow-card);
  color: var(--carbon);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.doc-chip .ph {
  color: var(--gold-text);
  font-size: 1.1rem;
}

.doc-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  color: var(--gold-text);
}

.nota-ayuda {
  margin: 10px 0 0;
  padding: 10px 14px;
  background: #f0ede4;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* --- Formulario de brief --- */
.link-button {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
}

.link-button:hover {
  color: var(--carbon);
}

.campo {
  margin-bottom: 22px;
}

.campo-label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.opcional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
}

.campo input[type="text"],
.campo textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--carbon);
  background: #fff;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.campo input[type="text"]:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(217 179 77 / 0.18);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--carbon-soft);
}

.campo-escala {
  margin-bottom: 26px;
}

.escala-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.campo-escala input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

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

.site-footer {
  margin-top: 40px;
  padding: 20px 0 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.site-footer a {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.site-footer a:first-child {
  padding-left: 0;
  border-left: none;
}

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

@media (max-width: 480px) {
  .gate form {
    flex-direction: column;
  }
  .gate button {
    width: 100%;
  }
  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .site-footer {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .site-footer a {
    border-left: none;
    padding-left: 0;
  }
}
