/* Vortix Hardware Site — style baseline
   Palette/font extracted from vortixnetworks.com (research/vortix_home_style.json)
   Brand: #32b7e4 / #2b96cf · Text: #333 · Muted: #999 · Light: #f0faff / #e5f1ff */

/* Self-hosted Poppins — same OTF files as main site (vortixnetworks.com/fonts/).
   Was Google Fonts CDN: unreachable in CN network -> whole site fell back to
   system-ui, which is why overall proportions read "off" vs the Poppins-rendered
   main site (09-17 verified case). */
@font-face { font-family: Poppins; src: url("../fonts/Poppins-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Poppins; src: url("../fonts/Poppins-Medium.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Poppins; src: url("../fonts/Poppins-SemiBold.otf") format("opentype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Poppins; src: url("../fonts/Poppins-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --brand: #32b7e4;
  --brand-dark: #2b96cf;
  --brand-light: #e5f1ff;
  --brand-lighter: #f0faff;
  --text: #333;
  --muted: #999;
  --white: #fff;
  --radius: 12px;
  --header-h: 100px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: clip; /* safety net against accidental horizontal overflow */
}

a { color: var(--brand-dark); text-decoration: none; transition: color .3s var(--ease); }
a:hover { color: var(--brand); }

.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }  /* 1400 ≈ main site 1440 canvas (09-17 scale alignment) */

/* ===== Header (mirrors main site .header: white bg, 100px, image logo, four dropdowns, gradient Build Now) ===== */
.site-header {
  height: var(--header-h);
  background: var(--white);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header .container {
  width: 100%;
  max-width: 1440px;  /* main site .header-container: 1440 canvas, 112px side insets */
  padding: 0 112px;
  display: flex;
  align-items: center;
}
.logo { display: inline-flex; align-items: center; margin-right: 163px; }  /* main site .header .logo gap */
.logo img { display: block; width: 184px; height: auto; }  /* mirrors main site .header .logo 184x66 box (09-17 review: 232px appeared oversized) */
.main-nav { display: flex; align-items: center; }
.nav-item { position: relative; margin-right: 56px; }
.nav-title {
  display: flex;
  align-items: center;
  height: var(--header-h);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.nav-item:hover .nav-title, .nav-title.active { color: #2ea7da; }
.arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;  /* main site .nav-title .arrow box = 24px */
  height: 24px;
}
.arrow::before {
  content: "";
  width: 9px; height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .25s;
}
.nav-item:hover .arrow::before { transform: rotate(225deg) translateY(0); }
.dropdown {
  position: absolute;
  top: var(--header-h);
  left: 80%;
  transform: translate(-50%) translateY(10px);
  width: 216px;
  background: var(--white);
  border: 1px solid #e6edf3;  /* keeps the bar visually contained over white/light-blue sections (main site has no such line; usability fix) */
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 24px 50px rgba(91, 161, 222, .18);
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%) translateY(0);
}
.dropdown-item {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  padding-bottom: 24px;
  white-space: nowrap;
}
.dropdown-item:last-child { padding-bottom: 0; }
.dropdown-item:hover { color: #2ea7da; }
/* Build Now: main-site gradient button (88deg, #2b96cf -> #32b7e4, 131x54) */
.btn-build {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 131px;
  height: 54px;
  margin-left: 106px;  /* main site .header .right-action gap */
  background: linear-gradient(88deg, #2b96cf 0%, #32b7e4 100%);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .3s var(--ease);
}
.btn-build:hover { background: #31b4e2; color: var(--white); }
.nav-toggle {
  display: none;
  background: var(--white);
  border: 1px solid #d9edf9;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--text);
}

/* ===== Buttons (radius 12px per main site) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 32px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 16px;
  transition: background .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.btn-primary { background: linear-gradient(88deg, #2b96cf 0%, #32b7e4 100%); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); color: var(--white); box-shadow: 0 6px 18px rgba(43, 150, 207, .3); }
.btn-outline { border: 2px solid var(--brand); color: var(--brand-dark); }
.btn-outline:hover { background: var(--brand-lighter); color: var(--brand-dark); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(180deg, var(--brand-lighter) 0%, var(--white) 100%);
  min-height: calc(100vh - var(--header-h));  /* main site .home-reveal full-screen rhythm */
  display: flex;
  align-items: center;
  padding: 64px 0;
  text-align: center;
}
.hero .container { width: 100%; transform: translateY(calc(5px - 5vh)); }  /* main site anchors hero content center at ~45.5% of hero height, not dead center */
.hero h1 { font-size: 68px; font-weight: 700; line-height: 1.05; }  /* main site .container-slogan 68px / 70px line box */
.hero h1 span {
  background: linear-gradient(90deg, #2b96cf 0%, #32b7e4 100%);  /* main site slogan uses gradient text, not solid */
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero p {
  max-width: 780px;
  margin: 24px auto 44px;
  color: #666;
  font-size: 18px;
}
.hero .btn + .btn { margin-left: 16px; }

/* ===== Sections ===== */
.section { padding: 100px 0; }  /* main site section rhythm: 103px vertical padding */
.section-title { font-size: 36px; font-weight: 700; text-align: center; }  /* main site .tech-specs-title 36px */
.section-sub { text-align: center; color: var(--muted); margin: 16px 0 56px; font-size: 16px; }

/* ===== Category tiles (homepage) ===== */
.cat-tile {
  display: block;
  background: var(--brand-lighter);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 40px;
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
}
.cat-tile:hover {
  transform: translateY(-3px);
  background: var(--white);
  border-color: #d9edf9;
}
.cat-tile h3 { font-size: 24px; margin-bottom: 8px; color: var(--text); transition: color .35s var(--ease); }
.cat-tile:hover h3 { color: var(--brand-dark); }
.cat-tile p { color: #555; font-size: 16px; margin-bottom: 24px; }
.cat-go { font-weight: 600; font-size: 14px; color: var(--brand-dark); }
.cat-tile:hover .cat-go { text-decoration: underline; }

/* ===== Product line cards ===== */
/* 5 tiles: flex centered wrap, 3+2 layout so no orphan grid cell */
.line-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; align-items: stretch; }
.line-grid .cat-tile { flex: 0 1 calc(33.333% - 22px); min-width: 280px; display: flex; flex-direction: column; }
.line-grid .cat-tile p { flex: 1; }
.line-card {
  background: var(--brand-lighter);
  border-radius: var(--radius);
  padding: 40px;
}
.line-card h3 { font-size: 24px; margin-bottom: 8px; }
.line-card p { color: #555; font-size: 16px; margin-bottom: 20px; }
.line-card ul { list-style: none; }
.line-card li {
  padding: 10px 0;
  border-bottom: 1px solid #dceef9;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.line-card li:last-child { border-bottom: none; }
.line-card li a { font-weight: 500; }

/* ===== CTA band ===== */
.cta-band {
  background: var(--brand-light);
  border-radius: var(--radius);
  text-align: center;
  padding: 72px 24px;
}
.cta-band h2 { font-size: 32px; margin-bottom: 12px; }
.cta-band p { color: #555; margin-bottom: 28px; }

/* ===== Footer (mirrors main site .footer-container: #fafafa bg, 352px, 1440 canvas + 110px insets, inline-block columns, no copyright bar) ===== */
.site-footer {
  background: #fafafa;
  padding: 100px 0 0;
  height: 352px;
}
.site-footer .container { max-width: 1440px; padding: 0 110px; }
.footer-grid {
  display: flex;
}
.footer-grid > * { min-width: 0; flex-shrink: 0; }  /* no flex shrink: column positions must match main site's inline-block flow exactly */
.footer-brand { width: 289px; margin-right: 154px; }  /* main site .footer-nav rhythm */
.footer-col { margin-right: 100px; }
.footer-col:last-child { margin-right: 0; }
.footer-brand .logo { margin-right: 0; }
.footer-brand .logo img { width: 184px; height: auto; }
.footer-brand p { color: var(--muted); font-size: 16px; margin-top: 16px; }
.footer-brand a { color: var(--muted); }
.footer-brand a:hover { color: #2ea7da; }
.footer-col h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 32px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 16px; font-size: 16px; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: #2ea7da; }

/* ===== Product detail ===== */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 24px 0 0; }
.breadcrumb strong { color: var(--text); font-weight: 600; white-space: nowrap; }
.product-head { padding: 32px 24px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.product-head h1 { font-size: 36px; }
.product-head .tagline { color: var(--muted); margin: 8px 0 24px; font-size: 17px; }
.key-bullets { list-style: none; margin: 0 0 28px; }
.key-bullets li { padding: 8px 0 8px 24px; position: relative; font-size: 16px; }
.key-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.product-image {
  background: var(--brand-lighter);
  border-radius: var(--radius);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
}
.product-image img { max-width: 100%; height: auto; display: block; }

/* ===== Product grid (category pages) ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.featured-grid { grid-template-columns: repeat(4, 1fr); margin-top: 32px; }
.p-card {
  background: var(--white);
  border: 1px solid #eef2f5;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
/* whole card clickable: the title link's ::after covers the card */
.p-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.p-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(43, 150, 207, .12);
  border-color: #d9edf9;
}
.p-thumb {
  height: 200px;
  background: linear-gradient(180deg, #f7fcff, #edf7fd);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.p-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.p-body { padding: 20px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.p-body h3 { font-size: 20px; margin-bottom: 6px; }
.p-body h3 a { color: var(--text); }
.p-body h3 a:hover { color: var(--brand-dark); }
.p-spec { color: var(--muted); font-size: 14px; margin-bottom: 16px; flex: 1; }
.p-link { font-weight: 600; font-size: 14px; }
.p-card.text-only .p-body { padding-top: 28px; }

@media (max-width: 900px) {
  .product-grid, .featured-grid { grid-template-columns: 1fr; }
}
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  vertical-align: top;
}
.spec-table th { width: 220px; color: var(--muted); font-weight: 500; }
.spec-note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.download-card {
  background: var(--brand-lighter);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.download-card .doc-name { font-weight: 600; }
.download-card .doc-meta { color: var(--muted); font-size: 13px; }
.download-card .btn { white-space: nowrap; }

/* ===== Products catalog (products/index.html) ===== */
.anchor-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.anchor-chip {
  border: 1px solid #d9edf9;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
}
.anchor-chip:hover { background: var(--brand-lighter); color: var(--brand-dark); }
.catalog-title { font-size: 28px; font-weight: 700; margin-bottom: 4px; scroll-margin-top: 120px; }
.catalog-desc { color: var(--muted); font-size: 15px; margin-bottom: 24px; }

/* ===== Contact page ===== */
.contact-card {
  background: var(--brand-lighter);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  margin: 32px 0;
}
.contact-card .email-big {
  font-size: 26px;
  font-weight: 700;
  color: var(--brand-dark);
  word-break: break-all;
}
.contact-points { list-style: none; max-width: 560px; margin: 0 auto 32px; text-align: left; }
.contact-points li { padding: 10px 0 10px 28px; position: relative; font-size: 15px; }
.contact-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 18px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* ===== Motion: scroll reveal (matches main site: 40px / .8s) ===== */
/* .reveal is only added by JS — without JS all content stays visible */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero { min-height: 0; padding: 64px 0; }  /* mobile: compact hero, full-screen stays desktop-only */
  .hero .container { transform: none; }
  .hero h1 { font-size: 34px; }
  .section { padding: 64px 0; }
  .section-title { font-size: 28px; }
  .line-grid, .product-head { grid-template-columns: 1fr; }
  .footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 8px; width: auto; margin-right: 0; }  /* brand block takes a full row, then 2x2 columns */
  .footer-col { margin-right: 0; }
  .footer-col li { font-size: 15px; }  /* guard against long words like "Intelligent Software" overflowing */
  .site-footer { height: auto; padding: 64px 0 32px; }
  .site-footer .container { padding: 0 24px; }
  .site-header { height: 72px; }
  .site-header .container { padding: 0 24px; justify-content: space-between; }
  .logo { margin-right: 0; }
  .logo img { width: 170px; }

  /* mobile navigation: hamburger + accordion dropdowns (JS toggles .open) */
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 24px 16px;
    border-bottom: 1px solid #e6edf3;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .10);  /* visual separation from the hero CTA below */
  }
  .main-nav.open { display: flex; }
  .nav-item { margin-right: 0; }
  .nav-title {
    height: auto;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
    justify-content: space-between;
    font-size: 16px;
  }
  .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    width: auto;
    box-shadow: none;
    border-radius: 0;
    padding: 4px 0 8px 16px;
  }
  .nav-item.open .dropdown { display: block; transform: none; }
  /* after tap, :focus-within hits the desktop hover rule (0,3,0) and shifts the dropdown 50% off-screen — later same-specificity override */
  .nav-item:hover .dropdown, .nav-item:focus-within .dropdown { transform: none; }
  .nav-item.open .nav-title { color: #2ea7da; }
  .nav-item.open .arrow::before { transform: rotate(225deg) translateY(0); }
  .dropdown-item { padding: 10px 0; font-size: 15px; }
  .dropdown-item:last-child { padding-bottom: 10px; }
  .btn-build { width: 100%; margin: 12px 0 4px; text-align: center; }

  /* hero buttons stack cleanly */
  .hero .btn { display: block; max-width: 320px; margin: 0 auto; }
  .hero .btn + .btn { margin-left: auto; margin-top: 12px; }

  /* category tiles go full width */
  .line-grid .cat-tile { flex: 1 1 100%; min-width: 0; }

  /* spec table: narrow label column so long values fit */
  .spec-table th { width: 130px; }
  .spec-table th, .spec-table td { font-size: 13px; padding: 10px 12px; }

  /* download card: stack text above button on narrow screens */
  .download-card { flex-direction: column; align-items: flex-start; }
}
