/* ==========================================================================
   青雲五號 QINGYUN No.5
   Single-residence listing. Bilingual (zh-Hant lead, English support).

   DESIGN SYSTEM NOTES
   - Vibe archetype: Soft Structuralism (white ground, large grotesk display,
     airy floating components, diffused ambient shadow). Chosen over Editorial
     Luxury because the brief mandates #ffffff / #111111 and because the warm
     cream + brass palette is the banned default for premium-property briefs.
   - Palette is MEASURED from the owner's own photograph of the house, not
     invented. See --stone-*, --accent below for the sampled source pixels.
   - One accent (the warm glow of the windows at dusk), one radius scale,
     one theme. No section inverts.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root{
  /* ground + ink (brief mandate) */
  --white:#ffffff;
  --ink:#111111;

  /* stone scale, sampled from the house itself
     gate/parapet #202023 · granite #51524f · left block #697876
     shutter #60584d · asphalt #4e504f · overcast sky #b9cbd0        */
  --stone-950:#17181a;
  --stone-900:#202023;
  --stone-800:#2b2d30;
  --stone-600:#51524f;
  --stone-500:#6b6d6b;
  --stone-400:#8f918f;
  --stone-300:#c6c8c6;
  --stone-200:#e4e5e3;
  --stone-100:#f1f1ef;
  --stone-50:#f8f8f6;

  /* the single accent: warm light inside the windows at dusk, sampled
     #bd7b37. 3.44:1 on white, so it is used for LARGE type, rules and
     the storey glow only. --accent-deep is the small-text-safe variant. */
  --accent:#bd7b37;
  --accent-deep:#8a5522;
  --accent-glow:rgba(189,123,55,.22);

  /* type */
  --sans:"Inter","Noto Sans TC",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --han-display:"Noto Serif TC","Songti TC",serif;
  --han-body:"Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;

  /* radius: ONE scale. pills are full, cards 16, media concentric at 10 */
  --r-pill:999px;
  --r-card:16px;
  --r-media:10px;
  --r-xl:28px;
  --r-xl-inner:20px;

  /* motion: no linear, no ease-in-out anywhere */
  --ease:cubic-bezier(.16,1,.3,1);
  --ease-mech:cubic-bezier(.32,.72,0,1);

  /* rhythm */
  --gut:clamp(20px,5vw,68px);
  --sec-y:clamp(72px,9vw,132px);
  --maxw:1400px;
}

