/* ============================================================
   honlapcegeknek.hu — base.css
   Design system: "Ink & Lime" — editorial-tech, bold type
   ============================================================ */

:root {
  --ink: #0a0e13;
  --ink-2: #10161e;
  --ink-3: #161e28;
  --line: rgba(242, 238, 227, 0.1);
  --line-strong: rgba(242, 238, 227, 0.18);
  --cream: #f2eee3;
  --cream-2: #e7e1d0;
  --cream-line: rgba(10, 14, 19, 0.12);
  --lime: #c8ff4d;
  --lime-deep: #9ee018;
  --lime-glow: rgba(200, 255, 77, 0.14);
  --txt: #e9e6db;
  --txt-dim: rgba(233, 230, 219, 0.62);
  --txt-ink: #11161d;
  --txt-ink-dim: rgba(17, 22, 29, 0.66);
  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;
  --font-mono: "Space Mono", monospace;
  --radius: 18px;
  --radius-lg: 28px;
  --container: 1200px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ink) url("../img/bg-ink.jpg") center / cover no-repeat fixed;
  color: var(--txt);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (max-width: 900px) {
  body { background-attachment: scroll; }
}

::selection { background: var(--lime); color: var(--ink); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.container {
  width: min(var(--container), 92vw);
  margin: 0 auto;
}

/* ---- Mozgó háttér-aurora + részecskék (main.js szúrja be) ---- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.bg-fx .blob {
  position: absolute;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.bg-fx .blob.b1 {
  background: radial-gradient(circle, rgba(200, 255, 77, 0.16), transparent 65%);
  top: -18vw;
  right: -14vw;
  animation: blob-drift-1 34s ease-in-out infinite alternate;
}
.bg-fx .blob.b2 {
  background: radial-gradient(circle, rgba(126, 232, 76, 0.1), transparent 65%);
  bottom: -22vw;
  left: -16vw;
  animation: blob-drift-2 44s ease-in-out infinite alternate;
}
.bg-fx .blob.b3 {
  background: radial-gradient(circle, rgba(242, 238, 227, 0.06), transparent 60%);
  top: 28%;
  left: 30%;
  width: 38vw;
  height: 38vw;
  animation: blob-drift-3 52s ease-in-out infinite alternate;
}
@keyframes blob-drift-1 {
  to { transform: translate(-16vw, 22vh) scale(1.25); }
}
@keyframes blob-drift-2 {
  to { transform: translate(14vw, -18vh) scale(0.85); }
}
@keyframes blob-drift-3 {
  to { transform: translate(-10vw, 12vh) scale(1.3); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-fx .blob { animation: none; }
}

/* ---- Noise + grid atmosphere ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Eyebrow / labels ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--lime);
}
.on-cream .eyebrow { color: #5c7a00; }
.on-cream .eyebrow::before { background: #5c7a00; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  padding: 17px 30px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, background 0.25s, color 0.25s;
  position: relative;
  white-space: nowrap;
}
.btn svg { transition: transform 0.35s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

.btn-lime {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 0 0 0 var(--lime-glow);
}
.btn-lime:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px -8px rgba(200, 255, 77, 0.45);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--txt);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-2px); }

.on-cream .btn-ghost { border-color: rgba(10, 14, 19, 0.25); color: var(--txt-ink); }
.on-cream .btn-ghost:hover { border-color: var(--txt-ink); color: var(--txt-ink); }

.btn-ink {
  background: var(--ink);
  color: var(--cream);
}
.btn-ink:hover { transform: translateY(-2px); box-shadow: 0 14px 38px -10px rgba(10, 14, 19, 0.5); }

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  transition: background 0.3s, box-shadow 0.3s, transform 0.4s var(--ease-out);
}
.site-header.scrolled {
  background: rgba(10, 14, 19, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.hidden { transform: translateY(-110%); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo em { font-style: normal; color: var(--lime); }
.logo-mark {
  flex: 0 0 36px;
  filter: drop-shadow(0 0 12px rgba(200, 255, 77, 0.35));
  transition: transform 0.45s var(--ease-out);
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-mark .lm-cursor {
  animation: cursor-nudge 2.6s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes cursor-nudge {
  0%, 100% { transform: translate(0, 0); }
  45% { transform: translate(-3px, -3px); }
  55% { transform: translate(0.5px, 0.5px) scale(0.92); }
  65% { transform: translate(0, 0); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a:not(.btn) {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--txt-dim);
  position: relative;
  transition: color 0.2s;
  padding: 4px 0;
}
.nav-links a:not(.btn):hover,
.nav-links a:not(.btn).active { color: var(--cream); }
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--lime);
  transition: width 0.3s var(--ease-out);
}
.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn).active::after { width: 100%; }

.nav-links .btn { padding: 12px 24px; font-size: 14.5px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px; height: 44px;
  position: relative;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  background: var(--cream);
  margin: 6px auto;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: 80px 0 36px;
  position: relative;
  overflow: hidden;
}
.site-footer::after {
  content: "honlapcégeknek";
  position: absolute;
  bottom: -0.28em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(80px, 13vw, 190px);
  letter-spacing: -0.04em;
  color: rgba(242, 238, 227, 0.04);
  white-space: nowrap;
  pointer-events: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
  position: relative;
  z-index: 1;
}
.footer-grid h4 {
  font-size: 15px;
  margin-bottom: 18px;
  color: var(--cream);
  letter-spacing: 0.04em;
}
.footer-grid li { margin-bottom: 11px; }
.footer-grid a, .footer-grid p {
  color: var(--txt-dim);
  font-size: 15px;
  transition: color 0.2s;
}
.footer-grid a:hover { color: var(--lime); }
.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  color: rgba(233, 230, 219, 0.4);
  position: relative;
  z-index: 1;
}
.footer-legal { display: inline-flex; gap: 8px; align-items: center; }
.footer-legal a { color: rgba(233, 230, 219, 0.55); transition: color 0.2s; }
.footer-legal a:hover { color: var(--lime); }

/* ---- Popup ---- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 13, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.popup-overlay.show { opacity: 1; visibility: visible; }

.popup {
  background: var(--cream);
  color: var(--txt-ink);
  border-radius: var(--radius-lg);
  max-width: 920px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  position: relative;
  transform: translateY(28px) scale(0.96);
  transition: transform 0.5s var(--ease-out);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.6);
}
.popup-overlay.show .popup { transform: translateY(0) scale(1); }

.popup-visual {
  background: var(--ink);
  position: relative;
  min-height: 100%;
  overflow: hidden;
}
.popup-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.9;
}
.popup-visual .popup-badge {
  position: absolute;
  top: 22px; left: 22px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 100px;
  font-weight: 700;
}

.popup-body { padding: 44px 42px; }
.popup-body h3 {
  font-size: clamp(24px, 3vw, 31px);
  margin: 14px 0 12px;
  color: var(--ink);
}
.popup-body h3 em { font-style: normal; background: linear-gradient(transparent 62%, var(--lime) 62%); }
.popup-body p { font-size: 15.5px; color: var(--txt-ink-dim); margin-bottom: 20px; }
.popup-body ul { margin-bottom: 24px; }
.popup-body ul li {
  font-size: 14.5px;
  padding-left: 26px;
  position: relative;
  margin-bottom: 9px;
  color: var(--txt-ink);
}
.popup-body ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #5c7a00;
  font-weight: 800;
}
.popup-body .btn { width: 100%; justify-content: center; }
.popup-note {
  font-size: 12.5px !important;
  margin: 14px 0 0 !important;
  text-align: center;
  color: rgba(17, 22, 29, 0.45) !important;
}

.popup-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 14, 19, 0.08);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  z-index: 2;
  transition: background 0.2s, transform 0.3s;
}
.popup-close:hover { background: rgba(10, 14, 19, 0.16); transform: rotate(90deg); }

/* ---- Reveal animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }
.reveal.d4 { transition-delay: 0.4s; }

/* ---- Hero: AZONNALI, CSS-vezérelt belépő (nem várja meg a main.js-t) ----
   A hajtás feletti hero nem függhet a JS IntersectionObservertől, különben az
   LCP-elem (hero-kép) több másodpercig opacity:0 marad. A szöveg fade-up-ot kap,
   a hero-kép (= LCP) viszont AZONNAL, fade nélkül jelenik meg (csak finom csúszás). */
.hero .reveal { animation: heroRevealUp 0.85s var(--ease-out) both; transition: none; }
.hero .reveal.d1 { animation-delay: 0.07s; }
.hero .reveal.d2 { animation-delay: 0.14s; }
.hero .reveal.d3 { animation-delay: 0.21s; }
.hero .reveal.d4 { animation-delay: 0.28s; }
.hero .hero-visual.reveal { opacity: 1; animation-name: heroSlideUp; }
@keyframes heroRevealUp { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes heroSlideUp { from { transform: translateY(22px); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---- Responsive base ---- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 19, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
    z-index: 1000;
  }
  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-links a:not(.btn) { font-size: 24px; font-family: var(--font-display); font-weight: 700; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .popup { grid-template-columns: 1fr; max-width: 460px; }
  .popup-visual { display: none; }
  .popup-body { padding: 36px 28px; }
}
