/* ============ Engineer Hub landing page — design tokens ============ */
/* Palette matches the existing IEK voting.html tokens (--ke-*) for
   cross-product consistency: black/red/green, not an invented palette. */
:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-sunken: #eef0f2;
  --ink: #1b1d22;
  --ink-muted: #6b7280;
  --border: #e2e4e9;

  --black: #0a0a0a;
  --black-800: #16171b;
  --black-700: #202228;

  --red-600: #bb0a1e;
  --red-700: #8f0817;
  --red-500: #d81b31;
  --red-100: #fbe3e5;

  --green-600: #007a3d;
  --green-700: #005c2d;
  --green-100: #dcefe4;

  --amber-600: #b9812c;
  --amber-100: #f6ead2;

  --shadow-sm: 0 2px 8px -2px rgba(10, 10, 10, 0.08);
  --shadow-md: 0 12px 28px -12px rgba(10, 10, 10, 0.2);
  --shadow-lg: 0 24px 56px -20px rgba(10, 10, 10, 0.32);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Safety net: nothing on this site is meant to be wider than the
   viewport. If a future absolutely-positioned dropdown/panel ever
   miscalculates and overflows off an edge again, this keeps that one
   element clipped instead of letting the whole page scroll sideways
   (exactly what happened with the nav search panel on phones). */
html, body { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.eh-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .eh-reveal { opacity: 1 !important; transform: none !important; }
}

/* ============ Scroll reveal ============ */
.eh-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.eh-reveal.is-in { opacity: 1; transform: none; }

/* ============ Navbar ============ */
.eh-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.eh-nav.is-scrolled {
  background: rgba(10, 10, 10, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}
.eh-nav-row {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.eh-brand { display: flex; align-items: center; gap: 10px; }
.eh-brand-mark {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: #fff;
  flex-shrink: 0;
}
.eh-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.eh-brand-text .name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.01em;
}
.eh-brand-text .name em { color: var(--red-500); font-style: normal; }
.eh-brand-text .tag { font-size: 10.5px; color: rgba(255,255,255,0.5); font-weight: 500; }

.eh-nav-links {
  display: none;
  align-items: center;
  gap: 30px;
}
.eh-nav-links a {
  position: relative;
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  padding-bottom: 4px;
  transition: color 0.2s;
}
.eh-nav-links a:hover { color: #fff; }
.eh-nav-links a.is-active { color: #fff; }
.eh-nav-links a.is-active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--red-500), var(--green-600));
  border-radius: 2px;
}

.eh-nav-actions { display: none; align-items: center; gap: 12px; }
.eh-nav-actions .eh-signin { font-size: 14.5px; font-weight: 600; color: rgba(255,255,255,0.9); }
.eh-nav-actions .eh-signin:hover { color: #fff; }

.eh-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
}
.eh-burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: #fff;
  transition: transform 0.2s, opacity 0.2s;
}
.eh-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.eh-burger.is-open span:nth-child(2) { opacity: 0; }
.eh-burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.eh-mobile-menu {
  display: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(12px);
  padding: 8px 20px 20px;
}
.eh-mobile-menu.is-open { display: block; }
.eh-mobile-menu nav { display: flex; flex-direction: column; gap: 2px; }
.eh-mobile-menu nav a {
  padding: 10px 8px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}
.eh-mobile-menu nav a:hover { background: rgba(255,255,255,0.05); }
.eh-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ============ Buttons ============ */
.eh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.eh-btn-primary {
  background: var(--red-600);
  color: #fff;
  box-shadow: 0 10px 26px -8px rgba(187, 10, 30, 0.55);
}
.eh-btn-primary:hover { background: var(--red-500); transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(187, 10, 30, 0.65); }
.eh-btn-primary svg { transition: transform 0.25s var(--ease); }
.eh-btn-primary:hover svg { transform: translateX(3px); }
.eh-btn-ghost-dark { border-color: rgba(255,255,255,0.28); color: #fff; }
.eh-btn-ghost-dark:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }
.eh-btn-solid-light { background: #fff; color: var(--black); }
.eh-btn-solid-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.eh-btn-full { width: 100%; }

/* ============ Hero carousel ============ */
.eh-hero {
  position: relative;
  overflow: hidden;
  height: min(92vh, 760px);
  min-height: 560px;
  background: var(--black);
}
.eh-hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.eh-hero-slide.is-active { opacity: 1; }
.eh-hero-slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  animation: eh-kenburns 9s ease-out forwards;
}
@keyframes eh-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
.eh-hero-slide::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(10,10,10,0.92) 10%, rgba(10,10,10,0.55) 45%, rgba(10,10,10,0.25) 75%),
    linear-gradient(0deg, rgba(10,10,10,0.75) 0%, transparent 40%);
}
@media (prefers-reduced-motion: reduce) {
  .eh-hero-slide img { animation: none; }
}

