/* Layout: full-bleed photographic bands alternating with quiet white and sand sections; one gold accent, used sparingly. */
:root {
  --ink: #1C1E22;
  --ink-2: #3C4047;
  --muted: #5B6068;
  --paper: #FFFFFF;
  --sand: #F6F2EC;
  --line: #E4DFD7;
  --gold: #C9963E;
  --gold-text: #8A6420;
  --night: #121418;
  --on-dark: #F4F2EE;
  --on-dark-muted: #C7C9CD;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
  --radius: 6px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 48px);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 480px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-text); }
.on-dark .eyebrow { color: var(--gold); }
.h2 { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 4vw, 44px); line-height: 1.12; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 62ch; }
.section { padding-block: clamp(64px, 9vw, 112px); }
.section.sand { background: var(--sand); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 44px; max-width: 720px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius);
  font: 600 15px/1.2 var(--body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: #D9A852; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #33363C; }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { border-color: var(--on-dark); background: rgba(255,255,255,.08); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 21px; }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }
.nav-links .btn { color: var(--paper); min-height: 42px; padding: 10px 18px; }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; color: var(--ink); }
@media (max-width: 920px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px));
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 14px; border-bottom: 0; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--night); color: var(--on-dark); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; animation: drift 24s ease-in-out infinite alternate; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14,16,20,.86) 0%, rgba(14,16,20,.62) 45%, rgba(14,16,20,.12) 80%),
              linear-gradient(0deg, rgba(14,16,20,.55) 0%, rgba(14,16,20,0) 40%);
}
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.1) translateX(-1.5%); } }
.hero-inner { position: relative; padding-block: clamp(80px, 12vw, 150px) clamp(64px, 9vw, 110px); display: flex; flex-direction: column; gap: 26px; max-width: 760px; }
.years { display: flex; align-items: flex-end; gap: 18px; }
.years-num { font-family: var(--display); font-weight: 600; font-size: clamp(96px, 15vw, 168px); line-height: .82; color: var(--gold); letter-spacing: -0.02em; }
.years-label { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; line-height: 1.5; padding-bottom: 6px; color: var(--on-dark); }
.hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(36px, 5.4vw, 62px); line-height: 1.06; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--on-dark-muted); }
.hero p { font-size: clamp(16px, 1.6vw, 19px); color: var(--on-dark-muted); max-width: 56ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Credentials bar */
.creds { border-bottom: 1px solid var(--line); background: var(--paper); }
.creds-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 36px; padding-block: 22px; }
.creds-list { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.creds-list span { display: inline-flex; align-items: center; gap: 8px; }
.creds-list span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.creds-logos { display: flex; align-items: center; gap: 28px; }
.creds-logos img { height: 44px; width: auto; }
.creds-logos img.hkfa { height: 38px; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-img { position: relative; }
.about-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 38% center; border-radius: var(--radius); }
.about-img figcaption { position: absolute; left: 16px; bottom: 16px; background: var(--paper); padding: 10px 14px; border-radius: 4px; font-size: 13px; font-weight: 500; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.about-text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.about-text .h2 { font-style: italic; font-weight: 500; }
.about-text p { color: var(--ink-2); font-size: 17px; }
.signoff { font-family: var(--display); font-style: italic; font-size: 20px; color: var(--ink); }
@media (max-width: 860px) { .about { grid-template-columns: minmax(0, 1fr); } .about-img img { aspect-ratio: 16 / 11; } }

/* Market cycles timeline */
.cycles { margin-top: clamp(56px, 8vw, 88px); }
.cycles-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 26px; }
.cycles-head h3 { font-family: var(--display); font-size: 24px; font-weight: 600; }
.cycles-head p { color: var(--muted); font-size: 14.5px; }
.cycles-track { overflow-x: auto; padding-bottom: 6px; }
.cycles-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); min-width: 920px; position: relative; }
.cycles-list::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--line); }
.cycles-list li { position: relative; padding: 30px 18px 0 0; display: flex; flex-direction: column; gap: 6px; }
.cycles-list li::before { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.cycles-list li.now::before { background: var(--gold); border-color: var(--gold); }
.cycle-year { font-family: var(--display); font-weight: 600; font-size: 22px; font-variant-numeric: tabular-nums; }
.cycle-title { font-weight: 600; font-size: 14.5px; }
.cycle-text { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service { background: var(--paper); padding: 30px 28px 32px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: background .25s; }
.service:hover { background: #FCFAF7; }
.service svg { width: 30px; height: 30px; color: var(--gold-text); margin-bottom: 6px; }
.service h3 { font-size: 17px; font-weight: 600; font-family: var(--body); }
.service p { font-size: 15px; color: var(--muted); }
@media (max-width: 900px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .services { grid-template-columns: minmax(0, 1fr); } }

/* Photo band */
.band { position: relative; color: var(--on-dark); background: var(--night); overflow: hidden; }
.band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,16,20,0) 30%, rgba(14,16,20,.82) 72%); }
.band.left::after { background: linear-gradient(90deg, rgba(14,16,20,.86) 0%, rgba(14,16,20,.55) 50%, rgba(14,16,20,.1) 85%); }
.band-inner { position: relative; z-index: 1; display: flex; justify-content: flex-end; padding-block: clamp(90px, 14vw, 170px); }
.band.left .band-inner { justify-content: flex-start; }
.band-copy { max-width: 470px; display: flex; flex-direction: column; gap: 18px; }
.band-copy p { color: var(--on-dark-muted); font-size: 17px; }
.countries { display: flex; flex-wrap: wrap; gap: 8px; }
.countries span { border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; }
@media (max-width: 760px) {
  .band::after, .band.left::after { background: linear-gradient(0deg, rgba(14,16,20,.9) 35%, rgba(14,16,20,.25) 100%); }
  .band-inner { padding-block: 220px 48px; }
}

/* Calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 28px; align-items: start; }
.calc-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .unit { position: absolute; right: 12px; font-size: 13px; color: var(--muted); pointer-events: none; }
input, select, textarea {
  width: 100%; font: 400 15.5px/1.4 var(--body); color: var(--ink);
  background: var(--paper); border: 1px solid #CFCAC1; border-radius: 4px; padding: 12px 14px; min-height: 48px;
}
.input-wrap input { padding-right: 52px; font-variant-numeric: tabular-nums; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(201,150,62,.28); }
textarea { min-height: 120px; resize: vertical; }
.calc-results { background: var(--ink); color: var(--on-dark); border-radius: var(--radius); padding: 30px 28px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 96px; }
.calc-results .big { display: flex; flex-direction: column; gap: 4px; }
.calc-results .big span { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); }
.calc-results .big strong { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 4vw, 44px); line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums; }
.result-rows { display: grid; gap: 0; border-top: 1px solid rgba(255,255,255,.14); }
.result-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 14.5px; }
.result-rows dt { color: var(--on-dark-muted); }
.result-rows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.result-rows dd.neg { color: #F2A38B; }
.calc-note { font-size: 12.5px; color: var(--on-dark-muted); line-height: 1.5; }
@media (max-width: 900px) { .calc { grid-template-columns: minmax(0, 1fr); } .calc-results { position: static; } }
@media (max-width: 520px) { .calc-form { grid-template-columns: minmax(0, 1fr); padding: 20px; } }

/* Testimonials */
.quotes { position: relative; max-width: 860px; }
.quote { display: none; flex-direction: column; gap: 20px; }
.quote.active { display: flex; }
.quote blockquote { margin: 0; font-family: var(--display); font-size: clamp(22px, 2.8vw, 30px); line-height: 1.35; }
.quote cite { font-style: normal; font-size: 14.5px; color: var(--muted); }
.quote cite strong { color: var(--ink); }
.quote-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 28px; }
.quote-ctrl button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.quote-ctrl button:hover { background: var(--ink); color: var(--paper); }
.quote-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 6px; }

/* Developers teaser */
.dev-teaser .band-copy { max-width: 520px; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-side { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.contact-actions { display: flex; flex-direction: column; gap: 12px; }
.contact-actions .btn { justify-content: flex-start; }
.details { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.details li { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.details svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--gold-text); }
.details a { text-decoration: none; overflow-wrap: anywhere; }
.details a:hover { text-decoration: underline; }
.form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form .full { grid-column: 1 / -1; }
.form .btn { width: 100%; }
.form-status { font-size: 14.5px; min-height: 1.4em; }
.form-status.ok { color: #1F6B45; }
.form-status.err { color: #A23B2A; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 860px) { .contact { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .form { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.site-footer { background: var(--night); color: var(--on-dark-muted); font-size: 13.5px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding-block: 56px 40px; }
.footer-inner h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark); font-weight: 600; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--on-dark); }
.footer-inner ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand .brand-name { color: var(--on-dark); }
.footer-logos { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.footer-logos span { background: var(--paper); border-radius: 4px; padding: 8px 12px; display: inline-flex; }
.footer-logos img { height: 30px; width: auto; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 20px calc(20px + env(safe-area-inset-bottom, 0px)); font-size: 12.5px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: minmax(0, 1fr); } }

/* WhatsApp float */
.wa-float {
  position: fixed; z-index: 70;
  right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%; background: #1FA855; color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(0,0,0,.25); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }

/* Developers page */
.dev-hero .hero-media img { object-position: center 40%; }
.dev-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.dev-intro p { font-size: 17px; color: var(--ink-2); }
.dev-intro .note { border-left: 2px solid var(--gold); padding-left: 18px; font-size: 15px; color: var(--muted); }
@media (max-width: 860px) { .dev-intro { grid-template-columns: minmax(0, 1fr); } }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: stage; }
.stage { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stage-num { font-family: var(--display); font-size: 15px; color: var(--gold-text); font-weight: 600; letter-spacing: .06em; }
.stage h3 { font-family: var(--display); font-size: 23px; font-weight: 600; }
.stage p { font-size: 15px; color: var(--muted); }
.stage ul { margin: 4px 0 0; padding-left: 18px; font-size: 14.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1000px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stages { grid-template-columns: minmax(0, 1fr); } }
.setup-note { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }
.setup-note p { max-width: 70ch; color: var(--ink-2); font-size: 15px; }
.setup-note strong { color: var(--ink); }
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.why img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.why-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.why-list li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.why-list strong { font-size: 16px; }
.why-list span { font-size: 14.5px; color: var(--muted); }
@media (max-width: 860px) { .why { grid-template-columns: minmax(0, 1fr); } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { display: flex; flex-direction: column; gap: 8px; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps .stage-num { font-size: 14px; }
.steps strong { font-size: 17px; }
.steps span { font-size: 15px; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Motion: content is visible at rest; only items below the first screen fade in once. */
.reveal.pending { opacity: 0; transform: translateY(18px); }
.reveal { transition: opacity .7s ease, transform .7s ease; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img { animation: none; }
  .reveal, .reveal.pending { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
