/* Kaili Machinery — shared styles (Tailwind CDN handles utilities) */

:root {
  --brand: #1b2a5b;
  --brand-dark: #121d40;
  --accent: #c8102e;
  --accent-dark: #a50d26;
  --ink: #101828;
  --muted: #5b6475;
  --line: #e5e8ef;
  --soft: #f5f6f9;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, .font-display {
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.font-mono-spec {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

::selection {
  background: rgba(200, 16, 46, 0.15);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Layout */
.container-x {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .container-x { padding-inline: 2rem; }
}

/* Typography accents */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.eyebrow-light { color: #ffd7dd; }
.eyebrow-light::before { background: rgba(255, 255, 255, 0.55); }

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--brand);
}

.section-lead {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.9rem;
  padding: 0.75rem 1.35rem;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.btn svg { width: 1.05rem; height: 1.05rem; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(200, 16, 46, 0.65);
}
.btn-accent:hover { background: var(--accent-dark); }

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); }

.btn-outline {
  background: #fff;
  color: var(--brand);
  border-color: #cfd5e3;
}
.btn-outline:hover { border-color: var(--brand); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

.btn-lg { min-height: 3.25rem; padding-inline: 1.6rem; font-size: 0.95rem; }

/* Header */
#site-header {
  transition: box-shadow .25s ease, background-color .25s ease, border-color .25s ease;
}
#site-header.is-scrolled {
  box-shadow: 0 10px 30px -20px rgba(16, 24, 40, 0.45);
}

/* Transparent header over the home hero */
#site-header.header-overlay {
  position: fixed;
  inset-inline: 0;
  top: 0;
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
}
#site-header.header-overlay .header-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  background: rgba(9, 16, 38, 0.35);
  color: #cbd3e4;
}
#site-header.header-overlay .header-topbar .topbar-link {
  color: #cbd3e4;
}
#site-header.header-overlay .header-topbar .topbar-link:hover { color: #fff; }
#site-header.header-overlay .topbar-note { color: #a7b1c6; }
#site-header.header-overlay .nav-link { color: rgba(255, 255, 255, 0.88); }
#site-header.header-overlay .nav-link:hover,
#site-header.header-overlay .nav-link[aria-current="page"] { color: #fff; }
#site-header.header-overlay .brand-word { color: #fff; }
#site-header.header-overlay .brand-sub { color: rgba(255, 255, 255, 0.62); }
#site-header.header-overlay .menu-outline-btn { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
#site-header.header-overlay .menu-outline-btn:hover { border-color: #fff; }
#site-header.header-overlay .menu-outline-btn svg { color: #fff; }
#site-header.header-overlay.is-scrolled .menu-outline-btn svg { color: var(--brand); }

/* once scrolled, back to solid header */
#site-header.header-overlay.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -20px rgba(16, 24, 40, 0.45);
}
#site-header.header-overlay.is-scrolled .header-topbar {
  background: var(--soft);
  border-bottom-color: var(--line);
  color: #5b6475;
}
#site-header.header-overlay.is-scrolled .header-topbar .topbar-link { color: #5b6475; }
#site-header.header-overlay.is-scrolled .topbar-note { color: #98a1b3; }
#site-header.header-overlay.is-scrolled .nav-link { color: #33405a; }
#site-header.header-overlay.is-scrolled .nav-link:hover,
#site-header.header-overlay.is-scrolled .nav-link[aria-current="page"] { color: var(--brand); }
#site-header.header-overlay.is-scrolled .brand-word { color: var(--brand); }
#site-header.header-overlay.is-scrolled .brand-sub { color: #9aa3b4; }
#site-header.header-overlay.is-scrolled .menu-outline-btn { border-color: #cfd5e3; color: var(--brand); }

/* page content sits under the fixed header on home */
.header-overlay-offset { padding-top: 0; }
@media (min-width: 1024px) {
  #site-header.header-overlay .nav-dropdown-panel { background: #fff; }
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.15rem;
  font-size: 1rem;
  font-weight: 600;
  color: #33405a;
  transition: color .2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.15rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .22s ease;
}

