/* ============================================================
   ANVEIS Corporate Site — Tech Blue Theme
   Mobile-first, responsive (phone / tablet / desktop)
   ============================================================ */
:root {
  --c-navy: #0B1F3A;
  --c-navy-2: #11294d;
  --c-blue: #1457C7;
  --c-blue-600: #1565C0;
  --c-blue-700: #0f4fa3;
  --c-cyan: #00B4D8;
  --c-cyan-soft: #e6f7fc;
  --c-bg: #F4F8FD;
  --c-white: #FFFFFF;
  --c-text: #1B2733;
  --c-muted: #5B6B7B;
  --c-border: #E2E9F3;
  --c-success: #1f9d55;
  --shadow-sm: 0 2px 8px rgba(11,31,58,.06);
  --shadow-md: 0 10px 30px rgba(11,31,58,.10);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1200px;
  --header-h: 70px;
  --font: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-blue); text-decoration: none; }
a:hover { color: var(--c-blue-700); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--c-navy); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--c-muted); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section.alt { background: var(--c-white); }
.section-title { text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--c-muted); max-width: 720px; margin: 0 auto 40px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-weight: 600;
  border: 2px solid transparent; cursor: pointer; transition: .2s;
  font-size: .98rem;
}
.btn-primary { background: var(--c-blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--c-blue-700); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost { background: var(--c-cyan-soft); color: var(--c-blue-700); }
.btn-ghost:hover { background: #d4eef7; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid rgba(11,31,58,.08);
  box-shadow: 0 2px 16px rgba(11,31,58,.07);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; color: var(--c-navy); }
.brand img {
  height: 28px; width: auto; display: block;
  /* keep raster edges smooth when the 800x400 source is scaled down */
  image-rendering: auto; -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: #33465c; padding: 10px 16px; border-radius: 8px; font-weight: 500; font-size: .95rem;
  transition: color .2s ease, background .2s ease;
}
.nav a:hover, .nav a.active { color: var(--c-blue-700); background: rgba(20,87,199,.08); }
.nav a.cta {
  background: var(--c-blue); color: #fff; margin-left: 8px;
  box-shadow: 0 6px 16px rgba(20,87,199,.22);
}
.nav a.cta:hover { background: var(--c-blue-700); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: var(--c-navy); font-size: 1.6rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  height: 480px;
}
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; visibility: hidden;
}
/* The transition is enabled only after the page has painted (JS adds .is-ready),
   so the first slide shows up instantly instead of fading in from the solid fallback colour. */
