@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --orange: #F97316;
  --ink: #1C1917;
  --paper: #FAFAF9;
  --white: #ffffff;
  --line: #E7E5E4;
  --line-strong: #D6D3D1;
  --muted: #57534E;
  --footer: #1C1917;
  
  --font-display: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;
  
  --spacing-site: 24px;
  --radius-md: 6px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Kelloch Signature Elements */

.kelloch-rule-vertical {
  width: 1px;
  background-color: var(--line);
  align-self: center;
  height: 24px;
  margin: 0 16px;
}

.kelloch-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  display: block;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

p {
  color: var(--muted);
  max-width: 65ch;
}

/* Layout */

.page-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px var(--spacing-site);
}

.site-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 60px;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.dashboard-surface {
  display: flex;
  gap: 48px;
  padding: 56px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.04), 0 4px 10px -5px rgba(0,0,0,0.02);
  align-items: center;
}

.hero-lead {
  flex: 1.6;
}

.hero-insights {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.insight-card {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  max-width: 280px;
}

.insight-value {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
}

.insight-value span {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.insight-card p {
  font-size: 0.813rem;
  line-height: 1.4;
  margin: 0;
}

.site-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  color: var(--ink);
  max-width: 18ch;
  margin-bottom: 20px;
}

.site-summary {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 70ch;
}

.trust-bar-wrapper {
  margin-top: 24px;
  padding: 0 24px;
}

.trust-bar {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-item {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.8;
  transition: opacity 0.25s;
}

.trust-item:hover {
  opacity: 1;
}

.trust-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Kelloch Logo Palette Loop */
.trust-item:nth-child(1)::before { background: #49B6C6; } /* Cyan */
.trust-item:nth-child(2)::before { background: #E47B3B; } /* Orange */
.trust-item:nth-child(3)::before { background: #CA4697; } /* Magenta */

/* Navigation Tabs */

.nav-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0px;
}

.nav-tab {
  padding: 12px 24px;
  background: none;
  border: 1px solid transparent;
  border-bottom: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
  position: relative;
  top: 1px;
}

.nav-tab.active {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
  border-bottom-color: var(--white);
}

.nav-tab:hover:not(.active) {
  color: var(--orange);
}

/* Grid Sections */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
}

.main-content {
  grid-column: span 8;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.sidebar {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Role Selector */

.selector-block {
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--line);
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}

.role-card {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.role-card:hover {
  border-color: var(--orange);
}

.role-card.active {
  background: var(--white);
  border-color: var(--orange);
  box-shadow: 4px 0 0 0 var(--orange) inset;
}

.role-card strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.role-card span {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Course Rows */

.course-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  transition: border-color 0.2s;
}

.course-row:hover {
  border-color: var(--line-strong);
}

.course-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.provider-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--orange);
}

.course-row h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.course-meta {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.meta-item {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.course-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

/* Buttons */

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.8;
}

.header-main {
  display: flex;
  align-items: center;
}

.back-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

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

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 0.813rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--white);
}

/* Modals */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--white);
  padding: 48px;
  width: 100%;
  max-width: 500px;
  border: 1px solid var(--line);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.form-group input {
  padding: 12px;
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--paper);
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--orange);
}

/* Stats */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.stat-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
}

.stat-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card span {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* Footer */

.site-footer {
  margin-top: 100px;
  padding: 60px var(--spacing-site);
  background: var(--footer);
  color: var(--white);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  opacity: 0.8;
}

/* Responsive */

.feedback-btn {
  background: none;
  border: none;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0 4px;
}

.feedback-btn:hover {
  color: var(--orange);
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .main-content, .sidebar {
    grid-column: span 1;
  }
}

@media print {
  body { background: white; }
  .nav-tabs, .sidebar, .btn, .kelloch-rule-vertical { display: none !important; }
  .page-wrapper { padding: 0; max-width: 100%; }
  .site-header { margin-bottom: 30px; border-bottom: 2px solid var(--ink); padding-bottom: 20px; }
  .site-header h1 { font-size: 2.5rem; }
  .selector-block { border: none; padding: 0; }
  .main-content { grid-column: span 12; }
  .stat-card { border: 1px solid var(--line); }
  .stats-grid { margin-bottom: 40px; }
}
