/* =================================================================
   THE ALCIME GROUP — SHARED DESIGN SYSTEM
   Tokens, typography, buttons, nav, drawer, footer, motion.
   Linked by every page; page-specific rules stay inline in each file.
   ================================================================= */

/* ================================================================
   ALCIME GROUP — AGENT-FORWARD SITE
   Warm cream backgrounds · Agent photo split hero
   Community-embedded storytelling
   ================================================================ */
:root {
  --black:        #0D0D0D;
  --soft-black:   #1A1A1A;
  --white:        #FFFFFF;
  --cream:        #FAF7F2;
  --cream-dark:   #F2EDE5;
  --alt-bg:       #F5F5F5;
  --champagne:    #C8B99A;
  --champ-light:  #E8E0D0;
  --champ-dark:   #9E8B70;
  --text-sec:     #6B6B6B;
  --text-light:   #A0978C;
  --border:       #E0D8CF;
  --badge-green:  #1A5C3A;
  --font:         'Montserrat', system-ui, sans-serif;
  /* Display and body are the SAME family. Weight 300 at large sizes is
     the system's voice — authority through restraint, not bold. */
  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-serif:   'Lora', Georgia, serif;   /* body accent only, <=18px */

  /* ── SURFACES (structure from spec, hues kept from brand) ────── */
  --mist:         #E5E4E4;
  --char:         #1C1C1C;
  --smoke:        #8D8D8D;
  --pewter:       #666666;

  /* ── RADII ───────────────────────────────────────────────────── */
  --r-card:       8px;
  --r-img:        8px;
  --r-pill:       80px;
  --r-sm:         3.2px;

  /* ── WEIGHTS ─────────────────────────────────────────────────── */
  --w-light:      300;
  --w-reg:        400;
  --w-med:        500;
  --w-semi:       600;
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-inout:   cubic-bezier(0.76, 0, 0.24, 1);
  --max-w:        1200px;
  --pad-x:        72px;

  /* ── FLUID TYPE SCALE ─────────────────────────────────────
     Display sizes use the serif; body/label sizes the sans. */
  --t-display:    clamp(3.5rem, 11.5vw, 10.5rem);  /* -> 168px */
  --t-h1:         clamp(2.75rem, 5.2vw, 3.875rem);  /* -> 62px  */
  --t-h2:         clamp(1.875rem, 3.2vw, 2.25rem);  /* -> 36px  */
  --t-h3:         clamp(1.25rem, 1.6vw, 1.375rem);  /* -> 22px  */
  --t-lead:       1.125rem;                          /* 18px     */
  --t-body:       0.9375rem;                         /* 15px     */
  --t-small:      0.8125rem;                         /* 13px     */
  --t-label:      0.75rem;                           /* 12px     */

  /* Tracking: tight at display, open at body — the spec's core rule. */
  --tr-display:   -0.025em;
  --tr-heading:   -0.02em;
  --tr-body:      0.01em;

  /* ── SECTION RHYTHM ───────────────────────────────────────
     Deliberately unequal so sections don't read as a template. */
  --sp-xs:        clamp(3rem,  5vw,  4.5rem);
  --sp-sm:        clamp(4.5rem, 7vw,  7rem);
  --sp-md:        clamp(6rem,  10vw, 10rem);
  --sp-lg:        clamp(8rem,  14vw, 14rem);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html:not(.lenis) { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--cream); color: var(--black); font-size: var(--t-body); line-height: 1.65; letter-spacing: -0.011em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }

/* ── DISPLAY TYPE ─────────────────────────────────────────────
   One family carries both the shouting and the whispering. Large
   sizes take weight 300 with tight negative tracking; that
   restraint is what reads as authority. */
.hero-name, .about-name, .cta-title, .section-header h2,
.communities-header h2, .circ-portfolio-header h2, .testi-quote,
.comm-city-name, .about-stat-num, .testi-idx, .circ-stat-value,
.editorial-num, .editorial-title, .prop-price {
  font-family: var(--font-display);
  font-weight: var(--w-light);
  letter-spacing: var(--tr-heading);
}

