:root {
  --bg: #F7F4EF;
  --bg-alt: #EDE9E2;
  --fg: #2C2A26;
  --fg-muted: #7A766D;
  --accent: #5E7A5A;
  --accent-warm: #C4774A;
  --border: #D8D2C8;
  --white: #FDFCFA;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* — Header — */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 40px;
  background: rgba(247, 244, 239, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216, 210, 200, 0.4);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.tagline-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* — Hero — */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(94,122,90,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(196,119,74,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 80px;
  align-items: center;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 28px;
}

.hero-sub {
  font-size: 18px;
  font-weight: 300;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 520px;
}

/* Orbit visual */
.hero-visual {
  position: relative;
  width: 480px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(94,122,90,0.2);
}

.ring-1 { width: 240px; height: 240px; animation: spin 18s linear infinite; }
.ring-2 { width: 360px; height: 360px; border-style: dashed; border-width: 1px; animation: spin 28s linear infinite reverse; }
.ring-3 { width: 460px; height: 460px; animation: spin 40s linear infinite; }

.orbit-core {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7a9c75);
  box-shadow: 0 0 60px rgba(94,122,90,0.25), 0 0 120px rgba(94,122,90,0.1);
}

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

/* — Philosophy — */
.philosophy {
  background: var(--fg);
  color: var(--white);
  padding: 100px 40px;
  position: relative;
}

.philosophy::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 90% 50%, rgba(94,122,90,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.philosophy-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.philosophy-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 80px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 32px;
}

.philosophy-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.philosophy-attr {
  font-size: 13px;
  font-weight: 400;
  color: rgba(253,252,250,0.45);
  letter-spacing: 0.04em;
}

/* — Who — */
.who {
  padding: 100px 40px;
  background: var(--bg);
}

.who-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.who-header {
  margin-bottom: 64px;
}

.who-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 600px;
}

.who-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.who-card {
  background: var(--bg);
  padding: 40px 36px;
}

.who-card-icon {
  color: var(--accent);
  margin-bottom: 20px;
}

.who-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.2;
}

.who-card p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* — What — */
.what {
  padding: 100px 40px;
  background: var(--bg-alt);
}

.what-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.what-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.what-body {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-top: 16px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 400;
}

.feature-item:first-child {
  border-top: 1px solid var(--border);
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* — Closing — */
.closing {
  padding: 120px 40px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.closing-bg-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(120px, 20vw, 240px);
  font-weight: 300;
  color: rgba(94,122,90,0.07);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  letter-spacing: -0.04em;
}

.closing-content {
  position: relative;
  z-index: 1;
}

.closing-statement {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: var(--fg);
}

/* — Footer — */
.site-footer {
  padding: 48px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-wordmark {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 6px;
}

.footer-tagline {
  font-size: 12px;
  color: var(--fg-muted);
}

.footer-meta {
  font-size: 13px;
  color: var(--fg-muted);
  text-align: right;
  line-height: 1.7;
}

/* — CRM Layout — */
.crm-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  padding-top: 72px;
}

.crm-sidebar {
  position: fixed;
  top: 72px;
  left: 0;
  width: 260px;
  height: calc(100vh - 72px);
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  overflow-y: auto;
}

.sidebar-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--fg-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover, .sidebar-link.active {
  background: var(--bg-alt);
  color: var(--fg);
}

.sidebar-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 24px 14px 8px;
}

.crm-main {
  margin-left: 260px;
  padding: 40px 48px;
  min-height: 100vh;
}

/* — CRM Header Bar — */
.crm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.crm-topbar h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.crm-topbar-actions {
  display: flex;
  gap: 12px;
}

/* — Buttons — */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

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

.btn-primary:hover {
  background: #4d6750;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-alt);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--fg);
}

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

/* — Status Badges — */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-active { background: #e8f4e6; color: #3a6336; }
.status-active::before { background: #5E7A5A; }

.status-in_progress { background: #fef3e2; color: #8a5c1a; }
.status-in_progress::before { background: #C4774A; }

.status-completed { background: var(--bg-alt); color: var(--fg-muted); }
.status-completed::before { background: var(--fg-muted); }

.status-on_hold { background: #f3f3f3; color: #666; }
.status-on_hold::before { background: #999; }

.status-pending { background: #e8f0fe; color: #2d5fa8; }
.status-pending::before { background: #5E7A5A; }

.status-cancelled { background: var(--bg-alt); color: var(--fg-muted); }
.status-cancelled::before { background: var(--fg-muted); }

/* — Client Cards — */
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.client-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.client-card:hover {
  box-shadow: 0 4px 24px rgba(44,42,38,0.08);
  transform: translateY(-2px);
  border-color: #c8c2ba;
}

.client-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.client-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
}

.client-card-meta {
  font-size: 13px;
  color: var(--fg-muted);
}

.client-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.client-card-stat {
  font-size: 13px;
  color: var(--fg-muted);
}

/* — Milestones — */
.milestone-list {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.milestone-item {
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

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

.milestone-item:hover {
  background: var(--bg);
}

.milestone-date {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 400;
}

.milestone-date.overdue {
  color: #b0522a;
}

.milestone-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}

.milestone-client {
  font-size: 13px;
  color: var(--fg-muted);
}

/* — Section Headers — */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--fg);
}

/* — Empty State — */
.empty-state {
  text-align: center;
  padding: 64px 32px;
  color: var(--fg-muted);
}

.empty-state h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 15px;
  margin-bottom: 24px;
}

/* — Modal — */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(44,42,38,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(44,42,38,0.15);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.modal-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--fg);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--fg);
}

/* — Forms — */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
}

/* — Client Detail View — */
.client-detail {
  max-width: 900px;
}

.client-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
}

.client-detail-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 8px;
}

.client-detail-meta {
  font-size: 15px;
  color: var(--fg-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  margin-bottom: 24px;
}

.back-btn:hover {
  color: var(--fg);
}

/* — Tabs — */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 400;
  color: var(--fg-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab:hover { color: var(--fg); }

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

/* — Note Items — */
.note-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 12px;
}

.note-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.note-author {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}

.note-date {
  font-size: 13px;
  color: var(--fg-muted);
}

.note-content {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.6;
}

/* — Loading — */
.loading {
  text-align: center;
  padding: 48px;
  color: var(--fg-muted);
  font-size: 15px;
}

/* — Responsive — */
@media (max-width: 768px) {
  .site-header { padding: 16px 24px; }
  .hero { padding: 100px 24px 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { width: 280px; height: 280px; margin: 0 auto; }
  .ring-1 { width: 140px; height: 140px; }
  .ring-2 { width: 210px; height: 210px; }
  .ring-3 { width: 270px; height: 270px; }
  .philosophy { padding: 72px 24px; }
  .who { padding: 72px 24px; }
  .who-grid { grid-template-columns: 1fr; }
  .what { padding: 72px 24px; }
  .what-inner { grid-template-columns: 1fr; gap: 48px; }
  .closing { padding: 80px 24px; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
  .tagline-label { display: none; }
  /* CRM responsive */
  .crm-layout { grid-template-columns: 1fr; }
  .crm-sidebar { display: none; }
  .crm-main { margin-left: 0; padding: 24px 20px; }
  .client-grid { grid-template-columns: 1fr; }
  .milestone-item { grid-template-columns: 1fr auto; }
  .milestone-item .milestone-client { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
