/* ============================================================
   Luiz-Tech — redesign
   Dark developer theme with code-flavoured animations
   ============================================================ */

:root {
  --bg: #0a0e17;
  --bg-2: #0d1320;
  --bg-3: #111827;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e6edf3;
  --text-muted: #9aa7b8;
  --text-dim: #6b7889;

  --accent: #38e1ff;       /* cyan */
  --accent-2: #6c7bff;     /* indigo */
  --accent-3: #00ffa3;     /* terminal green */
  --accent-glow: rgba(56, 225, 255, 0.35);

  --grad: linear-gradient(135deg, #38e1ff 0%, #6c7bff 55%, #b46bff 100%);
  --grad-soft: linear-gradient(135deg, rgba(56,225,255,.14), rgba(108,123,255,.14));

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;

  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
/* a [hidden] attribútum mindig nyerjen a layout display szabályok felett
   (különben a display:grid/flex-es overlay-ek nem rejtődnének el) */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* subtle grid + glow background layered behind canvas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(900px 500px at 80% -5%, rgba(108,123,255,.18), transparent 60%),
    radial-gradient(800px 500px at 0% 10%, rgba(56,225,255,.12), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 40%, transparent 100%);
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--grad);
  z-index: 200;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width .1s linear;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 14, 23, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.5px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}
.brand-bracket { color: var(--accent); opacity: .7; }
.brand-accent { color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: .94rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s ease, background .2s ease;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.nav-cta {
  color: #04121a;
  background: var(--grad);
  font-weight: 600;
  box-shadow: 0 8px 24px -10px var(--accent-glow);
}
.main-nav a.nav-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 150px 0 90px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--accent-3);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 0 rgba(0,255,163,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,255,163,.5); }
  70% { box-shadow: 0 0 0 8px rgba(0,255,163,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,255,163,0); }
}

.hero-title {
  margin-top: 22px;
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1.5px;
}
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.hero-lead {
  margin-top: 22px;
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 540px;
}
.hero-lead strong { color: var(--text); }

.hero-actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #04121a;
  box-shadow: 0 14px 34px -14px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -14px var(--accent-glow); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-sm { padding: 11px 20px; font-size: .92rem; }
.btn-block { width: 100%; }

