/* ==========================================================================
   Components
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--cyan);
  color: var(--void);
}
.btn-primary:hover {
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-1px);
}
.btn-outline {
  border: 1px solid var(--hairline-strong);
  color: var(--white);
}
.btn-outline:hover {
  border-color: var(--magenta);
  color: var(--magenta);
}
.nav-cta { margin-left: 0.5rem; }

/* ---------- Logo orbit ---------- */
.logo-mark { width: 36px; height: 36px; }
.logo-orbit { stroke: var(--cyan); opacity: 0.7; }
.logo-orbit--2 { stroke: var(--magenta); transform: rotate(55deg); transform-origin: 22px 22px; opacity: 0.5; }
.logo-node { fill: var(--cyan); animation: orbitSpin 6s linear infinite; transform-origin: 22px 22px; }

.logo-text {
  display: block;
  width: auto;
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
  transition: filter var(--dur-mid) var(--ease-out);
}
.logo:hover .logo-text {
  filter: drop-shadow(0 0 14px rgba(95, 224, 214, 0.45));
}

/* ---------- Hero logo mark ---------- */
.hero-logo {
  width: 100%;
  max-width: 480px;
  height: auto;
  grid-area: stack;
  z-index: 2;
  filter: drop-shadow(0 0 34px rgba(95, 224, 214, 0.22));
  animation: heroLogoFloat 7s ease-in-out infinite;
}

/* ---------- Hero schematic ---------- */
.schematic-traces path {
  fill: none;
  stroke: var(--hairline-strong);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
}
.schematic-core {
  fill: var(--panel);
  stroke: var(--cyan);
  stroke-width: 2;
  filter: drop-shadow(0 0 14px rgba(102,252,241,0.5));
}
.schematic-node circle,
.schematic-node path,
.schematic-node rect {
  fill: var(--panel);
  stroke: var(--magenta);
  stroke-width: 1.6;
}
.schematic-node:not(.schematic-node--art) circle {
  stroke: var(--cyan);
}

/* ---------- STEM/STEAM interactive toggle ---------- */
.steam-toggle {
  position: relative;
  height: 260px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.steam-panel {
  position: absolute;
  inset: 0;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.steam-panel--stem { background: var(--panel); }
.steam-panel--steam {
  background: linear-gradient(135deg, var(--panel-raised), var(--panel));
  clip-path: inset(0 0 0 50%);
}
.steam-panel-label {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--cyan);
  margin-bottom: 0.5rem;
}
.steam-panel--steam .steam-panel-label { color: var(--magenta); }
.steam-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 3px;
  background: linear-gradient(var(--cyan), var(--magenta));
  cursor: ew-resize;
  touch-action: none;
}
.steam-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--void);
  border: 1.5px solid var(--hairline-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  color: var(--white);
}

/* ---------- Tabs ---------- */
.tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 1rem;
}
.tab-btn {
  padding: 0.9rem 0.3rem;
  margin-right: 1.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: rgba(197,198,199,0.55);
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.tab-btn.is-active { color: var(--white); border-color: var(--cyan); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn var(--dur-mid) var(--ease-out); }

.check-list { display: grid; gap: 0.6rem; margin: 1.2rem 0; }
.check-list li {
  padding-left: 1.6rem;
  position: relative;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: 50%;
}

.track-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.track-card:hover {
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-glow-cyan);
}
.track-level {
  font-size: var(--fs-2xs);
  color: var(--magenta);
  font-weight: 600;
}
.track-card h4 { margin: 0.3rem 0 0.4rem; }
.track-card p { margin: 0; font-size: var(--fs-sm); }

/* ---------- Calculator ---------- */
.calc-field label {
  display: block;
  font-size: var(--fs-sm);
  color: var(--white);
  margin-bottom: 0.6rem;
}
.calc-field input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}
.calc-field output {
  display: block;
  margin-top: 0.4rem;
  color: var(--cyan);
  font-family: var(--font-display);
}

.calc-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.5rem;
  display: grid;
  gap: 0.3rem;
}
.calc-card-label { font-size: var(--fs-sm); color: var(--mist); }
.calc-card-value {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--white);
}
.calc-card-note { font-size: var(--fs-xs); color: rgba(197,198,199,0.65); }
.calc-card--savings {
  border-color: var(--magenta);
  background: var(--magenta-dim);
}
.calc-card--savings .calc-card-value { color: var(--magenta); }

/* ---------- Gallery ---------- */
.filter-btn {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  font-size: var(--fs-xs);
  color: var(--mist);
  transition: all var(--dur-fast);
}
.filter-btn.is-active,
.filter-btn:hover {
  border-color: var(--cyan);
  color: var(--white);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--hairline);
  cursor: pointer;
  background: var(--void);
}

.gallery-image{
  width: 100%;
  max-width: 350px;
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
  cursor: pointer;
  grid-area: stack;
}

.gallery-item img,
.gallery-item svg {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-mid) var(--ease-out);
}
.gallery-item:hover img,
.gallery-item:hover svg { transform: scale(1.06); }
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.9rem 1rem;
  background: linear-gradient(transparent, rgba(11,12,16,0.9));
  font-size: var(--fs-xs);
  color: var(--white);
}
.gallery-item.is-hidden { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(11,12,16,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-content { max-width: min(90vw, 500px); }
.lightbox-content svg, .lightbox-content img { width: 100%; height: auto; border-radius: var(--radius-md); }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-size: 2rem; color: var(--white);
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 2.5rem; color: var(--white); padding: 0.5rem 1rem;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ---------- Timeline ---------- */
.timeline-node {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  border: 3px solid var(--void);
  box-shadow: 0 0 0 1px var(--hairline-strong);
  margin-bottom: 1rem;
}
.timeline-item--upcoming .timeline-node {
  background: var(--magenta);
  animation: pulseNode 1.8s ease-in-out infinite;
}
.timeline-date {
  display: block;
  font-size: var(--fs-2xs);
  color: var(--cyan);
  margin-bottom: 0.3rem;
}
.timeline-item h4 { margin-bottom: 0.3rem; }
.timeline-item p { font-size: var(--fs-sm); max-width: 26ch; }

/* ---------- Stats ---------- */
.stat-card {
  text-align: left;
  border-left: 2px solid var(--hairline-strong);
  padding-left: 1.2rem;
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--white);
}
.stat-label { font-size: var(--fs-sm); color: var(--mist); }

.testimonial-controls button {
  width: 38px; height: 38px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  font-size: var(--fs-lg);
  color: var(--white);
}
.testimonial-controls button:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Form ---------- */
input[type="text"], input[type="email"], input[type="date"], select, textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--panel);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast);
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); }
.form-submit { margin-top: 0.5rem; }
.form-status { margin-top: 0.75rem; font-size: var(--fs-sm); color: var(--cyan); min-height: 1.2em; }
