/* =========================================================
   KENWICK 高威物業管理 — one-page site (v2, design 2026-10-09)
   Dark top (hero → daily video), light bottom (cards → footer)
   ========================================================= */

:root {
  --bg: #000;
  --fg: #f4f2ee;
  --fg-soft: #c9c6c0;
  --fg-mute: #8d8a85;
  --line: rgba(244, 242, 238, .28);
  --panel: rgba(150, 150, 150, .78);

  /* light half */
  --paper: #ffffff;
  --ink: #5f5f5f;          /* body text on white */
  --ink-soft: #8a8a8a;     /* secondary text on white */
  --ink-head: #6e6e6e;     /* large light headings */
  --pledge: #a3a3a3;       /* grey promise panel */
  --navy: #39406c;         /* logo navy, form outline */
  --navy-line: rgba(57, 64, 108, .55);
  --accent: #e7dccb;

  --gutter: clamp(20px, 6vw, 88px);
  --maxw: 1320px;

  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-num: "Jost", "Futura", "Century Gothic", "Noto Sans TC", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 92px;
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 300;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.75;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.lang-en { letter-spacing: .01em; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
b { font-weight: 500; }
h1, h2, h3 { margin: 0; font-weight: 300; }
p { margin: 0; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--fg); color: #000; text-decoration: none;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Display type with masked line reveal ---------- */
.display {
  font-size: clamp(34px, 5.4vw, 76px);
  line-height: 1.32;
  letter-spacing: .14em;
  font-weight: 300;
}
.lang-en .display { letter-spacing: .02em; line-height: 1.18; }
.display--xl { font-size: clamp(44px, 6.6vw, 92px); }
.display--light { color: var(--ink-head); }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: inline-block; will-change: transform; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: transform .5s var(--ease), background-color .4s, backdrop-filter .4s;
}
.site-header.is-solid {
  background: rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__logo { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.site-header__logo img { width: clamp(120px, 13vw, 172px); height: auto; }
.site-header__zh {
  font-size: clamp(13px, 1.25vw, 17px); font-weight: 400; letter-spacing: .06em; line-height: 1.2; color: #fff;
}
.site-header__right { display: flex; align-items: center; gap: 28px; }

.lang { display: flex; gap: 8px; font-size: 13px; color: var(--fg-soft); }
.lang a { text-decoration: none; opacity: .7; transition: opacity .3s; }
.lang a:hover { opacity: 1; }
.lang a[aria-current="true"] { color: var(--fg); opacity: 1; }

.menu-btn {
  width: 34px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu-btn span {
  display: block; height: 1px; width: 100%; background: var(--fg);
  transition: transform .4s var(--ease), opacity .3s;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(11.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-11.5px) rotate(-45deg); }

.menu-panel {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--header-h) var(--gutter);
  opacity: 0; transition: opacity .45s var(--ease);
}
.menu-panel[hidden] { display: none; }
.menu-panel:not(.is-open) { pointer-events: none; }
.menu-panel.is-open { opacity: 1; }
.menu-panel ol { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.menu-panel li { counter-increment: m; }
.menu-panel li a {
  display: inline-flex; align-items: baseline; gap: 18px;
  font-size: clamp(30px, 5vw, 60px); letter-spacing: .14em; line-height: 1.6;
  text-decoration: none; color: var(--fg-soft); transition: color .3s;
}
.lang-en .menu-panel li a { letter-spacing: .02em; }
.menu-panel li a::before {
  content: "0" counter(m); font-size: 13px; letter-spacing: .1em; color: var(--fg-mute);
}
.menu-panel li a:hover { color: var(--fg); }
.menu-panel__contact { margin-top: 48px; color: var(--fg-mute); font-size: 14px; }
.menu-panel__contact a { text-decoration: none; }

/* ---------- Background video ---------- */
.bg-video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 1. Hero ---------- */
.hero { position: relative; }
.hero__media {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.hero__media .bg-video { object-position: 55% 50%; transform-origin: 50% 60%; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 16%),
    radial-gradient(ellipse 70% 50% at 18% 82%, rgba(0,0,0,.32) 0%, rgba(0,0,0,0) 70%),
    linear-gradient(0deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,0) 28%);
  pointer-events: none;
}
.hero__screen {
  position: relative; z-index: 2;
  height: 100vh; height: 100svh;
  margin-top: -100vh; margin-top: -100svh;
  display: flex; align-items: flex-end;
  padding: 0 var(--gutter) clamp(90px, 16vh, 170px);
}
.hero__kicker {
  font-size: clamp(16px, 1.6vw, 22px); letter-spacing: .08em; margin-bottom: 10px;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.hero__title {
  font-size: clamp(42px, 6.8vw, 96px);
  line-height: 1.3;
  letter-spacing: .16em;
  text-shadow: 0 2px 24px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.25);
}
.hero__title--en { font-size: clamp(38px, 5.6vw, 84px); letter-spacing: .01em; line-height: 1.12; }
.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; text-decoration: none;
  color: var(--fg-soft);
}
.scroll-cue i { display: block; width: 1px; height: 54px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--fg);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }

.intro {
  position: relative; z-index: 3;
  padding: 0 var(--gutter);
  margin-bottom: -120px;
}
.intro__panel {
  max-width: 1000px; margin-left: auto; margin-right: 6vw;
  background: var(--panel);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  padding: clamp(32px, 4vw, 56px) clamp(24px, 4vw, 60px);
  color: #fff;
}
.intro__lead { font-size: clamp(20px, 2vw, 28px); letter-spacing: .1em; line-height: 1.6; margin-bottom: 18px; }
.lang-en .intro__lead { letter-spacing: .01em; line-height: 1.4; }
.intro__body { color: rgba(255,255,255,.92); max-width: 46em; }
.intro__links { display: flex; flex-wrap: wrap; gap: 18px clamp(32px, 8vw, 110px); margin-top: clamp(40px, 6vw, 80px); }
.link-line { position: relative; text-decoration: none; padding-bottom: 4px; letter-spacing: .1em; }
.lang-en .link-line { letter-spacing: .02em; }
.link-line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform-origin: right; transition: transform .5s var(--ease);
}
.link-line:hover::after { transform: scaleX(0); }

