/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FAF7F0;
  --bg-alt: #F2EDE3;
  --ink: #0D1B2A;
  --ink-muted: #6B7280;
  --ink-faint: #9CA3AF;
  --accent: #F4A127;
  --accent-dark: #D4880F;
  --surface: #FFFFFF;
  --border: #E5DDD0;
  --radius: 10px;
  --radius-sm: 6px;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

/* ─── Nav ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.nav-tagline {
  font-size: 13px;
  color: var(--ink-muted);
  font-style: italic;
}

/* ─── Hero ─── */
.hero {
  padding: 80px 32px 96px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

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

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.65;
  max-width: 440px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; }

.stat-number {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 4px;
  max-width: 100px;
  line-height: 1.4;
}

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

/* ─── Dashboard Visual ─── */
.hero-visual {
  display: flex;
  justify-content: center;
}

.dashboard-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 32px rgba(13, 27, 42, 0.06), 0 1px 4px rgba(13, 27, 42, 0.04);
}

.dashboard-header {
  margin-bottom: 20px;
}

.dash-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.dash-meta {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 2px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.dash-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.dash-card.highlight {
  background: var(--ink);
  border-color: var(--ink);
}

.dash-card.highlight .card-label { color: rgba(255,255,255,0.6); }
.dash-card.highlight .card-value { color: #FFFFFF; }
.dash-card.highlight .card-sub { color: rgba(255,255,255,0.45); }

.card-label { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.card-value { font-family: var(--font-display); font-size: 22px; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.card-value.small { font-size: 20px; }
.card-sub { font-size: 11px; color: var(--ink-faint); margin-top: 4px; }

.dash-tenants { }
.tenant-header { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }

.tenant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.tenant-row:last-child { border-bottom: none; }

.tenant-avatar {
  width: 32px;
  height: 32px;
  background: var(--ink);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.tenant-info { flex: 1; min-width: 0; }
.tenant-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.tenant-prop { font-size: 11px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tenant-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.tenant-badge.paid { background: #ECFDF5; color: #065F46; }
.tenant-badge.maintenance { background: #FFF7ED; color: #92400E; }
.tenant-badge.due { background: #FEF2F2; color: #991B1B; }

/* ─── Features ─── */
.features {
  padding: 96px 32px;
  border-bottom: 1px solid var(--border);
}

.features-inner { max-width: 1160px; margin: 0 auto; }

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 600px;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 16px;
  color: var(--ink-muted);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.2s ease;
}

.feature-card:hover {
  box-shadow: 0 4px 20px rgba(13, 27, 42, 0.07);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  margin-bottom: 18px;
}

.feature-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}

.feature-body {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ─── Pricing ─── */
.pricing {
  padding: 96px 32px;
  background: var(--ink);
  color: #fff;
}

.pricing-inner { max-width: 1160px; margin: 0 auto; }

.pricing .section-label { color: var(--accent); }
.pricing .section-heading { color: #fff; }
.pricing .section-sub { color: rgba(255,255,255,0.6); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.price-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 32px;
  position: relative;
}

.price-card.featured {
  background: rgba(244, 161, 39, 0.1);
  border-color: var(--accent);
}

.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.price-tier {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 44px;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.price-per {
  font-size: 18px;
  color: rgba(255,255,255,0.5);
}

.price-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
  line-height: 1.5;
}

.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-features li {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  padding-left: 20px;
  position: relative;
}

.price-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}

.pricing-note {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* ─── Manifesto ─── */
.manifesto {
  padding: 96px 32px;
  border-bottom: 1px solid var(--border);
}

.manifesto-inner { max-width: 840px; margin: 0 auto; }

.manifesto-quote {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 26px);
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: -0.01em;
  font-style: italic;
  margin-bottom: 40px;
  padding-left: 24px;
  border-left: 3px solid var(--accent);
}

.manifesto-context p {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.75;
  margin-bottom: 20px;
}

.manifesto-context p:last-child { margin-bottom: 0; }

/* ─── Closing ─── */
.closing {
  padding: 96px 32px;
  border-bottom: 1px solid var(--border);
}

.closing-inner { max-width: 1160px; margin: 0 auto; }

.closing-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 580px;
  margin-bottom: 16px;
}

.closing-sub {
  font-size: 16px;
  color: var(--ink-muted);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: 56px;
}

.closing-value {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.value-item { }

.value-label {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 6px;
}

.value-desc {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ─── Footer ─── */
.footer {
  padding: 48px 32px;
  background: var(--ink);
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff;
}

.footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.footer-legal {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .closing-value { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 600px) {
  .hero, .features, .pricing, .manifesto, .closing { padding: 64px 20px; }
  .nav-inner { padding: 14px 20px; }
  .nav-tagline { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dashboard-frame { max-width: 100%; }
}

/* ─── App Shell ─── */
.app-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.app-nav-wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.app-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.app-nav-links a {
  font-size: 14px;
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.app-nav-links a:hover { color: var(--ink); }
.app-nav-links a.active { color: var(--ink); }

.app-nav-user {
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }

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

.btn-danger {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}
.btn-danger:hover { background: #FEE2E2; }

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

/* ─── Page Layout ─── */
.page-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 32px;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--ink-muted);
}

/* ─── Grid / Cards ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

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

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* ─── Stat Cards ─── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card-sub {
  font-size: 12px;
  color: var(--ink-faint);
}

/* ─── Tables ─── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead { background: var(--bg-alt); }

th {
  padding: 10px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

/* ─── Status Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-paid { background: #ECFDF5; color: #065F46; }
.badge-due { background: #FEF3C7; color: #92400E; }
.badge-late { background: #FEF2F2; color: #991B1B; }
.badge-pending { background: #EFF6FF; color: #1E40AF; }

/* ─── Forms ─── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s;
}

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

.form-error {
  font-size: 13px;
  color: #991B1B;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
}

/* ─── Auth Pages ─── */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 32px;
}

.auth-wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.auth-sub {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 28px;
}

.auth-link {
  font-size: 14px;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 20px;
}

.auth-link a { color: var(--accent); font-weight: 500; text-decoration: none; }

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-muted);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  margin-bottom: 20px;
}

/* ─── Alerts ─── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}

.alert-warning {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.alert-success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.alert-error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* ─── Property / Unit cards ─── */
.prop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

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

.prop-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.prop-address {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ─── Sections ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ─── Tenant Portal ─── */
.portal-hero {
  background: var(--ink);
  color: #fff;
  padding: 40px 32px;
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.portal-balance {
  font-family: var(--font-display);
  font-size: 48px;
  letter-spacing: -0.04em;
  margin: 8px 0;
}

.portal-meta {
  font-size: 14px;
  opacity: 0.6;
}
