/* === CNSTECH Intercoms Service Page === */
:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2230;
  --surface: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, .15);
  --accent-glow: rgba(0, 212, 255, .25);
  --radius: 10px;
  --transition: .25s ease;
  --max-w: 1140px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

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

/* ======== HEADER ======== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-img { height: 34px; width: auto; }
.nav-list {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}
.nav-list a {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .02em;
  transition: color var(--transition);
}
.nav-list a:hover { color: var(--accent); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ======== HERO ======== */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(170deg, var(--bg) 0%, #0a1628 50%, var(--bg) 100%);
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .75rem;
  border: 1px solid var(--accent-dim);
  padding: .3em .8em;
  border-radius: 20px;
}
.hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
}
.hero-desc {
  color: var(--text-muted);
  font-size: .975rem;
  margin-bottom: 1.5rem;
  max-width: 540px;
}
.hero-ctas { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: .7rem 1.5rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { background: #33dfff; color: var(--bg); box-shadow: 0 0 20px var(--accent-glow); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent-dim); color: #fff; }

/* Badges */
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.badge {
  font-size: .75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: .25em .65em;
  border-radius: 6px;
  white-space: nowrap;
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-device-img {
  position: relative;
  z-index: 2;
  max-width: 280px;
  filter: drop-shadow(0 0 40px rgba(0,212,255,.12));
}

/* Call flow composition */
.call-flow {
  display: grid;
  grid-template-columns: auto auto auto auto auto auto auto;
  align-items: center;
  gap: 0;
  margin-bottom: 1.5rem;
  width: 100%;
  justify-content: center;
}
.cf-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 600;
  text-align: center;
}
.cf-node svg { opacity: .9; }
.cf-signal-line {
  width: 50px;
  height: 2px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.cf-pulse {
  position: absolute;
  top: 0; left: -20px;
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  animation: pulseLine 2.5s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent-glow);
}
.cf-line-2 .cf-pulse { animation-delay: .8s; }

.cf-unlock-line {
  width: 50px;
  height: 2px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.cf-unlock-pulse {
  position: absolute;
  top: 0; left: -20px;
  width: 20px;
  height: 2px;
  background: #22c55e;
  border-radius: 2px;
  animation: pulseLine 2.5s ease-in-out infinite 1.6s;
  box-shadow: 0 0 8px rgba(34,197,94,.4);
}

@keyframes pulseLine {
  0% { left: -20px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* ======== TRUST STRIP ======== */
.trust-strip {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.trust-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.trust-item svg { color: var(--accent); flex-shrink: 0; }

/* ======== SOLUTIONS ======== */
.solutions { padding: 5rem 0; }
.solutions h2, .technologies h2, .process h2, .topology h2,
.security h2, .related h2, .faq h2 {
  text-align: center;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin-bottom: 2.5rem;
}
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.sol-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.sol-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,212,255,.08);
}
.sol-icon {
  color: var(--accent);
  margin-bottom: 1rem;
}
.sol-card h3 {
  font-size: 1.05rem;
  margin-bottom: .6rem;
}
.sol-card p {
  color: var(--text-muted);
  font-size: .875rem;
}

/* ======== TOPOLOGY ======== */
.topology {
  padding: 5rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, #0a1628 100%);
}
.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 680px;
  margin: -1rem auto 3rem;
  font-size: .925rem;
}
.topo-map {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}
.topo-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
}
.topo-row-bottom { margin-top: 3rem; }
.topo-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
}
.topo-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.topo-node:hover .topo-icon-wrap {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.topo-node span {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.topo-connector { display: flex; align-items: center; justify-content: center; padding: 0 .5rem; }
.topo-line-h {
  width: 60px;
  height: 2px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.topo-pulse-h {
  position: absolute;
  top: 0;
  left: -16px;
  width: 16px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  animation: pulseLine 3s ease-in-out infinite;
  box-shadow: 0 0 6px var(--accent-glow);
}
.topo-vert-connectors {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.topo-line-v {
  position: absolute;
  width: 2px;
  background: var(--border);
  overflow: hidden;
}
.topo-v1 { left: calc(10% + 28px); top: 56px; height: calc(3rem + 10px); }
.topo-v2 { left: 50%; top: 56px; height: calc(3rem + 10px); transform: translateX(-50%); }
.topo-v3 { right: calc(10% + 28px); top: 56px; height: calc(3rem + 10px); }
.topo-pulse-v {
  position: absolute;
  left: 0;
  top: -12px;
  width: 2px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
  animation: pulseLineV 3s ease-in-out infinite .5s;
  box-shadow: 0 0 6px var(--accent-glow);
}
@keyframes pulseLineV {
  0% { top: -12px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ======== TECHNOLOGIES ======== */
.technologies { padding: 5rem 0; }
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  transition: border-color var(--transition), transform var(--transition);
}
.tech-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.tech-card svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.tech-card span { font-size: .875rem; color: var(--text-muted); }

/* ======== PROCESS ======== */
.process {
  padding: 5rem 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.process-step {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color var(--transition);
}
.process-step:hover { border-color: var(--accent); }
.step-num {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: .5;
  margin-bottom: .5rem;
}
.process-step h3 {
  font-size: .95rem;
  margin-bottom: .4rem;
}
.process-step p {
  color: var(--text-muted);
  font-size: .85rem;
}

/* ======== SECURITY ======== */
.security {
  padding: 5rem 0;
}
.security-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.security-content p {
  color: var(--text-muted);
  font-size: .925rem;
  margin-bottom: 1.5rem;
}
.security-points {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.sec-point {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: var(--text-muted);
}

/* ======== RELATED ======== */
.related {
  padding: 5rem 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.related-link {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  text-align: center;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.related-link:hover {
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ======== FAQ ======== */
.faq { padding: 5rem 0; }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  background: var(--bg-card);
  overflow: hidden;
}
.faq-item summary {
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: .925rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform .3s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-answer {
  padding: 0 1.25rem 1.1rem;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.7;
}

/* ======== FINAL CTA ======== */
.final-cta {
  padding: 5rem 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, #0a1628 100%);
}
.final-cta h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin-bottom: 1rem;
}
.final-cta p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: .95rem;
}
.cta-buttons { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }

/* ======== FOOTER ======== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand img { margin-bottom: .75rem; height: 28px; width: auto; }
.footer-brand p { color: var(--text-muted); font-size: .825rem; max-width: 340px; }
.footer-title {
  font-weight: 600;
  font-size: .85rem;
  color: var(--text);
  margin-bottom: .75rem;
}
.footer-nav ul, .footer-contact ul { list-style: none; }
.footer-nav li, .footer-contact li { margin-bottom: .4rem; }
.footer-nav a, .footer-contact a {
  color: var(--text-muted);
  font-size: .825rem;
  transition: color var(--transition);
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--accent); }
.footer-contact li { color: var(--text-muted); font-size: .825rem; }

.footer-bottom {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  padding: 1rem 1.25rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: .75rem; }

/* ======== REVEAL ANIMATION ======== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ======== RESPONSIVE ======== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-content { order: 1; }
  .hero-visual { order: 0; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-badges { justify-content: center; }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .topo-row { grid-template-columns: 1fr auto 1fr auto 1fr; gap: 0; }
  .topo-line-h { width: 40px; }
}

@media (max-width: 640px) {
  .hero { padding: 3rem 0 2.5rem; }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
  }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: .75rem; }

  .solutions-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }

  .hero-device-img { max-width: 200px; }

  .call-flow {
    grid-template-columns: auto;
    grid-template-rows: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
  }
  .cf-signal-line, .cf-unlock-line { width: 30px; }

  .topo-map { overflow-x: auto; padding-bottom: 1rem; }
  .topo-row { min-width: 500px; }
  .topo-vert-connectors { min-width: 500px; }

  .security-points { flex-direction: column; align-items: center; gap: .75rem; }

  .btn { padding: .65rem 1.25rem; font-size: .85rem; width: 100%; justify-content: center; }
  .hero-ctas { flex-direction: column; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .cta-buttons .btn { max-width: 280px; }
}
