/* Tsuen Hing — Industrial floor systems design system */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&family=Noto+Serif+TC:wght@600;700&family=Barlow+Condensed:wght@500;600;700&display=swap');

:root {
  --ink: #1a1c1e;
  --ink-soft: #2e3236;
  --slate: #4a5259;
  --concrete: #8b9198;
  --mist: #c5c9ce;
  --fog: #e6e8ea;
  --paper: #f3f4f5;
  --white: #fafbfc;
  --accent: #b85c38;
  --accent-hover: #9a4a2c;
  --steel: #3d5a6c;
  --line: rgba(26, 28, 30, 0.12);
  --shadow: 0 18px 48px rgba(26, 28, 30, 0.12);
  --radius: 2px;
  --font-display: 'Noto Serif TC', 'Songti TC', serif;
  --font-ui: 'Noto Sans TC', 'PingFang TC', sans-serif;
  --font-condensed: 'Barlow Condensed', 'Noto Sans TC', sans-serif;
  --space: clamp(1rem, 2vw, 1.5rem);
  --section: clamp(4rem, 10vw, 7rem);
  --max: 1120px;
  --header-h: 4.75rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  background:
    linear-gradient(180deg, #eef0f2 0%, var(--paper) 28%, #ebeceb 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  height: var(--header-h);
  background: rgba(250, 251, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease), background 0.2s var(--ease);
}
.site-header.is-scrolled,
.site-header.is-menu-open { box-shadow: 0 8px 24px rgba(26, 28, 30, 0.08); }
.site-header.is-menu-open {
  background: var(--white);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.brand-text strong {
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1.7vw, 1.02rem);
  font-weight: 700;
  white-space: nowrap;
}
.brand-text span {
  font-family: var(--font-condensed);
  font-size: clamp(0.62rem, 1.2vw, 0.74rem);
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--slate);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.7rem;
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-dropdown { position: relative; }
.nav-dropdown > button {
  background: none;
  border: 0;
  font: inherit;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}
.nav-dropdown:hover > button,
.nav-dropdown:focus-within > button { color: var(--ink); }
.nav-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  z-index: 20;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel { display: block; }
.nav-dropdown-panel a {
  display: block;
  padding: 0.55rem 1rem;
  white-space: nowrap;
}
.nav-dropdown-panel a::after { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-condensed);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.55);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: grid;
  align-items: center;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 18s var(--ease) infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.1); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(18, 20, 22, 0.72) 0%, rgba(18, 20, 22, 0.62) 45%, rgba(18, 20, 22, 0.78) 100%);
}
.hero-content {
  width: min(100% - 2rem, 46rem);
  margin: 0 auto;
  padding: calc(var(--header-h) + 2.5rem) 0 3.5rem;
  text-align: center;
}
.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.35rem;
  max-width: none;
  color: var(--white);
}
.hero-brand em {
  font-style: normal;
  display: block;
  font-family: var(--font-condensed);
  font-size: 0.38em;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--mist);
  margin-top: 0.55rem;
  font-weight: 600;
}
.hero-intro {
  margin: 1.35rem auto 1.75rem;
  max-width: 42rem;
  text-align: left;
}
.hero-intro p {
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  line-height: 1.75;
  color: rgba(250, 251, 252, 0.92);
  margin: 0 0 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.hero-intro p:last-child { margin-bottom: 0; }
.hero-content .btn-group { justify-content: center; }
.hero-lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 36ch;
  color: rgba(250, 251, 252, 0.9);
  margin: 1.25rem 0 1.75rem;
}

.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 3rem) 0 3rem;
  background-color: var(--ink);
  background-image:
    linear-gradient(120deg, rgba(26,28,30,0.82), rgba(61,90,108,0.55)),
    url('../img/the-mills-g05-reference-1.jpg');
  background-position: center;
  background-size: cover;
  color: var(--white);
}
.page-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.2rem);
  max-width: 20ch;
}
.page-hero p {
  color: rgba(250,251,252,0.88);
  max-width: 50ch;
  margin-bottom: 0;
}

