:root {
  /* ---------- Light theme (default) ---------- */
  --bg: #f6f9fc;
  --bg-2: #eaf1f8;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --border: #d8e2ec;
  --text: #0f1d2b;
  --muted: #54657a;
  /* GOHM Electronics blue (brand accent — same in both themes) */
  --green: #0071B9;
  --green-2: #1f9ad6;
  --lime: #0a6fb0;       /* deeper accent so links read on white */
  --cyan: #2598ba;
  --badge-text: #0a5a90;
  --card-shadow: 0 16px 40px rgba(15,40,70,0.10);
  --grid-line: rgba(0,113,185,0.06);
  --glow: rgba(0,113,185,0.10);
  --radius: 16px;
  --maxw: 1140px;
}

[data-theme="dark"] {
  --bg: #070c12;
  --bg-2: #0a1019;
  --surface: #101824;
  --surface-2: #16202e;
  --border: #20303f;
  --text: #e6eef6;
  --muted: #8aa0b4;
  --green: #0071B9;
  --green-2: #1f9ad6;
  --lime: #5cc6ff;       /* brighter sky accent on dark */
  --cyan: #38c6e6;
  --badge-text: #cfeaff;
  --card-shadow: 0 16px 40px rgba(0,0,0,0.4);
  --grid-line: rgba(0,113,185,0.04);
  --glow: rgba(0,113,185,0.12);
}

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

html { scroll-behavior: smooth; }

/* Baseline so links never fall back to the browser's blue/purple defaults */
a { color: var(--green); text-decoration: none; }
a:visited { color: var(--green); }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

/* ---------- Background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; top: -20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 900px; z-index: -1;
  background: radial-gradient(circle, var(--glow), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(30px); }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px 24px;
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand-mark { color: var(--green); font-size: 1.3rem; font-weight: 700; line-height: 1; }
.brand-dot { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text) !important; background: var(--surface);
}
.nav-cta:hover { border-color: var(--green); }
.theme-toggle {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  font-size: 1rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.theme-toggle:hover { border-color: var(--green); }

/* ---------- Hero ---------- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 90px 24px 70px; text-align: center; }

/* Hero badge — prominent, high-contrast pill replacing the dim eyebrow */
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  margin-bottom: 24px; padding: 8px 18px 8px 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--badge-text);
  background: linear-gradient(120deg, rgba(0,113,185,0.22), rgba(56,198,230,0.12));
  border: 1px solid rgba(92,198,255,0.45);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0,113,185,0.15), 0 8px 24px rgba(0,113,185,0.25);
  backdrop-filter: blur(6px);
}
.hero-badge .badge-mark { color: var(--lime); font-weight: 700; font-size: 1.05rem; line-height: 1; }
.hero-badge .badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); animation: pulse 2.2s infinite; }
.eyebrow {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--green); margin-bottom: 18px;
}
.hero-title { font-size: clamp(2.1rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.grad { background: linear-gradient(120deg, var(--green), var(--lime)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-2 { background: linear-gradient(120deg, var(--green-2), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-3 { background: linear-gradient(120deg, var(--cyan), var(--lime)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 620px; margin: 24px auto 0; color: var(--muted); font-size: 1.08rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.btn { padding: 13px 26px; border-radius: 12px; font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s; display: inline-block; }
.btn-primary { background: linear-gradient(120deg, var(--green), var(--green-2)); color: #ffffff; box-shadow: 0 8px 24px rgba(0,113,185,0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,113,185,0.35); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--green); transform: translateY(-2px); }

.hero-stats { display: flex; gap: 50px; justify-content: center; flex-wrap: wrap; margin-top: 56px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.stat-label { font-size: 0.82rem; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 88px 24px; }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-2), transparent); max-width: 100%; }
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; }
.section-lead { color: var(--muted); margin-top: 14px; font-size: 1.02rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; transition: transform .2s, border-color .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0; transition: opacity .3s;
}
.card:hover { transform: translateY(-5px); border-color: rgba(0,113,185,0.4); box-shadow: var(--card-shadow); }
.card:hover::before { opacity: 1; }
.card-icon { font-size: 2.2rem; margin-bottom: 16px; }
.card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 0.96rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags li {
  font-family: 'JetBrains Mono', monospace; font-size: 0.74rem;
  padding: 4px 10px; border-radius: 7px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--green);
}
/* Title link — only the heading is a link; body text stays neutral */
.card-title-link { color: var(--text); text-decoration: none; }
.card-title-link:hover { color: var(--lime); }
/* Clear CTA button at the card foot */
.card-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  padding: 8px 15px; border-radius: 10px; text-decoration: none;
  font-weight: 600; font-size: 0.86rem; color: var(--lime);
  background: rgba(0,113,185,0.12); border: 1px solid rgba(0,113,185,0.4);
  transition: background .2s, border-color .2s, transform .2s;
}
.card-cta:hover { background: rgba(0,113,185,0.2); border-color: var(--lime); transform: translateX(3px); }

/* ---------- Systems ---------- */
.systems { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.sys {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto;
  gap: 2px 12px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; text-decoration: none; color: var(--text);
  transition: border-color .2s, transform .2s;
}
.sys:hover { border-color: rgba(0,113,185,0.4); transform: translateY(-3px); }
.sys-dot { grid-row: 1 / 4; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--muted); }
.sys-dot.online { background: var(--green); box-shadow: 0 0 0 0 rgba(0,113,185,0.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,113,185,0.5); } 70% { box-shadow: 0 0 0 8px rgba(0,113,185,0); } 100% { box-shadow: 0 0 0 0 rgba(0,113,185,0); } }
.sys-name { font-weight: 700; font-size: 1.02rem; }
.sys-desc { color: var(--muted); font-size: 0.88rem; }
.sys-host { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--green); margin-top: 4px; }
.sys-static { cursor: default; }
.sys-static:hover { transform: none; border-color: var(--border); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.about-text h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 18px; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
.about-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.panel-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-weight: 500; border-bottom: 1px solid var(--border); }
.panel-line:last-child { border-bottom: none; }
.panel-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* ---------- Contact / Business ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: stretch; }
.contact-info {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; display: flex; flex-direction: column; gap: 6px;
}
.info-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.info-row:first-of-type { padding-top: 0; }
.info-ico { font-size: 1.3rem; line-height: 1.4; }
.info-label { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); display: block; margin-bottom: 4px; }
.info-row p { color: var(--text); font-size: 0.96rem; }
.info-row a { color: var(--text); text-decoration: none; border-bottom: 1px solid rgba(0,113,185,0.4); transition: color .2s; }
.info-row a:hover { color: var(--green); }
.contact-cta { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.contact-cta .btn { text-align: center; }
.contact-map {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  min-height: 360px; background: var(--surface);
}
.contact-map iframe { display: block; width: 100%; height: 100%; min-height: 360px; filter: grayscale(0.25) contrast(1.05); }

@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 56px 24px; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-brand { font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.footer-note { color: var(--muted); font-size: 0.9rem; }
.footer-copy { color: var(--muted); font-size: 0.82rem; margin-top: 8px; opacity: 0.7; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .hero-stats { gap: 32px; }
}