/* ---------------------------------------------------------------- reset */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  margin:0;background:var(--white);color:var(--ink);
  font-family:var(--sans);font-weight:400;line-height:1.6;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  font-feature-settings:"kern" 1;
  overflow-x:hidden;
}
img,video{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
h1,h2,h3,h4,p,figure,ul,ol{margin:0;padding:0}
ul,ol{list-style:none}
:focus-visible{outline:2px solid var(--accent-deep);outline-offset:3px;border-radius:4px}

/* every number on the page is tabular so columns of 坪 / 價 do not jitter */
.num,.stat__n,.space__price,.fl__area{font-variant-numeric:tabular-nums}

.wrap{max-width:var(--maxw);margin-inline:auto;padding-inline:var(--gut)}
.sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ------------------------------------------------------- type utilities */
/* Latin runs in Inter (brief mandate). Han display runs in Noto Serif TC:
   Inter carries no CJK glyphs, so without this the headings would silently
   fall back to a system font and break the type system.                  */
.han{font-family:var(--han-display);font-weight:500;letter-spacing:.01em}
.han-b{font-family:var(--han-body)}

.eyebrow{
  font-size:12px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;
  color:var(--stone-500);
}
.h-sec{
  font-family:var(--han-display);font-weight:500;
  /* 6.4vw so the small end keeps shrinking below 420px: at a fixed 27px the
     about heading wrapped to a third line on a 360 screen */
  font-size:clamp(24px,6.4vw,42px);line-height:1.28;letter-spacing:.01em;
  text-wrap:balance;
}
.h-sec--en{
  font-family:var(--sans);font-weight:500;letter-spacing:-.02em;line-height:1.15;
}
.lede{
  font-family:var(--han-body);font-size:16px;font-weight:400;line-height:1.85;
  color:var(--stone-600);max-width:52ch;text-wrap:pretty;
}

/* ------------------------------------------------------------- buttons */
.btn{
  display:inline-flex;align-items:center;gap:14px;
  border-radius:var(--r-pill);font-weight:600;font-size:15px;
  transition:transform .5s var(--ease),background-color .5s var(--ease),color .5s var(--ease),box-shadow .5s var(--ease);
  white-space:nowrap;
}
.btn:active{transform:scale(.977)}
.btn--dark{background:var(--ink);color:var(--white);padding:13px 26px}
.btn--dark:hover{background:var(--stone-800);box-shadow:0 12px 30px -12px rgba(17,17,17,.55)}
.btn--light{background:var(--white);color:var(--ink);padding:8px 8px 8px 24px;border:1px solid rgba(255,255,255,.7)}
.btn--light:hover{box-shadow:0 16px 44px -14px rgba(0,0,0,.45)}
.btn--ghost{border:1px solid var(--stone-200);padding:13px 26px;color:var(--ink)}
.btn--ghost:hover{border-color:var(--ink);background:var(--stone-50)}

/* button-in-button: the arrow always lives in its own disc, flush right */
.btn__disc{
  width:36px;height:36px;flex:0 0 36px;border-radius:var(--r-pill);
  background:var(--ink);color:var(--white);
  display:grid;place-items:center;
  transition:transform .55s var(--ease-mech),background-color .55s var(--ease);
}
.btn--light:hover .btn__disc{transform:translate(3px,-3px) scale(1.05)}
.btn__disc--inv{background:var(--white);color:var(--ink)}
.btn__disc svg{width:15px;height:15px}

/* =========================================================== 1 · NAV/HERO */
/* The hero is a scroll-scrubbed build sequence. `.hero` is a tall rail whose
   height sets how much scroll the film consumes; `.hero__pin` sticks for
   (rail - 1) screens and holds the canvas, nav and headline. Frames are drawn
   to a canvas rather than seeking a <video>: mid-GOP seeks stutter badly in
   Safari, while an image sequence scrubs deterministically.               */
.hero{position:relative;height:calc(100svh * 4);background:var(--stone-950)}
.hero__pin{position:sticky;top:0;height:100svh;display:flex;flex-direction:column;
  isolation:isolate;overflow:hidden}
.hero__media{position:absolute;inset:0;z-index:0;overflow:hidden;background:var(--stone-950)}
.hero__media canvas,.hero__media video,.hero__media img{width:100%;height:100%;object-fit:cover;display:block}
/* the poster sits under the canvas so the first paint is never an empty box,
   and it is the whole hero for anyone without JS */
.hero__poster{position:absolute;inset:0;z-index:0;transition:opacity .6s var(--ease)}
.hero__media canvas{position:relative;z-index:1}

/* stage ticker: which storey is going up right now */
.hero__stage{display:flex;align-items:baseline;gap:12px;margin-bottom:18px;min-height:22px}
.hero__stage b{font-family:var(--sans);font-size:12px;font-weight:700;letter-spacing:.18em;
  color:var(--accent);font-variant-numeric:tabular-nums}
.hero__stage span{font-family:var(--han-body);font-size:14px;font-weight:500;
  color:rgba(255,255,255,.9);letter-spacing:.04em}
.hero__stage b,.hero__stage span{transition:opacity .4s var(--ease)}
.hero__stage.is-swap b,.hero__stage.is-swap span{opacity:0}

/* how much film is left, while the section holds you */
.hero__prog{position:absolute;left:0;right:0;bottom:0;height:2px;z-index:3;
  background:rgba(255,255,255,.16)}
.hero__prog i{display:block;height:100%;width:100%;background:var(--accent);
  transform:scaleX(0);transform-origin:0 50%}
/* brief: no tint over the video, only a soft shadow at the foot */
.hero__foot{position:absolute;inset:0;z-index:2;pointer-events:none;
  background:linear-gradient(180deg,transparent 55%,rgba(0,0,0,.55) 100%)}
/* a second, very short scrim behind the nav only, so white nav text stays
   legible against a bright sky without tinting the picture itself */
.hero__topscrim{position:absolute;top:0;left:0;right:0;height:180px;z-index:2;pointer-events:none;
  background:linear-gradient(180deg,rgba(0,0,0,.34),transparent)}

.nav{position:relative;z-index:4;color:var(--white)}
.nav__in{display:flex;align-items:center;gap:32px;height:76px}
.brand{display:flex;align-items:center;gap:11px;flex:0 0 auto}
.brand svg{width:28px;height:34px;flex:0 0 28px}
.brand__wm{display:flex;flex-direction:column;line-height:1}
.brand__zh{font-family:var(--han-display);font-weight:600;font-size:19px;letter-spacing:.06em}
.brand__en{font-size:9.5px;font-weight:600;letter-spacing:.22em;opacity:.72;margin-top:3px}
.nav__links{display:none;gap:30px;margin-left:auto}
.nav__links a{font-size:15px;font-weight:500;opacity:.9;position:relative;padding-block:4px}
.nav__links a::after{content:"";position:absolute;left:0;right:100%;bottom:0;height:1px;background:currentColor;transition:right .5s var(--ease)}
.nav__links a:hover::after{right:0}
.nav__cta{display:none}
.nav__burger{
  margin-left:auto;width:46px;height:46px;border-radius:12px;
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.28);
  display:grid;place-items:center;gap:5px;align-content:center;
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
}
.nav__burger span{display:block;width:18px;height:1.5px;background:var(--white);border-radius:2px;
  transition:transform .5s var(--ease-mech),opacity .3s var(--ease)}
