/* =====================================================================
   CERULEAN DECORATION ENGINEERING — Design System
   蔚藍裝飾工程有限公司
   A premium, calm, editorial design language for interior design
   and custom furniture manufacturing.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces */
  --cream:        #FBF8F3;   /* page background */
  --cream-2:      #F4EEE4;   /* alternating sections */
  --beige:        #EDE5D7;   /* cards */
  --beige-deep:   #E4D8C5;   /* borders / accents */
  --paper:        #FFFFFF;

  /* Ink / accents */
  --deep-blue:    #1C2A4A;   /* primary headings / nav */
  --deep-blue-2:  #243B6B;
  --cerulean:     #2E5A8C;   /* brand link / hover */
  --purple:       #5B4B7A;   /* muted purple accent */
  --gold:         #B6985A;   /* champagne gold */
  --gold-soft:    #C9B488;
  --grey:         #6E6A63;   /* body soft */
  --grey-line:    #DFD6C7;   /* hairlines / grid lines */

  /* Text */
  --ink:          #20242C;
  --ink-soft:     #565049;
  --on-dark:      #F3EEE4;

  /* Type */
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans:  "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Spacing rhythm */
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);
  --maxw: 1240px;

  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 10px rgba(28, 42, 74, 0.05);
  --shadow-md: 0 18px 40px -22px rgba(28, 42, 74, 0.28);
  --shadow-lg: 0 40px 80px -40px rgba(28, 42, 74, 0.40);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--deep-blue);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}
.display {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 500;
}
h2.section-title {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 500;
}
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
p { margin: 0 0 1.1rem; color: var(--ink-soft); }
.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* Eyebrow label with accent rule */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
.eyebrow.center { justify-content: center; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }
.section--cream { background: var(--cream); }
.section--cream2 { background: var(--cream-2); }
.section--paper { background: var(--paper); }

/* Architectural vertical guide lines overlay — disabled */
.guides { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), background .35s var(--ease),
              color .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--deep-blue); color: var(--on-dark); box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--deep-blue-2); box-shadow: var(--shadow-lg); }
.btn--gold { background: var(--gold); color: #1d1a12; }
.btn--gold:hover { background: var(--gold-soft); }
.btn--ghost { background: transparent; color: var(--deep-blue); border-color: var(--beige-deep); }
.btn--ghost:hover { border-color: var(--deep-blue); background: rgba(28,42,74,0.04); }
.btn--light { background: var(--cream); color: var(--deep-blue); }

.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Text link with arrow */
.tlink {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; font-size: 0.95rem; color: var(--cerulean);
  position: relative; width: fit-content;
}
.tlink::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.tlink:hover::after { transform: scaleX(1); }
.tlink .arrow { transition: transform .35s var(--ease); }
.tlink:hover .arrow { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 243, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--grey-line); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: 78px;
}
.brand { display: flex; align-items: center; gap: 0.7rem; line-height: 1; }
.brand__mark { height: 46px; width: auto; flex: none; object-fit: contain; display: block; }
.brand__text { display: flex; flex-direction: column; }
.brand__zh { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--deep-blue); letter-spacing: 0.04em; }
.brand__en { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }

.nav__links { display: flex; align-items: center; gap: 1.1rem; margin-left: 1.1rem; }
.nav__links a {
  font-size: 0.85rem; font-weight: 600; color: var(--ink-soft);
  position: relative; padding: 0.3rem 0; transition: color .3s var(--ease);
  line-height: 1.15; white-space: nowrap;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav__links a:hover, .nav__links a.active { color: var(--deep-blue); }
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); }

