/* ============================================================
   homico - Website v2
   Tokens from design/tokens/homico-tokens.json
   ============================================================ */

:root {
  /* color */
  --bg-base: #F6F1EA;
  --bg-subtle: #EFE7DC;
  --bg-card: #FBF9F6;
  --bg-elevated: #FFFFFF;
  --text-primary: #1D2525;
  --text-secondary: #5D625F;
  --text-muted: #8A918D;
  --text-inverse: #FBF9F6;
  --border-default: #D8D1C7;
  --border-soft: #E8E1D8;
  --border-strong: #B6B0A8;
  --action-primary: #2F5D51;
  --action-primary-hover: #24463D;
  --action-secondary: #ECE2D4;
  --action-secondary-text: #24463D;
  --accent-terracotta: #B86C4C;
  --accent-clay: #D8B8A5;
  --accent-moss: #24463D;
  --status-success: #6E8A57;
  --status-warning: #D39A43;
  --status-error: #A2505A;
  --status-info: #7C94A8;

  /* type */
  --font-ui: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --brand-wordmark-font: var(--font-display);
  --brand-wordmark-weight: 600;
  --brand-wordmark-size: 1.08em;
  --brand-wordmark-letter-spacing: 0em;
  --brand-wordmark-color: var(--accent-moss);
  --brand-wordmark-accent: var(--accent-terracotta);

  /* radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* shadow */
  --shadow-soft: 0 6px 16px rgba(29, 37, 37, 0.06);
  --shadow-card: 0 12px 32px rgba(29, 37, 37, 0.08);
  --shadow-modal: 0 20px 44px rgba(29, 37, 37, 0.12);

  --container: 1160px;
}

/* ---------- reset ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

::selection { background: rgba(184, 108, 76, 0.22); }

body.nav-open,
body.auth-open { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: inherit; }

h1, h2, h3, h4, p, ul, ol { margin: 0; }

button { font: inherit; cursor: pointer; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 93, 81, 0.45);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--accent-moss);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

/* ---------- layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section--tight { padding: 72px 0; }

.motion-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-subtle);
}

/* ---------- typography ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.8vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.12;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
}

.h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
}

.lead {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--text-secondary);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  margin-bottom: 16px;
}

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head .lead { margin-top: 16px; }

/* ---------- brand text ---------- */

.brand-wordmark {
  display: inline-block;
  font-family: var(--brand-wordmark-font);
  font-weight: var(--brand-wordmark-weight);
  font-size: var(--brand-wordmark-optical-size, var(--brand-wordmark-size));
  letter-spacing: var(--brand-wordmark-letter-spacing);
  line-height: inherit;
  color: var(--brand-wordmark-color);
  text-transform: none;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  vertical-align: baseline;
}

.brand-wordmark__accent,
.brand__name b {
  color: var(--brand-wordmark-accent);
}

.trust,
.cta-final,
.mock__homa,
.homa-chat__head,
.app-nav__item.is-active,
.compare-bar,
.message--user,
.app-toast {
  --brand-wordmark-color: var(--text-inverse);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  min-height: 52px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--action-primary);
  color: var(--text-inverse);
}
.btn--primary:hover {
  background: var(--action-primary-hover);
  box-shadow: 0 8px 20px rgba(36, 70, 61, 0.22);
}