.nav.is-open .nav__burger span:nth-child(1){transform:translateY(6.5px) rotate(45deg)}
.nav.is-open .nav__burger span:nth-child(2){opacity:0}
.nav.is-open .nav__burger span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg)}

.drawer{
  position:fixed;inset:0;z-index:60;background:var(--stone-950);color:var(--white);
  /* display:none, not visibility/opacity: Safari 26 still samples hidden-but-
     present fixed layers and turns its toolbar into an opaque slab           */
  display:none;flex-direction:column;justify-content:center;gap:6px;
  padding:0 var(--gut);
  opacity:0;transform:translateY(-12px);
  transition:opacity .5s var(--ease),transform .6s var(--ease-mech),display .5s allow-discrete;
}
.drawer.is-open{display:flex;opacity:1;transform:none}
@starting-style{ .drawer.is-open{opacity:0;transform:translateY(-12px)} }
.drawer a{font-family:var(--han-display);font-size:26px;font-weight:500;padding:12px 0;
  opacity:0;transform:translateY(22px);transition:opacity .6s var(--ease),transform .6s var(--ease)}
.drawer.is-open a{opacity:1;transform:none}
.drawer.is-open a:nth-child(1){transition-delay:.10s}
.drawer.is-open a:nth-child(2){transition-delay:.16s}
.drawer.is-open a:nth-child(3){transition-delay:.22s}
.drawer.is-open a:nth-child(4){transition-delay:.28s}
.drawer.is-open a:nth-child(5){transition-delay:.34s}
.drawer__cta{margin-top:26px;align-self:flex-start;opacity:0;transform:translateY(22px);
  transition:opacity .6s var(--ease) .40s,transform .6s var(--ease) .40s}
.drawer.is-open .drawer__cta{opacity:1;transform:none}
.drawer__close{position:absolute;top:22px;right:var(--gut);width:46px;height:46px;border-radius:12px;
  border:1px solid rgba(255,255,255,.28);display:grid;place-items:center}

.hero__body{position:relative;z-index:3;margin-top:auto;padding-bottom:clamp(34px,5vw,62px);color:var(--white)}
.hero__grid{display:grid;gap:clamp(24px,3vw,48px);align-items:end}
.hero h1{
  font-family:var(--han-display);font-weight:600;
  font-size:clamp(29px,4.7vw,64px);line-height:1.16;letter-spacing:.005em;
  text-shadow:0 2px 30px rgba(0,0,0,.3);
}
.hero__right{display:flex;flex-direction:column;gap:24px;align-items:flex-start}
.hero__p{font-family:var(--han-body);font-size:16px;font-weight:400;line-height:1.8;
  color:rgba(255,255,255,.86);max-width:44ch;text-shadow:0 1px 16px rgba(0,0,0,.35)}

/* =============================================================== 2 · ABOUT */
.about{padding:var(--sec-y) 0}
/* px, not ch: the `ch` unit resolves against THIS element's font (Inter 16px),
   not the 42px Noto Serif TC heading inside it, so 26ch was ~230px wide and
   stacked the headline into five lines.                                    */
.about__head{max-width:min(720px,100%);margin-inline:auto;text-align:center;display:grid;gap:18px;justify-items:center}
.about__media{margin-top:clamp(46px,6vw,92px);border-radius:var(--r-media);overflow:hidden;background:var(--stone-100)}
.about__media img{width:100%;aspect-ratio:21/9;object-fit:cover;
  transition:transform 1s var(--ease)}
.about__media:hover img{transform:scale(1.06)}

.stats{margin-top:clamp(40px,5.5vw,80px);display:grid;grid-template-columns:repeat(2,1fr);
  gap:30px 0;border-top:1px solid var(--stone-200);padding-top:clamp(30px,4vw,52px)}
.stat{padding-inline:clamp(12px,2vw,28px)}
.stat:nth-child(odd){padding-left:0}
.stat__n{font-size:clamp(30px,3.4vw,44px);font-weight:600;line-height:1;letter-spacing:-.03em}
.stat__n sub{font-size:.42em;font-weight:600;letter-spacing:0;vertical-align:baseline;margin-left:3px;color:var(--stone-500)}
.stat__l{margin-top:12px;font-size:11.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--stone-600)}
.stat__zh{font-family:var(--han-body);font-size:13px;color:var(--stone-500);margin-top:5px}

/* ====================================== 3 · SIGNATURE: the storey walk-up */
/* The owner marked one floor of their own photograph in green. That gesture
   is the navigation: the real elevation stays pinned and each storey lights
   as its description arrives.                                              */