/* Lora is a body accent only — never above 18px, never a heading. */
.serif-accent {
  font-family: var(--font-serif);
  font-size: var(--t-lead);
  line-height: 1.5;
  letter-spacing: 0.011em;
  font-weight: 400;
}
a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; }
ul { list-style: none; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.eyebrow { font-size: var(--t-label); font-weight: var(--w-reg); letter-spacing: 0.01em; text-transform: none; color: var(--smoke); }
.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--char); color: var(--white);
  font-size: var(--t-small); font-weight: var(--w-med); letter-spacing: var(--tr-body);
  text-transform: none; padding: 16px 26px;
  border: 1px solid var(--char); border-radius: var(--r-pill);
  cursor: pointer; transition: background 0.3s var(--ease-std), color 0.3s var(--ease-std), border-color 0.3s var(--ease-std);
}
.btn-primary:hover { background: var(--black); border-color: var(--black); }
.btn-primary:active { transform: translateY(0); }

.btn-champ {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--champagne); color: var(--black);
  font-size: var(--t-small); font-weight: var(--w-med); letter-spacing: var(--tr-body);
  text-transform: none; padding: 16px 26px;
  border: 1px solid var(--champagne); border-radius: var(--r-pill);
  cursor: pointer; transition: all 0.3s var(--ease-std);
}
.btn-champ:hover { background: var(--champ-light); border-color: var(--champ-light); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--black);
  font-size: var(--t-small); font-weight: var(--w-reg); letter-spacing: var(--tr-body);
  text-transform: none; padding: 16px 26px;
  border: 1px solid var(--mist); border-radius: var(--r-pill);
  cursor: pointer; transition: all 0.3s var(--ease-std);
}
.btn-outline:hover { border-color: var(--black); }

.btn-ghost-w {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--white);
  font-size: var(--t-small); font-weight: var(--w-reg); letter-spacing: var(--tr-body);
  text-transform: none; padding: 16px 26px;
  border: 1px solid rgba(255,255,255,0.42); border-radius: var(--r-pill);
  cursor: pointer; transition: all 0.3s var(--ease-std);
}
.btn-ghost-w:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.link-arrow {
  font-size: var(--t-body); font-weight: var(--w-reg); letter-spacing: var(--tr-body);
  text-transform: none; color: var(--black);
  display: inline-flex; align-items: center; gap: 10px;
  border-bottom: none; padding-bottom: 0;
  transition: color 0.25s ease, gap 0.35s var(--ease);
}
.link-arrow:hover { color: var(--champ-dark); gap: 16px; }