/* Sections */
.section {
  padding: var(--section) 0;
}
.section-alt {
  background: rgba(255,255,255,0.55);
  border-block: 1px solid var(--line);
}
.section-dark {
  background: var(--ink);
  color: var(--fog);
}
.section-dark h2,
.section-dark h3 { color: var(--white); }
.section-label {
  font-family: var(--font-condensed);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.section-head {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}
.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.92);
}

.service-grid,
.project-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.service-card,
.project-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.service-card:hover,
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.service-card img {
  width: 100%;
  aspect-ratio: 16/11;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.service-card:hover img { transform: scale(1.05); }
.project-card img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--fog);
  display: block;
}
.project-card:hover img { transform: none; }
.brand-grid .service-card img {
  object-fit: contain;
  background: var(--white);
  padding: 1rem;
}
.service-card-body,
.project-card-body {
  padding: 1.1rem 1.15rem 1.25rem;
}
.service-card h3,
.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.service-card p,
.project-card p {
  color: var(--slate);
  font-size: 0.95rem;
  margin: 0;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.85rem;
}
.steps li {
  position: relative;
  padding: 1rem 1rem 1rem 4rem;
  background: var(--white);
  border: 1px solid var(--line);
  margin: 0;
}
.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
}

.prose {
  max-width: 68ch;
}
.prose .seo-boost {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.feature-list li {
  padding-left: 1.4rem;
  position: relative;
  margin: 0;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
}
.contact-details {
  display: grid;
  gap: 1.25rem;
}
.contact-item h3 {
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.contact-item a { color: inherit; text-decoration: none; }
.contact-item a:hover { color: var(--accent); }

.form {
  display: grid;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.5rem;
}
.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.form input,
.form textarea,
.form select {
  font: inherit;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: 2px solid var(--steel);
  outline-offset: 1px;
}
.form-note {
  font-size: 0.85rem;
  color: var(--slate);
  margin: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.video-card {
  background: var(--white);
  border: 1px solid var(--line);
}
.video-card video {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--ink);
  object-fit: cover;
}
.video-card h3 {
  font-size: 1.05rem;
  padding: 1rem 1.1rem 1.15rem;
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--white);
}
.projects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.projects-table th,
.projects-table td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.projects-table th {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-condensed);
  letter-spacing: 0.04em;
  font-weight: 600;
  white-space: nowrap;
}
.projects-table tr:nth-child(even) td { background: rgba(230,232,234,0.35); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 14, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 200;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 90;
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 28px rgba(18, 20, 22, 0.28);
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.whatsapp-float:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 32px rgba(18, 20, 22, 0.34);
}
.whatsapp-float:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
body.nav-open .whatsapp-float { visibility: hidden; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--mist);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.site-footer h2,
.site-footer h3 {
  color: var(--white);
  font-size: 1.1rem;
}
.site-footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Utilities */
.muted { color: var(--slate); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }

@media (max-width: 960px) {
  .split,
  .contact-grid,
  .footer-grid,
  .service-grid,
  .project-grid,
  .card-grid,
  .video-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 122;
  }
  .site-nav {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    z-index: 110;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border: 0;
    padding: calc(var(--header-h) + 0.75rem) 1.25rem 2.5rem;
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav.is-open { display: flex; }
  .nav-dropdown-panel {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    background: var(--paper);
    margin: 0.25rem 0 0.5rem;
  }
  .nav-dropdown.is-open .nav-dropdown-panel { display: block; }
  .nav-dropdown > button {
    width: 100%;
    text-align: left;
  }
  .site-nav a,
  .nav-dropdown > button {
    padding: 0.85rem 0.7rem;
  }
  body.nav-open {
    overflow: hidden;
    height: 100dvh;
  }
  .split,
  .contact-grid,
  .footer-grid,
  .service-grid,
  .project-grid,
  .card-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }
  .hero { min-height: min(90vh, 760px); align-items: end; }
  .hero-content { text-align: left; padding-bottom: 2.5rem; }
  .hero-content .btn-group { justify-content: flex-start; }
  .brand-text strong,
  .brand-text span {
    white-space: normal;
  }
  .brand-text span {
    max-width: 14rem;
    line-height: 1.2;
  }
  .whatsapp-float {
    right: 0.9rem;
    bottom: 0.9rem;
    width: 3.25rem;
    height: 3.25rem;
  }
}
