/* ============================================
   CLARIOPTICS — Machine Vision Lens Manufacturer
   Shared stylesheet (placeholder brand)
   ============================================ */

:root {
  --navy: #0a2540;
  --navy-2: #123a63;
  --ink: #1c2b3a;
  --body: #3d4f60;
  --muted: #64788c;
  --cyan: #00a8e8;
  --cyan-dark: #0084b8;
  --orange: #f57c1f;
  --bg: #f5f8fb;
  --white: #ffffff;
  --line: #dfe8f0;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 10px 30px rgba(10, 37, 64, 0.14);
  --font: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--body);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--cyan-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; font-weight: 700; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.04em;
  color: var(--navy);
}
.logo:hover { text-decoration: none; }
.logo .accent { color: var(--cyan); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}
.main-nav a:hover { color: var(--cyan-dark); text-decoration: none; }

.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

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

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: #fff; }

.btn-light {
  background: #fff;
  color: var(--navy);
}
.btn-light:hover { background: #eaf6fd; color: var(--navy); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(0, 168, 232, 0.25), transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #cfe3f5;
  padding: 90px 0 80px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(30px, 4.5vw, 48px);
  max-width: 720px;
  margin-bottom: 18px;
}
.hero h1 .hl { color: var(--cyan); }
.hero p.lead {
  font-size: 18px;
  max-width: 640px;
  margin-bottom: 30px;
  color: #b9d2e8;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  max-width: 860px;
}
.stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat .num {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
}
.stat .num span { color: var(--cyan); }
.stat .lbl { font-size: 13.5px; color: #9fbdd8; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg); }

.section-head { max-width: 720px; margin-bottom: 42px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  color: var(--cyan-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 12px; }
.section-head p { font-size: 17px; }

/* ---------- Cards / grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { font-size: 15px; margin-bottom: 14px; }

.card .icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #e5f5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card .icon-wrap svg { width: 28px; height: 28px; }

.card .more { font-weight: 700; font-size: 14.5px; }

.card.dark {
  background: linear-gradient(160deg, var(--navy), var(--navy-2));
  border-color: rgba(255,255,255,0.1);
}
.card.dark h3, .card.dark .num { color: #fff; }
.card.dark p { color: #b9d2e8; }

/* ---------- Feature list ---------- */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .f-icon {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 10px;
  background: #e5f5fd;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature .f-icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { font-size: 14.5px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
table.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 620px; }
table.spec th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  white-space: nowrap;
}
table.spec td { padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--body); }
table.spec tr:last-child td { border-bottom: none; }
table.spec tr:nth-child(even) td { background: #f7fafc; }
table.spec td.model { font-weight: 700; color: var(--navy); white-space: nowrap; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #b9d2e8;
  padding: 54px 0;
}
.page-hero h1 { color: #fff; font-size: clamp(26px, 3.5vw, 38px); margin-bottom: 10px; }
.page-hero p { max-width: 700px; font-size: 16.5px; }

.breadcrumb { font-size: 13.5px; margin-bottom: 14px; color: #8fb0cc; }
.breadcrumb a { color: var(--cyan); }

/* ---------- FAQ ---------- */
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item details summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15.5px;
}
.faq-item details summary::-webkit-details-marker { display: none; }
.faq-item details summary::after {
  content: "+";
  font-size: 20px;
  color: var(--cyan-dark);
  font-weight: 700;
}
.faq-item details[open] summary::after { content: "–"; }
.faq-item details .faq-a {
  padding: 0 20px 16px;
  font-size: 15px;
  color: var(--body);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy), var(--navy-2));
  border-radius: 16px;
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: 26px; margin-bottom: 8px; }
.cta-band p { color: #b9d2e8; max-width: 560px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: 14px; color: var(--ink); }
.form-field input, .form-field select, .form-field textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--cyan);
}
.form-field textarea { min-height: 130px; resize: vertical; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #9fbdd8; padding: 56px 0 26px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 36px; margin-bottom: 36px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: 0.04em; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; font-size: 14.5px; }
.site-footer a { color: #9fbdd8; }
.site-footer a:hover { color: var(--cyan); }
.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: #fff; margin-bottom: 14px; }
.footer-logo .accent { color: var(--cyan); }
.footer-note { font-size: 13.5px; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Article / blog ---------- */
.article { max-width: 820px; margin: 0 auto; }
.article h2 { font-size: 24px; margin: 40px 0 14px; }
.article h3 { font-size: 19px; margin: 28px 0 10px; }
.article p, .article li { font-size: 16px; margin-bottom: 12px; }
.article ul, .article ol { padding-left: 24px; margin-bottom: 16px; }
.article .formula {
  background: #eef6fb;
  border-left: 4px solid var(--cyan);
  padding: 14px 20px;
  border-radius: 8px;
  font-family: "Cambria Math", Georgia, serif;
  font-size: 17px;
  color: var(--navy);
  margin: 16px 0;
}
.article-meta { font-size: 14px; color: var(--muted); margin-bottom: 26px; }

/* ---------- Misc ---------- */
.pill {
  display: inline-block;
  background: #e5f5fd;
  color: var(--cyan-dark);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  margin: 0 6px 8px 0;
}

.note {
  background: #fff8ec;
  border: 1px solid #f5dfb8;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14.5px;
  color: #7a5b1e;
  margin: 18px 0;
}

.center { text-align: center; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 34px; }
.mb-2 { margin-bottom: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
  }
  .nav-toggle span {
    width: 24px;
    height: 2.5px;
    background: var(--navy);
    border-radius: 2px;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 4px; }
  .main-nav .btn { margin-top: 10px; text-align: center; }
  .hero { padding: 60px 0 54px; }
  .section { padding: 54px 0; }
  .cta-band { padding: 34px 26px; }
}
