/* VIVOSUN section — brand-accented layer over the HSC dark theme.
   Accent palette scraped from vivosun.com: green #14c355 / #05da54, orange #f96715. */

.vs {
  --vs-green: #14c355;
  --vs-green-bright: #05da54;
  --vs-orange: #f96715;
  --vs-ink: #141414;
  --vs-line: rgba(20, 195, 85, 0.22);
  --vs-line-strong: rgba(20, 195, 85, 0.55);
  --vs-wash: rgba(20, 195, 85, 0.05);
  --vs-space: clamp(3rem, 2rem + 4vw, 6.5rem);
}

/* ---------- shared atoms ---------- */
.vs-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vs-green);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vs-eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: var(--vs-green);
  flex: none;
}

.vs-h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.vs-lede {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 62ch;
  margin: 0;
}

.vs-logo {
  align-self: flex-start;   /* flex-column parents stretch <img> without this */
  width: 232px;
  max-width: 60vw;
  height: auto;
  display: block;
}

.vs-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--vs-line);
  background: var(--vs-wash);
  color: var(--vs-green);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.vs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition),
              background-color var(--transition), border-color var(--transition), color var(--transition);
}
.vs-btn svg { width: 16px; height: 16px; flex: none; }
.vs-btn-primary { background: var(--vs-green); color: #04240f; box-shadow: 0 8px 26px rgba(20, 195, 85, 0.28); }
.vs-btn-primary:hover { background: var(--vs-green-bright); transform: translateY(-2px); box-shadow: 0 12px 34px rgba(20, 195, 85, 0.4); }
.vs-btn-ghost { border-color: var(--border-light); color: var(--text-primary); background: transparent; }
.vs-btn-ghost:hover { border-color: var(--vs-line-strong); color: var(--vs-green); transform: translateY(-2px); }
.vs-btn:focus-visible { outline: 2px solid var(--vs-green-bright); outline-offset: 3px; }

/* ---------- hero ---------- */
.vs-hero {
  position: relative;
  overflow: hidden;
  padding: 176px 0 var(--vs-space);
  border-bottom: 1px solid var(--border);
}
.vs-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -12%;
  width: 780px;
  height: 780px;
  background: radial-gradient(circle, rgba(20, 195, 85, 0.16) 0%, rgba(20, 195, 85, 0) 68%);
  pointer-events: none;
}
.vs-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 78% 62% at 50% 32%, #000 30%, transparent 100%);
  pointer-events: none;
}
.vs-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.vs-hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.vs-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.9rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 26px 0 18px;
  color: var(--text-primary);
}
.vs-hero h1 em { font-style: normal; color: var(--vs-green); }
.vs-hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.vs-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  width: 100%;
}
.vs-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--vs-green);
  line-height: 1;
}
.vs-stat span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* hero collage — the three smart boxes orbit a shared center, so none of them
   sits hidden behind another. Each is 120deg out of phase via a negative delay
   on one shared keyframe. Transform/opacity only, so it stays on the compositor. */
.vs-hero-art {
  position: relative;
  min-height: 420px;
  --vs-orbit-r: clamp(72px, 11vw, 132px);
  --vs-orbit-size: clamp(116px, 16vw, 184px);
}
.vs-hero-art img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--vs-orbit-size);
  height: auto;
  aspect-ratio: 1;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: #fff;
  object-fit: contain;
  box-shadow: var(--shadow-lg);
  transform-origin: 50% 50%;
  will-change: transform;
  animation: vs-orbit 26s linear infinite;
  animation-delay: var(--vs-delay, 0s);
}
.vs-hero-art .a1 { --vs-angle: 0deg;   --vs-delay: 0s; }
.vs-hero-art .a2 { --vs-angle: 120deg; --vs-delay: -8.667s; }
.vs-hero-art .a3 { --vs-angle: 240deg; --vs-delay: -17.334s; }

/* hold the carousel so a product can actually be looked at */
.vs-hero-art:hover img,
.vs-hero-art:focus-within img { animation-play-state: paused; }

/* Rotation is clockwise with +Y down, so 25% is the near/bottom point and
   75% the far/top one — scale and stacking follow that depth. */
@keyframes vs-orbit {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) translateX(var(--vs-orbit-r)) rotate(0deg) scale(1);
    z-index: 2; opacity: 0.96;
  }
  25% {
    transform: translate(-50%, -50%) rotate(90deg) translateX(var(--vs-orbit-r)) rotate(-90deg) scale(1.14);
    z-index: 3; opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) rotate(180deg) translateX(var(--vs-orbit-r)) rotate(-180deg) scale(1);
    z-index: 2; opacity: 0.96;
  }
  75% {
    transform: translate(-50%, -50%) rotate(270deg) translateX(var(--vs-orbit-r)) rotate(-270deg) scale(0.84);
    z-index: 1; opacity: 0.82;
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg) translateX(var(--vs-orbit-r)) rotate(-360deg) scale(1);
    z-index: 2; opacity: 0.96;
  }
}

