/* =====================================================================
   WefieHome — Motion design system
   One set of tokens for every animation on the site.
   Content is never hidden unless JavaScript has confirmed it can reveal
   it again (html.motion). Reduced-motion visitors get no movement (end of file).
   Reference: WefieHome Motion Design System v2.1 (flagship owner page allowance).
   ===================================================================== */
:root {
  --m-instant: 80ms;        /* press / active */
  --m-fast: 200ms;          /* hover, press */
  --m-base: 600ms;          /* text + card reveals */
  --m-slow: 850ms;          /* image reveals, hero entrance */
  --m-hero-bg: 8s;          /* hero background settle */
  --m-ease-out: cubic-bezier(.22, 1, .36, 1);   /* entering: soft settle, no bounce */
  --m-ease-io: cubic-bezier(.45, 0, .25, 1);    /* hover in/out */
  --m-ease-in: cubic-bezier(.4, 0, 1, 1);       /* exits / dismiss */
  --m-rise: 16px;           /* reveal travel distance */
  --m-rise-lg: 24px;        /* hero text + large blocks */
  --m-stagger: 80ms;        /* gap between items in a group */
  --m-stagger-max: 480ms;   /* cap for long grids */
  --m-lift: -4px;           /* card hover lift */
  --m-lift-btn: -2px;       /* button hover lift */
  --m-zoom: 1.04;           /* image zoom on card hover */
  --m-shadow-hover: 0 14px 32px rgba(22, 40, 39, .14);
}
@media (max-width: 760px) { :root { --m-rise: 12px; --m-rise-lg: 16px; } }

/* ---------- Hover: buttons ---------- */
.btn { transition: background-color var(--m-fast) var(--m-ease-io), color var(--m-fast) var(--m-ease-io), border-color var(--m-fast) var(--m-ease-io), transform var(--m-fast) var(--m-ease-io), box-shadow var(--m-fast) var(--m-ease-io); }
.btn:hover { transform: translateY(var(--m-lift-btn)); box-shadow: 0 8px 20px rgba(22, 40, 39, .16); }
.btn:active { transform: translateY(0); box-shadow: none; transition-duration: var(--m-instant); }
.btn-primary::after, .btn-brand::after { content: "→"; display: inline-block; margin-left: .5em; transition: transform var(--m-fast) var(--m-ease-io); }
.btn-primary:hover::after, .btn-brand:hover::after { transform: translateX(4px); }

/* ---------- Hover: text-link arrows ---------- */
.arr, .prop-list a .arrow { display: inline-block; transition: transform var(--m-fast) var(--m-ease-io); }
a:hover .arr, .prop-list a:hover .arrow, .route:hover .arr, .listing:hover .arr { transform: translateX(4px); }

/* ---------- Hover: cards ---------- */
.listing, .route, .prop-list a, .perf-img { transition: transform var(--m-fast) var(--m-ease-io), box-shadow var(--m-fast) var(--m-ease-io), border-color var(--m-fast) var(--m-ease-io); }
.listing:hover, .route:hover, .prop-list a:hover { transform: translateY(var(--m-lift)); box-shadow: var(--m-shadow-hover); }
.listing-img { overflow: hidden; }
.listing-img img { transition: transform var(--m-slow) var(--m-ease-out); }
.listing:hover .listing-img img { transform: scale(var(--m-zoom)); }

/* ---------- Hero entrance (pure CSS: works even if scripts are slow) ---------- */
@keyframes m-rise { from { opacity: 0; transform: translate3d(0, var(--m-rise-lg), 0); } to { opacity: 1; transform: none; } }
html.motion .hero-content > *,
html.motion .page-hero > .container > *,
html.motion .building-hero-grid > div > * { animation: m-rise var(--m-slow) var(--m-ease-out) both; }
html.motion .hero-content > :nth-child(2), html.motion .page-hero > .container > :nth-child(2), html.motion .building-hero-grid > div > :nth-child(2) { animation-delay: calc(var(--m-stagger) * 1.5); }
html.motion .hero-content > :nth-child(3), html.motion .page-hero > .container > :nth-child(3), html.motion .building-hero-grid > div > :nth-child(3) { animation-delay: calc(var(--m-stagger) * 3); }
html.motion .hero-content > :nth-child(4), html.motion .page-hero > .container > :nth-child(4), html.motion .building-hero-grid > div > :nth-child(4) { animation-delay: calc(var(--m-stagger) * 4.5); }
html.motion .hero-content > :nth-child(n+5), html.motion .page-hero > .container > :nth-child(n+5), html.motion .building-hero-grid > div > :nth-child(n+5) { animation-delay: calc(var(--m-stagger) * 6); }

