/* ============================================================
   Gazdag László — grafikai portfólió
   Hi-fi rekonstrukció. Design tokenek a :root-ban.
   ============================================================ */

:root {
  /* Háttér */
  --bg:            #0e0d0b;
  --bg-alt:        #0c0b07;
  --bg-sidebar:    #100e08;

  /* Panel / kártya */
  --panel:         #141009;
  --panel-2:       #120f08;

  /* Szegélyek */
  --border:        #221d14;
  --divider:       #1c1810;
  --border-input:  #262013;
  --border-icon:   #2c2618;
  --border-hover:  #3d3322;
  --border-side:   #241f16;

  /* Szöveg */
  --text:          #f3efe7;
  --text-1:        #f6f2ea;
  --text-1b:       #f4eee1;
  --text-2:        #c6bda9;
  --text-2b:       #c3bba8;
  --text-2c:       #c9c1ae;
  --text-2d:       #b4ab97;
  --text-muted:    #a49b88;
  --text-muted-2:  #8b8371;
  --text-faint:    #6f6857;
  --text-faint-2:  #5f5849;

  /* Akcent */
  --accent:        #f0a545;
  --accent-hover:  #f8bd66;
  --accent-soft:   rgba(240,165,69,.08);

  /* Tipográfia */
  --display: 'Space Grotesk', sans-serif;
  --body:    'Manrope', sans-serif;
  --mono:    ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --sidebar-w: 300px;
  --pad-x: 8vw;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  position: relative;
}

::selection { background: var(--accent); color: var(--bg); }
::placeholder { color: var(--text-faint); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

/* ----------------------------------------------------------------
   Placeholder helyőrzők (csíkos minta + monospace felirat).
   Cseréld valós képre: állíts be background-image-t, vagy tegyél
   <img>-et a placeholder helyére. A .ph--img osztály elrejti a mintát.
   ---------------------------------------------------------------- */
.ph {
  font-family: var(--mono);
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #1a1610 0 12px, #141009 12px 24px);
}
.ph--img { background: none; color: transparent; }

/* ============================ SIDEBAR ============================ */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-side);
  display: flex;
  flex-direction: column;
  padding: 38px 34px;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 52px; }
.ph--logo {
  width: 46px; height: 46px; flex: none;
  border-radius: 12px;
  background: repeating-linear-gradient(45deg, #221d12 0 8px, #181309 8px 16px);
  border: 1px solid #322a1b;
  font-size: 9px; color: #7a7160;
}
.brand__name {
  font-family: var(--display);
  font-weight: 700; font-size: 19px; letter-spacing: -.01em;
  color: var(--text-1);
  display: block;
}
.brand__sub {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-muted-2); margin-top: 3px; display: block;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 12px; border-radius: 9px;
  font-size: 14.5px; font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  transition: color .25s ease, background .25s ease;
}
.nav__dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: #3a3325;
  transition: background .25s ease, transform .25s ease;
}
.nav__item:hover { color: var(--text-1); }
.nav__item.is-active { color: var(--accent); background: var(--accent-soft); }
.nav__item.is-active .nav__dot { background: var(--accent); transform: scale(1.5); }

.sidebar__foot {
  margin-top: auto; padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 9px;
}
.sidebar__foot a { font-size: 13px; color: var(--text-muted); }
.sidebar__foot a:hover { color: var(--accent-hover); }
.sidebar__copy { font-size: 12px; color: var(--text-faint-2); margin-top: 8px; }

