/* ----------  Alap változók  ---------- */
:root {
  --bg:        #f3ede2;
  --bg-soft:   #ebe3d5;
  --paper:     #faf6ee;
  --ink:       #2a2419;
  --ink-soft:  #4a4032;
  --muted:     #8a7e6b;
  --accent:    #8b7355;
  --line:      #d8cdb8;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);

  /* Carousel kártya méret — breakpointonként felülíródik */
  --card-w: 86vw;
  --card-gap: 14px;
}

@media (min-width: 700px)  { :root { --card-w: 70vw;            --card-gap: 22px; } }
@media (min-width: 1100px) { :root { --card-w: min(62vw, 980px); --card-gap: 28px; } }

/* ----------  Reset / alapok  ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.5), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(255,255,255,.35), transparent 45%);
  background-attachment: fixed;
}

a { color: var(--ink); text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ----------  Hero  ---------- */
.hero {
  padding: clamp(70px, 12vh, 150px) 0 clamp(50px, 8vh, 100px);
  text-align: center;
}
.hero-inner { max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* Profilkép — körformára, finom melegtónusú árnyékkal */
.hero-photo-wrap {
  position: relative;
  width: clamp(110px, 13vw, 150px);
  margin: 0 auto clamp(28px, 4vh, 44px);
  /* dupla "gyűrűs" hatás: külső halvány körvonal + belső kép */
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.65), rgba(216, 205, 184, .35));
  box-shadow:
    0 14px 38px -10px rgba(42, 36, 25, .35),
    0 4px 10px -2px rgba(42, 36, 25, .12),
    inset 0 0 0 1px rgba(255,255,255,.5);
}
.hero-photo-wrap::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid var(--line);
  opacity: .55;
  pointer-events: none;
}
.hero-photo-inner {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-soft);
  position: relative;
}
.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ráközelítés Vikire — a 800x800 forráson az arc kb. 50% × 36%-nál van */
  transform: scale(1.55);
  transform-origin: 50% 34%;
  filter: contrast(1.02) brightness(1.02);
}

.hero-mark {
  font-size: 11px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}
.hero-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: .04em;
  margin: 0 0 28px;
  color: var(--ink);
}
.hero-divider { width: 64px; height: 1px; background: var(--ink); margin: 0 auto 28px; opacity: .55; }
.hero-role {
  font-size: 12px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

/* ----------  Projekt szekció  ---------- */
.project {
  padding: clamp(40px, 7vh, 90px) 0 clamp(40px, 7vh, 90px);
  position: relative;
}
.project + .project::before {
  content: "";
  display: block;
  width: 40px; height: 1px;
  background: var(--line);
  margin: 0 auto clamp(36px, 5vh, 70px);
}
.project-head {
  text-align: center;
  margin-bottom: clamp(28px, 4vh, 50px);
  padding: 0 20px;
}
.project-eyebrow {
  font-size: 11px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.project-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 50px);
  letter-spacing: .015em;
  margin: 0 0 14px;
  color: var(--ink);
}
.project-desc {
  max-width: 540px;
  margin: 0 auto;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ----------  Carousel (univerzális)  ---------- */
.gallery-wrap {
  position: relative;
}

.gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--card-gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  /* A széleken hagyott padding biztosítja, hogy az első és utolsó kép is középre snappeljen,
     és a szomszéd képből legyen "peek". */
  padding: 0 calc((100% - var(--card-w)) / 2);
  scrollbar-width: none;
  scroll-behavior: smooth;
  /* a kívülre lógó kép ne kerüljön el szövegezésileg */
  cursor: grab;
}
.gallery.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.gallery::-webkit-scrollbar { display: none; }

.gallery-item {
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.gallery-item .tile {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  cursor: zoom-in;
  width: 100%;
  aspect-ratio: 4 / 5;          /* portrait mobilon */
  border-radius: 4px;
  box-shadow: 0 8px 28px rgba(42, 36, 25, 0.08), 0 1px 0 rgba(0,0,0,.04);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}

@media (min-width: 700px) {
  .gallery-item .tile { aspect-ratio: 3 / 2; }   /* landscape tableten / gépen */
}

.gallery-item .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.4s var(--ease), filter .6s var(--ease);
  will-change: transform;
}

/* A nem-középen lévő kártyák kicsit halványabbak, kisebbek — fókusz a középsőre */
.gallery-item:not(.is-active) .tile {
  transform: scale(.94);
  box-shadow: 0 4px 16px rgba(42, 36, 25, 0.05);
}
.gallery-item:not(.is-active) .tile img {
  filter: brightness(.96) saturate(.92);
}
.gallery-item.is-active .tile img { transform: scale(1.02); }

/* Drag közben ne reagáljon klikkre */
.gallery.is-dragging a { pointer-events: none; }
.gallery.is-dragging .tile img { transition: none; }

/* ----------  Nyíl gombok (csak ≥ 700px) ---------- */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(42, 36, 25, 0.6);
  color: #f3ede2;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background .25s var(--ease), transform .25s var(--ease), opacity .25s var(--ease);
  opacity: .82;
  font-size: 22px;
  line-height: 1;
}
.gallery-nav:hover {
  background: rgba(42, 36, 25, 0.95);
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}
.gallery-nav:active { transform: translateY(-50%) scale(.96); }
.gallery-nav[disabled] { opacity: 0; pointer-events: none; }