/* ---------- V-Series showcase ---------- */
.vs-section { padding: var(--vs-space) 0; }
/* The site navbar is fixed and ~141px tall at desktop — clear it explicitly.
   Must come after .vs-section, which otherwise resets padding-top. */
.vs-page-top { padding-top: 176px; }
.vs-section-head { max-width: 68ch; margin-bottom: 44px; }

.vs-series { display: grid; gap: 22px; }
.vs-series-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1.5rem, 1rem + 2.4vw, 3.2rem);
  align-items: center;
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.6rem);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: linear-gradient(140deg, rgba(20, 195, 85, 0.055) 0%, rgba(20, 20, 20, 0.6) 46%);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.vs-series-card:hover { border-color: var(--vs-line-strong); transform: translateY(-3px); }
.vs-series-card:nth-child(even) { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
.vs-series-card:nth-child(even) .vs-series-media { order: -1; }

.vs-series-media {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.vs-series-media img { width: 100%; max-height: 330px; object-fit: contain; display: block; }

.vs-series-tag {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 1.4rem + 1.7vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 6px;
  line-height: 1;
}
.vs-series-tag b { color: var(--vs-green); font-weight: 800; }
.vs-series-role {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vs-orange);
  font-weight: 700;
  margin: 0 0 16px;
}
.vs-series-desc { font-size: 14.5px; line-height: 1.75; color: var(--text-secondary); margin: 0 0 20px; }
.vs-series-points { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 11px; }
.vs-series-points li {
  position: relative;
  padding-left: 26px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.vs-series-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 13px;
  height: 8px;
  border-left: 2px solid var(--vs-green);
  border-bottom: 2px solid var(--vs-green);
  transform: rotate(-45deg);
}
.vs-series-points li strong { color: var(--text-primary); font-weight: 600; }
.vs-series-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- category grid ---------- */
.vs-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.vs-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.vs-cat:hover { transform: translateY(-4px); border-color: var(--vs-line-strong); box-shadow: 0 14px 40px rgba(20, 195, 85, 0.14); }
.vs-cat:focus-visible { outline: 2px solid var(--vs-green-bright); outline-offset: 3px; }
.vs-cat-img { aspect-ratio: 16 / 10; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vs-cat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.vs-cat:hover .vs-cat-img img { transform: scale(1.05); }
.vs-cat-img.is-empty { background: linear-gradient(140deg, rgba(20, 195, 85, 0.12), rgba(20, 20, 20, 0.9)); }
.vs-cat-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.vs-cat-body h3 { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 6px; }
.vs-cat-count { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--vs-green); font-weight: 600; margin: 0 0 12px; }
.vs-cat-subs { font-size: 12.5px; line-height: 1.65; color: var(--text-muted); margin: 0 0 14px; }
.vs-cat-go { margin-top: auto; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 7px; }
.vs-cat:hover .vs-cat-go { color: var(--vs-green); }
.vs-cat-go svg { width: 14px; height: 14px; transition: transform var(--transition); }
.vs-cat:hover .vs-cat-go svg { transform: translateX(4px); }

/* ---------- product grid ---------- */
.vs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 18px; }
.vs-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.vs-card:hover { transform: translateY(-4px); border-color: var(--vs-line-strong); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45); }
.vs-card:focus-visible { outline: 2px solid var(--vs-green-bright); outline-offset: 3px; }
.vs-card-img { background: #fff; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: 14px; }
.vs-card-img img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform var(--transition-slow); }
.vs-card:hover .vs-card-img img { transform: scale(1.04); }
.vs-card-body { padding: 14px 15px 16px; display: flex; flex-direction: column; flex: 1; }
.vs-card-cat { font-size: 10.5px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--vs-green); font-weight: 600; margin: 0 0 7px; }
.vs-card-name {
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vs-card-sku { margin-top: auto; font-size: 11px; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- browse layout ---------- */
.vs-browse { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 34px; align-items: start; }
.vs-side {
  position: sticky;
  top: 96px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 18px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}
.vs-side h4 {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.vs-side ul { list-style: none; margin: 0; padding: 0; }
.vs-side a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}
.vs-side a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-primary); }
.vs-side a.is-active { background: var(--vs-wash); color: var(--vs-green); font-weight: 600; }
.vs-side a span { color: var(--text-muted); font-size: 11.5px; }
.vs-side .sub { margin: 2px 0 8px 10px; padding-left: 10px; border-left: 1px solid var(--border-light); }
.vs-side .sub a { font-size: 12.5px; padding: 6px 9px; }

.vs-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 18px; }
.vs-crumbs a { color: var(--text-secondary); text-decoration: none; }
.vs-crumbs a:hover { color: var(--vs-green); }

