/* ============================================================
   casavello marketing site — WEB-002
   Design tokens derived from the app's global.css so the site
   and the product read as one brand.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Brand — same values as the app */
  --green:        #3A6B1A;
  --green-light:  #5A8F32;
  --green-pale:   #E8F4E0;
  --green-dark:   #2D5214;
  --orange:       #D4621A;
  --orange-light: #EB9865;
  --orange-pale:  #F9E8DC;

  /* Ink — sampled from the logo wordmark, used for dark surfaces */
  --ink:        #222D10;
  --ink-soft:   #2E3B18;
  --ink-line:   rgba(232, 244, 224, 0.14);
  --on-ink:     #EDF2E6;
  --on-ink-dim: #A9B79A;

  /* Light surfaces */
  --bg:      #F4F6F8;
  --surface: #FFFFFF;
  --line:    #E2E6EA;
  --line-2:  #CFD5DB;

  --text:    #111827;
  --text-2:  #5A6472;
  --text-3:  #8B95A1;

  --danger:  #C2410C;
  --ok:      #16A34A;

  --shadow-card: 0 1px 2px rgba(16,24,10,.05), 0 8px 24px rgba(16,24,10,.06);
  --shadow-lift: 0 2px 4px rgba(16,24,10,.06), 0 18px 44px rgba(16,24,10,.14);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --maxw: 1140px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- type ---------- */
.h1, .h2, .h3 {
  font-family: 'Archivo', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.05;
}
.h1 { font-size: clamp(2.45rem, 5.6vw, 4.15rem); }
.h2 { font-size: clamp(1.85rem, 3.6vw, 2.85rem); line-height: 1.1; }
.h3 { font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1.3; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow-ink { color: var(--orange-light); }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.24rem); color: var(--text-2); line-height: 1.6; }
.lede-ink { color: var(--on-ink-dim); }

.mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.mark { color: var(--orange); }
.nowrap { white-space: nowrap; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.band { padding: clamp(56px, 8vw, 104px) 0; }
.band-tight { padding: clamp(40px, 5vw, 64px) 0; }
.band-ink { background: var(--ink); color: var(--on-ink); }
.band-white { background: var(--surface); }
.band-pale { background: linear-gradient(180deg, var(--green-pale) 0%, #F1F8EB 100%); }

.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 34px; }

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

.section-head { max-width: 660px; margin-bottom: 44px; }
.section-head > * + * { margin-top: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.97rem;
  padding: 13px 22px; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #BE5415; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-ghost-ink { background: transparent; color: var(--on-ink); border-color: var(--ink-line); }
.btn-ghost-ink:hover { border-color: var(--on-ink); background: rgba(255,255,255,.05); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 86px; }
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { height: 44px; width: auto; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--text-2); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--green); }
.header-cta { display: flex; align-items: center; gap: 14px; }
.header-cta .btn { padding: 10px 18px; font-size: 0.9rem; }
.signin { text-decoration: none; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.signin:hover { color: var(--green); }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto -10% -55% 45%;
  height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,98,26,.24), transparent 68%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center;
  padding: clamp(56px, 7vw, 92px) 0 clamp(64px, 8vw, 104px);
}
.hero-copy > * + * { margin-top: 22px; }
.hero h1 { color: #fff; }
.hero-note {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; color: var(--on-ink-dim);
  letter-spacing: 0.01em;
}
.hero-note span { color: var(--orange-light); }

/* ---------- signature: rent roll ---------- */
.rentroll-stage { position: relative; padding: 14px 10px 10px 0; }
.rentroll-ghost {
  position: absolute; top: 0; right: 16px; left: 34px; height: 92%;
  background: var(--ink-soft); border: 1px solid var(--ink-line);
  border-radius: var(--r-xl); transform: rotate(-2.4deg);
}
.rentroll {
  position: relative;
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lift); overflow: hidden;
}
.rr-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.rr-title { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 1.06rem; letter-spacing: -0.02em; }
.rr-meta { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 5px; }
.rr-rows { padding: 6px 0; }
.rr-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  padding: 9px 20px;
  opacity: 0; transform: translateY(7px);
  animation: rr-in .5s ease forwards;
}
.rr-row + .rr-row { border-top: 1px solid #F1F3F5; }
.rr-room { font-weight: 600; font-size: 0.9rem; }
.rr-tenant { font-size: 0.78rem; color: var(--text-3); font-weight: 400; }
.rr-rent { font-family: 'IBM Plex Mono', monospace; font-size: 0.86rem; font-variant-numeric: tabular-nums; color: var(--text-2); }
.chip {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.chip-paid    { background: var(--green-pale); color: var(--green-dark); }
.chip-due     { background: #FEF3C7; color: #78350F; }
.chip-overdue { background: #FEE2E2; color: #991B1B; }
.chip-void    { background: #EEF1F4; color: var(--text-3); }

.rr-foot { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 20px; background: #FAFBFC; border-top: 1px solid var(--line); }
.rr-foot-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.rr-foot-value { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rr-foot-value small { font-weight: 500; font-size: 0.8rem; color: var(--text-3); letter-spacing: 0; }

.rr-certs { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 20px 16px; background: #FAFBFC; border-top: 1px solid var(--line); }
.cert {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.67rem;
  padding: 5px 9px; border-radius: var(--r-sm);
  background: #fff; border: 1px solid var(--line); color: var(--text-2);
}
.cert-warn { border-color: var(--orange-light); color: #9A4511; background: var(--orange-pale); }

@keyframes rr-in { to { opacity: 1; transform: translateY(0); } }

/* ---------- deal appraisal card (WEB-012) ---------- */
.deal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lift); }
.deal-figs { display: grid; grid-template-columns: repeat(3, 1fr); }
.deal-fig { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.deal-fig:nth-child(3n) { border-right: none; }
.deal-fig-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.63rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3); }
.deal-fig-value { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 1.32rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 3px; }
.deal-fig-value.pos { color: var(--green); }

.pipeline { display: flex; align-items: stretch; background: #FAFBFC; border-top: 1px solid var(--line); }
.pipe-step {
  flex: 1; padding: 11px 6px; text-align: center;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-3); border-right: 1px solid var(--line);
}
.pipe-step:last-child { border-right: none; }
.pipe-step.now { background: var(--green); color: #fff; font-weight: 500; }
.pipe-step.done { color: var(--green); }

.refurb-bar { display: flex; height: 9px; border-radius: 999px; overflow: hidden; background: var(--line); }
.refurb-bar i { display: block; height: 100%; }
.refurb-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; color: var(--text-2); margin-top: 12px; }
.refurb-key span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: baseline; background: var(--c, var(--line-2)); }

/* ---------- replaces strip ---------- */
.replaces { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.replaces div { padding: 20px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.replaces div:nth-child(3n) { border-right: none; }
.replaces div:nth-last-child(-n+3) { border-bottom: none; }
.replaces .rp-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); }
.replaces .rp-body { font-size: 0.93rem; color: var(--text-2); margin-top: 6px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px; box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-2); }
.card > * + * { margin-top: 10px; }
.card p { font-size: 0.95rem; color: var(--text-2); }
.card-num {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.1em;
  color: var(--green); display: block;
}
.card-ink { background: var(--ink-soft); border-color: var(--ink-line); box-shadow: none; }
.card-ink p { color: var(--on-ink-dim); }
.card-ink:hover { border-color: rgba(232,244,224,.3); box-shadow: none; }

.tick { list-style: none; }
.tick li { position: relative; padding-left: 27px; font-size: 0.95rem; color: var(--text-2); }
.tick li + li { margin-top: 9px; }
.tick li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 15px; height: 8px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.tick-ink li { color: var(--on-ink-dim); }
.tick-ink li::before { border-color: var(--orange-light); }

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 16px; align-items: stretch; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 24px; display: flex; flex-direction: column; gap: 16px;
}
.plan-featured { border: 2px solid var(--green); box-shadow: var(--shadow-lift); position: relative; }
.plan-flag {
  position: absolute; top: -12px; left: 24px;
  background: var(--green); color: #fff; font-family: 'IBM Plex Mono', monospace;
  font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
}
.plan-name { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; }
.plan-price { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 2.3rem; letter-spacing: -0.035em; line-height: 1; }
.plan-price small { font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.plan-sub { font-size: 0.85rem; color: var(--text-3); margin-top: -8px; }
.plan .btn { width: 100%; }
.plan-spacer { flex: 1; }
.plan-limits { font-family: 'IBM Plex Mono', monospace; font-size: 0.76rem; color: var(--text-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.plan-limits span { display: block; }

.toggle-note { font-size: 0.88rem; color: var(--text-2); }

/* comparison table */
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.cmp { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 0.92rem; }
.cmp th, .cmp td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.cmp thead th { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3); background: #FAFBFC; }
.cmp td:not(:first-child), .cmp th:not(:first-child) { text-align: center; }
.cmp tbody tr:last-child td { border-bottom: none; }
.cmp .yes { color: var(--green); font-weight: 600; }
.cmp .no { color: var(--text-3); }
.cmp .grp td { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--orange); background: #FCFCFA; }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative;
  font-family: 'Archivo', sans-serif; font-weight: 600; font-size: 1.03rem; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 17px;
  font-family: 'IBM Plex Mono', monospace; font-size: 1.3rem; color: var(--orange); font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq .faq-body { padding: 0 44px 22px 0; color: var(--text-2); font-size: 0.96rem; }
.faq .faq-body > * + * { margin-top: 12px; }

/* ---------- forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-card); }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-family: inherit; font-size: 0.95rem;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; color: var(--text);
}
.field textarea { min-height: 130px; resize: vertical; }
.field-hint { font-size: 0.8rem; color: var(--text-3); margin-top: 5px; font-weight: 400; }
.hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-dim); padding: 56px 0 30px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; }
.footer-brand img { height: 54px; width: auto; margin-bottom: 18px; }
.footer-col h4 { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink); font-weight: 500; margin-bottom: 12px; }
.footer-col a { display: block; text-decoration: none; padding: 4px 0; color: var(--on-ink-dim); }
.footer-col a:hover { color: #fff; }
.footer-base { border-top: 1px solid var(--ink-line); margin-top: 40px; padding-top: 22px; font-size: 0.8rem; line-height: 1.6; }
.footer-base p + p { margin-top: 8px; }

/* ---------- misc ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; }
.badge {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; letter-spacing: 0.04em;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ink-line); color: var(--on-ink-dim);
}
.badge-light { border-color: var(--line-2); color: var(--text-2); background: var(--surface); }
.disclaimer { font-size: 0.82rem; color: var(--text-3); line-height: 1.6; }
.center { text-align: center; }
.center .section-head { margin-left: auto; margin-right: auto; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .price-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .replaces { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .replaces div:nth-child(3n) { border-right: 1px solid var(--line); }
  .replaces div:nth-child(2n) { border-right: none; }
  .replaces div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .replaces div:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .replaces { grid-template-columns: 1fr; }
  .replaces div { border-right: none !important; border-bottom: 1px solid var(--line) !important; }
  .replaces div:last-child { border-bottom: none !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .header-cta .signin { display: none; }
  .rentroll-ghost { display: none; }
  .brand img { height: 34px; }
  .header-inner { height: 72px; }
  .deal-figs { grid-template-columns: repeat(2, 1fr); }
  .deal-fig:nth-child(3n) { border-right: 1px solid var(--line); }
  .deal-fig:nth-child(2n) { border-right: none; }
  .pipeline { flex-wrap: wrap; }
  .pipe-step { flex: 1 1 33%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rr-row { opacity: 1; transform: none; }
}
