/* =========================================================
   采瑩消防設備工程有限公司 — Cai-Ying Fire Safety
   Professional Engineering Theme
   ========================================================= */

:root {
  --red: #C8102E;
  --red-dark: #9B0F1C;
  --red-light: #FDECEE;
  --ink: #1F2937;
  --ink-2: #374151;
  --muted: #6B7280;
  --line: #E5E7EB;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-dark: #0F172A;
  --amber: #F59E0B;
  --green: #10B981;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  --shadow-md: 0 4px 6px -2px rgba(15,23,42,.05), 0 10px 20px -5px rgba(15,23,42,.10);
  --shadow-lg: 0 10px 30px -10px rgba(15,23,42,.25);
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1200px;
  --header-h: 88px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; transition: color .2s; }
a:hover { color: var(--red-dark); }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 64px; width: auto; }
.logo-text { display: none; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  transition: all .2s;
}
.nav a:hover { background: var(--red-light); color: var(--red); }
.nav a.active { color: var(--red); }

.header-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(200,16,46,.35);
}
.header-cta:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: #0B1220;
  color: #fff;
  min-height: 720px;
  padding: 128px 0 132px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: .98;
}
.hero::before {
  content:""; position:absolute; inset:0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(6, 10, 20, .72) 0%, rgba(9, 16, 31, .42) 38%, rgba(9, 16, 31, .06) 100%),
    linear-gradient(180deg, rgba(6, 10, 20, .08) 0%, rgba(6, 10, 20, .38) 100%);
  pointer-events:none;
}
.hero::after {
  content:""; position:absolute; inset:0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events:none; opacity:.28;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 760px);
  gap: 56px; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(225,29,42,.18);
  border: 1px solid rgba(225,29,42,.45);
  color: #FECACA;
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .5px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
  font-weight: 900;
  margin: 0 0 20px;
  letter-spacing: -.5px;
}
.hero h1 .accent { color: #FF6B73; }
.hero p.lead {
  font-size: 18px;
  color: rgba(255,255,255,.85);
  margin: 0 0 32px;
  max-width: 560px;
}
.hero-stats {
  display: flex; gap: 32px; margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 24px;
}
.hero-stat .n {
  font-size: 32px; font-weight: 900;
  color: #FF6B73; line-height: 1;
}
.hero-stat .l { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 6px; }

.hero-image {
  display: none;
}
.hero-image .placeholder { height: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  transition: all .2s;
  cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 20px rgba(200,16,46,.4); }
.btn-primary:hover { background: var(--red-dark); color:#fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn-ghost { background: transparent; color: var(--red); border-color: var(--red); }
.btn-ghost:hover { background: var(--red); color: #fff; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Section ---------- */
section { padding: 96px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section-eyebrow {
  display: inline-block;
  color: var(--red);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  margin: 0 0 16px;
  letter-spacing: -.5px;
}
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-dark .section-head h2 { color: #fff; }
.section-dark .section-head p { color: rgba(255,255,255,.75); }

/* ---------- Service Cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all .25s;
  position: relative; overflow: hidden;
}
.service-card::after {
  content:""; position: absolute; top:0; left:0;
  width: 4px; height: 100%; background: var(--red);
  transform: scaleY(0); transform-origin: top;
  transition: transform .3s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-card:hover::after { transform: scaleY(1); }
.service-icon {
  width: 56px; height: 56px;
  background: var(--red-light);
  border-radius: 14px;
  display: grid; place-items: center;
  color: var(--red);
  margin-bottom: 20px;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 { margin: 0 0 10px; font-size: 19px; font-weight: 800; }
.service-card p { margin: 0; color: var(--muted); font-size: 15px; }
.service-card .more {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 16px;
  color: var(--red); font-weight: 700; font-size: 14px;
}

/* ---------- Product Grid ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-card .placeholder { aspect-ratio: 4/3; }
.product-body { padding: 18px 20px 22px; }
.product-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--red); background: var(--red-light);
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.product-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; }
.product-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Image Placeholder ----------
   Used wherever a real photo is missing.
   Renders as a dark gradient block with an icon + hint label so the
   page still looks intentional. Replace with <img> when you have photos. */
.placeholder {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, #1F2937, #0F172A);
  color: rgba(255,255,255,.45);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 8px; padding: 16px;
  text-align: center; font-size: 12px; letter-spacing: 1px;
  position: relative; overflow: hidden;
}
.placeholder::before {
  content:""; position:absolute; inset:0;
  background: radial-gradient(circle at 30% 30%, rgba(225,29,42,.25), transparent 50%);
}
.placeholder svg { width: 38px; height: 38px; opacity: .55; }
.placeholder .hint { z-index: 1; color: rgba(255,255,255,.6); }
.placeholder.light {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,.02) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, #F1F5F9, #E2E8F0);
  color: #64748B;
}
.placeholder.light::before {
  background: radial-gradient(circle at 30% 30%, rgba(225,29,42,.12), transparent 50%);
}

/* ---------- Feature Strip ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-top: -64px;
  position: relative; z-index: 2;
}
.feature {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--red-light);
  color: var(--red);
  display: grid; place-items: center; flex-shrink: 0;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature h4 { margin: 0 0 2px; font-size: 15px; font-weight: 800; }
.feature p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- About / Two Column ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.two-col .image-col { aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; }
.two-col h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 900;
  margin: 0 0 20px;
  letter-spacing: -.5px;
}
.two-col .lead { font-size: 17px; color: var(--ink-2); margin-bottom: 24px; }
.value-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.value-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; color: var(--ink-2);
}
.value-list .check {
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: var(--red); color: #fff;
  border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
}

/* ---------- Stats ---------- */
.stat-band {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  padding: 56px 0;
}
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px; text-align: center;
}
.stat-grid .n {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900; line-height: 1;
}
.stat-grid .l {
  font-size: 14px; color: rgba(255,255,255,.85);
  margin-top: 8px; letter-spacing: 1px;
}

/* ---------- Case Logo Wall ---------- */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.logo-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 16px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--ink-2);
  text-align: center;
  font-size: 15px;
  background: #fff;
  min-height: 92px;
  transition: all .2s;
}
.logo-cell:hover { background: var(--red-light); color: var(--red); }

/* ---------- Case Cards ---------- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.case-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: all .25s;
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.case-card .placeholder { aspect-ratio: 16/10; }
.case-body { padding: 22px 24px 24px; }
.case-tag {
  font-size: 12px; color: var(--red); font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px;
}
.case-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.case-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- CTA Band ---------- */
.cta-band {
  background:
    linear-gradient(135deg, rgba(15,23,42,.92), rgba(155,15,28,.92)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 12px, transparent 12px 24px);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}
.cta-band h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 16px; font-weight: 900; }
.cta-band p { font-size: 18px; color: rgba(255,255,255,.85); margin: 0 0 28px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.info-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .info-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--red-light); color: var(--red);
  border-radius: 12px; display: grid; place-items: center;
}
.info-row .info-icon svg { width: 22px; height: 22px; }
.info-row h4 { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.info-row p, .info-row a { margin: 0; font-size: 16px; color: var(--ink); font-weight: 600; }
.info-row a:hover { color: var(--red); }

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  min-height: 480px;
}
.map-wrap iframe { width: 100%; height: 100%; min-height: 480px; border: 0; display: block; }