/* ===================== MOBIL FEJLÉC ===================== */
.topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: 64px; z-index: 40;
  align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: rgba(16,14,8,.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-side);
}
.topbar__brand { display: flex; align-items: center; gap: 12px; }
.ph--logoSm {
  width: 34px; height: 34px; flex: none;
  border-radius: 9px;
  background: repeating-linear-gradient(45deg, #221d12 0 8px, #181309 8px 16px);
  border: 1px solid #322a1b;
  font-size: 8px; color: #7a7160;
}
.topbar__name {
  font-family: var(--display); font-weight: 700; font-size: 16px;
  color: var(--text-1); letter-spacing: -.01em;
}
.hamburger {
  width: 44px; height: 44px; flex: none;
  background: transparent; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--text-1);
  transition: transform .3s ease, opacity .3s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-scrim {
  position: fixed; inset: 0; z-index: 25;
  background: rgba(9,8,6,.6);
  opacity: 0; transition: opacity .3s ease;
}
.nav-scrim.is-open { opacity: 1; }

/* ============================= MAIN ============================= */
.main { margin-left: var(--sidebar-w); }

.section { padding: 120px var(--pad-x); border-top: 1px solid var(--divider); }
.section--alt { background: var(--bg-alt); }
.section--contact { padding-bottom: 130px; }

/* --- Szekció fejléc sablon --- */
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.sec-num { font-family: var(--display); font-size: 14px; color: var(--accent); letter-spacing: .1em; }
.sec-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -.02em;
  margin: 0; color: var(--text-1);
}
.sec-intro {
  max-width: 640px; color: var(--text-muted-2); font-size: 16px;
  margin: 0 0 48px; line-height: 1.6;
}
.sec-intro--lg { color: var(--text-2d); font-size: 17px; margin-bottom: 56px; }

/* ============================= HERO ============================= */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px var(--pad-x);
  position: relative;
}
.hero__decor {
  position: absolute; top: 0; right: 0; width: 52%; height: 100%;
  background: repeating-linear-gradient(135deg, #141009 0 22px, #110d07 22px 44px);
  opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.hero__body { position: relative; }

.kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.kicker__line { width: 44px; height: 2px; background: var(--accent); }
.kicker__text {
  font-family: var(--display); font-size: 13px;
  letter-spacing: .24em; text-transform: uppercase; color: var(--accent);
}
.hero__title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(48px, 7.2vw, 104px); line-height: .98; letter-spacing: -.03em;
  margin: 0; color: #f8f4ec;
}
.hero__lead {
  margin: 34px 0 0; font-size: clamp(17px, 1.7vw, 23px);
  color: var(--text-2d); max-width: 640px; line-height: 1.5; text-wrap: pretty;
}
.hero__actions { display: flex; gap: 14px; margin-top: 46px; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; bottom: 42px; left: var(--pad-x);
  display: flex; align-items: center; gap: 11px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: #7d7563;
}
.scroll-hint:hover { color: var(--text-2d); }
.scroll-hint__arrow { display: inline-flex; animation: floatY 2.4s ease-in-out infinite; }

/* ============================ GOMBOK ============================ */
.btn {
  padding: 15px 30px; border-radius: 10px;
  font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .25s ease, border-color .25s ease, transform .25s ease, color .25s ease;
}
.btn--solid {
  background: var(--accent); color: var(--bg); font-weight: 700; border: none;
}
.btn--solid:hover { background: var(--accent-hover); color: var(--bg); transform: translateY(-2px); }
.btn--ghost {
  border: 1px solid var(--border-hover-ghost, #342d1e); color: var(--text); font-weight: 600;
}
.btn--ghost:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }

/* ============================ RÓLAM ============================ */
.prose {
  max-width: 820px; display: flex; flex-direction: column; gap: 20px;
  font-size: clamp(16px, 1.35vw, 19px); line-height: 1.65; color: var(--text-2b);
  text-wrap: pretty;
}
.prose p { margin: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose__muted { color: var(--text-muted-2); }

.subhead {
  font-family: var(--display); font-weight: 600; font-size: 20px;
  color: #e7e0d1; margin: 64px 0 24px;
}

.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 56px; }
.service { display: flex; gap: 24px; padding: 34px 8px; border-bottom: 1px solid var(--divider); }
.ph--icon-lg {
  width: 60px; height: 60px; flex: none; border-radius: 14px;
  background: repeating-linear-gradient(45deg, #1e1910 0 8px, #171208 8px 16px);
  border: 1px solid var(--border-icon);
  font-size: 9px; color: var(--text-faint);
}
.service__ico {
  width: 60px; height: 60px; flex: none; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--border-icon);
  display: flex; align-items: center; justify-content: center; padding: 11px;
}
.service__ico img { width: 100%; height: 100%; object-fit: contain; }
.service__title {
  margin: 0 0 12px; font-family: var(--display); font-size: 20px; font-weight: 600;
  color: var(--text-1b); line-height: 1.2;
}
.service__desc { margin: 0; font-size: 15.5px; line-height: 1.75; color: var(--text-2); text-wrap: pretty; }

/* ==================== AMIBEN SEGÍTENI TUDOK ==================== */
.help { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; }
.help__item { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--divider); }
.help__num { font-family: var(--display); font-size: 14px; color: var(--accent); flex: none; padding-top: 2px; }
.help__text { font-size: 16px; line-height: 1.5; color: var(--text-2c); }