.btn--secondary {
  background: var(--action-secondary);
  color: var(--action-secondary-text);
  border-color: var(--border-default);
}
.btn--secondary:hover { background: #E4D8C6; }

.btn--ghost {
  background: transparent;
  color: var(--action-secondary-text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: rgba(36, 70, 61, 0.06); }

.btn--on-dark {
  background: var(--bg-card);
  color: var(--accent-moss);
}
.btn--on-dark:hover { background: #fff; }

.btn--ghost-on-dark {
  background: transparent;
  color: var(--text-inverse);
  border-color: rgba(251, 249, 246, 0.4);
}
.btn--ghost-on-dark:hover { border-color: rgba(251, 249, 246, 0.85); }

/* ---------- header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 234, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow .25s ease;
}

.header.is-scrolled { box-shadow: 0 8px 24px rgba(29, 37, 37, 0.07); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__name {
  font-family: var(--brand-wordmark-font);
  font-weight: var(--brand-wordmark-weight);
  font-size: 22px;
  line-height: 1;
  letter-spacing: var(--brand-wordmark-letter-spacing);
  color: var(--brand-wordmark-color);
}

.brand__tagline {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color .2s ease;
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--text-primary); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.header__cta { padding: 11px 22px; min-height: 44px; font-size: 15px; }

/* duplicate CTA shown next to the burger on mobile only */
.header__cta--outside { display: none; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform .25s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero { padding: 88px 0 96px; overflow: hidden; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}

.hero__title { margin-bottom: 24px; }
.hero__title em {
  font-style: italic;
  color: var(--action-primary);
}

.hero__sub { max-width: 520px; margin-bottom: 36px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.hero__note {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 440px;
}

/* hero product mock — client cabinet preview */

.mock {
  position: relative;
}

.mock::before {
  content: "";
  position: absolute;
  inset: -48px -64px -48px 8px;
  background:
    radial-gradient(120% 100% at 80% 20%, rgba(216, 184, 165, 0.45), transparent 65%),
    radial-gradient(100% 120% at 20% 90%, rgba(47, 93, 81, 0.16), transparent 60%),
    linear-gradient(rgba(246, 241, 234, 0.42), rgba(246, 241, 234, 0.18)),
    url("../assets/img/apartment-documents-soft-hero.webp") center / cover no-repeat;
  border-radius: 48% 52% 55% 45% / 50% 45% 55% 50%;
  z-index: 0;
}

.mock__card {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.mock__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.mock__deal {
  font-weight: 700;
  font-size: 16px;
}

.mock__deal small {
  display: block;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pill--progress { background: rgba(110, 138, 87, 0.14); color: #55703F; }
.pill--info { background: rgba(124, 148, 168, 0.16); color: #54718A; }

.timeline { display: grid; gap: 0; }

.tl-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  position: relative;
  padding-bottom: 18px;
}

.tl-step:last-child { padding-bottom: 0; }

.tl-step::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 2px;
  width: 2px;
  background: var(--border-soft);
}
.tl-step:last-child::before { display: none; }

.tl-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex: none;
}

.tl-dot--done { background: var(--action-primary); color: var(--text-inverse); }
.tl-dot--active {
  background: var(--bg-card);
  border: 2px solid var(--accent-terracotta);
  color: var(--accent-terracotta);
}
.tl-dot--next {
  background: var(--bg-subtle);
  border: 2px solid var(--border-default);
  color: var(--text-muted);
}

.tl-step h4 { font-size: 15px; font-weight: 700; padding-top: 3px; }
.tl-step p { font-size: 13.5px; color: var(--text-secondary); margin-top: 2px; }

.mock__doc {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.mock__doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-moss);
  flex: none;
}

.mock__doc b { font-size: 14px; display: block; }
.mock__doc span { font-size: 12.5px; color: var(--text-muted); }

.mock__homa {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: -18px;
  margin-left: 36px;
  margin-right: -12px;
  background: var(--accent-moss);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
  padding: 14px 18px;
  box-shadow: var(--shadow-soft);
}

.mock__homa img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.mock__homa p { font-size: 13.5px; line-height: 1.5; }
.mock__homa b { color: var(--accent-clay); }

/* ---------- editorial statement ---------- */

.statement {
  background: var(--bg-card);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.statement__inner {
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
}

.statement__inner .h2 { margin-bottom: 24px; }
.statement__inner .lead { max-width: 700px; margin: 0 auto; }

.statement-lockup {
  width: min(176px, 42vw);
  aspect-ratio: 1;
  margin: 34px auto 0;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.statement-lockup img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- cards grid ---------- */

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-subtle);
  color: var(--accent-moss);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card--accent .card__icon { background: rgba(184, 108, 76, 0.12); color: var(--accent-terracotta); }

.card .h3 { margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 15.5px; }

/* ---------- trust (dark block) ---------- */

.trust {
  background: var(--accent-moss);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  padding: 72px 64px;
  position: relative;
  overflow: hidden;
}

.trust::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 60px solid rgba(251, 249, 246, 0.05);
  pointer-events: none;
}

.trust .eyebrow { color: var(--accent-clay); }

.trust__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 56px;
  margin-top: 48px;
}

.trust-item { display: grid; grid-template-columns: 44px 1fr; gap: 18px; }

.trust-item__num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--accent-clay);
  line-height: 1;
  padding-top: 2px;
}

.trust-item h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.trust-item p { color: rgba(251, 249, 246, 0.75); font-size: 15px; }

/* ---------- process steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--accent-moss);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
}

.step--current .step__num { background: var(--accent-terracotta); color: var(--text-inverse); }

.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 14.5px; }

/* ---------- fit / quote ---------- */

.fit {
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.fit blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.35;
  color: var(--accent-moss);
}

.fit blockquote footer {
  margin-top: 16px;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ---------- persona blocks (Dasha / Homa) ---------- */

.persona {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: center;
}

.persona--flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }

.persona__visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 4.6;
  background:
    radial-gradient(120% 90% at 30% 20%, #EFE7DC 0%, #E4D6C3 55%, #D8C4AC 100%);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.persona__visual--homa {
  aspect-ratio: 4 / 3.4;
  background:
    radial-gradient(110% 110% at 70% 25%, #2F5D51 0%, #24463D 70%);
}

.persona__monogram { width: 42%; opacity: 0.9; filter: drop-shadow(0 16px 32px rgba(29,37,37,0.18)); }

.persona__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.persona__video { object-position: center; }

.persona__badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  max-width: calc(100% - 40px);
  background: rgba(251, 249, 246, 0.94);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-moss);
  box-shadow: var(--shadow-soft);
}
.persona__badge > span { display: block; font-weight: 600; color: var(--text-muted); font-size: 12px; }

.persona__body .h2 { margin-bottom: 20px; }
.persona__body p { color: var(--text-secondary); margin-bottom: 16px; font-size: 16.5px; }
.persona__body p:last-of-type { margin-bottom: 0; }

.persona__phrase {
  margin-top: 24px;
  padding: 18px 22px;
  border-left: 3px solid var(--accent-terracotta);
  background: var(--bg-card);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--accent-moss);
}

/* ---------- photo band ---------- */

.photo-band { margin: 0; }