/* ---------- Form ---------- */
.contact-form { display: grid; gap: 16px; }
.contact-form .field { display: grid; gap: 6px; }
.contact-form label { font-size: 13px; font-weight: 700; color: var(--ink-2); letter-spacing: .5px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  transition: all .2s;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-light);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Page Header (sub-pages) ---------- */
.page-header {
  background:
    linear-gradient(135deg, rgba(15,23,42,.92), rgba(31,41,55,.92)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 14px, transparent 14px 28px);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}
.page-header h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 900;
  margin: 0 0 12px;
  letter-spacing: -.5px;
}
.page-header p { font-size: 17px; color: rgba(255,255,255,.8); margin: 0; }
.crumbs {
  display: inline-flex; gap: 8px; align-items: center;
  font-size: 13px; color: rgba(255,255,255,.6);
  margin-bottom: 18px;
}
.crumbs a { color: rgba(255,255,255,.85); }
.crumbs a:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0B1220;
  color: rgba(255,255,255,.7);
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}
.site-footer h5 {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255,255,255,.7); font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-brand .logo img { height: 44px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 14px; margin: 16px 0 0; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,.5);
  flex-wrap: wrap; gap: 12px;
}

/* ---------- Floating CTA ---------- */
.float-cta {
  position: fixed; right: 20px; bottom: 24px; z-index: 50;
  display: flex; flex-direction: column; gap: 10px;
}
.float-cta a {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
  transition: all .2s;
}
.float-cta a:hover { transform: translateY(-3px) scale(1.05); }
.float-cta .phone { background: var(--red); }
.float-cta .line { background: #06C755; }
.float-cta .mail { background: var(--ink); }
.float-cta a svg { width: 24px; height: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open {
    display: flex;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    gap: 0;
  }
  .nav.open a { padding: 14px 16px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav.open a:last-child { border-bottom: 0; }

  .hero { padding: 64px 0 96px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-image { aspect-ratio: 16/12; }
  .hero-stats { gap: 20px; }

  section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .features { grid-template-columns: 1fr 1fr; margin-top: -40px; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .contact-form .row-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
  .float-cta a { width: 48px; height: 48px; }
  .float-cta a svg { width: 22px; height: 22px; }
}
