:root {
  --app-background: #F5F3EF;
  --canvas-background: #EAE6DF;
  --surface: #FFFFFF;
  --elevated: #FBFAF7;
  --subtle: #F1ECE4;
  --dark-surface: #2A2521;
  --text-primary: #2A2521;
  --text-secondary: #6E665B;
  --text-tertiary: #9C9487;
  --text-on-brand: #FFFFFF;
  --border: #E9E3DA;
  --border-subtle: #F1ECE4;
  --brand-primary: #B0533C;
  --brand-primary-surface: #F3E3DC;
  --brand-secondary: #6E8E72;
  --brand-secondary-surface: #DEEBDF;
  --sage-ink: #3C6E48;
  --warning: #BC8729;
  --warning-surface: #F6EAD0;
  --success: #4E8A5C;
  --success-surface: #DEEBDF;
  --info: #3F7BA6;
  --info-surface: #DCE7F0;
  --danger: #BE443B;
  --danger-surface: #F4DEDB;
  --shadow-card: 0 4px 14px rgba(42, 37, 33, 0.06);
  --shadow-lift: 0 20px 50px rgba(42, 37, 33, 0.12);
  --shadow-button: 0 2px 6px rgba(176, 83, 60, 0.32);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--app-background);
  color: var(--text-primary);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.site-shell { min-height: 100vh; overflow-x: hidden; }

/* ---------- Icons ---------- */
.ico {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Brand mark ---------- */
.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--surface);
  display: block;
  object-fit: cover;
  box-shadow: var(--shadow-button);
}

/* ---------- Top nav ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(245, 243, 239, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
}
.brand span { font-size: 19px; letter-spacing: -0.01em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
}
.nav-links a { text-decoration: none; }
.nav-links a:hover,
.footer-links a:hover { color: var(--brand-primary); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--brand-primary);
  color: var(--text-on-brand);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-button);
  white-space: nowrap;
}
.nav-cta .ico { width: 17px; height: 17px; stroke-width: 2; }

/* ---------- Hero ---------- */
.hero {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  padding: 88px 0 76px;
}
.hero-copy { display: grid; gap: 22px; min-width: 0; }

.eyebrow {
  margin: 0;
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; overflow-wrap: anywhere; }

h1 {
  margin: 0;
  font-size: 54px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 620px;
}
h2 { margin: 0 0 12px; font-size: 34px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; font-weight: 800; }

.lead {
  margin: 0;
  max-width: 560px;
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.6;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
}
.button .ico { width: 18px; height: 18px; stroke-width: 2; }
.button.primary {
  background: var(--brand-primary);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-button);
}
.button.secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.note { margin: 0; color: var(--text-tertiary); font-size: 13px; max-width: 480px; }

/* ---------- Hero preview panel: three layers ---------- */
.layer-panel {
  position: relative;
}
.layer-panel::before {
  content: "";
  position: absolute;
  inset: -22px -14px -14px;
  border-radius: 24px;
  background: var(--brand-primary-surface);
  opacity: 0.5;
}
.layer-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lift);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.layer-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.mini-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.mini-row.dark { background: var(--dark-surface); border-color: var(--dark-surface); color: var(--elevated); }
.mini-row .body { flex: 1; min-width: 0; }
.mini-row strong { display: block; font-size: 15px; }
.mini-row .body span { display: block; font-size: 12.5px; margin-top: 2px; color: var(--text-secondary); }
.mini-row.dark .body span { color: rgba(245, 243, 239, 0.7); }