/* ── SLIDE-OUT DRAWER (Let's Connect) ─────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(13,13,13,0.5);
  backdrop-filter: blur(4px); z-index: 9000;
  opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 440px;
  background: var(--cream); z-index: 9001; border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform 0.45s var(--ease);
  overflow-y: auto; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-top {
  background: var(--black); padding: 40px 44px 32px;
  position: relative;
}
.drawer-top-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--champagne); margin-bottom: 8px; }
.drawer-top-title { font-size: 26px; font-weight: 300; color: var(--white); letter-spacing: -0.01em; }
.drawer-top-sub { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 8px; line-height: 1.6; }
.drawer-close {
  position: absolute; top: 24px; right: 28px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  width: 36px; height: 36px; cursor: pointer; font-size: 14px;
  color: rgba(255,255,255,0.6); display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; border-radius: 0;
}
.drawer-close:hover { background: var(--white); color: var(--black); }
.drawer-body { padding: 36px 44px 44px; flex: 1; }
.drawer-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-light); }
.form-input, .form-select, .form-textarea {
  background: var(--white); border: 1.5px solid var(--border);
  color: var(--black); font-family: var(--font); font-size: 13px;
  padding: 13px 16px; outline: none; border-radius: 0;
  transition: border-color 0.25s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--champagne); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-submit {
  background: var(--black); color: var(--white); font-family: var(--font);
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 16px; border: none;
  cursor: pointer; transition: all 0.3s ease; border-radius: 0; margin-top: 4px;
}
.form-submit:hover { background: var(--soft-black); }
.drawer-contact { padding: 0 44px 44px; border-top: 1px solid var(--border); padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.drawer-contact-item { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-sec); }
.drawer-contact-item a { color: var(--black); font-weight: 500; transition: color 0.2s ease; }
.drawer-contact-item a:hover { color: var(--champagne); }
.sms-row { display: flex; align-items: flex-start; gap: 10px; }
.sms-row input[type="checkbox"] { margin-top: 2px; accent-color: var(--champagne); }
.sms-row label { font-size: 11px; color: var(--text-sec); line-height: 1.5; cursor: pointer; }

/* ── NAV: EDITORIAL MASTHEAD ─────────────────────────────────── */
/* The nav is absent over the hero and drops in once the user starts
   to scroll — the hero reads as a clean full-bleed frame first.
   Structured as a magazine nameplate rather than an app toolbar:
   serif logotype, hairline rules, tracked-out small caps. The type
   does the work, so nothing here needs a fill or a shadow. */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8000;
  height: 84px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 var(--pad-x);
  background: transparent; border-bottom: 1px solid transparent;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease),
              background 0.45s var(--ease), border-color 0.45s var(--ease),
              height 0.45s var(--ease), backdrop-filter 0.45s var(--ease);
}
.nav.revealed {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
/* Interior pages open on light content instead of a dark hero, so the
   nav needs its solid treatment from the start. Pages opt in with
   .nav--solid; the home hero keeps the transparent-over-video default. */
.nav--solid,
.nav--solid.revealed {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.nav--solid .nav-logo,
.nav--solid .nav-links a,
.nav--solid .nav-phone { color: var(--black); }
.nav--solid .nav-links a { color: var(--text-sec); }
.nav--solid .nav-links a:hover { color: var(--black); }
.nav--solid .nav-cta { background: var(--black); color: var(--white); }
.nav--solid .nav-cta:hover { background: var(--champagne); color: var(--black); }
.nav--solid .nav-hamburger span { background: var(--black); }
/* Over content the bar becomes translucent cream rather than a solid
   swap, so what is behind it stays faintly legible as it passes under
   — a printed overlay, not a lid. It also tightens by 8px, which reads
   as the masthead settling once you are into the page. */
.nav.scrolled {
  height: 76px;
  background: rgba(250, 247, 242, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

/* ── Logotype ─────────────────────────────────────────────────── */
/* Lora, not uppercase Montserrat. The serif is already in the system
   for body accents; promoting it to the nameplate is what separates a
   masthead from a navbar. */
.nav-logo {
  font-family: var(--font-serif);
  font-size: 21px; font-weight: 400; letter-spacing: 0.005em;
  text-transform: none; color: var(--white);
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  line-height: 1; transition: color 0.4s ease;
}
.nav.scrolled .nav-logo { color: var(--black); }
/* The rule under the wordmark is the nameplate device. It grows to full
   width on hover, so the logo has a considered hover state instead of a
   colour flicker. */
.nav-logo-sub {
  font-family: var(--font);
  font-size: 8.5px; font-weight: var(--w-med); letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--champagne);
  padding-top: 5px; position: relative;
}
.nav-logo-sub::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 22px; height: 1px; background: var(--champagne);
  opacity: 0.55; transition: width 0.5s var(--ease), opacity 0.35s ease;
}
.nav-logo:hover .nav-logo-sub::before { width: 100%; opacity: 1; }

/* ── Links ────────────────────────────────────────────────────── */
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a {
  font-size: 11px; font-weight: var(--w-med); letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.72);
  transition: color 0.25s ease; position: relative; padding: 6px 0;
}
.nav.scrolled .nav-links a { color: var(--text-sec); }
/* Wipes in from the left rather than growing from centre — it reads as
   a rule being drawn under a word, which is the editorial gesture. */
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--champagne);
  transition: width 0.4s var(--ease);
}
.nav-links a:hover { color: var(--white); }

/* Current page in the nav. Without this the .active link inherits the
   over-hero white and disappears on light interior pages. */
.nav-links a.active { color: var(--black); }
.nav-links a.active::after { width: 100%; }
.nav:not(.nav--solid):not(.scrolled) .nav-links a.active { color: var(--white); }
.nav.scrolled .nav-links a:hover { color: var(--black); }
.nav-links a:hover::after { width: 100%; }
/* The current page keeps its rule permanently, so location is legible
   without a heavier weight or a colour change. */
.nav-links a.active { color: var(--white); }
.nav.scrolled .nav-links a.active,
.nav--solid .nav-links a.active { color: var(--black); }
.nav-links a.active::after { width: 100%; opacity: 0.9; }