.nav__cta { display: flex; align-items: center; gap: 0.6rem; }
.nav__cta .btn { padding: 0.7rem 1.2rem; font-size: 0.85rem; }
.lang-toggle {
  font-family: var(--sans); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em;
  color: var(--deep-blue); background: var(--paper); border: 1px solid var(--beige-deep);
  padding: 0.5rem 0.8rem; border-radius: 999px; line-height: 1;
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.lang-toggle:hover { border-color: var(--deep-blue); background: rgba(28,42,74,0.05); }
html[lang="zh-HK"] .lang-toggle { font-family: var(--serif); font-size: 0.95rem; }

.nav__toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--grey-line);
  border-radius: 12px; background: var(--paper); align-items: center; justify-content: center;
}
.nav__toggle span { position: relative; width: 20px; height: 2px; background: var(--deep-blue); transition: .3s var(--ease); }
.nav__toggle span::before, .nav__toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--deep-blue); transition: .3s var(--ease);
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
body.menu-open .nav__toggle span { background: transparent; }
body.menu-open .nav__toggle span::before { top: 0; transform: rotate(45deg); }
body.menu-open .nav__toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Footer ---------- */
.footer { background: var(--deep-blue); color: var(--on-dark); padding-block: 4.5rem 2rem; }
.footer a { color: rgba(243,238,228,0.78); transition: color .3s var(--ease); }
.footer a:hover { color: #fff; }
.footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 2.5rem;
  padding-bottom: 3rem; border-bottom: 1px solid rgba(243,238,228,0.14);
}
.footer__logo { height: 58px; width: auto; margin-bottom: 1.1rem; display: block; }
.footer__brand-zh { font-family: var(--serif); font-size: 1.4rem; color: #fff; margin-bottom: 0.3rem; }
.footer__brand-en { font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 1.2rem; }
.footer p { color: rgba(243,238,228,0.66); font-size: 0.95rem; }
.footer h4 { color: #fff; font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1.3rem; font-weight: 700; }
.footer__col ul { display: flex; flex-direction: column; gap: 0.7rem; font-size: 0.95rem; }
.footer__contact li { display: flex; gap: 0.65rem; font-size: 0.95rem; margin-bottom: 0.7rem; color: rgba(243,238,228,0.78); }
.footer__contact svg { flex: none; margin-top: 3px; color: var(--gold-soft); }
.footer__social { display: flex; gap: 0.7rem; margin-top: 1.2rem; }
.footer__social a {
  width: 40px; height: 40px; border: 1px solid rgba(243,238,228,0.22); border-radius: 50%;
  display: grid; place-items: center; transition: .3s var(--ease);
}
.footer__social a:hover { background: var(--gold); border-color: var(--gold); color: #1d1a12; }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  padding-top: 1.8rem; font-size: 0.85rem; color: rgba(243,238,228,0.55);
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero { position: relative; overflow: hidden; background: var(--cream); }
.hero__grid {
  display: grid; grid-template-columns: 0.92fr 1.35fr; gap: clamp(1.75rem, 4vw, 4rem);
  align-items: center; padding-block: clamp(3rem, 6vw, 6rem);
}

/* Service toggle */
.toggle {
  display: inline-flex; padding: 5px; background: var(--beige); border-radius: 999px;
  border: 1px solid var(--beige-deep); margin-bottom: 2rem; position: relative;
}
.toggle__btn {
  position: relative; z-index: 2; border: none; background: transparent;
  padding: 0.6rem 1.25rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.02em; color: var(--ink-soft); transition: color .4s var(--ease); white-space: nowrap;
}
.toggle__btn.active { color: var(--on-dark); }
.toggle__pill {
  position: absolute; z-index: 1; top: 5px; left: 5px; height: calc(100% - 10px);
  background: var(--deep-blue); border-radius: 999px; transition: transform .45s var(--ease), width .45s var(--ease);
  box-shadow: var(--shadow-sm);
}

.hero__eyebrow { color: var(--purple); }
.hero__eyebrow::before { background: var(--purple); }
.hero h1 { margin-bottom: 1.4rem; }
.hero h1 .accent { color: var(--gold); font-style: italic; }

/* swap-able copy blocks */
.swap { position: relative; }
.swap__mode { transition: opacity .5s var(--ease), transform .5s var(--ease); }
.swap__mode[hidden] {
  position: absolute; inset: 0; opacity: 0; transform: translateY(8px);
  pointer-events: none; display: block;
}

.hero__values { display: grid; gap: 0.7rem; margin: 1.6rem 0 2rem; }
.hero__values li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-soft); font-size: 1.02rem; }
.hero__values li svg { flex: none; margin-top: 5px; color: var(--gold); }

.hero__cta { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }

.hero__stats { display: flex; gap: 2.4rem; margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--grey-line); }
.hero__stat strong { display: block; font-family: var(--serif); font-size: 2rem; color: var(--deep-blue); line-height: 1; }
.hero__stat span { font-size: 0.82rem; color: var(--grey); letter-spacing: 0.04em; }

