/* =====================================================================
   [CÉGNÉV] — Villamos tervezés és kivitelezés
   Design: "Blueprint Precision" (Irány A) — arculat-független váz.
   A jóváhagyott paletta egy helyen, a :root tokenekben cserélhető.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Alap (sötét irány) — kékesbe hajló, a Kekrolix arculathoz hangolva */
  --bg:            #0D1017;
  --surface:       #151A22;
  --surface-2:     #1A212B;
  --border:        #232C39;
  --text:          #E7ECF3;
  --text-muted:    #8A96A8;

  /* Kekrolix brand-kék (a logóból mérve). Egy helyen cserélhető. */
  --accent:        #215CBF;   /* elsődleges fill: gombok, mark, tag-ek */
  --accent-ink:    #FFFFFF;   /* akcenten lévő szöveg */
  --accent-text:   #6E9BE6;   /* akcent-szín SZÖVEGHEZ sötét háttéren */
  --brand-deep:    #17408A;   /* sötétebb kék: hover, mély felület */

  /* "Feszültség-sáv" gradiens a logóból (világos -> telített) — motívum */
  --g1: #C2D0ED; --g2: #A7BFE6; --g3: #8EACDF; --g4: #678FD2;
  --g5: #4A7DCA; --g6: #316AC1; --g7: #215CBF;
  --stripes: linear-gradient(90deg,
    var(--g1), var(--g2), var(--g3), var(--g4), var(--g5), var(--g6), var(--g7));

  /* Tipográfia */
  --font-display:  "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body:     "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:     "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Ritmus (8px skála) */
  --sp-1: 8px;  --sp-2: 16px; --sp-3: 24px; --sp-4: 40px;
  --sp-5: 64px; --sp-6: 96px;
  --radius: 4px;
  --maxw: 1200px;

  --shadow: 0 1px 0 var(--border), 0 12px 30px rgba(0,0,0,.35);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

/* Világos téma — data-theme="light" a <html>-en */
:root[data-theme="light"] {
  --bg:         #F6F8FB;
  --surface:    #FFFFFF;
  --surface-2:  #EEF2F8;
  --border:     #D7DEE9;
  --text:       #10141B;
  --text-muted: #566071;
  --accent-ink: #FFFFFF;
  --accent-text: #1B56BC;   /* sötét brand-kék szöveghez világos háttéren */
  --shadow: 0 1px 0 var(--border), 0 12px 30px rgba(20,40,80,.10);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 var(--sp-2); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { margin: 0 0 var(--sp-2); }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: none; box-shadow: var(--ring); border-radius: 2px;
}
img, svg { max-width: 100%; display: block; }

.container { width: min(100% - 2 * var(--sp-3), var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--sp-6); }
.section--alt { background: var(--surface); }

.sr-only, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: var(--sp-2); left: var(--sp-2); width: auto; height: auto;
  clip: auto; background: var(--accent); color: var(--accent-ink);
  padding: var(--sp-1) var(--sp-2); z-index: 200; border-radius: var(--radius);
}

/* ---------- Helpers ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-text); margin: 0 0 var(--sp-1);
}
.accent-text { color: var(--accent-text); }
.section__head { max-width: 60ch; margin-bottom: var(--sp-4); }

.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 600; font-size: .95rem;
  padding: .7em 1.3em; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--ghost  { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent-text); color: var(--accent-text); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; gap: var(--sp-3); padding-block: var(--sp-2); }
.brand { display: inline-flex; align-items: center; gap: .55em; font-weight: 700; }
/* "Feszültség-sáv" mark — a Kekrolix logó megkülönböztető motívuma */
.brand__mark {
  width: 28px; height: 20px; background: var(--stripes);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 2.5px, transparent 2.5px 4.5px);
          mask: repeating-linear-gradient(90deg, #000 0 2.5px, transparent 2.5px 4.5px);
}
.brand__name { font-family: var(--font-display); letter-spacing: -.02em; font-size: 1.15rem; }
.brand__name b { color: var(--accent-text); font-weight: 700; }  /* i-dot / kék akcent */
.brand__kft {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em;
  color: var(--accent-text); align-self: flex-start; margin-top: .1em;
}

/* Signature "feszültség-sáv" band — vékony gradiens csík */
.stripe-band { height: 4px; background: var(--stripes); }

.nav { margin-left: auto; }
.nav__menu { display: flex; gap: var(--sp-3); list-style: none; margin: 0; padding: 0; }
.nav__menu a { color: var(--text-muted); font-size: .95rem; }
.nav__menu a:hover { color: var(--text); }
.nav__toggle { display: none; }

.header__actions { display: flex; align-items: center; gap: var(--sp-2); }
.theme-toggle {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  width: 38px; height: 38px; border-radius: var(--radius); cursor: pointer; font-size: 1rem;
}
.theme-toggle:hover { border-color: var(--accent-text); color: var(--accent-text); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: var(--sp-6); }
.hero__grid-bg {
  position: absolute; inset: 0; z-index: 0; color: var(--border);
  background-image:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  background-size: 40px 40px; opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 30% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 30% 30%, #000 30%, transparent 75%);
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--sp-4); align-items: center;
}
.hero__lead { color: var(--text-muted); font-size: 1.1rem; max-width: 52ch; }
.hero__cta { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); }
.hero__visual { color: var(--accent-text); }
.blueprint { width: 100%; height: auto; }
.blueprint .bp-signal { stroke: var(--accent); }
.blueprint .bp-node { fill: var(--accent); stroke: none; }