/* ========================= MEGOLDÁSOK ========================= */
.accordion { display: flex; flex-direction: column; gap: 14px; }
.acc {
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--panel-2); transition: border-color .3s ease;
}
.acc.is-open { border-color: var(--border-hover); }
.acc__header {
  width: 100%; display: flex; align-items: center; gap: 24px;
  padding: 26px 30px; background: transparent; border: none; cursor: pointer; text-align: left;
}
.acc__num { font-family: var(--display); font-size: 14px; color: var(--accent); flex: none; }
.ph--acc {
  flex: none; width: 110px; height: 70px; border-radius: 9px;
  background: repeating-linear-gradient(45deg, #1c1810 0 10px, #161108 10px 20px);
  border: 1px solid #2a2416;
  font-size: 9px; color: var(--text-faint);
}
.acc__title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(18px, 1.9vw, 24px); color: #efe8d9; flex: 1;
}
.acc__plus { font-size: 26px; color: var(--text-muted-2); flex: none; transition: transform .3s ease; }
.acc.is-open .acc__plus { transform: rotate(45deg); }

.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.acc.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__body { padding: 0 30px 36px 178px; max-width: 840px; }
.acc__intro { margin: 0 0 20px; color: var(--text-2b); font-size: 16px; line-height: 1.72; }
.acc__lead {
  font-family: var(--display); font-weight: 600; font-size: 13px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.acc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.acc__list li { display: flex; gap: 14px; color: var(--text-2d); font-size: 15px; line-height: 1.66; }
.acc__list li::before { content: '—'; color: var(--accent); flex: none; padding-top: 1px; }
.acc__list strong { color: #eae3d4; font-weight: 600; }

/* ========================= PORTFÓLIÓ ========================= */
.portfolio { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile {
  position: relative; aspect-ratio: 1/1;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  cursor: pointer; padding: 0;
  background: repeating-linear-gradient(45deg, #1a1610 0 12px, #141009 12px 24px);
  transition: border-color .25s ease;
}
.tile:hover { border-color: var(--accent); }
.tile__num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--text-faint);
}
.tile__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 14px;
  background: linear-gradient(0deg, rgba(14,13,11,.92), rgba(14,13,11,0) 60%);
  opacity: 0; transition: opacity .3s ease;
}
.tile:hover .tile__overlay { opacity: 1; }
.tile__idx { font-size: 12px; color: var(--accent); font-family: var(--display); }
.tile__cat { font-size: 13px; color: #efe8d9; font-weight: 600; line-height: 1.3; }

/* ========================== KAPCSOLAT ========================== */
.contact { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: start; }
.contact__cards { display: flex; flex-direction: column; gap: 14px; }
.info-card {
  display: flex; align-items: center; gap: 16px; padding: 20px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
}
.info-card--link { transition: border-color .3s ease; }
.info-card--link:hover { border-color: var(--border-hover); }
.ph--icon {
  width: 46px; height: 46px; flex: none; border-radius: 11px;
  background: repeating-linear-gradient(45deg, #1e1910 0 8px, #171208 8px 16px);
  border: 1px solid var(--border-icon);
  font-size: 9px; color: var(--text-faint);
}
.info-card__label { font-size: 12px; color: var(--text-muted-2); text-transform: uppercase; letter-spacing: .12em; }
.info-card__value { font-size: 16px; color: #efe8d9; font-weight: 600; margin-top: 3px; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field {
  padding: 16px 18px; background: var(--panel-2); border: 1px solid var(--border-input);
  border-radius: 11px; color: var(--text); font-size: 15px; outline: none;
  font-family: var(--body);
  transition: border-color .25s ease;
}
.field:focus { border-color: var(--border-hover); }
.field--full { grid-column: 1 / 3; }
textarea.field { resize: vertical; }
.form__submit { justify-self: start; padding: 16px 34px; }
.form__note { grid-column: 1 / 3; margin: 0; font-size: 14px; color: var(--text-muted-2); }
.form__note.is-error { color: #e0956a; }

/* ============================ LIGHTBOX ============================ */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(9,8,6,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5vh 6vw;
  animation: lbIn .25s ease;
}
.lb-btn {
  position: absolute; border: 1px solid #342d1e; color: var(--text);
  cursor: pointer; border-radius: 50%; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .25s ease, background .25s ease;
}
.lb-btn:hover { border-color: var(--accent); }
.lb-btn--close { top: 28px; right: 34px; width: 46px; height: 46px; font-size: 22px; background: transparent; }
.lb-btn--prev { left: 34px; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 22px; background: rgba(20,17,10,.7); }
.lb-btn--next { right: 34px; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 22px; background: rgba(20,17,10,.7); }

.lb-inner { width: min(760px, 80vw); max-width: 100%; }
.lb-image {
  aspect-ratio: 4/3; border-radius: 14px; border: 1px solid #2a2416;
  background: repeating-linear-gradient(45deg, #1a1610 0 16px, #141009 16px 32px);
  font-size: 13px; color: var(--text-faint);
  overflow: hidden;
}
.lb-image img { width: 100%; height: 100%; object-fit: contain; }
.lb-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; gap: 20px; }
.lb-count { font-family: var(--display); color: var(--accent); font-size: 14px; }
.lb-caption { margin: 6px 0 0; color: #e7e0d1; font-size: 17px; }

/* ========================== KEYFRAMES ========================== */
@keyframes lbIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ---- data-reveal alap állapot (JS kapcsolja be) ---- */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

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

/* ============================================================
   RESZPONZÍV
   ============================================================ */

/* Közepes: szűkebb padding, portfólió 4 -> a rács marad, kisebb gap */
@media (max-width: 1200px) {
  .contact { grid-template-columns: 300px 1fr; gap: 40px; }
}

/* ≤900px: sidebar -> felső fejléc + becsúszó menü */
@media (max-width: 900px) {
  :root { --pad-x: 6vw; }

  .sidebar {
    top: 64px; bottom: auto; height: calc(100dvh - 64px);
    width: 280px;
    transform: translateX(-100%);
    transition: transform .3s ease;
    padding: 28px 26px;
  }
  .sidebar.is-open { transform: translateX(0); }
  .brand { display: none; }             /* a márkajel a fejlécben van */
  .sidebar__foot { padding-top: 24px; }

  .topbar { display: flex; }
  .nav-scrim.is-open { display: block; }

  .main { margin-left: 0; padding-top: 64px; }

  .section { padding: 80px var(--pad-x); }
  .hero { padding: 80px var(--pad-x); min-height: calc(100vh - 64px); }
  .scroll-hint { left: var(--pad-x); }

  .services { grid-template-columns: 1fr; gap: 0; }
  .help { grid-template-columns: 1fr; gap: 0; }

  .portfolio { grid-template-columns: repeat(2, 1fr); }

  .acc__header { gap: 16px; padding: 22px 20px; }
  .ph--acc { width: 84px; height: 56px; }
  .acc__body { padding: 0 20px 30px 20px; }

  .contact { grid-template-columns: 1fr; gap: 32px; }
  .contact__cards { max-width: 420px; }
}

/* ≤560px: sűrűbb mobil elrendezés */
@media (max-width: 560px) {
  .section { padding: 56px 20px; }
  .hero { padding: 40px 20px; }
  :root { --pad-x: 20px; }

  .form { grid-template-columns: 1fr; }
  .field--full { grid-column: 1; }

  .lb-btn--prev { left: 14px; width: 46px; height: 46px; }
  .lb-btn--next { right: 14px; width: 46px; height: 46px; }
  .lb-btn--close { top: 16px; right: 16px; }
  .acc__header { flex-wrap: wrap; }
  .ph--acc { order: 3; }
}