.eh-hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  padding-top: 64px;
}
.eh-hero-content .inner { max-width: 620px; }

.eh-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}
.eh-badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green-600);
  box-shadow: 0 0 0 0 rgba(0, 122, 61, 0.6);
  animation: eh-pulse 2.2s infinite;
}
@keyframes eh-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 122, 61, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(0, 122, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 122, 61, 0); }
}
.eh-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.8vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 18px 0 0;
  text-wrap: balance;
}
.eh-hero h1 .accent { color: var(--red-500); }
.eh-hero .eh-tagline {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--green-600);
}
.eh-hero p.eh-lede {
  max-width: 48ch;
  font-size: 16.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  margin: 16px 0 0;
}
.eh-hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.eh-hero-controls {
  position: absolute; left: 20px; bottom: 24px; z-index: 2;
  display: flex; align-items: center; gap: 12px;
}
@media (min-width: 640px) { .eh-hero-controls { left: 40px; } }
.eh-hero-pause {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
}
.eh-hero-pause:hover { background: rgba(255,255,255,0.18); }
.eh-hero-dots { display: flex; align-items: center; gap: 6px; }
.eh-hero-dot {
  width: 22px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.3);
  border: none; padding: 0; cursor: pointer;
  transition: background-color 0.2s;
}
.eh-hero-dot.is-active { background: var(--green-600); }

/* ============ Section heads ============ */
.eh-eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--red-600);
}
.eh-section-head { max-width: 640px; }
.eh-section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 10px 0 0;
  text-wrap: balance;
}
.eh-section-head p { margin: 12px 0 0; font-size: 15.5px; color: var(--ink-muted); line-height: 1.6; }
.eh-section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ============ Quick links + For engineers ============ */
.eh-quick { background: var(--surface-sunken); padding: 56px 0; }
.eh-quick-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.eh-quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  align-self: start;
}
.eh-quick-card h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 700; }
.eh-quick-card ul { list-style: none; margin: 8px 0 0; padding: 0; }
.eh-quick-card li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 4px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.eh-quick-card li:last-child a { border-bottom: none; }
.eh-quick-card li a:hover { color: var(--red-600); }
.eh-quick-card li a svg { color: var(--ink-muted); flex-shrink: 0; }

.eh-field h3 { margin: 0 0 14px; font-size: 15.5px; font-weight: 700; }
.eh-field-cards { display: flex; flex-direction: column; gap: 14px; }
.eh-field-card {
  display: flex; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.eh-field-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.eh-field-thumb { position: relative; width: 96px; height: 76px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.eh-field-thumb img { width: 100%; height: 100%; object-fit: cover; }
.eh-field-body h4 { margin: 0; font-size: 14.5px; font-weight: 700; }
.eh-field-body p { margin: 4px 0 0; font-size: 13px; color: var(--ink-muted); line-height: 1.55; }
.eh-field-body .eh-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--red-600); }

@media (min-width: 860px) {
  .eh-quick-grid { grid-template-columns: 1fr 2fr; gap: 32px; }
  .eh-field-cards { flex-direction: row; }
  .eh-field-card { flex: 1; flex-direction: column; }
  .eh-field-thumb { width: 100%; height: 120px; }
}

/* ============ Full-bleed banner ============ */
.eh-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--black) 0%, var(--red-700) 130%);
  padding: 64px 0;
}
.eh-banner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}
.eh-banner h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  color: #fff;
  margin: 0;
  text-wrap: balance;
}
.eh-banner p {
  margin: 14px 0 0;
  max-width: 46ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
}
.eh-banner-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.eh-banner-media img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 900px) {
  .eh-banner-grid { grid-template-columns: 1fr 1fr; gap: 56px; }
}