.icon-tile {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.icon-tile.personal { background: var(--dark-surface); color: var(--elevated); }
.icon-tile.dark-on-dark { background: rgba(255, 255, 255, 0.12); color: var(--elevated); }
.icon-tile.home { background: var(--brand-secondary); color: #fff; }
.icon-tile.event { background: var(--brand-primary); color: #fff; }

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}
.chip.personal { background: rgba(255, 255, 255, 0.14); color: var(--elevated); }
.chip.home { background: var(--brand-secondary-surface); color: var(--sage-ink); }
.chip.event { background: var(--brand-primary-surface); color: var(--brand-primary); }

/* ---------- Sections ---------- */
.section { padding: 76px 0; border-top: 1px solid var(--border-subtle); }
.section.alt { background: var(--elevated); }
.section-inner { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.section-heading { max-width: 720px; margin-bottom: 40px; }
.section-heading .eyebrow.sage { color: var(--brand-secondary); }
.section-heading p { margin: 14px 0 0; color: var(--text-secondary); font-size: 17px; line-height: 1.6; }

.grid { display: grid; gap: 24px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.card p { margin: 10px 0 0; color: var(--text-secondary); font-size: 14.5px; line-height: 1.55; }
.card.personal { border-top: 3px solid var(--dark-surface); }
.card.home { border-top: 3px solid var(--brand-secondary); }
.card.event { border-top: 3px solid var(--brand-primary); }

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
}
.card-icon.personal { background: var(--dark-surface); color: var(--elevated); }
.card-icon.home { background: var(--brand-secondary); }
.card-icon.event { background: var(--brand-primary); }
.card-icon .ico { width: 24px; height: 24px; }

/* home-type cards (sage themed) */
.card.hometype {
  background: var(--brand-secondary-surface);
  border: 1px solid rgba(110, 142, 114, 0.25);
  box-shadow: none;
}
.card.hometype h3 { color: var(--text-primary); }
.card.hometype p { color: var(--sage-ink); }

/* ---------- Workflow ---------- */
.workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.step {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.step p { margin: 8px 0 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.5; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step-number { margin: 0; font-size: 22px; font-weight: 900; color: var(--brand-primary); }
.step-rule { flex: 1; height: 1px; background: var(--border-subtle); }

/* ---------- Split (privacy) ---------- */
.split {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: center;
}
.split .lead { font-size: 16.5px; max-width: 100%; }
.split h2 { font-size: 32px; }
.feature-image { overflow: hidden; border-radius: 20px; box-shadow: var(--shadow-lift); border: 1px solid var(--border); }
.feature-image img { width: 100%; height: 380px; object-fit: cover; }

/* ---------- Legal / content pages ---------- */
.legal-page { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 88px; }
.legal-header { margin-bottom: 32px; min-width: 0; }
.legal-header h1 { font-size: 40px; max-width: 100%; }
.legal-header .lead { font-size: 18px; margin-top: 16px; }
.legal-header .note { margin-top: 12px; }
.legal-stack { display: grid; gap: 16px; }

.legal-block, .policy-block, .support-block {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.legal-block h2, .policy-block h2, .support-block h2 {
  font-size: 19px;
  margin-bottom: 10px;
}
.legal-block p, .policy-block p, .support-block p { color: var(--text-secondary); margin: 0 0 4px; }
.legal-block p + p, .policy-block p + p, .support-block p + p { margin-top: 12px; }

.legal-block ul, .policy-block ul, .support-block ul,
.legal-block ol, .policy-block ol, .support-block ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
}
.legal-block li, .policy-block li, .support-block li { margin: 6px 0; }
.support-block .button { margin-top: 4px; }
.support-block a, .policy-block a, .legal-block a { color: var(--brand-primary); font-weight: 700; }

.compliance-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.compliance-table th, .compliance-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}
.compliance-table tr:last-child th,
.compliance-table tr:last-child td { border-bottom: none; }
.compliance-table th { width: 34%; color: var(--text-primary); font-size: 14px; font-weight: 800; }
.compliance-table td { color: var(--text-secondary); font-size: 14px; }
.compliance-table a { color: var(--brand-primary); font-weight: 700; word-break: break-word; }

/* ---------- Footer ---------- */
.footer { padding: 52px 0 40px; background: var(--dark-surface); color: rgba(245, 243, 239, 0.82); }
.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 48px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.footer-brand { max-width: 340px; }
.footer-brand .brand-mark { box-shadow: none; background: var(--surface); }
.footer-lockup { display: flex; align-items: center; gap: 12px; }
.footer-lockup span { font-size: 18px; font-weight: 800; color: var(--elevated); }
.footer-brand .note { margin-top: 16px; font-size: 13.5px; line-height: 1.6; color: rgba(245, 243, 239, 0.66); max-width: 100%; }
.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 12px 48px;
  font-size: 14px;
}
.footer-links a { color: rgba(245, 243, 239, 0.82); text-decoration: none; }
.footer-legal {
  width: min(1120px, calc(100% - 32px));
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(245, 243, 239, 0.14);
  font-size: 12.5px;
  color: rgba(245, 243, 239, 0.55);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 56px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  h1 { font-size: 38px; }
  .grid.three, .grid.two, .workflow { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 560px) {
  .nav { min-height: 60px; }
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .lead { font-size: 16.5px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .button { width: 100%; }
  .section { padding: 48px 0; }
  .legal-header h1 { font-size: 30px; }
  .footer-inner { flex-direction: column; gap: 28px; }
  .compliance-table th, .compliance-table td { display: block; width: 100%; }
  .compliance-table th { border-bottom: none; padding-bottom: 0; }
}