.nav-link:hover, .nav-link[aria-current="page"] { color: var(--brand); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { width: 100%; }

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translate(-50%, 0.4rem);
  min-width: 26rem;
  padding: 0.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 24px 48px -24px rgba(16, 24, 40, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 60;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel,
.nav-dropdown.is-open .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav-dropdown-panel a {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0;
  font-size: 0.95rem;
  color: #3a4660;
  white-space: nowrap;
}
.nav-dropdown-panel a:hover { background: var(--soft); color: var(--brand); }
.nav-dropdown-panel span { color: #98a1b3; font-size: 0.875rem; white-space: nowrap; }

/* Language switcher (dropdown, no translation yet) */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  line-height: 1;
}
.lang-btn:hover { border-color: var(--line); background: #fff; }
.lang-flag { width: 1.25rem; height: 0.875rem; object-fit: cover; display: block; }
.lang-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 11rem;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 24px 48px -24px rgba(16, 24, 40, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.35rem);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 70;
}
.lang-switch.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: #3a4660;
  cursor: pointer;
  text-align: left;
}
.lang-option:hover { background: var(--soft); color: var(--brand); }
.lang-option.is-active { color: var(--brand); background: var(--soft); }
.lang-menu--mobile {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: 0;
  padding: 0.25rem 0.75rem 0;
  min-width: 0;
  margin-top: 0.35rem;
}
.lang-menu--mobile .lang-option { padding: 0.5rem 0.5rem; }
#site-header.header-overlay .lang-btn { color: #fff; }
#site-header.header-overlay .lang-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); }
#site-header.header-overlay.is-scrolled .lang-btn { color: var(--brand); }
#site-header.header-overlay.is-scrolled .lang-btn:hover { background: #fff; border-color: var(--line); }

/* Mobile nav */
.mobile-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.mobile-panel.is-open { max-height: 44rem; overflow-y: auto; background: #fff; }
#site-header.header-overlay .mobile-panel.is-open { background: rgba(9, 16, 38, 0.97); }
#site-header.header-overlay .mobile-panel.is-open a,
#site-header.header-overlay .mobile-panel.is-open button { color: #e7ebf3; }
#site-header.header-overlay .mobile-panel.is-open .btn-accent { color: #fff; }
#site-header.header-overlay.is-scrolled .mobile-panel.is-open { background: #fff; }
#site-header.header-overlay.is-scrolled .mobile-panel.is-open a,
#site-header.header-overlay.is-scrolled .mobile-panel.is-open button { color: #33405a; }
#site-header.header-overlay.is-scrolled .mobile-panel.is-open .btn-accent { color: #fff; }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--brand-dark);
}
.hero-slide {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s ease, visibility .7s;
}
.hero-slide.is-active {
  position: relative;
  z-index: 1;
  opacity: 1;
  visibility: visible;
}
.hero-slide-media,
.hero-slide-shade {
  position: absolute;
  inset: 0;
}
.hero-slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
}
.hero-slide-shade {
  background:
    linear-gradient(90deg, rgba(9, 16, 38, 0.92) 0%, rgba(9, 16, 38, 0.72) 48%, rgba(9, 16, 38, 0.35) 100%),
    linear-gradient(0deg, rgba(9, 16, 38, 0.55) 0%, transparent 45%);
}
.hero-slide-content { position: relative; }
.hero-grid-lines { z-index: 0; pointer-events: none; }
.hero-controls {
  position: absolute;
  z-index: 3;
  bottom: 1.75rem;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.hero-control {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  background: rgba(9,16,38,.4);
  font-size: 1.25rem;
  line-height: 1;
}
.hero-control:hover { background: var(--accent); border-color: var(--accent); }
.hero-dots { display: flex; align-items: center; gap: .5rem; }
.hero-dot {
  width: 1.75rem;
  height: .3rem;
  border: 0;
  padding: 0;
  background: rgba(255,255,255,.4);
}
.hero-dot.is-active { background: #fff; }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}
.hero-screen {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 7rem);
}

/* Trust strip marks */
.trust-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--line);
}
.trust-mark svg { width: 1.35rem; height: 1.35rem; }
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 16, 38, 0.92) 0%, rgba(9, 16, 38, 0.72) 48%, rgba(9, 16, 38, 0.35) 100%),
    linear-gradient(0deg, rgba(9, 16, 38, 0.55) 0%, transparent 45%);
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.8), transparent 78%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.8), transparent 78%);
}

.page-hero {
  position: relative;
  isolation: isolate;
  background: var(--brand-dark);
  overflow: hidden;
}
.page-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(9, 16, 38, 0.94) 0%, rgba(9, 16, 38, 0.78) 52%, rgba(9, 16, 38, 0.42) 100%);
}

/* Cards */
.card-hover {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  border-color: #c9d0e0;
  box-shadow: 0 22px 40px -28px rgba(16, 24, 40, 0.4);
}

