/* =====================================================
   Revisio – Design Revision Tracking
   ===================================================== */

:root {
  --brand: #6366f1;
  --brand-dark: #4f46e5;
  --brand-light: #eef2ff;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}

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

/* ---- Nav ---- */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}

.nav-brand span { color: var(--text); }

.nav-links { display: flex; gap: 8px; align-items: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg); text-decoration: none; }

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

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }

/* ---- Container ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 680px; margin: 0 auto; padding: 0 24px; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #f0f0ff 0%, #fafafe 60%, #fff5f0 100%);
  padding: 100px 24px 80px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 em { color: var(--brand); font-style: normal; }

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Features ---- */
.features { padding: 80px 0; }

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 56px;
  font-size: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 0.92rem; }

/* ---- Pricing ---- */
.pricing { background: var(--white); padding: 80px 0; }

.price-card {
  background: var(--white);
  border: 2px solid var(--brand);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 380px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.price-label { color: var(--brand); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.price-amount { font-size: 3.5rem; font-weight: 800; margin: 8px 0 4px; }
.price-amount small { font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-desc { color: var(--muted); margin-bottom: 28px; }
.price-features { list-style: none; text-align: left; margin-bottom: 32px; }
.price-features li { padding: 6px 0; display: flex; gap: 8px; }
.price-features li::before { content: '✓'; color: var(--success); font-weight: 700; }

/* ---- Waitlist ---- */
.waitlist-section { background: var(--brand-light); padding: 80px 24px; text-align: center; }
.waitlist-section h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; }
.waitlist-section p { color: var(--muted); margin-bottom: 32px; }

.waitlist-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.waitlist-form input {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  outline: none;
}

.waitlist-form input:focus { border-color: var(--brand); }

/* ---- Card ---- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* ---- Form ---- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--brand); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ---- Progress / Revision counter ---- */
.revision-meter {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.revision-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.revision-meter-header .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.revision-meter-header .count { font-size: 1.4rem; font-weight: 800; }
.revision-meter-header .count.over { color: var(--danger); }
.revision-meter-header .count.ok { color: var(--brand); }

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 100px;
  transition: width .4s ease;
}

.progress-fill.ok { background: var(--brand); }
.progress-fill.warn { background: var(--warning); }
.progress-fill.over { background: var(--danger); }

/* ---- Status badges ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-in-progress { background: #dbeafe; color: #1e40af; }
.badge-complete { background: #dcfce7; color: #166534; }
.badge-extra { background: #fee2e2; color: #991b1b; }
.badge-active { background: var(--brand-light); color: var(--brand); }

/* ---- Project list ---- */
.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.project-row:last-child { border-bottom: none; }
.project-row:hover { background: var(--bg); }

.project-row-info { flex: 1; min-width: 0; }
.project-row-info h3 { font-size: 0.95rem; font-weight: 600; }
.project-row-info span { font-size: 12px; color: var(--muted); }

.revision-mini { display: flex; align-items: center; gap: 8px; }

/* ---- Client portal ---- */
.client-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
}

.client-header .logo { color: var(--brand); font-weight: 800; font-size: 18px; }
.client-header h1 { font-size: 1.3rem; font-weight: 700; margin: 4px 0; }
.client-header p { color: var(--muted); font-size: 14px; }

.limit-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
}

.limit-warning h3 { color: #9a3412; margin-bottom: 8px; }
.limit-warning p { color: #c2410c; font-size: 14px; }

.limit-reached {
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-bottom: 24px;
}

.limit-reached h3 { color: var(--danger); font-size: 1.2rem; margin-bottom: 8px; }
.limit-reached p { color: var(--muted); font-size: 14px; }

/* ---- Revision history ---- */
.revision-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--white);
}

.revision-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.revision-number { font-weight: 700; font-size: 14px; }
.revision-feedback { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---- Alerts / Flash ---- */
.alerts { padding: 12px 24px 0; }
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* ---- Page header ---- */
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 32px 0 24px;
  margin-bottom: 32px;
}

.page-header h1 { font-size: 1.6rem; font-weight: 700; }
.page-header p { color: var(--muted); margin-top: 4px; }

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

/* ---- Utilities ---- */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Responsive */
@media (max-width: 640px) {
  .hero { padding: 60px 20px; }
  .nav-links .btn-outline { display: none; }
  .project-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .waitlist-form { flex-direction: column; }
}