.photo-band img,
.photo-band video {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

.photo-band figcaption {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- checklist ---------- */

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

.check-list { list-style: none; padding: 0; display: grid; gap: 14px; }

.check-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  font-size: 16px;
  color: var(--text-secondary);
  align-items: start;
}

.check-list li::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-top: 1px;
  background-color: rgba(110, 138, 87, 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2355703F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9'/%3E%3C/svg%3E");
  background-size: 15px;
  background-position: center;
  background-repeat: no-repeat;
}

.check-list--no li::before {
  background-color: rgba(184, 92, 103, 0.13);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23A2505A' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M8 8l8 8M16 8l-8 8'/%3E%3C/svg%3E");
}

/* ---------- stories ---------- */

.story {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-soft);
}

.story:last-of-type { margin-bottom: 0; }

.story h3 { font-family: var(--font-display); font-size: 26px; font-weight: 600; margin-bottom: 14px; }
.story p { color: var(--text-secondary); font-size: 15.5px; }

.story__takeaway {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: var(--accent-moss);
}

.story__takeaway span {
  display: block;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  margin-bottom: 10px;
}

/* ---------- final CTA ---------- */

.cta-final {
  background: var(--accent-moss);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  padding: 80px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-final::before {
  content: "";
  position: absolute;
  left: -140px;
  bottom: -180px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 70px solid rgba(251, 249, 246, 0.05);
}

.cta-final .h2 { max-width: 720px; margin: 0 auto 20px; position: relative; }
.cta-final p { color: rgba(251, 249, 246, 0.78); max-width: 520px; margin: 0 auto 36px; font-size: 17px; position: relative; }

.cta-final__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  position: relative;
}

/* ---------- forms ---------- */

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
}

.form-side .h1 { margin-bottom: 20px; }
.form-side .lead { margin-bottom: 28px; }

.form-side__person {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.form-side__person img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  flex: none;
}

.form-side__person b { display: block; font-size: 15px; }
.form-side__person span { font-size: 13px; color: var(--text-muted); }

.form-side__photo {
  margin-top: 24px;
}

.form-side__photo img,
.form-side__photo video {
  width: 100%;
  aspect-ratio: 6 / 7;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

.form-side__note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.form-side__note img { width: 36px; height: 36px; border-radius: 9px; flex: none; }

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

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

.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.field label small { font-weight: 600; color: var(--text-muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  min-height: 48px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field textarea { resize: vertical; min-height: 96px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--action-primary);
  box-shadow: 0 0 0 3px rgba(47, 93, 81, 0.15);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); }

.form-card .btn { width: 100%; margin-top: 28px; }

.form-card__legal {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}
.form-card__legal a { color: var(--text-secondary); }

.form-success {
  display: none;
  text-align: center;
  padding: 48px 24px;
}

.form-success .h2 { margin-bottom: 14px; }
.form-success p { color: var(--text-secondary); }

.form-success__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: rgba(110, 138, 87, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--status-success);
}

.form-card.is-sent form { display: none; }
.form-card.is-sent .form-success { display: block; }

/* ---------- footer ---------- */

.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-soft);
  padding: 64px 0 40px;
  margin-top: 96px;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer__about p {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 320px;
}

.footer h4 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.footer ul { list-style: none; padding: 0; display: grid; gap: 12px; }

.footer ul a {
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
}
.footer ul a:hover { color: var(--text-primary); }

.footer__bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- page hero (inner pages) ---------- */

.page-hero { padding: 80px 0 0; }
.page-hero .h1 { max-width: 780px; margin-bottom: 20px; }
.page-hero .lead { max-width: 640px; }
.section--top { padding-top: 80px; }
.section--bottom-room { padding-bottom: 96px; }
.section--flush-bottom { padding-bottom: 0; }
.action-spaced { margin-top: 24px; }
.legal-page { max-width: 780px; }
.legal-page .h1 { margin-bottom: 24px; }
.legal-page .lead { margin-bottom: 20px; }
.legal-page__muted { color: var(--text-secondary); }
.footer__bottom--compact { border-top: 0; padding-top: 0; }
.link-inherit { color: inherit; }
.check-card { padding: 40px; }
.check-card__title { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 28px; }
.eyebrow--danger { color: var(--status-error); }
.persona__phrase--spaced { margin-top: 28px; }

/* ---------- reveal animation ---------- */

/* gated under .js so content stays visible when JS is unavailable */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.js .reveal.is-visible { opacity: 1; transform: none; }