.floors{background:var(--stone-950);color:var(--white);padding:var(--sec-y) 0;position:relative}
.floors .eyebrow{color:var(--stone-400)}
.floors__head{display:grid;gap:16px;max-width:min(640px,100%);margin-bottom:clamp(40px,5vw,68px)}
.floors__grid{display:grid;gap:clamp(30px,4vw,64px)}
.floors__stage{position:relative}
.elev{
  position:relative;border-radius:var(--r-card);overflow:hidden;
  background:var(--stone-900);
}
.elev img{width:100%;aspect-ratio:3/4;object-fit:cover;filter:brightness(.62) saturate(.9);transition:filter 1s var(--ease)}
.elev__bands{position:absolute;inset:0}
.elev__band{
  position:absolute;left:0;right:0;
  border-top:1px solid rgba(255,255,255,0);border-bottom:1px solid rgba(255,255,255,0);
  transition:background-color .9s var(--ease),box-shadow .9s var(--ease),border-color .9s var(--ease);
}
.elev__band.is-on{
  background:linear-gradient(180deg,rgba(189,123,55,.30),rgba(189,123,55,.14));
  border-color:rgba(232,168,86,.9);
  box-shadow:inset 0 0 70px rgba(189,123,55,.42),0 0 0 1px rgba(232,168,86,.35);
}
.elev__tag{
  position:absolute;left:12px;top:8px;font-size:11px;font-weight:700;letter-spacing:.14em;
  color:var(--white);opacity:0;transform:translateX(-6px);
  transition:opacity .7s var(--ease),transform .7s var(--ease);
}
.elev__band.is-on .elev__tag{opacity:1;transform:none}

.fl{padding:clamp(34px,4.8vw,58px) 0;border-top:1px solid rgba(255,255,255,.14)}
.fl:first-child{border-top:0;padding-top:0}
.fl__no{font-size:12px;font-weight:700;letter-spacing:.18em;color:var(--accent);transition:color .6s var(--ease)}
.fl__t{font-family:var(--han-display);font-size:clamp(21px,2.4vw,28px);font-weight:500;margin-top:10px}
.fl__d{font-family:var(--han-body);font-size:15px;line-height:1.85;color:rgba(255,255,255,.62);margin-top:12px;max-width:46ch}
.fl__meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
.fl__area{font-size:12px;font-weight:600;letter-spacing:.04em;padding:7px 13px;border-radius:var(--r-pill);
  border:1px solid rgba(255,255,255,.2);color:rgba(255,255,255,.8)}
.fl__area--est{border-style:dashed;color:rgba(255,255,255,.55)}

/* ------------------------------------------------- floor-plan bottom sheet */
/* Built to the iOS rules: the fixed shell is TRANSPARENT (Safari 26 samples
   fixed edge elements and paints its toolbar as an opaque colour extension,
   so the material lives on children); the closed state is display:none, not
   opacity/visibility, because hidden-but-present layers are still sampled.
   Discrete `display` is transitioned via allow-discrete + @starting-style.  */
.plan-btn{
  display:inline-flex;align-items:center;gap:9px;margin-top:20px;
  padding:11px 18px;border-radius:var(--r-pill);
  border:1px solid rgba(255,255,255,.24);background:transparent;
  font-size:13.5px;font-weight:600;color:var(--white);
  transition:border-color .45s var(--ease),background-color .45s var(--ease),transform .45s var(--ease);
}
.plan-btn:hover{border-color:rgba(255,255,255,.55);background:rgba(255,255,255,.08)}
.plan-btn:active{transform:scale(.975)}
.plan-btn svg{width:17px;height:17px}
.plan-btn[disabled]{opacity:.42;cursor:default}
.plan-btn[disabled]:hover{border-color:rgba(255,255,255,.24);background:transparent}

.sheet{
  position:fixed;inset:0;z-index:90;background:transparent;   /* transparent shell */
  display:none;align-items:flex-end;justify-content:center;
  transition:display .42s allow-discrete;
}
.sheet.is-open{display:flex}
.sheet__scrim{
  position:absolute;inset:0;background:rgba(10,11,12,.62);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
  opacity:0;transition:opacity .42s var(--ease);
}
.sheet.is-open .sheet__scrim{opacity:1}

.sheet__panel{
  position:relative;width:100%;max-width:1080px;
  max-height:92svh;                       /* svh, never lvh/dvh */
  background:var(--white);
  border-radius:var(--r-xl) var(--r-xl) 0 0;
  display:flex;flex-direction:column;overflow:hidden;
  transform:translateY(100%);
  transition:transform .52s var(--ease-mech);
  box-shadow:0 -20px 60px -20px rgba(0,0,0,.5);
  padding-bottom:var(--sab,0px);
}
.sheet.is-open .sheet__panel{transform:none}
@starting-style{ .sheet.is-open .sheet__panel{transform:translateY(100%)} }
@starting-style{ .sheet.is-open .sheet__scrim{opacity:0} }

.sheet__grip{width:42px;height:4px;border-radius:2px;background:var(--stone-300);
  margin:10px auto 0;flex:0 0 auto}