.vs-chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 28px; }
.vs-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background-color var(--transition);
}
.vs-chip:hover, .vs-chip.is-active { border-color: var(--vs-line-strong); color: var(--vs-green); background: var(--vs-wash); }

/* ---------- product detail ---------- */
.vs-pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.8rem, 1rem + 3vw, 3.6rem); align-items: start; }
.vs-gallery-main {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  overflow: hidden;
}
.vs-gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vs-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.vs-thumb {
  width: 74px;
  height: 74px;
  border-radius: 9px;
  border: 1px solid var(--border-light);
  background: #fff;
  padding: 6px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}
.vs-thumb img { width: 100%; height: 100%; object-fit: contain; }
.vs-thumb:hover { transform: translateY(-2px); }
.vs-thumb.is-active { border-color: var(--vs-green); box-shadow: 0 0 0 1px var(--vs-green); }
.vs-thumb:focus-visible { outline: 2px solid var(--vs-green-bright); outline-offset: 2px; }

.vs-pd h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 14px;
}
.vs-pd-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.vs-pd-desc { font-size: 14.5px; line-height: 1.8; color: var(--text-secondary); margin: 0 0 26px; }

.vs-feature { border-top: 1px solid var(--border); padding: 18px 0; }
.vs-feature h4 { font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: var(--vs-green); margin: 0 0 7px; }
.vs-feature p { font-size: 13.5px; line-height: 1.72; color: var(--text-secondary); margin: 0; }

.vs-specs { width: 100%; border-collapse: collapse; margin-top: 10px; }
.vs-specs th, .vs-specs td { text-align: left; padding: 11px 14px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
.vs-specs th { color: var(--text-muted); font-weight: 500; width: 42%; }
.vs-specs td { color: var(--text-primary); }
.vs-specs tr:nth-child(odd) { background: rgba(255, 255, 255, 0.015); }

.vs-docs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.vs-doc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 9px;
  border: 1px solid var(--border-light);
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}
.vs-doc:hover { border-color: var(--vs-line-strong); color: var(--vs-green); }

/* ---------- CTA band ---------- */
.vs-cta {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--vs-line);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 1.4rem + 2.6vw, 3.6rem);
  background: linear-gradient(135deg, rgba(20, 195, 85, 0.1) 0%, rgba(20, 20, 20, 0.86) 58%);
  text-align: center;
}
.vs-cta h2 { font-family: var(--font-heading); font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.1rem); font-weight: 800; color: var(--text-primary); margin: 0 0 12px; }
.vs-cta p { font-size: 14.5px; line-height: 1.7; color: var(--text-secondary); max-width: 58ch; margin: 0 auto 26px; }
.vs-cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- states ---------- */
.vs-empty { padding: 60px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }
.vs-loading { padding: 80px 20px; text-align: center; color: var(--text-muted); font-size: 13.5px; }

/* Preview badge — this section is not linked from the public nav yet.
   Pinned bottom-left so it clears the fixed navbar and the back-to-top button. */
.vs-preview-flag {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  max-width: min(420px, calc(100vw - 32px));
  background: rgba(28, 16, 6, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(249, 103, 21, 0.45);
  border-radius: 10px;
  color: #f9a76c;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 14px;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.vs-preview-flag b { color: #ffc79a; font-weight: 700; }
@media (max-width: 560px) {
  .vs-preview-flag { font-size: 11px; padding: 8px 11px; left: 10px; bottom: 10px; max-width: calc(100vw - 20px); }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .vs-browse { grid-template-columns: 1fr; }
  .vs-side { position: static; max-height: none; }
  .vs-pd { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .vs-hero-inner { grid-template-columns: 1fr; }
  /* tall enough for the orbit's full sweep incl. the 1.14x near-point scale */
  .vs-hero-art { min-height: 340px; order: -1; }
  .vs-series-card,
  .vs-series-card:nth-child(even) { grid-template-columns: 1fr; }
  .vs-series-card .vs-series-media,
  .vs-series-card:nth-child(even) .vs-series-media { order: -1; }
}
@media (max-width: 560px) {
  .vs-hero { padding-top: 104px; }
  .vs-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .vs-cats { grid-template-columns: 1fr; }
  .vs-hero-stats { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .vs-btn, .vs-cat, .vs-card, .vs-series-card, .vs-cat-img img, .vs-card-img img, .vs-thumb, .vs-cat-go svg {
    transition: none !important;
  }
  .vs-cat:hover, .vs-card:hover, .vs-series-card:hover, .vs-btn:hover { transform: none; }
  /* park the orbit at its three resting angles — still spread out, just still */
  .vs-hero-art img {
    animation: none;
    transform: translate(-50%, -50%) rotate(var(--vs-angle))
               translateX(var(--vs-orbit-r)) rotate(calc(-1 * var(--vs-angle)));
  }
}