/* gentle stagger inside grids */
.js .cards .reveal:nth-child(2),
.js .steps .reveal:nth-child(2),
.js .check-cols .reveal:nth-child(2) { transition-delay: .08s; }
.js .cards .reveal:nth-child(3),
.js .steps .reveal:nth-child(3) { transition-delay: .16s; }
.js .cards .reveal:nth-child(4),
.js .steps .reveal:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 56px; }
  .hero__sub { max-width: none; }

  .trust { padding: 56px 32px; }
  .trust__grid { grid-template-columns: 1fr; gap: 32px; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .fit { grid-template-columns: 1fr; padding: 48px 32px; gap: 32px; }

  .persona,
  .persona--flip { grid-template-columns: 1fr; gap: 40px; }
  .persona--flip .persona__visual { order: -1; }
  .persona__visual { aspect-ratio: 4 / 3; }

  .story { grid-template-columns: 1fr; gap: 24px; padding: 32px 28px; }

  .form-layout { grid-template-columns: 1fr; gap: 48px; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: 76px 0 auto 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: var(--shadow-modal);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 24px;
    display: none;
  }

  .nav.is-open { display: flex; }

  .nav__link {
    padding: 14px 4px;
    font-size: 17px;
    border-bottom: 1px solid var(--border-soft);
  }
  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] { color: var(--accent-terracotta); }

  .nav .header__cta { margin-top: 16px; width: 100%; }

  .header__inner { gap: 12px; }

  .header__cta--outside {
    display: inline-flex;
    order: 2;
    margin-left: auto;
    padding: 9px 16px;
    min-height: 40px;
    font-size: 13.5px;
    white-space: nowrap;
  }

  .nav-toggle { order: 3; }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .section--tight { padding: 48px 0; }
  .section-head { margin-bottom: 36px; }

  .container { padding: 0 20px; }

  .hero { padding: 56px 0 64px; }
  .hero__actions .btn { width: 100%; }

  .cards { grid-template-columns: 1fr; }
  .card { padding: 28px 24px; }

  .steps { grid-template-columns: 1fr; }

  .check-cols { grid-template-columns: 1fr; }

  .trust { padding: 48px 24px; border-radius: var(--radius-md); }

  .cta-final { padding: 56px 24px; border-radius: var(--radius-md); }
  .cta-final__actions .btn { width: 100%; }

  .mock__card { padding: 22px 20px; }
  .mock__homa { margin-left: 16px; margin-right: 0; }

  .form-card { padding: 28px 20px; }
  .form-grid { grid-template-columns: 1fr; }

  .photo-band img { aspect-ratio: 16 / 10; border-radius: var(--radius-md); }
  .photo-band video { aspect-ratio: 16 / 10; border-radius: var(--radius-md); }

  /* keep the mobile path to the form short */
  .form-side__photo { display: none; }

  .footer { margin-top: 64px; padding: 48px 0 32px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; }
}

@media (max-width: 400px) {
  .header__cta--outside { display: none; }
}

/* ============================================================
   V2 COMPONENTS: animated logo, auth, comments, chat, home fab
   ============================================================ */

/* ---------- animated logo ---------- */

.brand__lockup {
  display: block;
  width: 190px;
  height: auto;
  flex: 0 0 auto;
}

.footer__about .brand__lockup { width: 240px; }

.logo--draw .brand__lockup { animation: logoFade .6s ease backwards; }

@keyframes logoFade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

/* footer brand: same component, larger */
.footer__about .brand { gap: 18px; }

/* ---------- header account ---------- */

.nav__account { display: flex; align-items: center; }

.nav__login {
  padding: 10px 18px;
  min-height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  font-weight: 700;
  font-size: 14px;
  color: var(--action-secondary-text);
  transition: background-color .2s ease;
}
.nav__login:hover { background: rgba(36, 70, 61, 0.06); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 5px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
}

.user-chip__profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.user-chip__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-moss);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.user-chip__name { font-size: 14px; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-chip__out {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 8px;
}
.user-chip__out:hover { color: var(--status-error); }

/* ---------- auth modal ---------- */

.auth-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-modal[hidden] { display: none; }

.auth-modal__backdrop { position: absolute; inset: 0; background: rgba(29, 37, 37, 0.45); backdrop-filter: blur(4px); }

.auth-modal__card {
  position: relative;
  width: min(420px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  padding: 32px;
}

.auth-modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-subtle);
  font-size: 20px;
  line-height: 1;
  color: var(--text-secondary);
}
.auth-modal__close:hover { background: var(--border-soft); }

.auth-modal__tabs { display: flex; gap: 6px; margin-bottom: 24px; background: var(--bg-subtle); padding: 5px; border-radius: var(--radius-pill); }

.auth-modal__tab {
  flex: 1;
  border: 0;
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  background: transparent;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-secondary);
}
.auth-modal__tab.is-active { background: var(--bg-card); color: var(--text-primary); box-shadow: var(--shadow-soft); }

.auth-modal__form { display: grid; gap: 16px; }
.auth-modal__form[hidden] { display: none; }
.auth-modal__form .btn { width: 100%; }

.auth-modal__error { color: var(--status-error); font-size: 13.5px; font-weight: 600; }
.auth-modal__note { font-size: 12px; color: var(--text-muted); text-align: center; }

/* ---------- comments & reactions ---------- */

.comments { grid-column: 1 / -1; border-top: 1px solid var(--border-soft); margin-top: 8px; padding-top: 18px; }

.comments__reactions { display: flex; gap: 8px; margin-bottom: 14px; }

.react {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 15px;
  transition: transform .15s ease, border-color .2s ease, background-color .2s ease;
}
.react b { font-size: 12.5px; color: var(--text-secondary); }
.react:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.react.is-mine { background: rgba(110, 138, 87, 0.14); border-color: var(--status-success); }

.comments__details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-moss);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.comments__details summary::-webkit-details-marker { display: none; }
.comments__details summary::after { content: "▾"; font-size: 11px; transition: transform .2s ease; }
.comments__details[open] summary::after { transform: rotate(180deg); }

.comments__list { display: grid; gap: 14px; margin: 16px 0; }

.comments__empty { font-size: 14px; color: var(--text-muted); }

.comment { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }

.comment__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--accent-moss);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}

.comment b { font-size: 14px; }
.comment time { font-size: 12px; color: var(--text-muted); margin-left: 6px; }
.comment p { font-size: 14.5px; color: var(--text-secondary); margin-top: 2px; }

