/* WaylandRidgeOS Theme — Warm, grounded, editorial */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #1a1814;
  --text-muted: #6b6560;
  --accent: #c4622d;
  --accent-dark: #9a4d23;
  --forest: #2d4a3e;
  --forest-light: #3d5f50;
  --border: #e8e2d8;
  --warm-gray: #f0ebe2;
}

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

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

/* ── HERO ── */
.hero {
  padding: 96px 80px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

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

.hero-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 36px;
  max-width: 700px;
}

.hero-body p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 40px;
  max-width: 600px;
}

.stat {
  flex: 1;
  padding-right: 32px;
}

.stat-number {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  margin-right: 32px;
  flex-shrink: 0;
}

/* ── SHARED SECTION STYLES ── */
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

/* ── PORTFOLIO ── */
.portfolio {
  background: var(--surface);
  padding: 80px;
}

.portfolio-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 48px;
  max-width: 480px;
  line-height: 1.2;
}

.portfolio-card {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg);
  overflow: hidden;
}

.portfolio-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
}

.portfolio-info {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.portfolio-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 10px;
}

.portfolio-tagline {
  font-size: 15px;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 20px;
}

.portfolio-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
  background: #e8f0eb;
  border-radius: 2px;
  padding: 5px 10px;
}

/* Portfolio visual: animated wave/pool scene */
.portfolio-visual {
  background: linear-gradient(135deg, #2d4a3e 0%, #3d5f50 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.pool-illustration {
  width: 200px;
  height: 200px;
  position: relative;
}

.wave-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

.wave-1 { top: 30px; width: 100%; }
.wave-2 { top: 70px; width: 80%; }
.wave-3 { top: 110px; width: 60%; }

.swimmer-figure {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: swim-bob 2.4s ease-in-out infinite;
}

@keyframes swim-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

.swimmer-head {
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
}

.swimmer-body {
  width: 3px;
  height: 32px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
  margin-top: 2px;
}

/* ── PHILOSOPHY ── */
.philosophy {
  padding: 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.philosophy-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 620px;
  line-height: 1.15;
}

.philosophy-body p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 64px;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}

.pillar {
  padding: 40px 40px 40px 0;
  border-right: 1px solid var(--border);
}

.pillar:last-child {
  border-right: none;
  padding-left: 40px;
}

.pillar:nth-child(2) {
  padding-left: 40px;
}

.pillar-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.pillar h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.pillar p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── APPROACH ── */
.approach {
  background: var(--surface);
  padding: 80px;
}

.approach-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 56px;
  max-width: 540px;
  line-height: 1.2;
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}

.approach-item {
  padding: 40px 32px 40px 0;
  border-right: 1px solid var(--border);
}

.approach-item:last-child {
  border-right: none;
  padding-left: 32px;
}

.approach-item:nth-child(2),
.approach-item:nth-child(3) {
  padding-left: 32px;
}

.approach-icon {
  color: var(--forest);
  margin-bottom: 20px;
}

.approach-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.approach-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── PEOPLE ── */
.people {
  background: var(--forest);
  padding: 80px;
}

.people-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.people-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
  margin-top: 20px;
}

.people-title {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.people-bio {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
}

.contact-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding-top: 60px;
}

.contact-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.contact-email {
  font-size: 15px;
  color: #e8c9a0;
  text-decoration: none;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-value {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
}

/* ── CLOSING ── */
.closing {
  padding: 100px 80px;
  max-width: 900px;
  margin: 0 auto;
}

.closing-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 28px;
}