/* ----- Hero visual / interactive render ----- */
.stage {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); aspect-ratio: 16 / 11; background: var(--beige);
  border: 1px solid rgba(255,255,255,0.5);
  opacity: 0; transform: scale(1.04);
  animation: stageIn 1.4s var(--ease) forwards 0.15s;
}
@keyframes stageIn { to { opacity: 1; transform: scale(1); } }
.stage__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__img svg, .stage__img img { width: 100%; height: 100%; object-fit: cover; }
.stage__img--design { transition: opacity .6s var(--ease); }
.stage__img--furniture { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); }
.stage.is-furniture .stage__img--furniture { opacity: 1; }
.stage.is-furniture .stage__img--design { opacity: 0; }

/* parallax wrapper */
.stage__parallax { position: absolute; inset: -4%; transition: transform .4s var(--ease); will-change: transform; }

.stage__caption {
  position: absolute; left: 18px; bottom: 18px; z-index: 6;
  background: rgba(251,248,243,0.92); backdrop-filter: blur(6px);
  padding: 0.6rem 1rem; border-radius: 10px; font-size: 0.8rem; font-weight: 600;
  color: var(--deep-blue); box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 0.5rem;
}
.stage__caption .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* Hotspots */
.hotspot {
  position: absolute; z-index: 5; width: 40px; height: 40px;
  /* magnetic offset (--mx/--my) is eased in JS via rAF; a CSS transition on this
     percentage-based transform misbehaves in some engines, so none is set here */
  transform: translate(calc(-50% + var(--mx, 0px)), calc(-50% + var(--my, 0px)));
  border: none; background: transparent; padding: 0;
}
.hotspot[hidden] { display: none; }
/* active hotspot sits above neighbouring markers so its tooltip is never covered */
.hotspot:hover, .hotspot.open { z-index: 8; }
.hotspot__dot {
  position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(28,42,74,0.92); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(28,42,74,0.4); transition: transform .35s var(--ease), background .35s var(--ease);
}
.hotspot__dot::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid rgba(182,152,90,0.7); animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.5); opacity: 0; }
}
.hotspot:hover .hotspot__dot, .hotspot.open .hotspot__dot { transform: scale(1.14); background: var(--gold); color: #1d1a12; }
/* stop the pulsing ring from overlapping the tooltip while it is open */
.hotspot:hover .hotspot__dot::before, .hotspot.open .hotspot__dot::before { opacity: 0; animation: none; }
.hotspot__plus { width: 16px; height: 16px; }

.hotspot__tip {
  position: absolute; bottom: calc(100% + 18px); left: 50%; transform: translate(-50%, 6px);
  background: var(--paper); color: var(--deep-blue); padding: 0.55rem 0.9rem; border-radius: 10px;
  font-size: 0.82rem; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease);
  border: 1px solid var(--grey-line);
}
.hotspot__tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--paper);
}
.hotspot:hover .hotspot__tip, .hotspot.open .hotspot__tip { opacity: 1; transform: translate(-50%, 0); }
.hotspot__tip small { display: block; font-weight: 500; color: var(--grey); font-size: 0.72rem; }