.sheet__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:16px clamp(18px,3vw,28px) 14px;flex:0 0 auto}
.sheet__t{font-family:var(--han-display);font-size:19px;font-weight:600}
.sheet__sub{font-family:var(--han-body);font-size:13.5px;color:var(--stone-600);margin-top:5px}
.sheet__acts{display:flex;gap:8px;flex:0 0 auto}
.sheet__ico{width:40px;height:40px;border-radius:var(--r-pill);border:1px solid var(--stone-200);
  display:grid;place-items:center;color:var(--stone-600);
  transition:border-color .35s var(--ease),color .35s var(--ease)}
.sheet__ico:hover{border-color:var(--ink);color:var(--ink)}
.sheet__ico svg{width:18px;height:18px}

.sheet__body{flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch;
  background:var(--stone-100);padding:12px;overscroll-behavior:contain}
.sheet__img{display:block;width:100%;height:auto;border-radius:8px;background:var(--white)}
.sheet.is-zoom .sheet__img{width:220%;max-width:none}
.sheet__note{padding:12px clamp(18px,3vw,28px) 18px;font-family:var(--han-body);
  font-size:13px;line-height:1.7;color:var(--stone-600);flex:0 0 auto;
  border-top:1px solid var(--stone-200)}
.sheet__empty{padding:44px 24px 52px;text-align:center;font-family:var(--han-body);
  color:var(--stone-600);font-size:15px;line-height:1.8}
.sheet__empty b{display:block;font-family:var(--han-display);font-size:18px;color:var(--ink);margin-bottom:10px}

/* Safari 26 samples fixed elements at the viewport edge and paints its toolbar
   as an opaque colour extension. A transparent 5px shim at the bottom edge
   makes the sampler read "transparent" and fall back to real compositing.
   Zero visual cost; applied because this page has a dark canvas.          */
.safari-toolbar-sampling-shim{position:fixed;left:0;right:0;bottom:0;height:5px;
  z-index:2147483647;background:transparent;pointer-events:none}

/* ============================================================== 4 · SPACES */
.spaces{background:var(--stone-50);padding:var(--sec-y) 0}
.spaces__head{display:flex;flex-wrap:wrap;gap:26px;align-items:flex-end;justify-content:space-between;
  margin-bottom:clamp(32px,4vw,52px)}
.spaces__head .h-sec{max-width:20ch}
.grid-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:26px}
.space{
  background:var(--white);border-radius:var(--r-card);padding:6px;
  box-shadow:0 1px 2px rgba(23,24,26,.05),0 14px 34px -22px rgba(23,24,26,.35);
  transition:transform .7s var(--ease),box-shadow .7s var(--ease);
}
.space:hover{transform:translateY(-4px);box-shadow:0 2px 4px rgba(23,24,26,.06),0 28px 60px -28px rgba(23,24,26,.45)}
.space__fig{position:relative;border-radius:var(--r-media);overflow:hidden;background:var(--stone-100)}
.space__fig img{width:100%;aspect-ratio:16/12;object-fit:cover;transition:transform 1s var(--ease)}
.space:hover .space__fig img{transform:scale(1.06)}
.space__badge{
  position:absolute;top:12px;left:12px;background:var(--white);color:var(--ink);
  font-size:11.5px;font-weight:700;letter-spacing:.08em;padding:7px 13px;border-radius:8px;
}
.space__body{padding:20px 20px 24px}
.space__row{display:flex;align-items:baseline;justify-content:space-between;gap:14px}
.space__t{font-family:var(--han-display);font-size:18px;font-weight:600}
.space__price{font-size:13px;font-weight:600;color:var(--stone-500);letter-spacing:.02em}
.space__rule{height:1px;background:var(--stone-200);margin:16px 0}
.space__loc{display:flex;align-items:center;gap:9px;font-family:var(--han-body);font-size:14px;color:var(--stone-600)}
.space__loc svg{width:17px;height:17px;flex:0 0 17px;color:var(--stone-400)}
.space__specs{display:flex;flex-wrap:wrap;gap:18px;margin-top:16px;font-size:13.5px;color:var(--stone-600)}
.space__specs li{display:flex;align-items:center;gap:7px}
.space__specs svg{width:18px;height:18px;flex:0 0 18px;color:var(--stone-400)}

/* ================================================================= 5 · CTA */
.cta{position:relative;min-height:clamp(400px,60vh,620px);display:flex;align-items:flex-end;
  isolation:isolate;overflow:hidden;color:var(--white)}
.cta__bg{position:absolute;inset:0;z-index:-2}
.cta__bg img{width:100%;height:100%;object-fit:cover}
.cta::after{content:"";position:absolute;inset:0;z-index:-1;
  background:linear-gradient(180deg,rgba(0,0,0,.30) 0%,rgba(0,0,0,.16) 46%,rgba(0,0,0,.66) 100%)}
.cta__in{width:100%;padding-block:clamp(38px,5vw,62px);display:flex;flex-wrap:wrap;gap:28px;
  align-items:flex-end;justify-content:space-between}