/* ---------- 2. Stats ---------- */
.stats {
  position: relative; z-index: 2; background: var(--bg);
  padding: calc(120px + clamp(70px, 9vw, 120px)) var(--gutter) clamp(80px, 10vw, 140px);
}
.stats__heading {
  text-align: center; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: .04em; margin-bottom: clamp(40px, 5vw, 70px);
}
.stats__list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1180px;
  display: grid; grid-template-columns: repeat(6, 1fr);
  row-gap: clamp(50px, 6vw, 90px); column-gap: 24px;
  text-align: center;
}
.stat { grid-column: span 2; display: flex; flex-direction: column; align-items: center; }
.stat--5 { grid-column: 2 / span 2; }
.stat--4 { grid-column: 4 / span 3; }
.stat__num {
  font-family: var(--font-num); font-weight: 600;
  font-size: clamp(44px, 5.2vw, 72px); line-height: 1; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stat__num sup { font-size: .5em; vertical-align: top; position: relative; top: -.05em; margin-left: .02em; font-weight: 500; }
.stat__num small { font-family: var(--font); font-size: .42em; font-weight: 400; margin-left: .08em; }
.stat__title { font-size: clamp(17px, 1.6vw, 22px); font-weight: 500; letter-spacing: .08em; margin: 12px 0 8px; }
.lang-en .stat__title { letter-spacing: .01em; }
.stat__desc { color: var(--fg-soft); font-size: 14.5px; line-height: 1.6; max-width: 22em; }
.stat__note { display: block; font-style: normal; color: var(--fg-mute); font-size: 11px; margin-top: 6px; }

/* ---------- 3. Daily ---------- */
.daily { position: relative; height: 180vh; background: var(--bg); }
.daily__media { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.daily__frame { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 0 0 0); }
.daily__frame .bg-video { object-position: 45% 40%; }
.daily__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 20% 60%, rgba(0,0,0,.30) 0%, rgba(0,0,0,0) 72%),
    linear-gradient(0deg, #000 0%, rgba(0,0,0,0) 26%);
}
.daily__text {
  position: absolute; left: 0; right: 0; bottom: 72vh; z-index: 2;
  height: 100vh; height: 100svh;
  display: flex; align-items: center;
  padding: 0 var(--gutter);
}
.daily__text .display { text-shadow: 0 2px 24px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.25); }
.daily__sub {
  margin-top: clamp(20px, 3vw, 40px);
  font-size: clamp(20px, 2.4vw, 34px); letter-spacing: .26em;
  text-shadow: 0 2px 18px rgba(0,0,0,.5);
}
.lang-en .daily__sub { letter-spacing: .02em; }

