/* ============================================================
   ByEco — TECHNOLOGY SECTION (standalone / embeddable)
   Pinned horizontal-scroll rail. Dark eco-futurism.
   Only .tech* styles + the tokens/fonts they need. Namespaced so it
   won't collide with a host site (except the :root design tokens and
   the shared .mono / .eyebrow / .btn helpers — rename if they clash).
   ============================================================ */

:root {
  --bg: #04100b;
  --bg-2: #061711;
  --panel: #0a2016;
  --ink: #ecf5ec;
  --ink-dim: #9db8a8;
  --ink-faint: #7f9a8b;
  --lime: #c8f04b;
  --line: rgba(214, 255, 214, 0.12);
  --line-soft: rgba(214, 255, 214, 0.06);
  --font-display: "Clash Display", "General Sans", -apple-system, sans-serif;
  --font-body: "General Sans", -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(20px, 4vw, 64px);
}

/* --- minimal reset (scope to your app if embedding) --- */
* , *::before, *::after { box-sizing: border-box; }
.tech, .tech * { margin: 0; }
body { margin: 0; }

/* the standalone demo page paints the ByEco ground so the pin looks right;
   when embedding, delete this rule and let your own page background show. */
body:has(.tech-spacer) { background: var(--bg); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }

.tech img { display: block; max-width: 100%; }
.tech a { color: inherit; text-decoration: none; }
.tech ul { list-style: none; padding: 0; }
.tech ::selection { background: var(--lime); color: #06130c; }

/* demo-only spacers to give the pin room on an otherwise empty page */
.tech-spacer { height: 12vh; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ---------- section shell ---------- */
.tech {
  position: relative;
  background: var(--bg-2);
  color: var(--ink);
  font-family: var(--font-body);
  border-block: 1px solid var(--line-soft);
  -webkit-font-smoothing: antialiased;
}
.tech-pin { overflow: clip; }
.tech-track {
  display: flex; align-items: center; gap: clamp(24px, 3vw, 56px);
  padding: clamp(72px, 10vh, 120px) var(--gutter);
  width: max-content; min-height: 100svh; will-change: transform;
}

/* ---------- intro panel ---------- */
.tech-intro { width: min(44rem, 82vw); flex: none; padding-right: clamp(16px, 4vw, 64px); }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--lime); margin-bottom: 22px; font-size: 0.72rem; }
.eyebrow i { font-style: normal; color: var(--ink-faint); }
.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: 1.02; letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-title em, .tech-end em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--lime);
  letter-spacing: 0;
}
.tech-hint { margin-top: 40px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 12px; }
.tech-hint-arrow { font-style: normal; display: inline-block; animation: nudge 1.6s var(--ease-out) infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } }

/* ---------- cards ---------- */
.tech-card {
  width: min(30rem, 80vw); flex: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: clamp(16px, 1.8vw, 26px);
  overflow: clip; transition: border-color 0.4s, transform 0.4s var(--ease-out);
}
.tech-card:hover { border-color: rgba(200, 240, 75, 0.45); transform: translateY(-8px); }
.tech-card-img { position: relative; aspect-ratio: 4 / 3.4; overflow: clip; }
.tech-card-img img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.9s var(--ease-out), filter 0.9s var(--ease-out); scale: 1.02; filter: saturate(0.85); }
.tech-card:hover .tech-card-img img { scale: 1.09; filter: saturate(1.1); }
.tech-index {
  position: absolute; top: 16px; left: 16px; padding: 0.55em 0.9em; border-radius: 999px;
  background: rgba(4, 16, 11, 0.55); backdrop-filter: blur(10px);
  border: 1px solid var(--line); font-size: 0.6rem; color: var(--lime);
}
.tech-card-body { padding: clamp(22px, 2.4vw, 34px); }
.tech-card-body h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 2vw, 1.8rem); letter-spacing: -0.02em; margin-bottom: 10px; }
.tech-card-body p { color: var(--ink-dim); font-size: 0.95rem; margin-bottom: 20px; }
.spec { display: flex; flex-wrap: wrap; gap: 8px; }
.spec li { padding: 0.55em 0.9em; border: 1px solid var(--line); border-radius: 999px; font-size: 0.58rem; color: var(--ink-dim); font-family: var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- end panel ---------- */
.tech-end { width: min(36rem, 80vw); flex: none; text-align: center; display: grid; gap: 22px; justify-items: center; padding-inline: 24px; }
.tech-end .mono { color: var(--ink-faint); font-size: 0.62rem; }
.tech-end h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.2rem, 4.6vw, 4rem); letter-spacing: -0.025em; }

/* ---------- button ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 0.7em;
  padding: 1.05em 1.9em; border-radius: 999px;
  font-family: var(--font-display); font-weight: 500; font-size: 1rem; line-height: 1;
  overflow: hidden; isolation: isolate; white-space: nowrap; cursor: pointer;
  transition: color 0.4s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: translateY(102%); transition: transform 0.5s var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn-arrow { transition: transform 0.4s var(--ease-out); }
.btn:hover .btn-arrow { transform: translate(3px, -3px); }
.btn-primary { background: var(--lime); color: #06130c; }
.btn-primary::before { background: var(--ink); }
.btn-primary:hover { color: var(--bg); }

/* ---------- mobile: rail stacks vertically ---------- */
@media (max-width: 860px) {
  .tech-track { flex-direction: column; align-items: stretch; width: auto; min-height: 0; padding: 72px var(--gutter); }
  .tech-intro, .tech-card, .tech-end { width: 100%; }
  .tech-hint { display: none; }
  .tech-end { text-align: left; justify-items: start; padding-inline: 0; }
}

/* ---------- reduced motion: no pin/scroll animation, stack + reachable ---------- */
@media (prefers-reduced-motion: reduce) {
  .tech-hint-arrow { animation: none !important; }
  .tech-track { flex-direction: column; align-items: stretch; width: auto; min-height: 0; padding: clamp(56px, 8vh, 96px) var(--gutter); }
  .tech-intro, .tech-card, .tech-end { width: 100%; }
  .tech-hint { display: none; }
  .tech-end { text-align: left; justify-items: start; padding-inline: 0; }
  * , *::before, *::after { transition-duration: 0.01ms !important; }
}


/* ---------------------------------------------------------------
   ByEco overrides
   1. The demo lime (#c8f04b) is very light for a primary CTA.
   2. The site's link colour was winning over .btn-primary's dark label,
      rendering near-white text on that lime: 1.18:1, effectively unreadable.
   Darker fill + restore the intended dark label, with enough specificity
   to beat the host page.
   --------------------------------------------------------------- */
.tech .btn-primary { background: #8fbc1f; }
.tech .btn-primary,
.tech .btn-primary .btn-label,
.tech .btn-primary .btn-arrow { color: #06130c; }
.tech .btn-primary:hover,
.tech .btn-primary:hover .btn-label,
.tech .btn-primary:hover .btn-arrow { color: var(--bg); }
