/* Succession App — matches landing page design tokens */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #0f1419;
  --cream: #faf8f4;
  --warm: #c8956c;
  --warm-light: #e8c9a8;
  --warm-glow: rgba(200, 149, 108, 0.08);
  --slate: #5a6570;
  --light-slate: #8a939c;
  --border: #e5e0d8;
  --green: #4a9e6d;
  --red: #c0392b;
  --red-light: rgba(192, 57, 43, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== NAV ===== */
.app-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 248, 244, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.app-nav .logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: var(--ink);
  text-decoration: none;
}

.app-nav .logo span { color: var(--warm); }

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  font-size: 0.85rem;
  color: var(--slate);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.nav-link:hover {
  color: var(--ink);
  background: var(--warm-glow);
}

/* ===== LAYOUT ===== */
.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
h1 em { font-style: italic; color: var(--warm); }

h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--slate);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.label {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 0.5rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover { background: #1a2028; transform: translateY(-1px); }

.btn-warm {
  background: var(--warm);
  color: white;
}
.btn-warm:hover { background: #b8854f; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--warm); color: var(--warm); }

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

.btn-ghost {
  background: transparent;
  color: var(--slate);
  padding: 0.5rem 0.75rem;
}
.btn-ghost:hover { color: var(--ink); background: var(--warm-glow); }

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(192,57,43,0.2);
}
.btn-danger:hover { background: var(--red-light); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  background: white;
  color: var(--ink);
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--warm);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235a6570' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ===== CARDS ===== */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s;
}
.card:hover { border-color: var(--warm-light); }

.card-clickable {
  cursor: pointer;
}
.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* ===== DASHBOARD ===== */
.sessions-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.session-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.session-info h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.session-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--light-slate);
}

.session-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-active { background: rgba(74,158,109,0.1); color: var(--green); }
.status-paused { background: var(--warm-glow); color: var(--warm); }
.status-completed { background: rgba(15,20,25,0.06); color: var(--ink); }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--light-slate);
}
.empty-state h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.empty-state p { margin-bottom: 1.5rem; }

/* ===== INTERVIEW VIEW ===== */
.interview-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.section-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: all 0.3s;
  position: relative;
}
.section-dot.completed {
  background: var(--warm);
  border-color: var(--warm);
}
.section-dot.current {
  border-color: var(--warm);
  animation: pulse-dot 2s infinite;
}
.section-dot.current::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--warm);
  border-radius: 50%;
}

.section-labels {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.7rem;
  color: var(--light-slate);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.5rem;
}
.section-labels span.active { color: var(--warm); font-weight: 600; }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 149, 108, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(200, 149, 108, 0); }
}

/* Question display */
.question-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.question-card .question-text {
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.question-card .section-label {
  font-size: 0.7rem;
  color: var(--warm);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Recording area */
.recording-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.record-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  position: relative;
}

.record-btn:hover {
  border-color: var(--warm);
  transform: scale(1.05);
}

.record-btn.recording {
  border-color: var(--red);
  background: var(--red-light);
  animation: pulse-record 1.5s infinite;
}

.record-btn svg {
  width: 28px;
  height: 28px;
  fill: var(--slate);
  transition: fill 0.3s;
}

.record-btn:hover svg { fill: var(--warm); }
.record-btn.recording svg { fill: var(--red); }

@keyframes pulse-record {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.3); }
  50% { box-shadow: 0 0 0 16px rgba(192, 57, 43, 0); }
}

.record-label {
  font-size: 0.85rem;
  color: var(--light-slate);
}
.record-label.recording-active { color: var(--red); font-weight: 500; }

/* Transcript display */
.transcript-area {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 80px;
  margin-bottom: 1.5rem;
  position: relative;
}

.transcript-area .transcript-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
}

.transcript-area .transcript-text.interim {
  color: var(--light-slate);
  font-style: italic;
}

.transcript-area .transcript-placeholder {
  color: var(--light-slate);
  font-size: 0.9rem;
  font-style: italic;
}

/* AI thinking */
.ai-thinking {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--slate);
  font-size: 0.9rem;
}

.thinking-dots {
  display: flex;
  gap: 4px;
}

.thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm);
  animation: thinking 1.4s infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinking {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* Action buttons row */
.action-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* Previous Q&A */
.history-section {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.history-section h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-slate);
  margin-bottom: 1rem;
}

.qa-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(229, 224, 216, 0.5);
}

.qa-item:last-child { border-bottom: none; }

.qa-item .qa-question {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.qa-item .qa-answer {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.6;
}

.qa-item .qa-section-tag {
  font-size: 0.65rem;
  color: var(--warm);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* ===== SECTION TRANSITION ===== */
.section-transition {
  text-align: center;
  padding: 2rem;
  animation: fadeIn 0.5s ease;
}

.section-transition .check-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(74,158,109,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.section-transition h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.section-transition p { color: var(--slate); font-size: 0.9rem; }

/* ===== INTERVIEW COMPLETE ===== */
.interview-complete {
  text-align: center;
  padding: 3rem 2rem;
}

.interview-complete h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}
.interview-complete h2 em { color: var(--warm); font-style: italic; }

.interview-complete p {
  color: var(--slate);
  margin-bottom: 2rem;
}

/* ===== DOCUMENT VIEW ===== */
.document-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.document-content {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem;
  line-height: 1.8;
}

.document-content h1 {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--warm);
}

.document-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.document-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.document-content p {
  margin-bottom: 1rem;
  color: var(--slate);
}

.document-content ul, .document-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.document-content li {
  margin-bottom: 0.5rem;
  color: var(--slate);
}

.document-content strong { color: var(--ink); }

.document-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ===== LOADING ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--slate);
  gap: 0.75rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--warm);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

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

.fade-in { animation: fadeIn 0.4s ease; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .app-nav { padding: 0.75rem 1.25rem; }
  .app-container { padding: 5rem 1.25rem 3rem; }
  h1 { font-size: 1.6rem; }
  .question-card { padding: 1.5rem; }
  .question-card .question-text { font-size: 1.15rem; }
  .document-content { padding: 1.5rem; }
  .session-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .section-labels { display: none; }
  .document-header { flex-direction: column; }
}

@media (max-width: 480px) {
  .record-btn { width: 70px; height: 70px; }
  .nav-actions { gap: 0.5rem; }
}

/* ===== PRINT STYLES ===== */
@media print {
  .app-nav, .document-header, .btn { display: none !important; }
  .app-container { padding: 0; max-width: none; }
  .document-content { border: none; padding: 0; border-radius: 0; }
  body { background: white; }
}