/* ---------- 4. Care cards: black fades to white ---------- */
.care {
  position: relative; z-index: 2;
  background: linear-gradient(180deg, #000 0, #000 60px, #fff clamp(220px, 28vw, 380px), #fff 100%);
  padding: clamp(140px, 18vw, 260px) var(--gutter) clamp(90px, 11vw, 150px);
  color: var(--ink);
}
.care__title {
  max-width: var(--maxw); margin: 0 auto clamp(28px, 3vw, 44px);
  font-size: clamp(22px, 2.4vw, 32px); color: var(--ink-head); letter-spacing: .02em;
}
.care__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
}
.card { text-align: center; }
.card__img { overflow: hidden; aspect-ratio: 16 / 9.5; margin-bottom: 28px; background: #ddd; }
.card__img img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.card h3 { font-size: clamp(20px, 1.9vw, 28px); letter-spacing: .14em; font-weight: 400; margin-bottom: 8px; color: #555; }
.lang-en .card h3 { letter-spacing: .01em; font-size: clamp(19px, 1.6vw, 24px); }
.card p { color: var(--ink-soft); font-size: 14.5px; max-width: 19em; margin: 0 auto; padding: 0 12px; }
.br-m { display: none; }

/* ---------- 5. Promise (white page, grey pledge panel) ---------- */
.promise {
  background: var(--paper); color: var(--ink);
  padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(90px, 10vw, 150px);
}
.promise__head, .pledges { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.promise__head { margin-bottom: clamp(36px, 5vw, 64px); }
.promise__kicker { font-size: clamp(26px, 3.4vw, 50px); letter-spacing: .14em; color: #8f8f8f; font-weight: 300; }
.lang-en .promise__kicker { letter-spacing: .01em; font-size: clamp(22px, 2.6vw, 38px); }
.promise .display { font-size: clamp(38px, 6vw, 86px); }
.promise__sub { font-size: clamp(18px, 2.2vw, 32px); letter-spacing: .3em; margin-top: 10px; color: #8f8f8f; }

.pledges {
  background: var(--pledge); color: #fff;
  padding: clamp(36px, 5vw, 70px) clamp(24px, 4vw, 60px);
  display: flex; flex-direction: column; gap: clamp(60px, 8vw, 110px);
}
.pledge { display: flex; }
.pledge--right { justify-content: flex-end; }
.pledge__text { max-width: 30em; }
.pledge__text--right { text-align: right; }
.pledge__word { font-size: clamp(48px, 6vw, 84px); line-height: 1.1; font-weight: 400; letter-spacing: .06em; margin-bottom: 10px; }
.lang-en .pledge__word { letter-spacing: 0; font-size: clamp(40px, 5vw, 70px); }
.pledge__head { font-size: clamp(22px, 2.3vw, 32px); font-weight: 500; letter-spacing: .2em; line-height: 1.45; margin-bottom: 10px; }
.lang-en .pledge__head { letter-spacing: .01em; }
.pledge__body { color: rgba(255,255,255,.92); font-size: 15px; }
.pledge--brand { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; }
.pledge--flip .pledge__text { justify-self: end; }
.pledge__logo { display: flex; justify-content: center; }
.pledge__logo img { width: min(100%, 144px); height: auto; }
.pledge__logo--wide img { width: min(100%, 260px); }

/* ---------- 6. Contact ---------- */
.contact {
  background: var(--paper); color: var(--ink);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 100px); align-items: center;
  padding: clamp(40px, 6vw, 90px) max(var(--gutter), calc((100% - var(--maxw)) / 2)) clamp(70px, 8vw, 120px);
}
.contact__kicker { font-size: clamp(18px, 1.9vw, 26px); letter-spacing: .18em; color: #8f8f8f; margin-bottom: 8px; }
.lang-en .contact__kicker { letter-spacing: .02em; }
.contact__body { margin-top: 26px; color: var(--ink-soft); max-width: 31em; }
.contact__body b { color: #555; }

.contact__form { position: relative; padding-top: 34px; }
.whatsapp {
  position: absolute; right: 0; top: -20px; width: 52px; height: 52px; border-radius: 12px;
  transition: transform .3s var(--ease);
}
.whatsapp img { width: 100%; height: 100%; }
.whatsapp:hover { transform: translateY(-3px) scale(1.04); }

.form {
  border: 1.5px solid var(--navy-line);
  border-radius: 34px;
  padding: clamp(24px, 3vw, 38px);
  background: #fff;
  display: flex; flex-direction: column; gap: 14px;
}
.form__heading { font-size: 18px; color: #555; font-weight: 400; margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: 13px; color: var(--ink-soft); }
.field label em { font-style: normal; color: var(--navy); }
.field input,
.field select,
.field textarea {
  font: inherit; font-size: 15px; color: #333;
  background: #fff;
  border: 1.5px solid var(--navy-line); border-radius: 6px;
  padding: 10px 12px; width: 100%;
  transition: border-color .3s, box-shadow .3s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 30px;
}
.field select:invalid { color: #aaa; }
.field input::placeholder, .field textarea::placeholder { color: #b3b3b3; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(57,64,108,.12); }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: #d0604a; }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); cursor: pointer; }
.consent input { margin: 4px 0 0; accent-color: var(--navy); flex: none; width: 15px; height: 15px; }
.consent a { color: #555; }
.consent.is-invalid span { color: #d0604a; }

.cf-turnstile:empty { display: none; }

.btn {
  font: inherit; font-size: 14px; letter-spacing: .14em;
  padding: 13px 20px; border: 0; border-radius: 6px; cursor: pointer;
  background: #cfcfcf; color: #fff;
  transition: background-color .3s, color .3s;
}
.lang-en .btn { letter-spacing: .04em; }
.btn:hover { background: var(--navy); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn--small { padding: 9px 18px; }
.form__status { font-size: 14px; min-height: 1.5em; text-align: center; }
.form__status:empty { min-height: 0; }
.form__status.is-ok { color: #3c8a4a; }
.form__status.is-err { color: #c0533e; }
.form__qr { display: block; width: 120px; margin: 4px auto 0; }
.form__qr img { display: block; width: 100%; height: auto; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper); color: var(--ink-soft);
  text-align: center; padding: clamp(30px, 5vw, 60px) var(--gutter) 56px;
  font-size: 13px; letter-spacing: .04em;
}
.site-footer__logo { width: clamp(110px, 10vw, 140px); height: auto; margin: 0 auto clamp(30px, 4vw, 50px); }
.site-footer address { font-style: normal; line-height: 1.9; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__copy { margin-top: 2px; }
.certs {
  list-style: none; margin: clamp(30px, 4vw, 44px) auto 0; padding: 0; max-width: 960px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: start;
}
.certs li { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.certs img { height: 72px; width: auto; object-fit: contain; }
.certs span { font-size: 12.5px; color: #777; font-weight: 500; line-height: 1.4; }
.certs b { font-weight: 500; }

/* ---------- PICS dialog ---------- */
.pics {
  max-width: 560px; width: calc(100% - 32px);
  border: 1px solid #ddd; border-radius: 18px;
  background: #fff; color: #444; padding: 30px;
}
.pics::backdrop { background: rgba(0,0,0,.6); }
.pics h2 { font-size: 20px; letter-spacing: .06em; margin-bottom: 14px; font-weight: 500; }
.pics ol { padding-left: 1.2em; margin: 0 0 22px; color: #666; font-size: 14px; }
.pics li + li { margin-top: 8px; }
.pics .btn { background: var(--navy); }

/* ---------- Initial states for JS-driven reveals ---------- */
.js-motion [data-reveal] { opacity: 0; }
.js-motion .line > span { transform: translateY(110%); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .stats__list { grid-template-columns: repeat(2, 1fr); }
  .stat, .stat--4 { grid-column: auto; }
  .stat--5 { grid-column: 1 / -1; }
  .care__grid { grid-template-columns: 1fr; gap: 56px; }
  .card__img { aspect-ratio: 16 / 9; }
  .contact { grid-template-columns: 1fr; }
  .intro__panel { margin-right: 0; }
  .pledge--brand { grid-template-columns: 1fr; }
  .pledge--right { justify-content: flex-start; }
  .pledge__text--right { text-align: left; }
  .pledge--flip .pledge__text { justify-self: start; }
  .pledge--flip .pledge__logo { order: 2; }
  .pledge__logo { justify-content: flex-start; }
  .pledge__logo img { width: 112px; }
  .pledge__logo--wide img { width: 188px; }
  .certs { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
}
@media (max-width: 600px) {
  .br-m { display: block; }
  .card p { max-width: 21em; }
  :root { --header-h: 74px; }
  .site-header__right { gap: 20px; }
  .hero__media .bg-video { object-position: 62% 50%; }
  .hero__title { letter-spacing: .12em; }
  .hero__title--en { letter-spacing: 0; }
  .scroll-cue { display: none; }
  .intro { padding: 0 12px; margin-bottom: -80px; }
  .stats { padding-top: calc(80px + 70px); }
  .stats__list { grid-template-columns: 1fr; }
  .stat__desc { font-size: 13.5px; }
  .daily { height: 150vh; }
  .daily__text { align-items: center; bottom: 48vh; padding-bottom: 0; }
  .daily .display { font-size: min(7.4vw, 34px); letter-spacing: .06em; }
  .lang-en .daily .display { font-size: min(8.4vw, 36px); letter-spacing: 0; }
  .daily__sub { letter-spacing: .14em; font-size: 18px; }
  .field-row { grid-template-columns: 1fr; }
  .form { border-radius: 24px; }
  .display { letter-spacing: .1em; }
  .promise .display { font-size: min(7.6vw, 40px); letter-spacing: 0; }
  .lang-en .promise .display { font-size: min(9vw, 40px); }
  .lang-en .promise .display { letter-spacing: 0; }
  .promise__sub { letter-spacing: .14em; }
  .pledges { padding: 32px 22px; }
  .whatsapp { top: -14px; width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