/* Hero background settle: photo banners scale 1.06 → 1 once */
.photo-hero { background: var(--deep); overflow: hidden; isolation: isolate; }
.photo-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22, 40, 39, .55), rgba(22, 40, 39, .72)), var(--hero) center / cover no-repeat; background-position: center, var(--hero-pos, center); }
@media (max-width: 760px) { .photo-hero::before { background-image: linear-gradient(180deg, rgba(22, 40, 39, .55), rgba(22, 40, 39, .75)), var(--hero-sm); } }
@keyframes m-settle { from { transform: scale(1.06); } to { transform: scale(1); } }
html.motion .photo-hero::before { animation: m-settle var(--m-hero-bg) var(--m-ease-out) both; }

/* ---------- Scroll reveal: fade up (JS adds .is-in) ---------- */
html.motion [data-reveal]:not(.is-in) { opacity: 0; transform: translate3d(0, var(--m-rise), 0); }
html.motion [data-reveal].rv-run { transition: opacity var(--m-base) var(--m-ease-out), transform var(--m-base) var(--m-ease-out); transition-delay: var(--d, 0ms); }

/* ---------- Scroll reveal: image mask (clip-path wipe, bottom → top) ---------- */
html.motion [data-reveal-img]:not(.is-in) { clip-path: inset(100% 0 0 0); }
html.motion [data-reveal-img]:not(.is-in) img { transform: scale(1.08); }
html.motion [data-reveal-img].rv-run { transition: clip-path var(--m-slow) var(--m-ease-out); transition-delay: var(--d, 0ms); }
html.motion [data-reveal-img].rv-run img { transition: transform calc(var(--m-slow) * 1.4) var(--m-ease-out); transition-delay: var(--d, 0ms); }

/* ---------- Management process: sequential highlighting ---------- */
.steps li::before { transition: background-color var(--m-base) var(--m-ease-out), color var(--m-base) var(--m-ease-out), transform var(--m-base) var(--m-ease-out); }
.steps li h3, .steps li p { transition: opacity var(--m-base) var(--m-ease-out); }
html.motion .steps[data-steps] li:not(.is-active) h3, html.motion .steps[data-steps] li:not(.is-active) p { opacity: .65; }
html.motion .steps[data-steps] li.is-active::before { background: var(--deep); color: var(--white); transform: scale(1.08); }

/* Service icons pop in with their card */
html.motion [data-reveal]:not(.is-in) .svc-icon { opacity: 0; transform: scale(.7); }
html.motion [data-reveal].rv-run .svc-icon { transition: opacity var(--m-base) var(--m-ease-out), transform var(--m-base) var(--m-ease-out); transition-delay: calc(var(--d, 0ms) + 150ms); }

/* ---------- Owner landing pages (/owners/…): hero text sequence (v2.0 §2) — flagship extras below (v2.1) ---------- */
html.motion .mr-hero > .container > * { animation: none; }
html.motion .mr-hero-copy > * { animation: m-rise var(--m-slow) var(--m-ease-out) both; }
html.motion .mr-hero-copy > :nth-child(2) { animation-delay: calc(var(--m-stagger) * 1.5); }
html.motion .mr-hero-copy > :nth-child(3) { animation-delay: calc(var(--m-stagger) * 3); }
html.motion .mr-hero-copy > :nth-child(4) { animation-delay: calc(var(--m-stagger) * 4.5); }
html.motion .mr-hero-copy > :nth-child(n+5) { animation-delay: calc(var(--m-stagger) * 6); }
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
html.motion .mr-hero > .container > .mr-hero-fig { animation: m-fade var(--m-slow) var(--m-ease-out) calc(var(--m-stagger) * 3) both; }