.comments__form { display: grid; gap: 10px; }
.comments__form textarea {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  padding: 12px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  resize: vertical;
}
.comments__form textarea:focus { outline: none; border-color: var(--action-primary); box-shadow: 0 0 0 3px rgba(47, 93, 81, 0.15); }
.comments__form .btn { justify-self: start; padding: 10px 22px; min-height: 42px; font-size: 14px; }

.comments__login-hint { font-size: 14px; color: var(--text-secondary); }
.comments__login-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent-terracotta);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
}

/* ---------- Homa chat ---------- */

.homa-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  padding: 7px 16px 7px 7px;
  box-shadow: var(--shadow-card);
  overflow: visible;
  transition: transform .2s ease, box-shadow .2s ease;
}
.homa-fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-modal); }

.homa-fab__avatar {
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid rgba(36, 70, 61, 0.12);
  box-shadow: inset 0 0 0 3px rgba(251, 249, 246, 0.7);
  overflow: visible;
}

.homa-fab__avatar img {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 66px;
  height: 66px;
  max-width: none;
  transform: translateX(-50%);
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  clip-path: circle(48% at 50% 52%);
}

.homa-fab__hint {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-moss);
  padding-right: 12px;
}

.homa-fab.is-open .homa-fab__hint { display: none; }

.homa-chat {
  position: fixed;
  right: 20px;
  bottom: 86px;
  z-index: 41;
  width: min(360px, calc(100vw - 40px));
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.homa-chat[hidden] { display: none; }

.homa-chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-moss);
  color: var(--text-inverse);
}
.homa-chat__head img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--bg-subtle); }
.homa-chat__head b { display: block; font-size: 15px; }
.homa-chat__head > div > span { font-size: 12px; color: rgba(251, 249, 246, 0.7); }
.homa-chat__close {
  margin-left: auto;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 249, 246, 0.12);
  color: var(--text-inverse);
  font-size: 18px;
  line-height: 1;
}
.homa-chat__close:hover { background: rgba(251, 249, 246, 0.22); }

.homa-chat__log {
  padding: 16px;
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-base);
}

.homa-chat__msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
}

.homa-chat__msg--homa {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 4px;
  justify-self: start;
}

.homa-chat__msg--user {
  background: var(--accent-moss);
  color: var(--text-inverse);
  border-bottom-right-radius: 4px;
  justify-self: end;
}

.homa-chat__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-card);
}

.homa-chat__form input {
  flex: 1;
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
}
.homa-chat__form input:focus { outline: none; border-color: var(--action-primary); }

.homa-chat__send {
  width: 42px;
  height: 42px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--action-primary);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
}
.homa-chat__send:hover { background: var(--action-primary-hover); }

/* ---------- home fab ---------- */

.home-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  color: var(--accent-moss);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, box-shadow .2s ease;
}

.home-fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.home-fab:hover { box-shadow: var(--shadow-modal); }

/* ---------- v2 mobile ---------- */

@media (max-width: 860px) {
  .nav__account { order: -1; padding: 14px 4px; }
  .nav__account .nav__login, .nav__account .user-chip { width: 100%; justify-content: center; }
}

@media (max-width: 720px) {
  .brand__lockup { width: 154px; }
  .footer__about .brand__lockup { width: 210px; }
  .brand__name { font-size: 19px; }
  .brand__tagline { font-size: 10.5px; }
  .brand { gap: 12px; }

  .homa-fab { right: 14px; bottom: 14px; }
  .homa-fab__hint { display: none; }

  .homa-chat {
    right: 10px;
    left: 10px;
    bottom: 78px;
    width: auto;
  }
  .homa-chat__log { max-height: 46vh; }

  .home-fab {
    left: 14px;
    bottom: 14px;
    padding: 0;
    width: 46px;
    height: 46px;
    justify-content: center;
  }
  .home-fab span { display: none; }
}