.hero-stats {
  margin-top: 46px;
  display: flex;
  gap: 38px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { font-size: .85rem; color: var(--text-dim); }

/* ---------- Terminal ---------- */
.hero-terminal { position: relative; }
.terminal, .code-window {
  background: linear-gradient(180deg, #0c1320, #0a0f1a);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.terminal::after, .code-window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(56,225,255,.5), transparent 40%, transparent 60%, rgba(108,123,255,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .6;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-dim);
}
.terminal-body {
  padding: 22px 20px;
  font-family: var(--mono);
  font-size: .92rem;
  line-height: 1.75;
  min-height: 320px;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body code { color: var(--text); }
.t-prompt { color: var(--accent-3); }
.t-cmd { color: var(--accent); }
.t-out { color: var(--text-muted); }
.t-ok { color: var(--accent-3); }
.t-comment { color: var(--text-dim); font-style: italic; }
.caret {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Floating badges ---------- */
.floating-badge {
  position: absolute;
  font-family: var(--mono);
  font-size: .8rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(13, 19, 32, 0.9);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}
.badge-react { top: -18px; right: 24px; color: #61dafb; animation-delay: 0s; }
.badge-node { bottom: 40px; left: -28px; color: #8cc84b; animation-delay: 1.2s; }
.badge-secure { bottom: -16px; right: 40px; color: var(--accent-3); animation-delay: 2.1s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  letter-spacing: 2px;
}
.scroll-hint span {
  width: 22px; height: 34px;
  border: 2px solid var(--border-strong);
  border-radius: 12px;
  position: relative;
}
.scroll-hint span::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 7px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translate(-50%, 12px); }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  border-block: 1px solid var(--border);
  background: rgba(255,255,255,.015);
  overflow: hidden;
  padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: inline-flex;
  gap: 22px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-muted);
  animation: marquee 32s linear infinite;
}
.marquee-track span:not(:nth-child(even)) { color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   SECTIONS (generic)
   ============================================================ */
.section { padding: 96px 0; position: relative; }
.section-alt { background: rgba(255,255,255,.015); border-block: 1px solid var(--border); }

.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-tag {
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--accent);
  letter-spacing: 1px;
}
.section-title {
  margin-top: 12px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}
.section-sub { margin-top: 16px; color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}
.service-card:hover { transform: translateY(-6px); border-color: var(--border-strong); background: var(--surface-2); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.service-card h3 { font-size: 1.25rem; margin-bottom: 10px; letter-spacing: -.3px; }
.service-card p { color: var(--text-muted); font-size: .96rem; }
.service-list { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.service-list li {
  font-size: .9rem;
  color: var(--text-muted);
  padding-left: 22px;
  position: relative;
}
.service-list li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  color: var(--accent);
}

/* ---------- Products ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.product-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 22px;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.product-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px -22px var(--accent-glow);
}
.product-index {
  font-family: var(--mono);
  font-size: .9rem;
  color: var(--accent);
  opacity: .7;
}
.product-item h3 { font-size: 1.08rem; margin: 12px 0 8px; letter-spacing: -.3px; }
.product-item p { font-size: .9rem; color: var(--text-muted); }

/* ---------- Timeline / Process ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 26px; left: 8%; right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.timeline-step { text-align: center; position: relative; }
.timeline-marker {
  width: 54px; height: 54px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  position: relative;
  z-index: 1;
}
.timeline-step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.timeline-step p { font-size: .92rem; color: var(--text-muted); }

/* ---------- Work / References ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.work-card:hover { transform: translateY(-6px); border-color: var(--border-strong); background: var(--surface-2); }
.work-tag {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--accent);
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--grad-soft);
  margin-bottom: 16px;
}
.work-card h3 { font-size: 1.25rem; margin-bottom: 10px; letter-spacing: -.3px; }
.work-card p { color: var(--text-muted); font-size: .95rem; flex-grow: 1; }
.work-meta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: .82rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.work-badge {
  font-family: var(--mono);
  color: var(--accent-3);
  font-size: .78rem;
}
.work-cta {
  grid-column: 1 / -1;          /* mindig új, teljes szélességű sorba */
  width: 100%;
  max-width: 520px;
  margin-inline: auto;          /* a kártya középre igazítva */
  align-items: center;
  background: var(--grad-soft);
  border-color: var(--border-strong);
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.work-cta p { flex-grow: 0; }

.testimonial {
  margin-top: 56px;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  padding: 40px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
}
.testimonial::before {
  content: "“";
  position: absolute;
  top: -10px; left: 26px;
  font-size: 5rem;
  font-family: Georgia, serif;
  color: var(--accent);
  opacity: .25;
  line-height: 1;
}
.testimonial blockquote { font-size: 1.18rem; line-height: 1.6; color: var(--text); }
.testimonial figcaption { margin-top: 18px; color: var(--text-dim); font-size: .92rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-copy .section-title { margin-bottom: 22px; }
.about-copy p { color: var(--text-muted); margin-bottom: 16px; }
.about-copy strong { color: var(--text); }
.about-points {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.about-point {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .95rem;
  color: var(--text);
}
.about-point span {
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: var(--accent-3);
  font-size: .8rem;
}
.code-block {
  padding: 24px 22px;
  font-family: var(--mono);
  font-size: .9rem;
  line-height: 1.85;
  overflow-x: auto;
}
.c-key { color: #ff7edb; }
.c-var { color: var(--accent); }
.c-prop { color: #ffd479; }
.c-str { color: var(--accent-3); }
.c-num { color: #ff9d6c; }
.c-fn { color: var(--accent); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-copy .section-sub { text-align: left; }
.contact-list { list-style: none; margin-top: 30px; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-ico {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  font-size: 1.1rem;
}
.contact-label { display: block; font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.contact-list a:hover { color: var(--accent); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: .85rem; color: var(--text-muted); font-weight: 500; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: .95rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56,225,255,.14);
}
.field textarea { resize: vertical; }
.form-note { font-size: .88rem; min-height: 1.2em; text-align: center; }
.form-note.ok { color: var(--accent-3); }
.form-note.err { color: #ff7a7a; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding-top: 56px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
}
.footer-brand p { color: var(--text-muted); font-size: .92rem; margin-top: 14px; max-width: 320px; }
.footer-col h4 { font-size: .95rem; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-muted); font-size: .9rem; padding: 4px 0; transition: color .2s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-dim);
  font-size: .85rem;
}
.footer-built code { color: var(--accent); }

/* ---------- Clickable references ---------- */
/* arany szegélyes (kiemelt) referencia */
.work-card.work-gold {
  border: 1.5px solid #f5c451;
  box-shadow: 0 0 0 1px rgba(245, 196, 81, .35), 0 22px 50px -26px rgba(245, 166, 35, .65);
}
.work-card.work-gold:hover { border-color: #ffd86b; box-shadow: 0 0 0 1px rgba(245, 196, 81, .5), 0 26px 56px -24px rgba(245, 166, 35, .8); }
.work-card.work-gold .work-tag { color: #f5c451; border-color: rgba(245, 196, 81, .5); }

.work-card.clickable { cursor: pointer; }
.work-card.clickable::after {
  content: "Részletek →";
  margin-top: 14px;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .3s ease, transform .3s ease;
}
.work-card.clickable:hover::after,
.work-card.clickable:focus-visible::after { opacity: 1; transform: none; }
.work-card.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Reference modal ---------- */
.ref-modal-overlay {
  position: fixed; inset: 0;
  z-index: 250;
  background: rgba(5, 8, 14, .72);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 22px;
  animation: refFade .25s ease;
}
@keyframes refFade { from { opacity: 0; } to { opacity: 1; } }
.ref-modal {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: linear-gradient(180deg, #0d1424, #0a0f1a);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 32px 30px;
  animation: refPop .3s cubic-bezier(.22,1,.36,1);
}
@keyframes refPop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.ref-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px; height: 34px; border-radius: 50%;
  cursor: pointer; font-size: 1rem;
  transition: color .2s ease, background .2s ease;
}
.ref-modal-close:hover { color: var(--text); background: var(--surface-2); }
.ref-modal h3 { font-size: 1.6rem; margin: 14px 0 12px; letter-spacing: -.5px; }
.ref-modal p { color: var(--text-muted); }
.ref-modal-more { margin-top: 12px; color: var(--text); }
.ref-modal-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin: 22px 0;
  padding: 14px 0;
  border-block: 1px solid var(--border);
  font-size: .85rem; color: var(--text-dim);
}
.ref-modal-meta .work-badge { font-family: var(--mono); color: var(--accent-3); }
.ref-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- News ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform .3s ease, border-color .3s ease;
}
.news-card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.news-date {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--accent);
}
.news-card h3 { font-size: 1.2rem; margin: 10px 0; letter-spacing: -.3px; }
.news-card p { color: var(--text-muted); font-size: .95rem; white-space: pre-line; }

@media (max-width: 980px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .news-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}
.price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, border-color .3s ease;
}
.price-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.price-featured {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  box-shadow: 0 24px 60px -28px var(--accent-glow);
}
.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  color: #04121a; background: var(--grad);
  padding: 5px 14px; border-radius: 999px;
}
.price-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.price { font-family: var(--mono); font-size: 2rem; font-weight: 700; letter-spacing: -1px; }
.price span { font-size: .9rem; color: var(--text-dim); font-weight: 400; margin-left: 2px; }
.price-sub { color: var(--text-muted); font-size: .92rem; margin: 8px 0 18px; }
.price-card ul { list-style: none; display: grid; gap: 10px; margin: 0 0 22px; flex-grow: 1; }
.price-card li { font-size: .92rem; color: var(--text-muted); padding-left: 24px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent-3); font-weight: 700; }

@media (max-width: 880px) { .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 20px;
  transition: border-color .25s ease;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; font-weight: 400; transition: transform .25s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 0 18px; color: var(--text-muted); font-size: .95rem; line-height: 1.7; }

/* ============================================================
   LIVE PEEK (iframe window)
   ============================================================ */
.peek-wrap { max-width: 860px; margin: 0 auto; text-align: center; }
.peek-window {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0b1018;
  position: relative;
}
.peek-window::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(56,225,255,.5), transparent 40%, transparent 60%, rgba(108,123,255,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; opacity: .5;
}
.peek-url { margin-left: 10px; font-family: var(--mono); font-size: .82rem; color: var(--text-dim); }
.peek-viewport {
  position: relative;
  height: 460px;
  overflow: hidden;
  background: linear-gradient(180deg, #0d1320, #0a0f1a);
}
.peek-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: .9rem;
  z-index: 0;
}
.peek-viewport iframe {
  position: absolute; top: 0; left: 0;
  width: 153.85%; height: 153.85%;
  border: 0;
  transform: scale(.65);
  transform-origin: top left;
  z-index: 1;
}
.peek-open {
  position: absolute; inset: 0; z-index: 2;
  cursor: pointer;
}
.peek-open::after {
  content: "Megnyitás ↗";
  position: absolute; right: 14px; bottom: 14px;
  font-family: var(--mono); font-size: .8rem;
  color: #04121a; background: var(--grad);
  padding: 7px 14px; border-radius: 999px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 10px 24px -10px var(--accent-glow);
}
.peek-window:hover .peek-open::after { opacity: 1; transform: none; }
.peek-cta { margin-top: 18px; }
@media (max-width: 600px) { .peek-viewport { height: 360px; } }

/* ============================================================
   SUPPORT TICKETS (shared)
   ============================================================ */
.ticket-thread { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; margin-bottom: 14px; }
.tmsg { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); max-width: 88%; }
.tmsg-cust { align-self: flex-end; background: var(--grad-soft); }
.tmsg-admin { align-self: flex-start; background: var(--surface); }
.tmsg-meta { font-family: var(--mono); font-size: .72rem; color: var(--text-dim); margin-bottom: 4px; }
.tmsg-body { font-size: .92rem; color: var(--text); white-space: pre-wrap; }

/* ============================================================
   COOKIE CONSENT
   ============================================================ */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 200%);
  width: min(940px, calc(100% - 32px));
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(13, 19, 32, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.cookie-banner.show { transform: translate(-50%, 0); }
.cookie-text { flex: 1 1 360px; }
.cookie-text strong { display: block; margin-bottom: 4px; font-size: 1rem; }
.cookie-text p { font-size: .9rem; color: var(--text-muted); margin: 0; }
.cookie-text a { color: var(--accent); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.cookie-modal-overlay {
  position: fixed; inset: 0;
  z-index: 320;
  background: rgba(5,8,14,.72);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 22px;
}
.cookie-modal {
  width: 100%; max-width: 480px;
  background: linear-gradient(180deg, #0d1424, #0a0f1a);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.cookie-modal h3 { font-size: 1.35rem; margin-bottom: 10px; }
.cookie-modal > p { color: var(--text-muted); font-size: .92rem; margin-bottom: 18px; }
.cookie-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.cookie-cat span { font-size: .9rem; color: var(--text-muted); }
.cookie-cat strong { color: var(--text); font-size: .95rem; }
.cookie-cat input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.cookie-cat input:disabled { opacity: .6; cursor: not-allowed; }
.cookie-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

@media (max-width: 560px) {
  .cookie-banner { gap: 14px; padding: 18px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* stagger children inside grids */
.services-grid .reveal.in,
.products-grid .reveal.in,
.work-grid .reveal.in,
.timeline .reveal.in { transition-delay: var(--d, 0s); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-terminal { order: -1; max-width: 520px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { display: none; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .main-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px 22px 26px;
    background: rgba(10,14,23,.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform .35s ease;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 13px 16px; }
  .main-nav a.nav-cta { text-align: center; margin-top: 6px; }
  .nav-toggle { display: flex; }

  .hero { padding-top: 120px; min-height: auto; }
  .hero-stats { gap: 26px; }
  .services-grid, .products-grid, .work-grid, .timeline, .footer-grid { grid-template-columns: 1fr; }
  .about-points { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .terminal-body { min-height: 260px; font-size: .82rem; }
}

/* ---------- Akciós ár (áthúzott eredeti ár) ---------- */
.price-old { text-decoration: line-through; color: var(--text-dim); font-weight: 400; font-size: .85em; }

/* ---------- Small phones (≤480px) ---------- */
@media (max-width: 480px) {
  .container { padding-inline: 16px; }
  .section { padding: 58px 0; }
  .section-head { margin-bottom: 36px; }
  .section-sub { font-size: .98rem; }
  .hero { padding-top: 104px; padding-bottom: 64px; }
  .hero-title { letter-spacing: -1px; }
  .hero-lead { font-size: 1.02rem; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 18px 28px; margin-top: 34px; }
  .stat-num { font-size: 1.7rem; }
  .floating-badge { display: none; }      /* ne lógjon ki a terminál mellett */
  .faq-item summary { font-size: .96rem; }
  .faq-item { padding: 0 16px; }
  .price-card { padding: 28px 22px; }
}

/* ---------- Mobil UX: nincs iOS auto-zoom, görgethető modálok, nagyobb tap-célok ---------- */
@media (max-width: 680px) {
  /* a 16px alatti betűméretű mezőkre az iOS ráközelít fókuszáláskor → 16px */
  .field input, .field select, .field textarea,
  input[type="text"], input[type="email"], input[type="password"],
  input[type="tel"], input[type="number"], input[type="search"],
  textarea, select {
    font-size: 16px;
  }
  .btn { min-height: 44px; }   /* kényelmes érintési méret */

  /* a modál tartalma görögjön, ne lógjon ki a képernyőből */
  .modal {
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    display: flex;
    flex-direction: column;
  }
  .modal-body { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
}

/* ============================================================
   FLOATING CHAT WIDGET + ROBOT MASCOT
   ============================================================ */
.chat-widget { position: fixed; right: 22px; bottom: 22px; z-index: 150; }
.chat-fab {
  position: relative;
  width: 60px; height: 60px;
  border: 0; border-radius: 50%;
  background: var(--grad);
  color: #04121a;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 14px 32px -10px var(--accent-glow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.chat-fab:hover { transform: scale(1.07); box-shadow: 0 18px 40px -10px var(--accent-glow); }
.chat-fab-ic { grid-area: 1 / 1; font-size: 1.5rem; line-height: 1; transition: opacity .25s ease, transform .35s ease; }
.chat-fab-close { opacity: 0; transform: rotate(-90deg); }
.chat-widget.open .chat-fab-open { opacity: 0; transform: rotate(90deg); }
.chat-widget.open .chat-fab-close { opacity: 1; transform: rotate(0); }

/* gentle attention pulse on the button */
.chat-fab::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: chatpulse 2.6s ease-out infinite;
}
.chat-widget.open .chat-fab::after { animation: none; }
@keyframes chatpulse {
  0% { box-shadow: 0 0 0 0 rgba(56,225,255,.5); }
  70% { box-shadow: 0 0 0 14px rgba(56,225,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,225,255,0); }
}

.chat-popup {
  position: absolute; right: 0; bottom: 74px;
  width: 250px;
  background: linear-gradient(180deg, #0c1320, #0a0f1a);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform-origin: bottom right;
  animation: chatpop .22s ease;
}
@keyframes chatpop { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: none; } }
.chat-popup-head { padding: 14px 16px; font-weight: 600; background: var(--grad-soft); border-bottom: 1px solid var(--border); }
.chat-popup-body { padding: 10px; display: grid; gap: 6px; }
.chat-channel {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: .92rem; font-weight: 500;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.chat-channel:hover { border-color: var(--accent); background: var(--surface-2); transform: translateX(2px); }
.chat-channel-ic { font-size: 1.15rem; }

/* robot mascot */
.chat-robot {
  position: absolute; right: 56px; bottom: 58px;
  width: 56px; height: 56px;
  pointer-events: auto; cursor: pointer;
  animation: robotfly 9s ease-in-out infinite;
}
.robot-svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)); }
.robot-arm { transform-origin: 48px 43px; animation: robotwave 1.6s ease-in-out infinite; }
.chat-widget.open .chat-robot { opacity: 0; pointer-events: none; transition: opacity .2s ease; }

/* kattintásra: szétrobban, majd lassan újraépül */
.robot-svg .rpiece {
  transform-box: fill-box; transform-origin: center;
  transition: transform .5s cubic-bezier(.36, 0, .66, -.4), opacity .5s ease;
}
.chat-robot.exploding .robot-svg .rpiece {
  transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--rot, 0)) scale(.25);
  opacity: 0;
}
.chat-robot.reassembling .robot-svg .rpiece {
  transition: transform 1.8s cubic-bezier(.16, 1, .3, 1), opacity 1.2s ease;
  transform: none; opacity: 1;
}
.chat-robot.exploding .robot-arm,
.chat-robot.reassembling .robot-arm { animation: none; }

/* üdvözlő szövegbuborék a robot FÖLÖTT (a .chat-robot gyermeke, vele mozog) */
.robot-bubble {
  position: absolute;
  bottom: calc(100% + 12px); right: -6px;
  width: max-content; max-width: min(230px, calc(100vw - 40px));
  padding: 11px 14px;
  background: #fff; color: #0d1320;
  font-size: .9rem; font-weight: 600; line-height: 1.35;
  border-radius: 14px;
  box-shadow: 0 14px 32px -12px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(10px) scale(.85);
  transform-origin: bottom right;
  transition: opacity .35s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none; z-index: 2;
}
.robot-bubble.show { opacity: 1; transform: translateY(0) scale(1); }
.robot-bubble::after {
  content: ''; position: absolute; right: 20px; bottom: -6px;
  width: 14px; height: 14px; background: #fff;
  transform: rotate(45deg); border-radius: 0 0 3px 0;
}
/* arany "Kattints rám!" variáns */
.robot-bubble.gold {
  background: linear-gradient(135deg, #ffd86b, #f5a623);
  color: #2a1c00;
  box-shadow: 0 0 0 1px rgba(245, 196, 81, .6), 0 16px 36px -10px rgba(245, 166, 35, .8);
}
.robot-bubble.gold::after { background: #f6ab26; }

/* ---------- Jogi oldalak (impresszum / ÁSZF / adatkezelés) ---------- */
.legal-main { padding: 120px 0 80px; }
.legal-card {
  max-width: 860px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px clamp(20px, 5vw, 56px);
}
.legal-card h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.5px; margin-bottom: 6px; }
.legal-updated { color: var(--text-muted); font-size: .9rem; margin-bottom: 28px; }
.legal-card h2 { font-size: 1.2rem; margin: 30px 0 10px; color: var(--text); }
.legal-card h3 { font-size: 1.02rem; margin: 18px 0 6px; color: var(--text); }
.legal-card p, .legal-card li { color: var(--text-muted); line-height: 1.7; font-size: .96rem; }
.legal-card ul, .legal-card ol { margin: 8px 0 8px 22px; }
.legal-card li { margin-bottom: 6px; }
.legal-card a { color: var(--accent); }
.legal-card strong { color: var(--text); }
.legal-data {
  list-style: none; margin: 10px 0; padding: 18px 20px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
}
.legal-data li { margin-bottom: 8px; }
.legal-data li:last-child { margin-bottom: 0; }
.legal-note {
  margin-top: 26px; padding: 14px 16px; border-radius: 12px;
  background: var(--grad-soft); border: 1px solid var(--border-strong);
  font-size: .9rem; color: var(--text-muted);
}
.legal-back { display: inline-block; margin-top: 30px; }
.consent-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 4px; font-size: .86rem; line-height: 1.45; color: var(--text-muted); cursor: pointer;
}
.consent-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); flex: 0 0 auto; cursor: pointer; }
.consent-row a { color: var(--accent); }
.placeholder { color: #ffb86c; background: rgba(255,184,108,.12); padding: 0 4px; border-radius: 4px; }
@keyframes robotfly {
  0%   { transform: translate(0, 0) rotate(0deg); }
  20%  { transform: translate(-42px, -16px) rotate(-8deg); }
  45%  { transform: translate(-14px, -46px) rotate(7deg); }
  70%  { transform: translate(-54px, -28px) rotate(-6deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
@keyframes robotwave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-42deg); } }

@media (max-width: 480px) {
  .chat-widget { right: 16px; bottom: 16px; }
  .chat-fab { width: 54px; height: 54px; }
  .chat-fab-ic { font-size: 1.35rem; }
  .chat-robot { width: 46px; height: 46px; right: 48px; bottom: 52px; }
  .chat-popup { width: min(250px, calc(100vw - 32px)); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .chat-robot, .robot-arm, .chat-fab::after { animation: none !important; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  #bg-canvas { display: none; }
}