/* Tooltip placement variants (keep tooltips inside the frame) */
/* below the marker — for hotspots near the top edge */
.hotspot.tip-below .hotspot__tip { top: calc(100% + 18px); bottom: auto; transform: translate(-50%, -6px); }
.hotspot.tip-below:hover .hotspot__tip, .hotspot.tip-below.open .hotspot__tip { transform: translate(-50%, 0); }
.hotspot.tip-below .hotspot__tip::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--paper); }
/* left-aligned — for hotspots near the left edge */
.hotspot.tip-start .hotspot__tip { left: 0; transform: translate(0, 6px); }
.hotspot.tip-start:hover .hotspot__tip, .hotspot.tip-start.open .hotspot__tip { transform: translate(0, 0); }
.hotspot.tip-start .hotspot__tip::after { left: 20px; }
/* right-aligned — for hotspots near the right edge */
.hotspot.tip-end .hotspot__tip { left: auto; right: 0; transform: translate(0, 6px); }
.hotspot.tip-end:hover .hotspot__tip, .hotspot.tip-end.open .hotspot__tip { transform: translate(0, 0); }
.hotspot.tip-end .hotspot__tip::after { left: auto; right: 20px; }

/* =====================================================================
   SERVICES (2 cards)
   ===================================================================== */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 2.5vw, 2rem); margin-top: 3.2rem; }
.svc-card {
  background: var(--beige); border: 1px solid var(--beige-deep); border-radius: var(--radius-lg);
  padding: clamp(2rem, 3.4vw, 3rem); position: relative; overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.svc-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.svc-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); }
.svc-card:hover::before { transform: scaleX(1); }
.svc-card__icon {
  width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;
  background: var(--cream); border: 1px solid var(--beige-deep); color: var(--gold); margin-bottom: 1.6rem;
  transition: color .4s var(--ease), background .4s var(--ease), transform .4s var(--ease);
}
.svc-card:hover .svc-card__icon { color: #1d1a12; background: var(--gold); transform: rotate(-6deg); }
.svc-card h3 { margin-bottom: 0.8rem; }
.svc-card__list { display: grid; gap: 0.75rem; margin: 1.5rem 0; }
.svc-card__list li { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.98rem; color: var(--ink-soft); }
.svc-card__list svg { flex: none; margin-top: 5px; color: var(--purple); }
.svc-card__num {
  position: absolute; top: clamp(2rem,3.4vw,3rem); right: clamp(2rem,3.4vw,3rem);
  font-family: var(--serif); font-size: 1.4rem; color: var(--beige-deep);
}

/* =====================================================================
   PROJECTS
   ===================================================================== */
.proj-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1.5rem; }
.proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 3vw, 2.4rem); margin-top: 3.4rem; }
.proj-card {
  background: var(--paper); border: 1px solid var(--grey-line); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.proj-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.proj-card__media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: var(--beige); }
.proj-card__media svg, .proj-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.proj-card:hover .proj-card__media svg { transform: scale(1.06); }
/* Ken Burns — cover photos drift in a very slow, subtle zoom (1 → ~1.06 over 8s
   each way). Hover nudges the ceiling a touch for a responsive feel. Pure scale
   (no pan) keeps the cover edge-to-edge so no gaps appear. */
.proj-card__media img { animation: kenburns 16s ease-in-out infinite alternate; }
.proj-card:hover .proj-card__media img { --kb: 1.09; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(var(--kb, 1.06)); } }
.proj-card__tag {
  position: absolute; top: 16px; left: 16px; background: rgba(251,248,243,0.94); backdrop-filter: blur(4px);
  color: var(--deep-blue); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--beige-deep);
}
.proj-card__body { padding: 1.7rem 1.8rem 1.9rem; }
.proj-card__body h3 { font-size: 1.4rem; margin-bottom: 1.2rem; }
.proj-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.proj-meta dt { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 0.25rem; }
.proj-meta dd { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--deep-blue); }

