/* HK Envirotech — corporate site */

:root {
  --navy: #072c3d;
  --navy-deep: #051e2b;
  --ink: #12232b;
  --muted: #5a6f78;
  --teal: #1a8a7c;
  --teal-bright: #2ec4b6;
  --teal-soft: rgba(26, 138, 124, 0.12);
  --paper: #f6f3ec;
  --surface: #fffcf7;
  --line: rgba(7, 44, 61, 0.1);
  --font-display: "Noto Serif TC", "Source Serif 4", serif;
  --font-body: "Noto Sans TC", "Source Sans 3", sans-serif;
  --space: clamp(1.25rem, 4vw, 2.5rem);
  --max: 1120px;
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 1rem;
}

html[lang="zh-Hans"] {
  --font-display: "Noto Serif TC", "Source Serif 4", serif;
  --font-body: "Noto Sans SC", "Source Sans 3", sans-serif;
}

html[lang="en"] {
  --font-display: "Source Serif 4", "Noto Serif TC", serif;
  --font-body: "Source Sans 3", "Noto Sans TC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--navy);
}

p {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(246, 243, 236, 0.82);
  backdrop-filter: blur(16px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 252, 247, 0.94);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--space);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.55rem;
  background: var(--navy);
  color: var(--teal-bright);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  line-height: 1.2;
}

.logo-sub {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

html[lang="en"] .logo-sub {
  display: none;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  margin-left: auto;
  margin-right: 1rem;
}

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}

.site-nav a:hover {
  color: var(--teal);
}

.nav-cta {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff !important;
}

.nav-cta:hover {
  background: var(--teal);
}

.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 1rem;
  height: 1.5px;
  margin: 5px auto;
  background: var(--navy);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(86vh, 42rem);
  display: grid;
  align-items: center;
  background: var(--navy-deep);
  color: #eef6f5;
  overflow: hidden;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(5, 30, 43, 0.88) 0%, rgba(5, 30, 43, 0.62) 46%, rgba(5, 30, 43, 0.38) 100%);
}

.hero-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%);
}

.hero-content {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) var(--space) 5.5rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}

.eyebrow--light {
  color: var(--teal-bright);
}

.hero h1 {
  max-width: 16ch;
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}

.hero-lead {
  max-width: 44rem;
  margin-top: 1.15rem;
  font-size: 1.08rem;
  color: rgba(238, 246, 245, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--teal-bright);
  color: var(--navy-deep);
}

.btn-primary:hover {
  background: #7fe0d5;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 72px;
  fill: var(--paper);
}

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--space);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.2rem;
}

.section-head h2,
.about-layout h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
}

.section-lead,
.about-copy p {
  margin-top: 0.85rem;
  color: var(--muted);
}

.facts {
  padding-top: 0.5rem;
  padding-bottom: 0;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
}

.fact-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.55rem;
}

.fact h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.fact p:last-child {
  color: var(--muted);
  font-size: 0.95rem;
}

.about {
  background:
    linear-gradient(180deg, transparent 0%, rgba(26, 138, 124, 0.05) 100%);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.about-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(7, 44, 61, 0.12);
}

.about-figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center 42%;
}

.about-copy p + p {
  margin-top: 1rem;
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.service-media {
  overflow: hidden;
}

.service-media img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.01);
  transition: transform 0.6s var(--ease);
}

.service-card:hover .service-media img {
  transform: scale(1.05);
}

.service-body {
  padding: 1.35rem 1.4rem 1.45rem;
  border-top: 3px solid var(--teal);
}

.service-index {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--teal);
  margin-bottom: 0.7rem;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
}

.service-card p {
  color: var(--muted);
}

.contact {
  position: relative;
  isolation: isolate;
  background: var(--navy);
  color: #eef6f5;
  overflow: hidden;
}

.contact-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.contact-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.contact-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 30, 43, 0.82) 0%, rgba(5, 30, 43, 0.9) 100%);
}

.contact h2,
.contact .eyebrow {
  color: #fff;
}

.contact .eyebrow {
  color: var(--teal-bright);
}

.contact .section-lead {
  color: rgba(238, 246, 245, 0.78);
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.3rem 1.25rem;
}

.contact-card:last-child {
  grid-column: 1 / -1;
}

.contact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 0.45rem;
}

.contact-card a,
.contact-card span[data-i18n="contact.addressValue"] {
  color: #fff;
  font-weight: 500;
}

.contact-card a:hover {
  color: var(--teal-bright);
}

.site-footer {
  background: var(--navy-deep);
  color: rgba(238, 246, 245, 0.78);
  padding: 2.2rem 0 2rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--space);
}

.footer-zh {
  font-family: var(--font-display);
  color: #fff;
  font-weight: 700;
}

.footer-en {
  margin-top: 0.25rem;
  font-size: 0.88rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.1rem 0 0.9rem;
}

.footer-nav a:hover {
  color: var(--teal-bright);
}

.footer-contact a:hover {
  color: var(--teal-bright);
}

.footer-sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.footer-meta {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: rgba(238, 246, 245, 0.55);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .service-card:hover .service-media img {
    transform: none;
  }
}

@media (max-width: 860px) {
  .facts-grid,
  .about-layout,
  .service-grid,
  .contact-cards {
    grid-template-columns: 1fr;
  }

  .contact-card:last-child {
    grid-column: auto;
  }

  .about-figure {
    order: -1;
  }

  .about-figure img {
    height: 180px;
  }

  .service-media img {
    height: 120px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.6rem var(--space) 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta {
    margin-top: 0.4rem;
    text-align: center;
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  .logo-sub {
    display: none;
  }

  .hero h1 {
    max-width: none;
  }
}

:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 3px;
}