.cta .eyebrow{color:rgba(255,255,255,.82)}
.cta h2{max-width:17ch;color:var(--white)}
.cta__act{display:flex;align-items:center;gap:12px}
.cta__circ{width:44px;height:44px;border-radius:var(--r-pill);background:var(--white);color:var(--ink);
  display:grid;place-items:center;transition:transform .55s var(--ease-mech)}
.cta__act:hover .cta__circ{transform:translate(3px,-3px)}
.cta__circ svg{width:16px;height:16px}

/* ======================================================= 6 · NEIGHBOURHOOD */
.hood{background:var(--stone-100);padding:var(--sec-y) 0;text-align:center}
.hood__head{display:grid;gap:16px;justify-items:center;margin-bottom:clamp(34px,4vw,54px)}
.pill{background:var(--white);border-radius:var(--r-pill);padding:9px 20px;font-size:14px;font-weight:500;
  display:inline-flex;align-items:center;gap:9px;color:var(--ink)}
.pill svg{width:17px;height:17px;color:var(--stone-500)}
.hood__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,430px),1fr));gap:22px;text-align:left}
.hcard{background:var(--white);border-radius:var(--r-xl);padding:10px;
  transition:transform .7s var(--ease),box-shadow .7s var(--ease)}
.hcard:hover{transform:translateY(-4px);box-shadow:0 26px 56px -30px rgba(23,24,26,.5)}
.hcard__fig{position:relative;border-radius:var(--r-xl-inner);overflow:hidden;background:var(--stone-200)}
.hcard__fig img{width:100%;aspect-ratio:16/10;object-fit:cover;transition:transform 1s var(--ease)}
.hcard:hover .hcard__fig img{transform:scale(1.06)}
.hcard__fig::after{content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,transparent 42%,rgba(0,0,0,.62) 100%)}
.hcard__cap{position:absolute;inset:auto 16px 16px 16px;z-index:2;display:flex;align-items:flex-end;
  justify-content:space-between;gap:14px}
.hcard__t{font-family:var(--han-display);color:var(--white);font-size:18px;font-weight:500;
  text-shadow:0 1px 12px rgba(0,0,0,.5)}
.hcard__tag{background:var(--white);color:var(--ink);border-radius:var(--r-pill);
  padding:6px 13px;font-size:12.5px;font-weight:600;white-space:nowrap}

/* ================================================================= 7 · FAQ */
.faq{background:var(--white);padding:var(--sec-y) 0}
.faq__head{display:grid;gap:14px;justify-items:center;text-align:center;margin-bottom:clamp(30px,4vw,48px)}
.faq__list{max-width:850px;margin-inline:auto;display:grid;gap:13px}
.qa{background:var(--stone-100);border-radius:var(--r-card);overflow:hidden}
.qa__btn{width:100%;display:flex;align-items:flex-start;gap:20px;justify-content:space-between;
  padding:24px clamp(20px,3vw,30px);text-align:left}
.qa__q{font-family:var(--han-body);font-size:16.5px;font-weight:600;color:#161616;line-height:1.55}
.qa__ico{flex:0 0 26px;width:26px;height:26px;position:relative;margin-top:2px;
  transition:transform .35s var(--ease-mech)}
.qa__ico::before,.qa__ico::after{content:"";position:absolute;top:50%;left:50%;background:var(--stone-600);border-radius:2px}
.qa__ico::before{width:15px;height:1.5px;transform:translate(-50%,-50%)}
.qa__ico::after{width:1.5px;height:15px;transform:translate(-50%,-50%)}
/* The <details> element keeps its `open` attribute at all times so the browser
   never display:none's the panel; visibility is driven by .is-open instead.
   Removing `open` would hide the content instantly and the close would snap
   rather than animate. With JS off, every panel simply renders expanded.   */
.qa.is-open .qa__ico{transform:rotate(45deg)}
.qa__panel{display:grid;grid-template-rows:1fr;transition:grid-template-rows .45s var(--ease-mech)}
.qa:not(.is-open) .qa__panel{grid-template-rows:0fr}
.qa__inner{overflow:hidden}
.qa__a{font-family:var(--han-body);font-size:15.5px;line-height:1.8;color:#5c5c5c;
  padding:2px clamp(20px,3vw,30px) 22px;margin:0;
  transition:opacity .35s var(--ease-mech)}
.qa:not(.is-open) .qa__a{opacity:0}
.qa__btn{list-style:none}
.qa__btn::-webkit-details-marker{display:none}
.qa__btn::marker{content:""}

/* ============================================================== 8 · PEOPLE */
.people{background:var(--stone-50);padding:var(--sec-y) 0}
.people__head{display:grid;gap:30px;margin-bottom:clamp(34px,4vw,54px)}
.people__right{display:grid;gap:22px;justify-items:start;align-content:start}
.people__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:20px}
.pc__fig{border-radius:18px;overflow:hidden;background:var(--stone-200)}
.pc__fig img{width:100%;aspect-ratio:1/1;object-fit:cover;transition:transform 1s var(--ease)}
.pc:hover .pc__fig img{transform:scale(1.06)}
.pc__info{background:var(--white);border-radius:var(--r-card);padding:17px 19px;margin-top:9px;
  box-shadow:0 1px 2px rgba(23,24,26,.05)}