/* multi-image gallery cards */
.proj-card[data-gallery] .proj-card__media { cursor: zoom-in; }
.proj-card[data-gallery] .proj-card__media::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(28,42,74,0); transition: background .4s var(--ease);
}
.proj-card[data-gallery]:hover .proj-card__media::after { background: rgba(28,42,74,0.16); }
.proj-card__count {
  position: absolute; bottom: 14px; right: 14px; z-index: 2;
  background: rgba(28,42,74,0.85); color: #fff; backdrop-filter: blur(4px);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.4rem 0.75rem; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.45rem;
}
.proj-card__count::before {
  content: ""; width: 13px; height: 13px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='14' height='14' rx='2'/%3E%3Cpath d='M7 7h14v14H7z' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='14' height='14' rx='2'/%3E%3Cpath d='M7 7h14v14H7z' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* fullscreen lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center;
  padding: 4vw; background: rgba(18,22,30,0.93); backdrop-filter: blur(8px); }
.lightbox.open { display: flex; animation: lbFade .3s var(--ease); }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.lightbox__img { max-width: 92vw; max-height: 80vh; width: auto; height: auto; object-fit: contain;
  border-radius: 10px; box-shadow: 0 30px 90px rgba(0,0,0,0.55); }
.lightbox__count { color: rgba(255,255,255,0.82); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.28);
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.7rem; line-height: 1; display: grid; place-items: center;
  cursor: pointer; transition: background .3s var(--ease), transform .3s var(--ease); }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,0.3); }
.lightbox__nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox__close { top: clamp(14px, 4vw, 40px); right: clamp(14px, 4vw, 40px); }
.lightbox__prev { left: clamp(12px, 3vw, 36px); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: clamp(12px, 3vw, 36px); top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lightbox__close, .lightbox__nav { width: 44px; height: 44px; font-size: 1.4rem; }
  .lightbox__img { max-height: 72vh; }
}

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 4vw, 4rem); margin-top: 3rem; align-items: start; }
.contact-info h2 { margin-bottom: 1.2rem; }
.contact-list { display: grid; gap: 1.4rem; margin-top: 2.2rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-list__ic {
  width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--beige); border: 1px solid var(--beige-deep); color: var(--gold);
}
.contact-list dt { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); font-weight: 700; margin-bottom: 0.15rem; }
.contact-list dd { margin: 0; font-weight: 600; color: var(--deep-blue); font-size: 1.02rem; }

.form-card {
  background: var(--paper); border: 1px solid var(--grey-line); border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 3.4vw, 2.8rem); box-shadow: var(--shadow-md);
}
.field { margin-bottom: 1.3rem; }
.field.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; margin-bottom: 0; }
.field.row .field { margin-bottom: 1.3rem; }
label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--deep-blue); margin-bottom: 0.5rem; letter-spacing: 0.02em; }
label .req { color: var(--gold); }
.input, .textarea, .select {
  width: 100%; padding: 0.9rem 1.1rem; border: 1px solid var(--grey-line); border-radius: 12px;
  background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 1rem;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--cerulean); background: var(--paper);
  box-shadow: 0 0 0 4px rgba(46,90,140,0.1);
}
.textarea { min-height: 150px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231C2A4A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1.1rem center; padding-right: 2.6rem; }
.consent { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0.5rem 0 1.5rem; font-size: 0.88rem; color: var(--grey); }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--deep-blue); flex: none; }

/* anti-bot: invisible honeypot (bots fill it, humans never see it) */
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.form-card .btn { width: 100%; }

.form-note { font-size: 0.8rem; color: var(--grey); margin-top: 1rem; text-align: center; }

/* =====================================================================
   MAP / LOCATION
   ===================================================================== */
.map-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 4vw, 3.5rem); margin-top: 3rem; align-items: stretch; }
.map-card {
  background: var(--paper); border: 1px solid var(--grey-line); border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 3vw, 2.6rem); display: flex; flex-direction: column;
}
.map-card .contact-list { margin-top: 1.6rem; }
.map-frame {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--grey-line);
  box-shadow: var(--shadow-md); min-height: 420px; position: relative; background: var(--beige);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; position: absolute; inset: 0; }
.map-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 2rem;
  background:
    repeating-linear-gradient(45deg, rgba(28,42,74,0.03) 0 14px, transparent 14px 28px),
    var(--cream-2);
}
.map-placeholder .pin { width: 56px; height: 56px; color: var(--gold); margin: 0 auto 1rem; }
.map-placeholder strong { display: block; color: var(--deep-blue); font-family: var(--serif); font-size: 1.3rem; }
.map-placeholder small { color: var(--grey); }