/* SVG stroke-rajz animáció */
@media (prefers-reduced-motion: no-preference) {
  .bp-lines path, .bp-lines circle, .bp-lines rect {
    stroke-dasharray: 1000; stroke-dashoffset: 1000;
    animation: draw 3s ease forwards;
  }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ---------- Stats ---------- */
.stats { border-block: 1px solid var(--border); background: var(--surface); padding-block: var(--sp-4); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.stat { text-align: center; border-left: 1px solid var(--border); padding-left: var(--sp-3); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num { display: block; font-family: var(--font-mono); font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600; color: var(--text); }
.stat__label { color: var(--text-muted); font-size: .9rem; }
.stats__note { color: var(--text-muted); font-size: .8rem; margin-top: var(--sp-2); text-align: center; }

/* ---------- Services ---------- */
.services__split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.service-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-4); position: relative;
}
.service-block__head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.service-block__idx {
  font-family: var(--font-mono); font-weight: 600; color: var(--accent-ink);
  background: var(--accent); width: 34px; height: 34px; border-radius: var(--radius);
  display: grid; place-items: center;
}
.service-block__head h3 { margin: 0; font-size: 1.4rem; }
.service-block__lead { color: var(--text-muted); }
.feature-list { list-style: none; margin: var(--sp-2) 0 0; padding: 0; }
.feature-list li { padding: .5em 0 .5em 1.6em; border-bottom: 1px solid var(--border); position: relative; }
.feature-list li:last-child { border-bottom: 0; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 1.1em;
  width: 8px; height: 8px; background: var(--accent-text);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); counter-reset: step; }
.step { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-3); }
.step__num { font-family: var(--font-mono); color: var(--accent-text); font-size: 1.4rem; font-weight: 600;
  display: block; margin-bottom: var(--sp-1); }
.step h3 { margin-bottom: .3em; }
.step p { color: var(--text-muted); margin: 0; font-size: .95rem; }

/* ---------- References ---------- */
.refs__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.ref-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s ease, border-color .18s ease; }
.ref-card:hover { transform: translateY(-4px); border-color: var(--accent-text); }
.ref-card__media {
  aspect-ratio: 16 / 10; position: relative;
  background:
    repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--surface) 10px 20px);
  border-bottom: 1px solid var(--border);
}
.ref-card__tag { position: absolute; top: var(--sp-2); left: var(--sp-2);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink); padding: .25em .6em; border-radius: 2px; }
.ref-card h3 { margin: var(--sp-3) var(--sp-3) .3em; }
.ref-card p { color: var(--text-muted); margin: 0 var(--sp-3) var(--sp-3); font-size: .95rem; }

/* ---------- Standards ---------- */
.badges { list-style: none; margin: 0 0 var(--sp-2); padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.badge { font-family: var(--font-mono); font-size: .85rem; letter-spacing: .04em;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: .6em 1em; background: var(--surface-2); }
.standards__note { color: var(--text-muted); font-size: .9rem; }

/* ---------- Contact ---------- */
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); align-items: start; }
.contact__intro p { color: var(--text-muted); }
.contact__details { list-style: none; margin: var(--sp-3) 0 0; padding: 0; }
.contact__details li { display: flex; justify-content: space-between; gap: var(--sp-2);
  padding: .7em 0; border-bottom: 1px solid var(--border); }
.contact__k { color: var(--text-muted); font-family: var(--font-mono); font-size: .85rem; }
.contact__form { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-4); }
.field { margin-bottom: var(--sp-2); }
.field label { display: block; font-size: .85rem; color: var(--text-muted); margin-bottom: .4em; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font: inherit; padding: .7em .9em; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--accent-text); }
.form__note { color: var(--text-muted); font-size: .8rem; margin: var(--sp-2) 0 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding-top: var(--sp-4); }
.footer__inner { display: flex; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap;
  padding-bottom: var(--sp-3); }
.footer__brand { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; }
.footer__brand p { width: 100%; color: var(--text-muted); font-size: .9rem; margin: .4em 0 0; }
.footer__contact { font-style: normal; display: flex; flex-direction: column; gap: .3em; }
.footer__contact-h { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: .2em; }
.footer__contact a, .footer__contact span { color: var(--text-muted); font-size: .9rem; }
.footer__contact a:hover { color: var(--accent-text); }
.footer__nav { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: flex-start; }
.footer__nav a { color: var(--text-muted); font-size: .9rem; }
.footer__nav a:hover { color: var(--accent-text); }
.footer__bottom { border-top: 1px solid var(--border); padding-block: var(--sp-3);
  color: var(--text-muted); font-size: .85rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: 360px; }
  .services__split, .contact__inner { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; padding-left: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .refs__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav__toggle {
    display: inline-grid; place-items: center; margin-left: auto;
    width: 40px; height: 40px; background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer; position: relative;
  }
  .nav__toggle-bar, .nav__toggle-bar::before, .nav__toggle-bar::after {
    content: ""; position: absolute; width: 18px; height: 2px; background: var(--text); transition: .2s;
  }
  .nav__toggle-bar::before { transform: translateY(-6px); }
  .nav__toggle-bar::after  { transform: translateY(6px); }
  .nav { margin-left: 0; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: var(--sp-2) var(--sp-3); display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu li { border-bottom: 1px solid var(--border); }
  .nav__menu a { display: block; padding: .8em 0; }
  .header__inner { flex-wrap: wrap; }
  .header__actions .btn { display: none; }
  .refs__grid, .steps, .stats__grid { grid-template-columns: 1fr; }
}