/* Clickable cards on owner pages: one card pattern (§4.3) */
.mr-proof-item, .owner-card { transition: transform var(--m-fast) var(--m-ease-io), box-shadow var(--m-fast) var(--m-ease-io); }
.mr-proof-item:hover, .owner-card:hover { transform: translateY(var(--m-lift)); box-shadow: var(--m-shadow-hover); }
.mr-proof-img img, .owner-card-img img { transition: transform var(--m-slow) var(--m-ease-out); }
.mr-proof-item:hover .mr-proof-img img, .owner-card:hover .owner-card-img img { transform: scale(var(--m-zoom)); }
.mr-textcta::after, .owner-card .arr, .mr-further .arr { transition: transform var(--m-fast) var(--m-ease-io); }
.mr-textcta:hover::after { transform: translateX(4px); }
.mr-textlink, .mr-textcta { transition: color var(--m-fast) var(--m-ease-io), border-color var(--m-fast) var(--m-ease-io); }

/* WhatsApp float: lift, never scale (§4.14) */
.wa-float { transition: transform var(--m-fast) var(--m-ease-io), box-shadow var(--m-fast) var(--m-ease-io); }
.wa-float:hover { transform: translateY(var(--m-lift-btn)); box-shadow: 0 10px 24px rgba(0, 0, 0, .28); }

/* ---------- Focus (site-wide, §4.9) ---------- */
:where(a, button, summary, .btn):focus-visible { outline: 3px solid var(--brand-mid); outline-offset: 3px; border-radius: 6px; transition: outline-offset var(--m-fast) var(--m-ease-io); }
.btn:focus-visible { border-radius: 999px; }

/* ---------- Print: show everything (§8.8) ---------- */
@media print {
  [data-reveal], [data-reveal-img] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  [data-reveal-img] img { transform: none !important; }
}

/* ---------- Reduced motion (§7) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.motion [data-reveal]:not(.is-in),
  html.motion [data-reveal-img]:not(.is-in) { opacity: 1; transform: none; clip-path: none; }
  html.motion [data-reveal-img] img { transform: none; }
  html.motion .hero-content > *, html.motion .page-hero > .container > *, html.motion .mr-hero-copy > *, html.motion .mr-hero-fig,
  html.motion .building-hero-grid > div > *, html.motion .photo-hero::before { animation: none; }
  .slide { animation: none; opacity: 0; }
  .slide:first-child { opacity: 1; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}
.mr-plan img { transition: transform var(--m-slow) var(--m-ease-out); }
.mr-plan:hover img { transform: scale(var(--m-zoom)); }
.og-card { transition: transform var(--m-fast) var(--m-ease-io), box-shadow var(--m-fast) var(--m-ease-io); }
.og-card:hover { transform: translateY(var(--m-lift)); box-shadow: var(--m-shadow-hover); }
.og-card-img img { transition: transform var(--m-slow) var(--m-ease-out); }
.og-card:hover .og-card-img img { transform: scale(var(--m-zoom)); }
.og-card:hover .arr { transform: translateX(4px); }

/* =====================================================================
   v2.1 — Flagship owner page (Maxim Risen). Every effect plays once,
   never loops, never touches fees or delays a button.
   ===================================================================== */