/* =====================================================================
   GENERIC PAGE HERO (interior pages)
   ===================================================================== */
.page-hero { background: var(--cream-2); position: relative; overflow: hidden; padding-block: clamp(4rem, 8vw, 7rem) clamp(3rem,5vw,4.5rem); }
.page-hero__inner { max-width: 760px; }
.page-hero h1 { font-size: clamp(2.6rem, 5.5vw, 4rem); font-weight: 500; margin-bottom: 1.3rem; }
.breadcrumb { display: flex; gap: 0.5rem; align-items: center; font-size: 0.82rem; color: var(--grey); margin-bottom: 1.6rem; font-weight: 600; }
.breadcrumb a:hover { color: var(--deep-blue); }
.breadcrumb span { color: var(--gold-soft); }

/* split feature blocks (alternating) */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.feature + .feature { margin-top: clamp(3.5rem, 7vw, 6rem); }
.feature.reverse .feature__media { order: 2; }
.feature__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 5/4; background: var(--beige); }
.feature__media svg, .feature__media img { width: 100%; height: 100%; object-fit: cover; }
/* brand panel — centres the logo on a deep field instead of cropping it */
.feature__media--brand { display: grid; place-items: center; background: var(--deep-blue); }
.feature__media--brand img { width: auto; height: auto; max-width: 52%; max-height: 56%; object-fit: contain; }
.feature h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 1rem; }
.checklist { display: grid; gap: 0.8rem; margin: 1.4rem 0; }
.checklist li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-soft); }
.checklist svg { flex: none; margin-top: 5px; color: var(--gold); }

/* process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3.2rem; counter-reset: step; }
.step { padding: 1.8rem 1.6rem; background: var(--paper); border: 1px solid var(--grey-line); border-radius: var(--radius); position: relative; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.step__n { font-family: var(--serif); font-size: 2.2rem; color: var(--gold); line-height: 1; margin-bottom: 0.9rem; }
.step h4 { font-family: var(--serif); font-size: 1.25rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.92rem; margin: 0; }

/* values / why-us tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.tile { padding: 2rem 1.8rem; background: var(--beige); border: 1px solid var(--beige-deep); border-radius: var(--radius); }
.tile__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--cream); color: var(--gold); border: 1px solid var(--beige-deep); margin-bottom: 1.2rem; }
.tile h4 { font-family: var(--serif); font-size: 1.35rem; margin-bottom: 0.6rem; }
.tile p { font-size: 0.95rem; margin: 0; }

/* big CTA band */
.cta-band { background: var(--deep-blue); color: var(--on-dark); border-radius: var(--radius-lg); padding: clamp(2.6rem, 5vw, 4.5rem); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(182,152,90,0.22), transparent 55%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; margin-bottom: 1rem; }
.cta-band p { color: rgba(243,238,228,0.78); max-width: 540px; margin: 0 auto 2rem; }
.cta-band .btn-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* stats strip */
.stats-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.8rem 3.5rem; text-align: center; }
.stats-strip__item { flex: 0 1 auto; min-width: 130px; }
.stats-strip__item strong { display: block; font-family: var(--serif); font-size: clamp(2.4rem,4vw,3.4rem); color: var(--deep-blue); line-height: 1; }
.stats-strip__item span { font-size: 0.85rem; color: var(--grey); letter-spacing: 0.04em; }

/* section header center */
.sec-head { max-width: 680px; }
.sec-head.center { margin-inline: auto; text-align: center; }

/* about team */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; margin-top: 3rem; }
.team-card { text-align: center; }
.team-card__img { aspect-ratio: 3/3.4; border-radius: var(--radius-lg); overflow: hidden; background: var(--beige); margin-bottom: 1.1rem; }
.team-card h4 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 0.2rem; }
.team-card span { font-size: 0.85rem; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }

/* filter pills for projects page */
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 2.4rem; }
.filter-pill { padding: 0.55rem 1.2rem; border-radius: 999px; border: 1px solid var(--beige-deep); background: transparent; font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); transition: .3s var(--ease); }
.filter-pill.active, .filter-pill:hover { background: var(--deep-blue); color: #fff; border-color: var(--deep-blue); }

/* utility */
.text-center { text-align: center; }
.mt-lg { margin-top: 3rem; }
.center-btn { display: flex; justify-content: center; margin-top: 3.4rem; }

/* reveal on scroll — fade up; JS adds a per-item stagger via transition-delay */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- motion polish ---------- */
html { scroll-behavior: smooth; }

/* scroll-progress bar — thin gold line tracking page position */
.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 1200;
  transform: scaleX(0); transform-origin: left; pointer-events: none;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
}

/* page-transition fade — fade in on load, fade out on internal navigation */
body { animation: pageIn .5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
body.is-leaving { animation: none; opacity: 0; transition: opacity .28s var(--ease); }

/* hero copy — line-by-line entrance on first paint */
.hero__copy .toggle,
.hero__eyebrow,
.swap__mode[data-mode="design"] h1,
.swap__mode[data-mode="design"] .lead,
.hero__values li,
.hero__cta,
.hero__stats { animation: heroRise .75s var(--ease) both; }
@keyframes heroRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero__copy .toggle                  { animation-delay: .05s; }
.hero__eyebrow                       { animation-delay: .14s; }
.swap__mode[data-mode="design"] h1   { animation-delay: .24s; }
.swap__mode[data-mode="design"] .lead{ animation-delay: .36s; }
.hero__values li:nth-child(1)        { animation-delay: .46s; }
.hero__values li:nth-child(2)        { animation-delay: .54s; }
.hero__values li:nth-child(3)        { animation-delay: .62s; }
.hero__cta                           { animation-delay: .72s; }
.hero__stats                         { animation-delay: .82s; }

/* underline-grow — extend the nav/text-link treatment to footer & breadcrumb links */
.footer__col ul a, .breadcrumb a { position: relative; }
.footer__col ul a::after, .breadcrumb a::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.footer__col ul a:hover::after, .breadcrumb a:hover::after { transform: scaleX(1); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .stage { aspect-ratio: 16/12; max-height: 460px; }
  .contact-grid, .map-grid { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .tiles, .team-grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .feature { grid-template-columns: 1fr; }
  .feature.reverse .feature__media { order: 0; }
  .stats-strip { grid-template-columns: repeat(2,1fr); gap: 2rem; }
}
/* nav collapses to a hamburger earlier than the content — 8 links + logo + CTA
   need ~1.16k px on one line, so below this width we switch to the drawer menu */
@media (max-width: 1200px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed; inset: 78px 0 auto 0; flex-direction: column; gap: 0; align-items: stretch;
    background: var(--cream); padding: 1rem var(--gutter) 2rem; border-bottom: 1px solid var(--grey-line);
    transform: translateY(-120%); transition: transform .4s var(--ease); box-shadow: var(--shadow-md);
  }
  body.menu-open .nav__links { transform: translateY(0); display: flex; }
  .nav__links a { padding: 1rem 0; border-bottom: 1px solid var(--grey-line); font-size: 1.05rem; }
  .nav__links a::after { display: none; }
  .nav__links .btn { display: inline-flex; margin-top: 1.2rem; }
}
@media (max-width: 760px) {
  .svc-grid, .proj-grid { grid-template-columns: 1fr; }
  .field.row { grid-template-columns: 1fr; gap: 0; }
  .hero__stats { gap: 1.5rem; flex-wrap: wrap; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .steps, .tiles, .team-grid, .stats-strip, .footer__grid { grid-template-columns: 1fr; }
  .toggle { width: 100%; }
  .toggle__btn { flex: 1; padding: 0.6rem 0.5rem; font-size: 0.78rem; }
  .hero__cta .btn { width: 100%; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  *, *::before, *::after { animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
  .hotspot__dot::before { display: none; }
  .proj-card__media img { animation: none; }
  .scroll-progress { display: none; }
}