/* ============================================================
   AUTHENTICATED CLIENT DASHBOARD
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dashboard-body {
  min-height: 100vh;
  background: var(--bg-card);
  overflow-x: hidden;
}

.dashboard-body button,
.dashboard-body input,
.dashboard-body select,
.dashboard-body textarea { font-family: var(--font-ui); }

.dashboard-body svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  background: #F8F4EE;
  border-right: 1px solid var(--border-soft);
  z-index: 30;
}

.app-brand {
  display: block;
  width: 170px;
  margin: 0 4px 30px;
}

.app-brand img { width: 100%; height: auto; }

.app-nav { display: grid; gap: 5px; }

.app-nav__item,
.app-homa {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  transition: background-color .18s ease, color .18s ease;
}

.app-nav__item:hover { background: rgba(36, 70, 61, 0.06); color: var(--text-primary); }
.app-nav__item.is-active { background: var(--accent-moss); color: var(--text-inverse); }
.app-nav__item svg { flex: 0 0 auto; }

.app-nav__badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 11px;
}
.app-nav__item.is-active .app-nav__badge { background: rgba(255,255,255,.14); color: var(--text-inverse); }
.app-nav__badge--accent { background: rgba(184,108,76,.14); color: var(--accent-terracotta); }

.app-homa {
  position: relative;
  margin-top: auto;
  min-height: 66px;
  padding: 8px 8px 8px 4px;
  color: var(--text-primary);
}
.app-homa:hover { background: rgba(36, 70, 61, 0.06); }
.app-homa > span:nth-child(2) { min-width: 0; }
.app-homa b, .app-homa small { display: block; }
.app-homa b { font-size: 14px; }
.app-homa small { color: var(--text-muted); font-size: 11px; font-weight: 600; }
.app-homa > svg { margin-left: auto; width: 16px; }

.app-homa__avatar {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
}
.app-homa__avatar img {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 62px;
  height: 62px;
  max-width: none;
  transform: translateX(-50%);
  object-fit: cover;
  object-position: center top;
  clip-path: circle(48% at 50% 52%);
}

.app-workspace { min-width: 0; }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 74px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 30px;
  background: rgba(251, 249, 246, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.app-menu { display: none; }

.deal-switcher select {
  min-height: 40px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.app-context { color: var(--text-muted); font-size: 13px; }
.app-topbar__actions { position: relative; margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--accent-moss);
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease;
}
.icon-btn:hover { background: var(--bg-subtle); border-color: var(--border-strong); }
.notification-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent-terracotta);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 3px 8px 3px 3px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}
.profile-button svg { width: 15px; }
.profile-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-moss);
  color: var(--text-inverse);
  font-weight: 800;
}

.notification-popover,
.profile-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 35;
  width: 300px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-modal);
}
.notification-popover p { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
.notification-popover button { margin-top: 12px; border: 0; background: transparent; color: var(--accent-terracotta); font-weight: 700; padding: 0; }
.profile-popover { width: 190px; padding: 8px; }
.profile-popover a, .profile-popover button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); text-align: left; text-decoration: none; font-size: 13px; font-weight: 700; }
.profile-popover a:hover, .profile-popover button:hover { background: var(--bg-subtle); color: var(--text-primary); }

.app-main { width: min(1240px, 100%); margin: 0 auto; padding: 40px 32px 72px; }
.app-view[hidden] { display: none; }

.dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.dashboard-kicker { margin-bottom: 5px; color: var(--accent-terracotta); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dashboard-heading h1 { font-family: var(--font-display); font-size: 38px; line-height: 1.08; font-weight: 600; letter-spacing: 0; }
.dashboard-heading > div > p:last-child { margin-top: 8px; color: var(--text-secondary); font-size: 14px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.status-pill--success { background: rgba(110,138,87,.14); color: #557040; }
.status-pill--progress { background: rgba(184,108,76,.13); color: #A45132; }

.panel {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: 0 8px 22px rgba(29,37,37,.045);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.panel h2 { font-size: 18px; line-height: 1.3; }
.panel p { color: var(--text-secondary); font-size: 13px; line-height: 1.55; }
.text-action { border: 0; background: transparent; padding: 2px 0; color: var(--accent-moss); font-size: 12px; font-weight: 800; white-space: nowrap; }
.text-action:hover { color: var(--accent-terracotta); }
.btn--compact { min-height: 40px; padding: 9px 16px; font-size: 13px; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.overview-grid--lower { grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); margin-top: 16px; }
.deal-progress { padding: 24px; }
.deal-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 26px 0 22px; padding: 0; list-style: none; }
.deal-steps li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: start; padding-right: 12px; }
.deal-steps li::before { content: ""; position: absolute; top: 14px; left: 30px; right: 2px; height: 1px; background: var(--border-default); }
.deal-steps li:last-child::before { display: none; }
.deal-steps li > span { position: relative; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border-default); border-radius: 50%; background: var(--bg-card); color: var(--text-muted); font-size: 11px; font-weight: 800; }
.deal-steps li.is-done > span { border-color: var(--accent-moss); background: var(--accent-moss); color: var(--text-inverse); }
.deal-steps li.is-current > span { border: 2px solid var(--accent-terracotta); color: var(--accent-terracotta); background: #fff; }
.deal-steps b, .deal-steps small { display: block; }
.deal-steps b { margin-top: 3px; font-size: 12px; }
.deal-steps small { margin-top: 3px; color: var(--text-muted); font-size: 10px; line-height: 1.35; }
.deal-steps .is-current b { color: var(--accent-terracotta); }

.next-action { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; min-height: 66px; padding: 10px 12px; border-top: 1px solid var(--border-soft); background: #FCFAF7; }
.next-action > svg { color: var(--accent-moss); }
.next-action span, .next-action b { display: block; }
.next-action span { color: var(--text-muted); font-size: 10px; }
.next-action b { margin-top: 2px; font-size: 13px; }

.advisor-panel { padding: 22px; }
.advisor-profile { display: flex; align-items: center; gap: 12px; margin: 14px 0 16px; }
.advisor-profile img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; object-position: center 22%; }
.advisor-profile h2 { font-size: 16px; }
.advisor-profile p { font-size: 11px; }
.advisor-actions { display: flex; gap: 9px; margin-bottom: 16px; }
.advisor-panel > .btn { width: 100%; }

.shortlist-panel, .updates-panel { padding: 22px; }
.property-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.property-mini { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: center; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.property-mini:hover b { color: var(--accent-terracotta); }
.property-mini__image { display: block; width: 62px; height: 62px; border-radius: 6px; background: url('../assets/img/apartment-documents-soft-hero.webp') center / cover; }
.property-mini__image--two { background-position: 25% center; filter: saturate(.78) contrast(.98); }
.property-mini__image--three { background-position: 75% center; filter: saturate(.72) brightness(1.05); }
.property-mini b, .property-mini small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.property-mini b { font-size: 11px; transition: color .18s ease; }
.property-mini small { margin-top: 4px; color: var(--text-muted); font-size: 9.5px; }

.updates-list { margin-top: 13px; }
.updates-list article { display: grid; grid-template-columns: 22px 1fr; gap: 9px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.updates-list article:first-child { border-top: 0; }
.update-dot { width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--accent-terracotta); color: #fff; display: grid; place-items: center; font-size: 10px; }
.update-dot--done { background: var(--accent-moss); }
.update-dot--muted { background: var(--border-default); }
.updates-list time { color: var(--text-muted); font-size: 9.5px; }
.updates-list p { margin-top: 2px; font-size: 11px; line-height: 1.4; }

.deal-view-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); gap: 16px; }
.deal-timeline-panel { padding: 24px; }
.vertical-timeline { margin-top: 22px; padding: 0; list-style: none; }
.vertical-timeline li { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 13px; padding-bottom: 28px; }
.vertical-timeline li::after { content: ""; position: absolute; left: 16px; top: 35px; bottom: 0; width: 1px; background: var(--border-default); }
.vertical-timeline li:last-child { padding-bottom: 0; }
.vertical-timeline li:last-child::after { display: none; }
.vertical-timeline li > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border-default); border-radius: 50%; background: var(--bg-card); color: var(--text-muted); font-size: 12px; font-weight: 800; }
.vertical-timeline li.is-done > span { background: var(--accent-moss); border-color: var(--accent-moss); color: #fff; }
.vertical-timeline li.is-current > span { border: 2px solid var(--accent-terracotta); color: var(--accent-terracotta); background: #fff; }
.vertical-timeline b { font-size: 14px; }
.vertical-timeline p { margin: 4px 0; }
.vertical-timeline time { color: var(--text-muted); font-size: 10px; }
.deal-side-stack { display: grid; align-content: start; gap: 16px; }
.deal-side-stack .panel { padding: 22px; }
.deal-side-stack .panel > p { margin-top: 10px; }
.task-panel label { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border-soft); font-size: 13px; }
.task-panel label:first-of-type { margin-top: 14px; }
.task-panel input { width: 18px; height: 18px; accent-color: var(--accent-moss); }
.task-panel input:checked + span { color: var(--text-muted); text-decoration: line-through; }

.segmented { display: inline-flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.segmented button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 5px; background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.segmented button.is-active { background: var(--bg-elevated); color: var(--text-primary); box-shadow: var(--shadow-soft); }
.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.property-card[hidden] { display: none; }
.property-card { min-width: 0; overflow: hidden; }
.property-card__image { position: relative; height: 160px; background-size: cover; }
.property-card__image .status-pill { position: absolute; top: 12px; left: 12px; background-color: rgba(251,249,246,.94); }
.property-card__body { position: relative; padding: 18px; }
.property-card__body h2 { font-size: 16px; }
.property-card__body > p { margin: 8px 0 14px; }
.property-save { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; color: var(--accent-terracotta); font-size: 21px; }
.property-save[aria-pressed="true"] { background: rgba(184,108,76,.12); border-color: var(--accent-terracotta); }
.property-card dl { margin: 0; }
.property-card dl div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 11px; }
.property-card dt { color: var(--text-muted); }
.property-card dd { margin: 0; font-weight: 700; text-align: right; }
.property-card__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.compare-check { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.compare-check input { accent-color: var(--accent-moss); }
.compare-bar { position: sticky; bottom: 20px; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(520px, 100%); margin: 24px auto 0; padding: 12px 14px 12px 18px; border-radius: var(--radius-sm); background: var(--accent-moss); color: var(--text-inverse); box-shadow: var(--shadow-modal); font-size: 13px; }
.compare-bar[hidden] { display: none; }

.upload-label { cursor: pointer; }
.upload-label input { display: none; }
.document-panel { overflow: hidden; }
.document-group { padding: 22px; border-top: 1px solid var(--border-soft); }
.document-group:first-child { border-top: 0; }
.document-row { display: grid; grid-template-columns: 42px 1fr 30px; gap: 12px; align-items: center; min-height: 62px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.document-group .panel-head + .document-row { margin-top: 12px; }
.document-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; background: var(--bg-subtle); color: var(--accent-moss); font-size: 9px; font-weight: 800; }
.document-row b, .document-row small { display: block; }
.document-row b { font-size: 13px; }
.document-row small { margin-top: 2px; color: var(--text-muted); font-size: 10px; }
.document-status { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--accent-terracotta); font-weight: 800; }
.document-status--done { background: var(--accent-moss); color: #fff; }

.message-layout { width: min(820px, 100%); margin: 0 auto; overflow: hidden; }
.message-contact { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border-soft); }
.message-contact img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center 22%; }
.message-contact b, .message-contact small { display: block; }
.message-contact b { font-size: 14px; }
.message-contact small { color: var(--text-muted); font-size: 10px; }
.message-log { min-height: 330px; max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--bg-base); }
.message { max-width: min(520px, 80%); padding: 11px 14px; border-radius: 8px; font-size: 13px; }
.message p { color: inherit; font-size: inherit; }
.message time { display: block; margin-top: 5px; color: var(--text-muted); font-size: 9px; }
.message--advisor { align-self: flex-start; background: var(--bg-elevated); border: 1px solid var(--border-soft); }
.message--user { align-self: flex-end; background: var(--accent-moss); color: var(--text-inverse); }
.message--user time { color: rgba(255,255,255,.7); }
.message-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; padding: 14px; border-top: 1px solid var(--border-soft); }
.message-form textarea { width: 100%; min-height: 44px; max-height: 130px; resize: vertical; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg-elevated); font: inherit; font-size: 13px; }

.app-dialog { width: min(450px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--text-primary); box-shadow: var(--shadow-modal); }
.app-dialog::backdrop { background: rgba(29,37,37,.48); backdrop-filter: blur(3px); }
.app-dialog > form, .app-dialog > div { position: relative; display: grid; gap: 16px; padding: 30px; }
.app-dialog h2 { font-size: 22px; }
.app-dialog .field { display: grid; gap: 7px; }
.app-dialog .field span { font-size: 12px; font-weight: 700; }
.app-dialog input, .app-dialog select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: #fff; }
.app-dialog--wide { width: min(720px, calc(100vw - 32px)); }
.compare-table { display: grid; gap: 10px; }
.compare-table article { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 13px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.compare-table small { color: var(--text-muted); }

.app-toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; max-width: 360px; padding: 13px 16px; border-radius: var(--radius-sm); background: var(--accent-moss); color: var(--text-inverse); box-shadow: var(--shadow-modal); font-size: 13px; font-weight: 700; }
.app-toast[hidden] { display: none; }
.app-bottom-nav { display: none; }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .app-sidebar { padding-left: 12px; padding-right: 12px; }
  .app-brand { width: 154px; }
  .app-main { padding-left: 24px; padding-right: 24px; }
  .overview-grid { grid-template-columns: 1fr 270px; }
  .property-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .property-card:last-child { grid-column: 1 / -1; }
  .property-card:last-child .property-card__image { height: 210px; }
}

@media (max-width: 860px) {
  .dashboard-body { padding-bottom: 66px; }
  .app-shell { display: block; }
  .app-sidebar { position: fixed; left: 0; top: 0; width: 238px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-modal); }
  .app-sidebar.is-open { transform: translateX(0); }
  .app-menu { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--text-primary); }
  .app-topbar { padding: 0 18px; }
  .app-context { display: none; }
  .overview-grid, .overview-grid--lower, .deal-view-grid { grid-template-columns: 1fr; }
  .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-card:last-child { grid-column: auto; }
  .property-card:last-child .property-card__image { height: 160px; }
  .app-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; height: 62px; display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--border-soft); background: rgba(251,249,246,.97); backdrop-filter: blur(12px); }
  .app-bottom-nav button { border: 0; background: transparent; color: var(--text-muted); font-size: 10px; font-weight: 800; }
  .app-bottom-nav button.is-active { color: var(--accent-moss); border-top: 2px solid var(--accent-terracotta); }
}

@media (max-width: 640px) {
  .app-topbar { height: 64px; padding: 0 12px; gap: 8px; }
  .deal-switcher select { width: 148px; font-size: 11px; }
  .profile-button > span:nth-child(2), .profile-button > svg { display: none; }
  .app-main { padding: 26px 14px 54px; }
  .dashboard-heading { align-items: flex-start; margin-bottom: 20px; }
  .dashboard-heading h1 { font-size: 31px; }
  .dashboard-heading > div > p:last-child { font-size: 12px; }
  .dashboard-heading > .status-pill { margin-top: 2px; }
  .deal-progress, .advisor-panel, .shortlist-panel, .updates-panel, .deal-timeline-panel, .deal-side-stack .panel, .document-group { padding: 18px; }
  .deal-steps { grid-template-columns: 1fr; gap: 15px; }
  .deal-steps li { grid-template-columns: 30px 1fr; }
  .deal-steps li::before { left: 14px; top: 29px; right: auto; bottom: -16px; width: 1px; height: auto; }
  .deal-steps b { font-size: 13px; }
  .deal-steps small { font-size: 10px; }
  .next-action { grid-template-columns: 30px 1fr; }
  .next-action .btn { grid-column: 1 / -1; width: 100%; }
  .property-strip { grid-template-columns: 1fr; }
  .property-mini { grid-template-columns: 58px 1fr; }
  .property-grid { grid-template-columns: 1fr; }
  .property-card:last-child { grid-column: auto; }
  .segmented { width: 100%; overflow-x: auto; }
  .segmented button { flex: 1 0 auto; }
  .message-form { grid-template-columns: 1fr; }
  .message-form .btn { width: 100%; }
  .message { max-width: 92%; }
  .notification-popover { position: fixed; top: 70px; left: 12px; right: 12px; width: auto; }
  .app-toast { right: 14px; left: 14px; bottom: 76px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .logo--draw .brand__lockup { animation: none; }
}


/* ---------- site notice (сервисный баннер) ---------- */

.site-notice {
  background: var(--accent-moss);
  color: var(--text-inverse);
}

.site-notice__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.site-notice__inner span { flex: 1; }

.site-notice button {
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 249, 246, 0.14);
  color: var(--text-inverse);
  font-size: 16px;
  line-height: 1;
}
.site-notice button:hover { background: rgba(251, 249, 246, 0.26); }
