/* ===== VARIABLES ===== */
:root {
  --bg: #f9f7f4;
  --surface: #ffffff;
  --border: #e8e4de;
  --text: #1a1814;
  --text-dim: #7a756c;
  --accent: #c0392b;
  --accent-light: #c0392b22;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.07);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== AUTH PAGE ===== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-wrap {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-logo {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logo-text {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
}

.logo-tag {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-card h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.auth-card p {
  font-size: 14px;
  color: var(--text-dim);
}

.auth-icon {
  font-size: 36px;
  text-align: center;
}

.alert {
  background: #fce8ee;
  border: 1px solid #f5c6d0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #c0392b;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.field input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus {
  border-color: var(--accent);
}

.btn-primary {
  background: var(--text);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
  margin-top: 4px;
}

.btn-primary:hover { opacity: 0.85; }

.auth-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

/* ===== SHARED HEADER / FOOTER ===== */
.site-header {
  background: var(--text);
  color: white;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .logo-text { color: white; font-size: 20px; }

.logout-link {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.logout-link:hover { color: white; }

.site-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* ===== DASHBOARD ===== */
.dashboard-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}

.dashboard-hero {
  margin-bottom: 40px;
}

.dashboard-hero h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.dashboard-hero p {
  font-size: 16px;
  color: var(--text-dim);
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.15s, transform 0.15s;
}

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

.project-name {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}

.project-updated {
  font-size: 13px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.project-arrow {
  font-size: 20px;
  color: var(--text-dim);
  transition: color 0.15s, transform 0.15s;
}

.project-card:hover .project-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.empty-state {
  font-size: 15px;
  color: var(--text-dim);
  padding: 48px 0;
  text-align: center;
}

/* ===== PROJECT PAGE ===== */
.back-bar {
  padding: 12px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.back-link {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

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

.project-header {
  background: var(--text);
  color: white;
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.project-header-left h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.project-tagline {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
}

.project-header-right {
  text-align: right;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
}

.project-header-right strong {
  color: rgba(255,255,255,0.7);
}

.status-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* ===== VISION / INTENTIONS ===== */
.vision-section {
  padding: 32px 0 8px;
}

.vision-section .section-label {
  padding: 0 4px;
  margin-bottom: 28px;
}

.intentions-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.intention {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  transition: opacity 0.25s, color 0.2s;
  letter-spacing: -0.5px;
  user-select: none;
  position: relative;
  padding-bottom: 4px;
}

.intention::after {
  content: '';
  display: block;
  height: 3px;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.25s;
  margin-top: 4px;
}

.intention.active::after { width: 100%; }
.intention.active { color: var(--accent); }
.intention.dimmed { opacity: 0.2; }

.intention-reveal {
  display: none;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.intention-reveal.visible { display: block; }

.level-1 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.level-1 p {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.6;
  animation: fadeSlide 0.3s ease both;
}

.level-1 p:nth-child(2) { animation-delay: 0.06s; }
.level-1 p:nth-child(3) { animation-delay: 0.12s; }

.level-1 p.has-level2 {
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s, color 0.2s;
}

.level-1 p.has-level2:hover {
  text-decoration-color: var(--accent);
  color: var(--accent);
}

.level-2 {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-left: 20px;
  border-left: 2px solid var(--accent-light);
}

.level-2.visible { display: flex; }

.level-2 p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  animation: fadeSlide 0.25s ease both;
}

.level-2 p:nth-child(2) { animation-delay: 0.07s; }

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

/* ===== ACTORS ===== */
.actors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.actor-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.actor-icon { font-size: 28px; margin-bottom: 10px; }
.actor-name { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.actor-desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ===== FEATURES ===== */
.features-list { display: flex; flex-direction: column; gap: 14px; }

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.feature-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.feature-text strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.feature-text span { font-size: 13px; color: var(--text-dim); }

/* ===== PHASES ===== */
.phases { display: flex; flex-direction: column; gap: 10px; }

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

.phase-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.phase-dot.done { background: #2d6a4f; }
.phase-dot.active { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.phase-dot.todo { background: #d4cfc8; }

.phase-connector { width: 2px; height: 10px; background: var(--border); margin-left: 6px; border-radius: 1px; }

.phase-label { font-size: 14px; }
.phase-label.todo { color: var(--text-dim); }
.phase-label.active { font-weight: 600; color: var(--accent); }
.phase-num { font-size: 11px; color: var(--text-dim); margin-left: auto; flex-shrink: 0; }

/* ===== NEXT CARD ===== */
.next-card { background: var(--text); color: white; border: none; }
.next-card .section-label { color: rgba(255,255,255,0.4); }
.next-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.next-desc { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.6; }
.next-tag {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .project-header { padding: 24px 20px; flex-direction: column; align-items: flex-start; }
  .project-header-left h1 { font-size: 26px; }
  .project-header-right { text-align: left; }
  .actors-grid { grid-template-columns: 1fr; }
  .project-container { padding: 24px 16px; }
  .card { padding: 20px; }
  .intentions-row { gap: 24px; }
  .intention { font-size: 22px; }
  .site-header { padding: 14px 20px; }
  .back-bar { padding: 12px 20px; }
  .dashboard-main { padding: 32px 16px; }
  .dashboard-hero h1 { font-size: 28px; }
}