/* ── Right cluster ────────────────────────────────────────────── */
/* A hairline separates the utility zone from the CTA — magazine
   furniture, and it stops the phone number and button from reading as
   one undifferentiated blob. */
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-right::before {
  content: ''; width: 1px; height: 26px;
  background: rgba(255,255,255,0.22);
  transition: background 0.4s ease;
}
.nav.scrolled .nav-right::before { background: var(--border); }
.nav-phone {
  font-size: 12px; font-weight: var(--w-med); letter-spacing: 0.06em;
  color: rgba(255,255,255,0.72); transition: color 0.25s ease;
  font-variant-numeric: tabular-nums;
}
.nav.scrolled .nav-phone { color: var(--text-sec); }
.nav-phone:hover { color: var(--white); }
.nav.scrolled .nav-phone:hover { color: var(--black); }

/* Outlined, not filled. A champagne block competes with the hero; a
   hairline box holds the same space with far less shouting, then fills
   on hover so the affordance is unmistakable. */
.nav-cta {
  font-family: var(--font);
  font-size: 10.5px; font-weight: var(--w-semi); letter-spacing: 0.16em;
  text-transform: uppercase; padding: 12px 24px;
  background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 0;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
              border-color 0.35s var(--ease);
}
.nav-cta:hover { background: var(--champagne); color: var(--black); border-color: var(--champagne); }
.nav.scrolled .nav-cta { color: var(--black); border-color: var(--champ-dark); }
.nav.scrolled .nav-cta:hover { background: var(--black); color: var(--white); border-color: var(--black); }

/* Keyboard users get the same champagne cue the mouse gets. */
.nav a:focus-visible, .nav button:focus-visible {
  outline: 1px solid var(--champagne); outline-offset: 4px;
}

.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 22px; height: 1.5px; background: var(--white); transition: all 0.3s ease; }
.nav.scrolled .nav-hamburger span { background: var(--black); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mobile-overlay {
  position: fixed; inset: 0; background: var(--cream); z-index: 7999;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 52px; opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.mobile-overlay.open { opacity: 1; visibility: visible; }
.mobile-overlay ul { display: flex; flex-direction: column; gap: 8px; }
.mobile-overlay ul li { opacity: 0; transform: translateY(16px); transition: opacity 0.4s ease, transform 0.4s ease; }
.mobile-overlay.open ul li { opacity: 1; transform: translateY(0); }
.mobile-overlay.open ul li:nth-child(1) { transition-delay: 0.05s; }
.mobile-overlay.open ul li:nth-child(2) { transition-delay: 0.1s; }
.mobile-overlay.open ul li:nth-child(3) { transition-delay: 0.15s; }
.mobile-overlay.open ul li:nth-child(4) { transition-delay: 0.2s; }
.mobile-overlay.open ul li:nth-child(5) { transition-delay: 0.25s; }
.mobile-overlay ul a { font-size: 1.75rem; font-weight: 300; letter-spacing: 0.04em; color: var(--black); display: block; padding: 12px 0; }
.mobile-overlay ul a:hover { color: var(--champagne); }
.mobile-close { display: none; }
.mobile-bottom { margin-top: 48px; display: flex; flex-direction: column; gap: 8px; }
.mobile-bottom a { color: var(--text-sec); font-size: 14px; }


/* ── FOOTER ──────────────────────────────────────────────────── */
.footer { background: #080807; padding: 72px 0 44px; border-top: 1px solid rgba(255,255,255,0.03); }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 56px; padding-bottom: 52px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.footer-logo { font-size: 17px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white); margin-bottom: 8px; }
.footer-tagline { font-size: 13px; font-weight: 300; color: rgba(255,255,255,0.35); margin-bottom: 6px; }
.footer-exp { font-size: 11px; color: rgba(255,255,255,0.2); letter-spacing: 0.04em; margin-bottom: 24px; }
.footer-social { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; }
.footer-social-icons { display: flex; align-items: center; gap: 12px; }
.footer-social-icons a {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.4);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.footer-social-icons a:hover { color: var(--champagne); border-color: rgba(200,185,154,0.35); background: rgba(255,255,255,0.04); }
.footer-social-icons svg { width: 18px; height: 18px; display: block; }
.footer-social-extra a { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.35); transition: color 0.25s ease; }
.footer-social-extra a:hover { color: var(--champagne); }
.footer-col-head { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 11px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.4); transition: color 0.25s ease; }
.footer-links a:hover { color: var(--white); }
.footer-disclaimer { padding: 16px 0; border-top: 1px solid rgba(255,255,255,0.06); font-size: 10px; color: rgba(255,255,255,0.18); line-height: 1.7; letter-spacing: 0.02em; }
.footer-bottom { padding-top: 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.22); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 11px; color: rgba(255,255,255,0.22); transition: color 0.2s ease; }
.footer-legal a:hover { color: rgba(255,255,255,0.5); }