.closing-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.8;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--forest);
}

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

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero { padding: 64px 24px 56px; }
  .portfolio { padding: 56px 24px; }
  .philosophy { padding: 56px 24px; }
  .approach { padding: 56px 24px; }
  .people { padding: 56px 24px; }
  .closing { padding: 56px 24px 80px; }
  .footer { padding: 24px; }

  .hero-headline { font-size: 36px; }
  .hero-stats { flex-direction: column; align-items: flex-start; gap: 24px; }
  .stat-divider { display: none; }
  .stat { padding-right: 0; }

  .portfolio-card-inner { grid-template-columns: 1fr; }
  .portfolio-visual { display: none; }

  .pillars { grid-template-columns: 1fr; }
  .pillar { border-right: none; border-bottom: 1px solid var(--border); padding: 32px 0; }
  .pillar:last-child { padding-left: 0; }
  .pillar:nth-child(2) { padding-left: 0; }

  .approach-grid { grid-template-columns: 1fr 1fr; }
  .approach-item:nth-child(2) { padding-left: 0; }
  .approach-item:nth-child(4) { border-right: none; padding-left: 0; }

  .people-inner { grid-template-columns: 1fr; gap: 40px; }
  .contact-block { padding-top: 0; }
}

/* ── PORTFOLIO DASHBOARD ── */
.dashboard-header {
  background: var(--forest);
  padding: 48px 80px 40px;
}

.dashboard-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.dashboard-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.dashboard-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.dashboard-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

.nav-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: #e8c9a0;
  text-decoration: none;
  border: 1px solid rgba(232,201,160,0.3);
  padding: 8px 20px;
  border-radius: 2px;
  transition: background 0.2s;
  align-self: flex-start;
  margin-top: 4px;
}
.nav-link:hover { background: rgba(232,201,160,0.1); }

/* KPI Strip */
.kpi-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 80px;
}

.kpi-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--border);
}

.kpi {
  padding: 28px 32px;
  border-right: 1px solid var(--border);
}

.kpi-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.kpi-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.kpi-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Dashboard Body */
.dashboard-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 80px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.section-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Business Cards */
.business-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.business-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.business-card-header {
  padding: 20px 24px;
  background: var(--warm-gray);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.business-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--forest);
}

.business-type {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.business-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 2px;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--border); }

.business-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.metric-cell {
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.metric-cell:last-child { border-right: none; }

.metric-name {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.metric-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.metric-month {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.business-entries {
  padding: 0 24px 16px;
}

.entries-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.entries-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--border);
}

.entries-table td {
  padding: 8px 12px 8px 0;
  color: var(--text);
}

.entries-table tr:hover td { background: var(--warm-gray); }

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 24px;
}

.sidebar-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

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

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--forest); }

.form-select {
  width: 100%;
  padding: 10px 12px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--forest);
  color: #ffffff;
}
.btn-primary:hover { background: var(--forest-light); }

.btn-secondary {
  background: var(--warm-gray);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-danger {
  background: #c44;
  color: #fff;
}
.btn-danger:hover { background: #a33; }

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

.btn-block { width: 100%; text-align: center; }

/* Alert Thresholds */
.threshold-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.threshold-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--warm-gray);
  border-radius: 2px;
  font-size: 12px;
}

.threshold-item-name {
  font-weight: 500;
  color: var(--text);
}

.threshold-item-value {
  color: var(--text-muted);
}

.threshold-item-value.breached {
  color: #c44;
  font-weight: 600;
}

.threshold-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 6px;
  margin-left: 8px;
}
.threshold-delete:hover { color: #c44; }

/* Flash Messages */
.flash {
  padding: 12px 20px;
  border-radius: 2px;
  font-size: 14px;
  margin-bottom: 16px;
}

.flash-success {
  background: #e8f0eb;
  color: var(--forest);
  border: 1px solid #c8e0d8;
}

.flash-error {
  background: #fce8e8;
  color: #c44;
  border: 1px solid #f0c8c8;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.empty-state strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,24,20,0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

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

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px;
  width: 480px;
  max-width: 90vw;
}

.modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Dashboard responsive */
@media (max-width: 768px) {
  .dashboard-header { padding: 40px 24px 32px; }
  .kpi-strip { padding: 0 24px; }
  .kpi-strip-inner { grid-template-columns: 1fr; }
  .kpi { border-right: none; border-bottom: 1px solid var(--border); }
  .dashboard-body { padding: 32px 24px; grid-template-columns: 1fr; }
  .business-metrics { grid-template-columns: 1fr 1fr; }
  .business-metrics .metric-cell:last-child { display: none; }
}