.pc__n{font-family:var(--han-display);font-size:17px;font-weight:600}
.pc__r{font-family:var(--han-body);font-size:13.5px;color:var(--stone-500);margin-top:4px}

/* ========================================================= 9 · TESTIMONIAL */
.says{background:linear-gradient(180deg,#f6f6f6,#efefef);padding:var(--sec-y) 0;overflow:hidden}
.says__head{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-end;justify-content:space-between;
  margin-bottom:clamp(28px,3.5vw,44px)}
.says__nav{display:flex;gap:11px}
.rnd{width:50px;height:50px;border-radius:var(--r-pill);background:var(--stone-300);color:var(--white);
  display:grid;place-items:center;transition:background-color .3s var(--ease),transform .5s var(--ease)}
.rnd:hover{background:var(--ink)}
.rnd:disabled{opacity:.34;cursor:default}
.rnd:disabled:hover{background:var(--stone-300)}
.rnd svg{width:19px;height:19px}
.rail{display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;
  scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px}
.rail::-webkit-scrollbar{display:none}
.say{flex:0 0 clamp(280px,32%,410px);scroll-snap-align:start;background:var(--white);
  border-radius:18px;padding:clamp(24px,2.6vw,30px);display:flex;flex-direction:column;gap:18px}
.say__who{display:flex;align-items:center;gap:13px}
.say__av{width:42px;height:42px;border-radius:var(--r-pill);object-fit:cover;flex:0 0 42px}
.say__n{font-size:15.5px;font-weight:600}
.say__r{font-family:var(--han-body);font-size:13.5px;color:var(--stone-500);margin-top:2px}
.say__q{font-family:var(--han-body);font-size:16px;font-weight:400;line-height:1.75;color:var(--ink);flex:1}
.stars{display:flex;gap:5px}
.stars i{width:26px;height:26px;border-radius:5px;background:var(--accent);display:grid;place-items:center;
  color:var(--white);font-size:13px;font-style:normal;line-height:1}

/* ============================================================ 10 · CONTACT */
.book{padding:clamp(18px,3.2vw,42px) 0;background:var(--white)}
.book__card{position:relative;border-radius:var(--r-xl);overflow:hidden;isolation:isolate;
  min-height:clamp(440px,66vh,650px);display:grid;place-items:center;text-align:center;color:var(--white);
  padding:clamp(38px,6vw,80px) var(--gut)}
.book__card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
.book__card::after{content:"";position:absolute;inset:0;z-index:-1;background:rgba(20,25,28,.5)}
.book__in{display:grid;gap:22px;justify-items:center;max-width:640px}
.book__in h2{color:var(--white)}
.book__in p{font-family:var(--han-body);font-size:16px;line-height:1.8;color:rgba(255,255,255,.92);max-width:40ch}

/* ============================================================= 11 · FOOTER */
.foot{background:var(--white);padding:clamp(50px,6vw,80px) 0 34px}
.foot__top{display:grid;gap:26px;padding-bottom:32px}
.foot .brand{color:var(--ink)}
.foot .brand__zh{font-size:22px}
.foot .brand__en{opacity:.55}
.foot__facts{display:grid;gap:18px}
.foot__fact{font-size:14.5px;color:var(--stone-600);font-family:var(--han-body)}
.foot__fact b{display:block;color:var(--ink);font-family:var(--sans);font-weight:700;font-size:12px;
  letter-spacing:.1em;text-transform:uppercase;margin-bottom:5px}
.rule{height:1px;background:var(--stone-200)}
.foot__cols{display:grid;grid-template-columns:repeat(2,1fr);gap:34px 24px;padding:36px 0}
.foot__ct{font-size:14px;font-weight:700;letter-spacing:.04em;margin-bottom:16px}
/* padded to a comfortable tap target: the bare text line was 21px tall */
.foot__cols li+li{margin-top:0}
.foot__cols a{display:inline-block;padding-block:11px;
  font-size:14.5px;color:var(--stone-500);font-family:var(--han-body);
  transition:color .35s var(--ease)}
.foot__cols a:hover{color:var(--ink)}
.foot__news p{font-family:var(--han-body);font-size:15px;line-height:1.75;color:var(--stone-500);margin-bottom:18px}
.news{display:flex;gap:10px;align-items:center}
.news__f{flex:1;display:flex;align-items:center;background:var(--stone-100);border-radius:var(--r-pill);
  padding:0 20px;height:52px}
.news__f input{flex:1;border:0;background:none;font:inherit;font-size:14.5px;color:var(--ink);outline:none;min-width:0}
.news__f input::placeholder{color:var(--stone-500)}
.news__f:focus-within{box-shadow:inset 0 0 0 1px var(--ink)}
.news__go{width:50px;height:50px;flex:0 0 50px;border-radius:var(--r-pill);background:var(--ink);color:var(--white);
  display:grid;place-items:center;transition:transform .55s var(--ease-mech)}
.news__go:hover{transform:translate(2px,-2px)}
.socials{display:flex;gap:11px;margin-top:20px}
.socials a{width:44px;height:44px;border-radius:var(--r-pill);border:1px solid var(--stone-200);
  display:grid;place-items:center;color:var(--stone-600);
  transition:border-color .4s var(--ease),color .4s var(--ease),transform .5s var(--ease)}
.socials a:hover{border-color:var(--ink);color:var(--ink);transform:translateY(-2px)}
.socials svg{width:19px;height:19px}
.foot__end{padding-top:26px;text-align:center;font-size:14px;color:var(--stone-600);font-family:var(--han-body)}
.foot__end b{color:var(--ink);font-weight:700}
/* the provenance note is the one line that must never be hard to read:
   stone-400 measured 3.17:1 on white, below AA for body text          */
.foot__note{margin-top:12px;font-size:13px;color:var(--stone-600);font-family:var(--han-body);line-height:1.75;
  max-width:70ch;margin-inline:auto}

/* ================================================================ MOTION */
/* everything below is gated on prefers-reduced-motion at the foot of file */
.rv{opacity:0;transform:translateY(28px);
  transition:opacity .8s var(--ease),transform .8s var(--ease)}
.rv.is-in{opacity:1;transform:none}

.w{display:inline-block;opacity:0;transform:translateY(.5em);
  transition:opacity .55s var(--ease),transform .55s var(--ease)}
.w.is-in{opacity:1;transform:none}
.wline{display:inline-block}

/* --- small screens: keep the hero CTA clear of an iOS toolbar --------------
   At 390x844 the button was landing 6px above the fold, which disappears the
   moment Safari shows its bottom bar. Tightening the stack buys ~26px.     */
@media (max-width:599px){
  /* 4 screens of pinned scrubbing is a lot of thumb on a phone */
  .hero{height:calc(100svh * 3)}
  .hero__right{gap:16px}
  .hero__p{font-size:15px;line-height:1.72}
}

/* The hero grid stays single-column until 900px, so the stacked copy runs tall
   all the way up through tablet. The hero body is bottom-anchored, so bottom
   padding is what lifts the CTA clear of the fold: it needs to apply across
   the whole single-column range, not just phones. */
@media (max-width:899px){
  .hero__body{padding-bottom:60px}
}

/* =========================================================== BREAKPOINTS */
@media (min-width:640px){
  .stats{grid-template-columns:repeat(4,1fr);gap:0}
  .stat{border-right:1px solid var(--stone-200)}
  .stat:last-child{border-right:0;padding-right:0}
  .stat:first-child{padding-left:0}
  .stat:nth-child(odd){padding-left:clamp(12px,2vw,28px)}
  .stat:first-child{padding-left:0}
  .foot__cols{grid-template-columns:repeat(3,1fr)}
  .foot__news{grid-column:1/-1}
}
@media (min-width:900px){
  .hero__grid{grid-template-columns:1.15fr .85fr;gap:clamp(30px,4vw,70px)}
  .hero__right{align-items:flex-start}
  .floors__grid{grid-template-columns:.92fr 1.08fr;align-items:stretch}
  /* the column stretches to the full row height; the figure inside it is
     what sticks, which is what gives sticky any distance to travel */
  /* capped width keeps the WHOLE elevation visible (never cropped) and
     shortens the figure so sticky has real distance to travel */
  .floors__stage .elev{position:sticky;top:88px;max-width:430px;margin-inline:auto}
  .people__head{grid-template-columns:1fr 1fr;gap:44px;align-items:end}
  .book__card{min-height:clamp(460px,70vh,680px)}
  .foot__top{grid-template-columns:auto 1fr;align-items:center;gap:48px}
  .foot__facts{grid-template-columns:repeat(2,auto);justify-content:end;gap:56px}
  .foot__cols{grid-template-columns:repeat(3,1fr) 1.4fr}
  .foot__news{grid-column:auto}
}
@media (min-width:1160px){
  .nav__links{display:flex}
  .nav__cta{display:inline-flex}
  .nav__burger{display:none}
}

/* ======================================================== REDUCED MOTION */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  /* no scrub means the tall rail would just be 3 screens of nothing */
  .hero{height:100svh}
  .hero__prog{display:none}
  *,*::before,*::after{
    animation-duration:.001ms !important;animation-iteration-count:1 !important;
    transition-duration:.001ms !important;scroll-behavior:auto !important;
  }
  .rv,.w{opacity:1 !important;transform:none !important}
  .space:hover,.hcard:hover{transform:none}
  .about__media:hover img,.space:hover .space__fig img,
  .hcard:hover .hcard__fig img,.pc:hover .pc__fig img{transform:none}
}