.hero.is-ready .hero-slide { transition: opacity .9s ease, visibility .9s ease; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide__img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  -webkit-user-drag: none; user-select: none;
}
.hero-slide--gradient {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-blue-700) 55%, var(--c-blue) 100%);
}
/* photo slide background comes from content.json home.heroPhoto (editable in /admin/section/home) */
.hero-slide--photo {
  /* fallback shown only while the photo is still downloading — keep it a soft gradient,
     so the first frame never reads as a flat solid block */
  background: linear-gradient(135deg, var(--c-navy) 0%, #12385f 55%, #1a4a78 100%);
}
/* Text layer per slide: slide 1 shows headline + subcopy, slide 2 shows the tagline */
.hero-caption { display: none; }
.hero-caption.is-active { display: block; }
.hero .hero-tagline {
  display: block;
  margin: 0;
  font-family: var(--font);
  color: #fff; max-width: 1140px;
  font-size: 2.7rem; line-height: 1.2; font-weight: 700;
}
.hero .hero-tagline .t-light { font-weight: 300; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(11,31,58,.55), rgba(11,31,58,.78));
}
.hero--photo-active .hero-overlay {
  background: linear-gradient(180deg, rgba(11,31,58,.32), rgba(11,31,58,.60));
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background-image: radial-gradient(circle at 80% 20%, rgba(0,180,216,.35), transparent 45%),
                    radial-gradient(circle at 10% 90%, rgba(0,180,216,.25), transparent 40%);
  pointer-events: none;
}
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 22px; z-index: 3;
  display: flex; justify-content: center; gap: 12px;
}
.hero-dot {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(11,31,58,.35); color: #fff;
  font: 600 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .15s ease;
}
.hero-dot:hover { border-color: #fff; background: rgba(11,31,58,.6); }
.hero-dot:active { transform: scale(.94); }
.hero-dot.is-active {
  background: var(--c-blue); border-color: var(--c-blue); color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.25);
}
.hero-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { color: #fff; max-width: 880px; font-size: 2.7rem; }
.hero p { color: #cfe0f5; font-size: 1.15rem; max-width: 720px; }
.hero-actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Page header banner (About / Products / FAQ / Contacts) ---------- */
.page-banner { position: relative; height: 280px; color: #fff; overflow: hidden; background: linear-gradient(120deg, var(--c-navy) 0%, var(--c-blue-700) 55%, var(--c-blue) 100%); }
.page-banner-bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.page-banner-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(120deg, rgba(11,31,58,.92) 0%, rgba(15,79,163,.84) 55%, rgba(20,87,199,.74) 100%);
}
.page-banner::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: radial-gradient(circle at 86% 28%, rgba(0,180,216,.30), transparent 46%);
}
.page-banner-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.page-banner-eyebrow { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: #8fd8ee; font-weight: 700; margin-bottom: 10px; }
.page-banner h1 { color: #fff; font-size: 2.6rem; line-height: 1.12; margin: 0 0 10px; max-width: 900px; }
.page-banner p { color: #d3e2f6; font-size: 1.05rem; line-height: 1.5; max-width: 720px; margin: 0; }
/* Pure-CSS texture variant (no photo, zero text risk) — dot matrix + diagonal light beams */
.page-banner--dots {
  background:
    linear-gradient(115deg, transparent 42%, rgba(0,180,216,.07) 50%, transparent 58%),
    linear-gradient(115deg, transparent 62%, rgba(0,180,216,.05) 70%, transparent 78%),
    radial-gradient(circle at 86% 28%, rgba(0,180,216,.18), transparent 46%),
    linear-gradient(120deg, var(--c-navy) 0%, var(--c-blue-700) 55%, var(--c-blue) 100%);
}
.page-banner--dots::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.14) 1.2px, transparent 1.3px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 90%);
  mask-image: linear-gradient(120deg, transparent 30%, #000 90%);
}

/* ---------- Feature / Stats ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card .icon { width: 48px; height: 48px; border-radius: 12px; background: var(--c-cyan-soft); color: var(--c-blue); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat .value { font-size: 2.4rem; font-weight: 800; color: var(--c-blue); }
.stat .label { color: var(--c-muted); font-size: .95rem; }

/* ---------- Category cards (home) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cat-card { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); transition: .2s; }
.cat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.cat-card img { width: 100%; height: 200px; object-fit: cover; }
.cat-card .body { padding: 22px; }
.cat-card h3 { margin-bottom: 8px; }
.cat-card .desc { font-size: .95rem; min-height: 60px; }

/* ---------- Industries ---------- */
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.ind-card { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); }
.ind-card img { width: 100%; height: 220px; object-fit: cover; }
.ind-card .body { padding: 22px; }

/* ---------- About ---------- */
.about-lead { max-width: 860px; margin: 0 auto; }

/* Company intro (home) — left text / right image */
.company-intro__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.company-intro__title { font-size: 2rem; margin-bottom: 18px; }
.company-intro__body { font-size: 1.05rem; line-height: 1.7; margin-bottom: 24px; }
.company-intro__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 1252 / 1049; }
.company-intro__media img { width: 100%; height: 100%; object-fit: cover; }

/* About — Our Approach */
.approach { max-width: 860px; margin: 0 auto; }
.approach .approach-title { text-align: center; margin-bottom: 22px; font-size: 1.8rem; }
/* Opening line of the body copy — rendered as a normal paragraph,
   matching the typography of the other .approach p blocks below. */
.approach .approach-intro { margin: 0 0 18px; font-size: 1.05rem; line-height: 1.75; font-weight: 400; color: var(--c-text); }
.approach p { font-size: 1.05rem; line-height: 1.75; color: var(--c-text); margin-bottom: 18px; }

/* About — Our Commitment (light band, clearly distinct from the dark footer) */
.commitment { background: linear-gradient(180deg, #eef4fb 0%, #e2ebf7 100%); color: var(--c-text); }
.commitment .section-title, .commitment h2 { color: var(--c-navy); }
.commitment .section-sub { color: var(--c-muted); }
.commitment .commit-sub { text-align: center; color: var(--c-blue-700); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 36px; font-size: .9rem; }
.commit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.commit-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 30px 24px; text-align: center; transition: .25s; box-shadow: var(--shadow-sm); }
.commit-card:hover { transform: translateY(-5px); background: #fff; border-color: rgba(20,87,199,.35); box-shadow: var(--shadow-md); }
.commit-card .ic { width: 54px; height: 54px; border-radius: 50%; background: var(--c-cyan-soft); color: var(--c-blue); display: grid; place-items: center; font-size: 1.5rem; margin: 0 auto 16px; }
.commit-card h3 { color: var(--c-navy); font-size: 1.15rem; margin-bottom: 10px; }
.commit-card p { color: var(--c-muted); font-size: .92rem; margin: 0; }

/* ---------- Facilities (auto marquee) ---------- */
.fac-marquee { overflow: hidden; padding: 6px 0; margin: -6px 0; }
.fac-track { display: flex; gap: 22px; will-change: transform; }
.fac-card { flex: 0 0 calc((100% - 44px) / 3); border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); }
.fac-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.fac-card .body { padding: 16px 18px; text-align: center; }
.fac-card h4 { margin: 0; font-weight: 700; }

/* ---------- Products page ---------- */
.products-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.cat-nav { position: sticky; top: 90px; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.cat-nav h4 { margin: 6px 10px 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--c-muted); }
.cat-nav a { display: block; padding: 11px 12px; border-radius: 8px; color: var(--c-text); font-weight: 500; }
.cat-nav a:hover, .cat-nav a.active { background: var(--c-cyan-soft); color: var(--c-blue-700); }
.product-block { margin-bottom: 48px; scroll-margin-top: 90px; }
.product-block > h2 { border-left: 5px solid var(--c-blue); padding-left: 14px; }
.product-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 18px; }
.product-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: .2s; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.product-card .body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.product-card .code { font-size: .8rem; color: var(--c-cyan); font-weight: 700; letter-spacing: .5px; }
.product-card h3 { font-size: 1.1rem; margin: 4px 0 8px; }
.product-card .body p { font-size: .9rem; flex: 1; }