.gallery-nav-prev { left: calc((100% - var(--card-w)) / 2 - 70px); }
.gallery-nav-next { right: calc((100% - var(--card-w)) / 2 - 70px); }

@media (min-width: 700px) {
  .gallery-nav { display: inline-flex; }
}
/* Kis viewportokon kihúznánk a képernyőről — bemozgatjuk a kártyára */
@media (min-width: 700px) and (max-width: 1099px) {
  .gallery-nav-prev { left: 14px; }
  .gallery-nav-next { right: 14px; }
}

.gallery-nav svg { width: 18px; height: 18px; }

/* ----------  Meta: számláló + progress sáv ---------- */
.gallery-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 24px auto 0;
  width: var(--card-w);
  padding: 0 4px;
}

.gallery-counter {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .28em;
  color: var(--ink-soft);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.gallery-counter .cur { color: var(--ink); font-weight: 500; }
.gallery-counter .sep { margin: 0 7px; opacity: .45; }
.gallery-counter .total { opacity: .55; }

.gallery-progress {
  flex: 1;
  height: 2px;
  background: rgba(42,36,25,.12);
  border-radius: 2px;
  overflow: hidden;
}
.gallery-progress .bar {
  display: block;
  height: 100%;
  background: var(--ink);
  width: 0%;
  transition: width .35s var(--ease);
}

/* ----------  Swipe hint (mobil only) ---------- */
.swipe-hint {
  display: none;
  margin: 14px auto 0;
  width: var(--card-w);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  opacity: .8;
}
.swipe-hint::after {
  content: "  →";
  display: inline-block;
  animation: swipeNudge 1.6s var(--ease) infinite;
}
@keyframes swipeNudge {
  0%,100% { transform: translateX(0); opacity: .8; }
  50%     { transform: translateX(6px); opacity: 1; }
}
@media (max-width: 699px) {
  .swipe-hint { display: block; }
}

/* ----------  Footer  ---------- */
.site-footer {
  padding: clamp(60px, 10vh, 110px) 0 50px;
  margin-top: 40px;
  text-align: center;
}
.footer-divider {
  width: 40px; height: 1px;
  background: var(--ink);
  opacity: .35;
  margin: 0 auto 28px;
}
.footer-name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: .06em;
  margin: 0 0 12px;
  color: var(--ink);
}
.footer-contact {
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.footer-contact .dot { margin: 0 10px; opacity: .5; }
.footer-meta {
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* ----------  Privát portfólió — jelszavas kapu ---------- */
.is-locked { overflow: hidden; height: 100vh; }
.is-locked .hero,
.is-locked main,
.is-locked .site-footer { visibility: hidden; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,.55), transparent 45%),
    radial-gradient(circle at 75% 80%, rgba(255,255,255,.35), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(216,205,184,.15), transparent 60%);
  padding: 20px;
  opacity: 1;
  transition: opacity .7s var(--ease), visibility .7s var(--ease);
}
.gate.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-inner {
  width: 100%;
  max-width: 420px;
  text-align: center;
  padding: clamp(36px, 6vh, 60px) clamp(28px, 5vw, 52px);
  background: rgba(250, 246, 238, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(216,205,184,.6);
  border-radius: 4px;
  box-shadow:
    0 30px 60px -20px rgba(42,36,25,.18),
    0 8px 20px -8px rgba(42,36,25,.1),
    inset 0 0 0 1px rgba(255,255,255,.55);
  animation: gateRise .9s var(--ease) both;
}
@keyframes gateRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.gate-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 22px;
  color: var(--ink);
  opacity: .8;
}
.gate-icon svg { width: 100%; height: 100%; }

.gate-eyebrow {
  font-size: 10.5px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.gate-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 5vw, 36px);
  letter-spacing: .02em;
  margin: 0 0 12px;
  color: var(--ink);
}

.gate-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  line-height: 1.6;
}

.gate-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid rgba(42,36,25,.18);
  border-radius: 3px;
  background: rgba(255,255,255,.6);
  overflow: hidden;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.gate-form:focus-within {
  border-color: rgba(42,36,25,.6);
  box-shadow: 0 0 0 3px rgba(42,36,25,.08);
}

.gate-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.gate-input::placeholder { color: var(--muted); letter-spacing: .12em; }

.gate-submit {
  border: none;
  background: var(--ink);
  color: var(--bg);
  width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease);
  flex-shrink: 0;
}
.gate-submit:hover { background: var(--accent); }
.gate-submit:active { transform: scale(.96); }
.gate-submit svg { width: 16px; height: 16px; }

.gate-error {
  margin-top: 16px;
  min-height: 18px;
  font-size: 11.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #a04a3a;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.gate-error.is-shown { opacity: 1; }

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.gate-form.is-error { animation: gateShake .42s var(--ease); border-color: rgba(160,74,58,.65); }

/* ----------  GLightbox finomítás ---------- */
.glightbox-clean .gslide-description { background: transparent; }
.gclose, .gnext, .gprev { background-color: rgba(42,36,25,.85) !important; }