/* Hero: highlighter stroke draws behind "Only 12 Owner Partners" */
@keyframes m-hl { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
html.motion .mr-hl { animation: m-hl 900ms var(--m-ease-out) 950ms both; }
/* Hero: tower visual settles 1.05 → 1 */
.mr-hero-fig { overflow: hidden; }
@keyframes m-settle-sm { from { transform: scale(1.05); } to { transform: none; } }
html.motion .mr-hero-fig img { animation: m-settle-sm var(--m-hero-bg) var(--m-ease-out) both; }

/* Line icons draw themselves when their card reveals */
html.motion [data-reveal] .mr-draw * { stroke-dasharray: 1; transition: stroke-dashoffset 900ms var(--m-ease-out); transition-delay: calc(var(--d, 0ms) + 200ms); }
html.motion [data-reveal]:not(.is-in) .mr-draw * { stroke-dashoffset: 1; }
/* Ticks draw in sequence (good-fit list, workload groups, assessment) */
html.motion [data-reveal] .mr-tick path { stroke-dasharray: 1; transition: stroke-dashoffset 500ms var(--m-ease-out); transition-delay: calc(var(--d, 0ms) + 250ms + var(--i, 0) * 120ms); }
html.motion [data-reveal]:not(.is-in) .mr-tick path { stroke-dashoffset: 1; }
html.motion [data-reveal] .mr-x { transition: opacity var(--m-base) var(--m-ease-out), transform var(--m-base) var(--m-ease-out); transition-delay: calc(var(--d, 0ms) + 250ms + var(--i, 0) * 120ms); }
html.motion [data-reveal]:not(.is-in) .mr-x { opacity: 0; transform: scale(.4); }

/* Why-12: number badges pop in after their row */
.mr-why .mr-num { transition: opacity var(--m-base) var(--m-ease-out), transform var(--m-base) var(--m-ease-out); }
html.motion .mr-why > li.rv-run .mr-num { transition-delay: calc(var(--d, 0ms) + 150ms); }
html.motion .mr-why > li[data-reveal]:not(.is-in) .mr-num { opacity: 0; transform: scale(.5); }

/* Checklist: steps light up in turn as you scroll (same pattern as .steps) */
.mr-check .mr-num { transition: background-color var(--m-base) var(--m-ease-out), color var(--m-base) var(--m-ease-out), transform var(--m-base) var(--m-ease-out); }
.mr-check h3, .mr-check p { transition: opacity var(--m-base) var(--m-ease-out); }
html.motion .mr-check[data-steps] li:not(.is-active) h3, html.motion .mr-check[data-steps] li:not(.is-active) p { opacity: .65; }
html.motion .mr-check[data-steps] li.is-active .mr-num { background: var(--deep); color: var(--white); transform: scale(1.08); }

/* Floor plans settle into their cards */
.mr-plan img { transition: transform var(--m-slow) var(--m-ease-out), opacity var(--m-base) var(--m-ease-out); }
html.motion .mr-layout.rv-run .mr-plan img { transition-delay: calc(var(--d, 0ms) + 150ms); }
html.motion .mr-layout[data-reveal]:not(.is-in) .mr-plan img { opacity: 0; transform: scale(1.06); }

/* 12 of 1,236: the 12 dots light up one by one, each with a single ripple */
.mr-on::before { transition: transform 520ms var(--m-ease-out), opacity 320ms var(--m-ease-out); transition-delay: calc(450ms + var(--i) * 110ms); }
html.motion .mr-dots[data-reveal]:not(.is-in) .mr-on::before { opacity: 0; transform: scale(0); }
@keyframes m-ripple { from { opacity: .8; transform: scale(.8); } to { opacity: 0; transform: scale(2.8); } }
html.motion .mr-dots.is-in .mr-on::after { animation: m-ripple 1100ms var(--m-ease-out) calc(520ms + var(--i) * 110ms) forwards; }

@media (prefers-reduced-motion: reduce) {
  html.motion .mr-hl, html.motion .mr-hero-fig img, html.motion .mr-dots.is-in .mr-on::after { animation: none; }
  html.motion [data-reveal] .mr-draw *, html.motion [data-reveal] .mr-tick path { stroke-dashoffset: 0; transition: none; }
  html.motion [data-reveal] .mr-x, html.motion .mr-why .mr-num, html.motion .mr-plan img, html.motion .mr-on::before { opacity: 1; transform: none; transition: none; }
}
@media print { .mr-draw *, .mr-tick path { stroke-dashoffset: 0 !important; } .mr-x, .mr-num, .mr-plan img, .mr-on::before { opacity: 1 !important; transform: none !important; } .mr-hl { background-size: 100% 100% !important; } }

/* ---------- M Vertica owner page (v2.1 owner-page extras) ---------- */
@keyframes m-clip-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
html.motion .mv-hero-fig { animation: m-clip-up var(--m-slow) var(--m-ease-out) calc(var(--m-stagger) * 2) both; }
html.motion .mv-hero-fig img { animation: m-settle-sm var(--m-hero-bg) var(--m-ease-out) both; }
html.motion .mv-hero-copy > * { animation: m-rise var(--m-slow) var(--m-ease-out) both; }
html.motion .mv-hero-copy > :nth-child(2) { animation-delay: calc(var(--m-stagger) * 1.5); }
html.motion .mv-hero-copy > :nth-child(3) { animation-delay: calc(var(--m-stagger) * 3); }
html.motion .mv-hero-copy > :nth-child(4) { animation-delay: calc(var(--m-stagger) * 4.5); }
html.motion .mv-hero-copy > :nth-child(n+5) { animation-delay: calc(var(--m-stagger) * 6); }
html.motion .mv-h1-2 { animation: m-hl 900ms var(--m-ease-out) 900ms both; }
/* hotspot markers pop in one by one */
html.motion .mv-spot-fig .mv-dot { transition: opacity var(--m-base) var(--m-ease-out), transform var(--m-base) var(--m-ease-out), background-color var(--m-fast) var(--m-ease-io), color var(--m-fast) var(--m-ease-io); }
html.motion .mv-spot-fig.rv-run .mv-dot { transition-delay: calc(300ms + var(--i) * 140ms); }
html.motion .mv-spot-fig[data-reveal]:not(.is-in) .mv-dot { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
@media (prefers-reduced-motion: reduce) {
  html.motion .mv-hero-fig, html.motion .mv-hero-fig img, html.motion .mv-hero-copy > *, html.motion .mv-h1-2 { animation: none; }
  html.motion .mv-spot-fig .mv-dot { opacity: 1; transform: translate(-50%, -50%); transition: none; }
}
@media print { .mv-dot { opacity: 1 !important; } .mv-hero-fig { clip-path: none !important; } }

/* handshake icon instead of the arrow (partners CTAs) */
.btn.btn-shake::after { content: ""; width: 1.25em; height: 1.25em; margin-left: .55em; vertical-align: -.28em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m11%2017%202%202a1%201%200%201%200%203-3%22/%3E%3Cpath%20d%3D%22m14%2014%202.5%202.5a1%201%200%201%200%203-3l-3.88-3.88a3%203%200%200%200-4.24%200l-.88.88a1%201%200%201%201-3-3l2.81-2.81a5.79%205.79%200%200%201%207.06-.87l.47.28a2%202%200%200%200%201.42.25L21%204%22/%3E%3Cpath%20d%3D%22m21%203%201%2011h-2%22/%3E%3Cpath%20d%3D%22M3%203%202%2014l6.5%206.5a1%201%200%201%200%203-3%22/%3E%3Cpath%20d%3D%22M3%204h8%22/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m11%2017%202%202a1%201%200%201%200%203-3%22/%3E%3Cpath%20d%3D%22m14%2014%202.5%202.5a1%201%200%201%200%203-3l-3.88-3.88a3%203%200%200%200-4.24%200l-.88.88a1%201%200%201%201-3-3l2.81-2.81a5.79%205.79%200%200%201%207.06-.87l.47.28a2%202%200%200%200%201.42.25L21%204%22/%3E%3Cpath%20d%3D%22m21%203%201%2011h-2%22/%3E%3Cpath%20d%3D%22M3%203%202%2014l6.5%206.5a1%201%200%201%200%203-3%22/%3E%3Cpath%20d%3D%22M3%204h8%22/%3E%3C/svg%3E") center / contain no-repeat; transform-origin: 50% 60%; }
.btn.btn-shake:hover::after, .btn.btn-shake:focus-visible::after { transform: none; animation: btnShake .6s ease; }
@keyframes btnShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .btn.btn-shake:hover::after { animation: none; } }
.contact-intro .btn { white-space: nowrap; }