/* ============ Features (feature cards used inside "For engineers" retained for compatibility) ============ */
.eh-features { background: var(--bg); padding: 80px 0; }
.eh-feature-grid { margin-top: 48px; display: grid; grid-template-columns: 1fr; gap: 24px; }
.eh-feature-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.eh-feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(187,10,30,0.35); }
.eh-feature-media { position: relative; height: 144px; }
.eh-feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.eh-feature-card:hover .eh-feature-media img { transform: scale(1.04); }
.eh-feature-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,10,10,0.55) 0%, transparent 60%);
}
.eh-feature-icon {
  position: absolute; bottom: -20px; left: 20px; z-index: 1;
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(10,10,10,0.18);
}
.eh-feature-icon.red { background: var(--red-100); color: var(--red-600); }
.eh-feature-icon.green { background: var(--green-100); color: var(--green-600); }
.eh-feature-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.eh-feature-icon.black { background: #e7e7e8; color: var(--black); }
.eh-feature-body { padding: 32px 20px 24px; }
.eh-feature-body h3 { font-size: 15.5px; font-weight: 700; margin: 0; }
.eh-feature-body p { font-size: 13.5px; color: var(--ink-muted); line-height: 1.6; margin: 6px 0 0; }

@media (min-width: 640px) { .eh-feature-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .eh-feature-grid { grid-template-columns: repeat(4, 1fr); } }

/* ============ Horizontal scroller (gallery) ============ */
.eh-scroller-section { background: var(--surface); padding: 76px 0; }
.eh-scroll-nav { display: flex; align-items: center; gap: 8px; }
.eh-scroll-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.eh-scroll-btn:hover { background: var(--surface-sunken); border-color: var(--red-600); color: var(--red-600); }
.eh-scroll-btn:disabled { opacity: 0.35; cursor: default; }
.eh-scroll-btn:disabled:hover { background: var(--surface); border-color: var(--border); color: var(--ink); }

.eh-scroller {
  margin-top: 28px;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.eh-scroller::-webkit-scrollbar { display: none; }
.eh-scroll-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 240px;
}
.eh-scroll-card .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.eh-scroll-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.eh-scroll-card:hover .thumb img { transform: scale(1.06); }
.eh-scroll-card h3 { margin: 12px 0 0; font-size: 14.5px; font-weight: 700; }
.eh-scroll-card p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-muted); }

@media (min-width: 640px) { .eh-scroll-card { width: 270px; } }

/* ============ Workflow ============ */
.eh-how { background: var(--surface-sunken); padding: 80px 0; }
.eh-steps { margin-top: 48px; display: grid; grid-template-columns: 1fr; gap: 24px; }
.eh-step-card {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.eh-step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.eh-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--red-600);
  color: #fff;
  font-size: 13.5px; font-weight: 700;
  margin-bottom: 16px;
}
.eh-step-card h3 { font-size: 15px; font-weight: 700; margin: 0; }
.eh-step-card p { font-size: 13.5px; color: var(--ink-muted); line-height: 1.6; margin: 6px 0 0; }

@media (min-width: 640px) { .eh-steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .eh-steps { grid-template-columns: repeat(4, 1fr); } }

/* ============ Footer ============ */
.eh-footer { background: var(--black); padding: 56px 20px 0; position: relative; }
.eh-footer-row { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.eh-footer-brand p { max-width: 380px; margin-top: 12px; font-size: 13.5px; color: rgba(255,255,255,0.55); line-height: 1.6; }
.eh-footer-links h4 { margin: 0 0 12px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.45); }
.eh-footer-links { display: flex; flex-direction: column; gap: 10px; }
.eh-footer-links a { font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,0.65); }
.eh-footer-links a:hover { color: #fff; }
.eh-footer-bottom {
  max-width: 1180px; margin: 40px auto 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
}
.eh-footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.4); margin: 0; }

@media (min-width: 640px) {
  .eh-footer-row { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 860px) {
  .eh-nav-links, .eh-nav-actions { display: flex; }
  .eh-burger { display: none; }
  .eh-mobile-menu { display: none !important; }
}

/* ============ Shared form fields (login + dashboard edit-profile) ============ */
.lg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  width: 100%;
}
.lg-field span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.lg-field input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lg-field input:focus {
  border-color: var(--red-600);
  box-shadow: 0 0 0 3px var(--red-100);
}
.lg-field small { font-size: 12px; color: var(--ink-muted); }

.lg-error {
  background: var(--red-100);
  color: var(--red-700);
  border: 1px solid rgba(187, 10, 30, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ============ Back to top ============ */
.eh-top-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--red-600);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, background-color 0.2s;
}
.eh-top-btn.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.eh-top-btn:hover { background: var(--red-500); }