.product-thumb {
  aspect-ratio: 4 / 3;
  background: #f2f4f8;
  overflow: hidden;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card-hover:hover .product-thumb img { transform: scale(1.035); }

/* Trust section thumbnails (About page): uniform 4:3 cells */
.trust-thumb {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f2f4f8;
}


/* Visits grid: 3 columns x 2 rows — column 1 spans both rows (portrait), columns 2-3 hold four landscape cells */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .visit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 1fr 1fr;
  }
  .visit-main { grid-row: span 2; position: relative; }
  .visit-main a { position: absolute; inset: 0; }
  .visit-grid > .visit-cell:not(.visit-main) { aspect-ratio: 4 / 3; }
}
.visit-cell {
  display: flex;
  min-width: 0;
  min-height: 0;
}
.visit-cell a {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: #f2f4f8;
  transition: box-shadow .25s ease;
}
.visit-cell a:hover { box-shadow: 0 16px 30px -22px rgba(16, 24, 40, 0.45); }
.visit-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-main {
  position: relative;
  background: #f2f4f8;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  color: var(--brand);
  opacity: 0;
  transition: opacity .2s ease;
  cursor: pointer;
  z-index: 2;
}
.gallery-nav svg { width: 1.15rem; height: 1.15rem; }
.gallery-nav:hover { background: #fff; color: var(--accent); }
.gallery-nav-prev { left: 0.75rem; }
.gallery-nav-next { right: 0.75rem; }
.product-gallery-main:hover .gallery-nav,
.gallery-nav:focus-visible { opacity: 1; }
.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery-strip-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.gallery-strip {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-strip-nav {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--brand);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.gallery-strip-nav svg { width: 1rem; height: 1rem; }
.gallery-strip-nav:hover { background: #fff; border-color: #aab3c6; color: var(--accent); }
.gallery-strip-nav[disabled] { opacity: .35; cursor: default; pointer-events: none; }
.gallery-strip-wrap.is-static .gallery-strip-nav { display: none; }
.gallery-thumb {
  flex: 0 0 auto;
  width: 5.5rem;
  aspect-ratio: 4 / 3;
  border: 2px solid transparent;
  border-radius: 0;
  overflow: hidden;
  background: #f2f4f8;
  cursor: pointer;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-active { border-color: var(--accent); }
.gallery-thumb:hover { border-color: #aab3c6; }
.gallery-thumb.is-active:hover { border-color: var(--accent); }

/* Spec table */
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.spec-table th, .spec-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.spec-table tbody tr:nth-child(odd) { background: #f8fafc; }
.spec-table th {
  width: 46%;
  font-weight: 600;
  color: #47536b;
}
.spec-table td { color: var(--ink); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

/* FAQ */
/* Home FAQ preview — clean divider accordion (kaili-machinery style) */
.faq-acc-item { border-bottom: 1px solid var(--line); }
.faq-acc-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  list-style: none;
}
.faq-acc-item summary::-webkit-details-marker { display: none; }
.faq-acc-chev {
  flex: none;
  width: 1rem;
  height: 1rem;
  color: var(--muted);
  transition: transform .2s ease;
}
.faq-acc-item[open] .faq-acc-chev {
  transform: rotate(180deg);
  color: var(--brand);
}
.faq-acc-a {
  padding: 0 1.5rem 1rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
}

/* Process band — trust-point list over faded workshop photo */
/* Process band — full-bleed photo, white wash fading left-to-right */
.process-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #F5F7FA 0%, #F5F7FA 18%, rgba(245, 247, 250, 0.82) 38%, rgba(245, 247, 250, 0.5) 60%, rgba(245, 247, 250, 0.05) 88%, rgba(245, 247, 250, 0) 100%);
}

/* Showcase tiles — photo card with dark bottom gradient (kaili-machinery style) */
.showcase-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.78) 0%, rgba(2, 6, 23, 0.22) 45%, transparent 70%);
}
.product-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.product-img-frame { display: block; }
.product-img-frame:hover img { transform: scale(1.02); }

.check-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  margin-top: 0.125rem;
  border-radius: 999px;
  background: rgba(27, 42, 91, 0.1);
  color: var(--brand);
}
.check-dot svg { width: 0.85rem; height: 0.85rem; }

.faq-item {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}
.faq-item + .faq-item { margin-top: 0.65rem; }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  position: relative;
  transition: transform .25s ease;
}
.faq-item summary .faq-icon::before,
.faq-item summary .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--accent);
  border-radius: 0;
}
.faq-item summary .faq-icon::before { left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%); }
.faq-item summary .faq-icon::after { top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); transition: opacity .2s ease, transform .2s ease; }
.faq-item[open] summary .faq-icon::after { opacity: 0; transform: translateX(-50%) scaleY(0.2); }
.faq-item[open] summary { color: var(--accent-dark); }
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: #4c586f;
  font-size: 0.93rem;
  line-height: 1.75;
}