/* ── SCROLL REVEAL ───────────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.fade-up.in { opacity: 1; transform: translateY(0); }
.stagger .fade-up:nth-child(2) { transition-delay: 0.09s; }
.stagger .fade-up:nth-child(3) { transition-delay: 0.18s; }
.stagger .fade-up:nth-child(4) { transition-delay: 0.27s; }




/* ── KEYFRAMES ───────────────────────────────────────────────── */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }


/* ── FILM GRAIN ───────────────────────────────────────────────
   Fixed, non-interactive noise layer. An inline SVG turbulence
   keeps it to zero network requests. Sits above content but
   below nav/drawer/overlays. */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 7500;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.7s steps(1) infinite;
  will-change: transform;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* Reveals only engage once JS confirms it can un-hide them. Without
   this, a JS failure would leave the page permanently blank. */
.js .rv, .js .rv-mask > *, .js .rv-img, .js .rv-comm .comm-info-2x2 { }

/* ── SCROLL REVEAL PRIMITIVES ─────────────────────────────────
   Replaces the single uniform 20px fade-up with a small set of
   reveals chosen per element, so sections don't animate in
   lockstep. All are transform+opacity only. */
.js .rv { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* Headline mask-wipe: text rises out of a clipped box. */
.rv-mask { overflow: hidden; }
.js .rv-mask > * { transform: translateY(100%); transition: transform 1s var(--ease); }
.js .rv-mask.in > * { transform: none; }

/* Image reveal: a clip wipe paired with a slow settle from scale. */
.js .rv-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.15s var(--ease-inout); }
.js .rv-img.in { clip-path: inset(0 0 0% 0); }
.js .rv-img img { transform: scale(1.12); transition: transform 1.6s var(--ease); }
.js .rv-img.in img { transform: scale(1); }

/* Community 2x2: the image scales down into place behind a static
   card frame. The card itself is never clipped, so a card that
   misses its observer callback still renders fully. */
.js .rv-comm .comm-bg-2x2 { transform: scale(1.16); transition: transform 1.5s var(--ease); }
.rv-comm.in .comm-bg-2x2 { transform: scale(1); }
.js .rv-comm .comm-info-2x2 { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.rv-comm.in .comm-info-2x2 { opacity: 1; transform: none; }
.comm-grid-2x2 .rv-comm:nth-child(2) .comm-info-2x2 { transition-delay: 0.09s; }
.comm-grid-2x2 .rv-comm:nth-child(3) .comm-info-2x2 { transition-delay: 0.09s; }
.comm-grid-2x2 .rv-comm:nth-child(4) .comm-info-2x2 { transition-delay: 0.18s; }

/* Stagger children of a group. */
.rv-group > .rv:nth-child(2)  { transition-delay: 0.08s; }
.rv-group > .rv:nth-child(3)  { transition-delay: 0.16s; }
.rv-group > .rv:nth-child(4)  { transition-delay: 0.24s; }
.rv-group > .rv:nth-child(5)  { transition-delay: 0.32s; }
.rv-group > .rv:nth-child(6)  { transition-delay: 0.40s; }

/* Parallax: JS writes --py; element drifts against the scroll. */
.parallax { will-change: transform; transform: translate3d(0, var(--py, 0px), 0); }

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .rv, .rv-mask > *, .rv-img, .rv-img img, .rv-comm .comm-bg-2x2, .rv-comm .comm-info-2x2 { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
  .hero-line > span { animation: none; transform: none; }
  .hero-video-wrap video { animation: none; transform: none; }
  .parallax { transform: none !important; }
}