/* ---------- Product detail ---------- */
.detail-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.detail-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.detail-img img { width: 100%; }
.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { background: var(--c-cyan-soft); color: var(--c-blue-700); padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.benefit-list { list-style: none; padding: 0; margin: 0; }
.benefit-list li { padding: 8px 0 8px 28px; position: relative; color: var(--c-text); }
.benefit-list li::before { content: "✓"; position: absolute; left: 0; color: var(--c-success); font-weight: 800; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm); margin-bottom: 14px; overflow: hidden; }
.faq-q { padding: 18px 22px; font-weight: 600; color: var(--c-navy); cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-q .chev { transition: .2s; color: var(--c-blue); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { padding: 0 22px; max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-a { max-height: 400px; padding-bottom: 18px; }
.faq-a p { margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info { background: var(--c-navy); color: #fff; border-radius: var(--radius); padding: 34px; }
.contact-info h3 { color: #fff; }
.contact-info .row { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.contact-info .row .ic { color: var(--c-cyan); font-size: 1.3rem; }
.contact-info .row a { color: #cfe0f5; }
.contact-form { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--c-text);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(20,87,199,.12); }
.alert { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .92rem; }
.alert-success { background: #e8f7ee; color: #1f7a47; border: 1px solid #b7e6c9; }
.alert-info { background: var(--c-cyan-soft); color: var(--c-blue-700); border: 1px solid #b9e2f0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-navy); color: #b8c8e0; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid a { color: #b8c8e0; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-brand img { height: 28px; width: auto; margin-bottom: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 30px; padding-top: 18px; text-align: center; font-size: .85rem; color: #7e92b3; }

/* breadcrumb */
.breadcrumb { background: var(--c-white); border-bottom: 1px solid var(--c-border); padding: 14px 0; font-size: .9rem; color: var(--c-muted); }
.breadcrumb a { color: var(--c-blue); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .feature-grid, .cat-grid, .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .company-intro__grid { grid-template-columns: 1fr; gap: 28px; }
  .commit-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .fac-card { flex-basis: calc((100% - 22px) / 2); }
  .products-layout { grid-template-columns: 1fr; }
  .cat-nav { position: static; display: flex; flex-wrap: wrap; gap: 8px; }
  .cat-nav h4 { width: 100%; }
  .cat-nav a { display: inline-block; }
  .product-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  :root { --header-h: 60px; }
  h1 { font-size: 1.9rem; } h2 { font-size: 1.5rem; }
  /* hero grows with its text on phones so the copy never collides with the 1/2 dots */
  .hero { height: auto; min-height: 448px; display: flex; flex-direction: column; justify-content: center; padding: 36px 0 86px; }
  .hero h1 { font-size: 1.85rem; }
  .hero .hero-caption p { font-size: .95rem; line-height: 1.55; }
  .hero .hero-tagline { font-size: 1.5rem; max-width: 100%; }
  .page-banner { height: 200px; }
  .page-banner h1 { font-size: 1.8rem; }
  .page-banner p { font-size: .92rem; }
  .page-banner-eyebrow { font-size: .7rem; letter-spacing: .16em; margin-bottom: 6px; }
  .fac-card { flex-basis: 82%; }
  .fac-card img { height: 180px; }
  .section { padding: 44px 0; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; background: #ffffff; border-bottom: 1px solid rgba(11,31,58,.08); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; max-height: 0; overflow: hidden; transition: max-height .25s ease; box-shadow: var(--shadow-md); }
  .nav.open { max-height: 380px; }
  .nav a { padding: 13px 20px; border-radius: 0; color: #33465c; }
  .nav a:hover, .nav a.active { background: rgba(20,87,199,.08); color: var(--c-blue-700); }
  .nav a.cta { margin: 8px 16px; border-radius: 8px; }
  .nav-toggle { display: block; }
  .brand img { height: 22px; }
  .feature-grid, .cat-grid, .ind-grid, .fac-grid, .stat-grid, .footer-grid, .company-intro__grid, .commit-grid { grid-template-columns: 1fr; }
  .brand .brand-sub { display: none; }
}