/* FAQ page — category tabs, search, divider accordion */
.faq-tab {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.faq-tab:hover { background: #e2e8f0; color: #1e293b; }
.faq-tab.is-active { background: var(--brand); color: #fff; }
.faq-search {
  width: 100%;
  padding: 0.5rem 0.875rem 0.5rem 2.25rem;
  font-size: 0.875rem;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0;
  color: var(--ink);
}
.faq-search:focus { outline: none; border-color: var(--brand); }
.faq-row[hidden] { display: none; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  text-align: left;
  cursor: pointer;
}
.faq-q:hover .faq-q-text { color: var(--brand); }
.faq-cat {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
}
.faq-q-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  transition: color .15s ease;
}
.faq-chev {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  color: #64748b;
  transition: transform .2s ease, color .2s ease;
}
.faq-row.is-open .faq-chev { transform: rotate(180deg); color: var(--brand); }
.faq-a {
  display: none;
  max-width: 56rem;
  padding: 0 2rem 1.25rem 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #4c586f;
}
.faq-row.is-open .faq-a { display: block; }

/* Forms */
.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #3c4860;
  margin-bottom: 0.4rem;
}
.field-input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #d6dbe6;
  border-radius: 0;
  background: #fff;
  font-size: 0.9rem;
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field-input::placeholder { color: #9aa3b4; }
.field-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27, 42, 91, 0.08);
}
.field-input.has-error { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08); }
.field-error {
  display: none;
  margin-top: 0.3rem;
  font-size: 0.875rem;
  color: var(--accent);
}
.field-error.is-visible { display: block; }
textarea.field-input { min-height: 7.5rem; resize: vertical; }

/* Forms status */
.form-status {
  border-radius: 0;
  border: 1px solid #bfe5cc;
  background: #f1fbf4;
  color: #166534;
  padding: 0.9rem 1rem;
  font-size: 0.875rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8, 13, 28, 0.88);
  backdrop-filter: blur(4px);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(100%, 68rem);
  max-height: 88vh;
  object-fit: contain;
  background: #fff;
  border-radius: 0;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

/* Misc */
.stat-num { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; letter-spacing: -0.03em; }
.divider-dot { width: 3px; height: 3px; border-radius: 999px; background: #b6bdcc; }

.client-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.875rem;
  line-height: 1.35;
  color: #3f4b63;
  transition: border-color .2s ease, color .2s ease;
}
.client-chip:hover { border-color: #b9c1d2; color: var(--brand); }
.client-chip::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.65;
}

.cert-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.cert-card:hover {
  transform: translateY(-2px);
  border-color: #c5ccdb;
  box-shadow: 0 18px 32px -26px rgba(16, 24, 40, 0.45);
}
.cert-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  background: #f5f6f9;
}

.timeline-step { position: relative; }
.timeline-step::after {
  content: "";
  position: absolute;
  top: 1.45rem;
  left: 2.9rem;
  right: -1rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(27,42,91,.25), rgba(27,42,91,.05));
}
.timeline-step:last-child::after { display: none; }
@media (max-width: 1023px) { .timeline-step::after { display: none; } }

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: #0d1530;
}
.video-frame video { width: 100%; height: 100%; display: block; }
.video-poster-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(8, 13, 28, .5), rgba(8, 13, 28, .05));
}
.video-poster-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-poster-btn .play {
  position: relative;
  z-index: 2;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55);
  transition: transform .2s ease, background .2s ease;
}
.video-poster-btn:hover .play { transform: scale(1.06); background: #fff; }

/* Workshop machine video tabs */
.machine-tab {
  padding: 0.6rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.machine-tab:hover { background: #e2e8f0; color: var(--ink); }
.machine-tab.is-active { background: var(--brand); color: #fff; }
.machine-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-machine-panel][hidden] { display: none; }
[data-machine-panel] .video-frame { aspect-ratio: 16 / 9; }

.map-embed iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.15); }

/* CTA card with background photo */
.cta-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0;
  background: var(--brand-dark);
  box-shadow: 0 28px 60px -32px rgba(9, 16, 38, 0.55);
}
.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../../uploads/images/cta_bg.webp");
  background-size: cover;
  background-position: center;
}
.cta-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(9, 16, 38, 0.93) 0%, rgba(9, 16, 38, 0.78) 52%, rgba(9, 16, 38, 0.55) 100%);
}

/* Back to top */
.to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 40;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(16, 24, 40, .5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--brand-dark); }

/* Accessibility */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-aos] { opacity: 1 !important; transform: none !important; }
}
