/* ============================================================
   BALOGH VINCE — PORTFOLIO
   Design tokens
   ============================================================ */

:root {
  /* colour — BV brand system: max. 3 core colours, per the logo.
     All "soft"/"faint"/"line" tones below are neutral tints of the
     same black/white pair (no separate hues), so the page stays a
     strict black / off-white / cyan system throughout. */
  --bg:            #f7f7f5;  /* off-white */
  --bg-card:       #eeeeec;  /* off-white, slightly deeper */
  --bg-card-hover: #e5e5e2;
  --ink:           #111111;  /* black */
  --ink-soft:      #55554f;  /* black, tinted for secondary text */
  --ink-faint:     #8c8c86;  /* black, tinted further for tertiary text */
  --line:          #e2e2de;
  --line-strong:   #cfcfc9;
  --overlay:       rgba(17, 17, 17, 0.82);

  /* accent — BV cyan, used sparingly (nav underline/active state,
     video badge accents, hover states, tags, gizmo corners) */
  --accent:        #00a6b2;
  --accent-bright: #29c4d0;
  --accent-soft:   rgba(0, 166, 178, 0.10);
  --accent-line:   rgba(0, 166, 178, 0.35);

  /* type */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --fs-nav: 12px;
  --fs-small: 13px;
  --fs-body: 16px;
  --fs-lead: 19px;
  --fs-h3: clamp(20px, 2.4vw, 26px);
  --fs-h2: clamp(28px, 4vw, 44px);
  --fs-h1: clamp(38px, 6vw, 68px);

  /* layout */
  --page-pad: 28px;
  --header-h: 88px;
  --grid-gap: 4px;
  --content-max: 1480px;
  --radius: 0px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Fluid step-down across the four size tiers requested:
   PC 1200+ / Laptop 900–1199 / Tablet 600–899 / Phone <600.
   Only page padding and header height need to step here — the
   header/nav and grid breakpoints themselves live further down. */
@media (max-width: 1199px) {
  :root { --page-pad: 24px; --header-h: 80px; }
}
@media (max-width: 899px) {
  :root { --page-pad: 20px; --header-h: 72px; }
}
@media (max-width: 599px) {
  :root { --page-pad: 16px; --header-h: 64px; }
}
@media (max-width: 399px) {
  :root { --page-pad: 14px; }
}

/* ============================================================
   Reset
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.no-scroll { overflow: hidden; height: 100%; }

/* ============================================================
   Layout shell
   ============================================================ */

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

main { flex: 1 0 auto; }

/* fade-up reveal used for page-load / scroll reveals */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Header / Navigation
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  position: relative;
}

.brand { justify-self: start; }
.nav-primary { justify-self: center; }
.header-aux { justify-self: end; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-type {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-type .name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand-type .role {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  margin-top: 2px;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-primary a {
  font-size: var(--fs-nav);
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding: 8px 12px;
  transition: color 0.25s var(--ease);
}

.nav-primary a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-primary a:hover { color: var(--ink); }
.nav-primary a:hover::after { transform: scaleX(1); }

.nav-primary a[aria-current="page"] {
  color: var(--ink);
}
.nav-primary a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--accent);
}

.header-aux {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* External link button (replaces the former language switcher) */
.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.header-btn:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 1199px) {
  .header-btn { padding: 8px 14px; font-size: 10.5px; }
}
@media (max-width: 899px) {
  .header-btn { padding: 7px 12px; font-size: 10px; }
}
@media (max-width: 480px) {
  .header-btn { padding: 7px 10px; font-size: 9.5px; letter-spacing: 0.06em; }
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding: 56px var(--page-pad) 36px;
  margin-top: 96px;
}
.site-footer__brand {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--bg);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-footer__logo { width: 26px; height: 26px; object-fit: contain; display: block; }
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(247, 247, 245, 0.16);
  margin-bottom: 20px;
}
.site-footer__nav a {
  font-size: var(--fs-nav);
  letter-spacing: 0.1em;
  font-weight: 600;
  color: rgba(247, 247, 245, 0.72);
  transition: color 0.2s var(--ease);
}
.site-footer__nav a:hover,
.site-footer__nav a[aria-current="page"] { color: var(--accent-bright); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-small);
  color: rgba(247, 247, 245, 0.55);
}
.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.site-footer__social a { color: rgba(247, 247, 245, 0.72); transition: color 0.2s var(--ease); }
.site-footer__social a:hover { color: var(--accent-bright); }

/* ============================================================
   Page header (title band used on inner pages)
   ============================================================ */

.page-lead {
  padding: 56px var(--page-pad) 8px;
}
.page-lead__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-nav);
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.page-lead__eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--accent-bright);
  display: inline-block;
}
.page-lead h1 {
  font-size: var(--fs-h1);
}
.page-lead p {
  max-width: 640px;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: var(--fs-lead);
  font-family: var(--font-display);
  font-weight: 400;
}

/* ============================================================
   Justified portfolio grid
   ------------------------------------------------------------
   JavaScript calculates rows from the real aspect ratio of each
   project. Every completed row fills the full available width,
   so there are no accidental holes or jagged row endings.
   ============================================================ */

.grid-section {
  padding: 36px 0 0;
}

.project-grid {
  width: 100%;
}

.project-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--grid-gap);
  width: 100%;
  margin: 0 0 var(--grid-gap);
}

.project-row:last-child {
  margin-bottom: 0;
}

.tile {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  color: var(--ink);
  flex: 0 0 auto;
  width: var(--tile-w, 100%);
  height: var(--tile-h, auto);
}

.tile--media { cursor: pointer; }
.tile--landscape,
.tile--portrait,
.tile--info { aspect-ratio: auto; }

.tile--info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 30px;
  background: var(--bg-card);
}

.tile__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.tile--media:hover .tile__media { transform: scale(1.045); }

.tile__scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(to top, rgba(10,10,8,0.62), transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.tile--media:hover .tile__scrim { opacity: 1; }

.tile__gizmo {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.tile--media:hover .tile__gizmo { opacity: 1; }
.tile__gizmo span {
  position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid var(--accent-bright);
}
.tile__gizmo span:nth-child(1) { top: 0; left: 0; border-right: none; border-bottom: none; }
.tile__gizmo span:nth-child(2) { top: 0; right: 0; border-left: none; border-bottom: none; }
.tile__gizmo span:nth-child(3) { bottom: 0; left: 0; border-right: none; border-top: none; }
.tile__gizmo span:nth-child(4) { bottom: 0; right: 0; border-left: none; border-top: none; }

.tile__caption {
  position: absolute; left: 18px; right: 18px; bottom: 16px;
  color: #fff; opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.tile--media:hover .tile__caption { opacity: 1; transform: translateY(0); }
.tile__caption .title { font-family: var(--font-display); font-size: 16px; }
.tile__caption .meta {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0.8; margin-top: 3px; color: var(--accent-bright);
}

.tile__badge {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center;
  gap: 6px; background: #fff; color: var(--ink); font-size: 11px;
  letter-spacing: 0.06em; font-weight: 600; padding: 7px 12px 7px 10px;
  transition: transform 0.3s var(--ease);
}
.tile--media:hover .tile__badge { transform: translateY(-2px); }
.tile__badge svg { width: 12px; height: 12px; }

.tile__orientation-tag {
  position: absolute; top: 12px; left: 12px; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.05em; color: rgba(255,255,255,0.85);
  background: rgba(10,10,8,0.4); padding: 4px 7px; opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.tile--media:hover .tile__orientation-tag { opacity: 1; }

.tile--info .eyebrow {
  font-size: var(--fs-nav); letter-spacing: 0.14em; color: var(--accent);
  font-weight: 600; margin-bottom: 12px; text-transform: uppercase;
}
.tile--info h3 { font-size: var(--fs-h3); margin-bottom: 10px; }
.tile--info a.info-link {
  display: inline-block; font-size: var(--fs-small); color: var(--ink-soft);
  border-top: 1px solid var(--line-strong); padding-top: 10px; margin-top: 10px;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.tile--info a.info-link:hover { color: var(--accent); padding-left: 4px; }

.tile--spacer { display: none !important; }

.project-row .tile {
  min-width: 0;
}

/* Tablet (600–899): the JS still lays out real multi-item rows here
   (capped per row so nothing gets squeezed to a sliver) — this just
   keeps captions readable and rows a touch tighter at that width. */
@media (max-width: 899px) {
  .grid-section { padding-top: 28px; }
  .tile__caption .title { font-size: 15px; }
}

/* Phone (<600): true single column, real aspect ratio kept. */
@media (max-width: 599px) {
  .grid-section { padding-top: 24px; }
  .project-grid { display: block; }
  .project-row { display: flex; flex-direction: column; gap: var(--grid-gap); margin-bottom: var(--grid-gap); }
  .tile, .tile--landscape, .tile--portrait, .tile--info {
    width: 100% !important; height: auto !important;
  }
  .tile--landscape, .tile--media.tile--landscape { aspect-ratio: 16 / 9; }
  .tile--portrait, .tile--media.tile--portrait { aspect-ratio: 9 / 16; }
  .tile--info { aspect-ratio: 16 / 9; }
  .tile__caption { opacity: 1; transform: none; }
  .tile__scrim { opacity: 1; }
  .tile--info { padding: 30px 24px; }
}

@media (max-width: 420px) {
  .tile__caption .title { font-size: 14px; }
  .tile__caption .meta { font-size: 10px; }
  .tile--info h3 { font-size: 20px; }
}

/* ============================================================
   About page
============================================================ */

.about {
    width: min(100%, 1180px);
    margin-left: auto;
    margin-right: auto;
    padding: 56px var(--page-pad) 100px;
}

.about__inner {
    width: 100%;
    max-width: 1052px;
    margin-left: auto;
    margin-right: auto;

    display: grid;
    grid-template-columns: 340px minmax(0, 640px);
    gap: 72px;
    align-items: start;
}

.about__portrait {
    width: 340px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--bg-card);
    position: sticky;
    top: calc(var(--header-h) + 32px);
}

.about__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about__role {
    font-size: var(--fs-lead);
    color: var(--ink-soft);
    font-family: var(--font-display);
    margin-top: 8px;
}

.about__disciplines {
    margin-top: 6px;
    font-size: var(--fs-small);
    letter-spacing: 0.06em;
    color: var(--accent);
    text-transform: uppercase;
}

.about__body {
    margin-top: 0;
    max-width: 640px;
    color: var(--ink-soft);
}

.about__body p {
    margin-bottom: 20px;
    font-size: var(--fs-body);
}

.about__body strong {
    color: var(--ink);
    font-weight: 600;
}

.about__block-title {
    font-size: var(--fs-nav);
    letter-spacing: 0.14em;
    font-weight: 600;
    color: var(--ink-faint);
    margin: 40px 0 16px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list li {
    font-size: var(--fs-small);
    border: 1px solid var(--line-strong);
    padding: 7px 14px;
    color: var(--ink-soft);
    transition:
        border-color 0.2s var(--ease),
        color 0.2s var(--ease);
}

.tag-list li:hover {
    border-color: var(--accent);
    color: var(--ink);
}

.about__social {
    display: flex;
    gap: 14px;
    margin-top: 40px;
}

.about__social a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    transition:
        background 0.2s var(--ease),
        color 0.2s var(--ease),
        border-color 0.2s var(--ease);
}

.about__social a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

@media (max-width: 899px) {

    .about {
        width: 100%;
        padding: 40px var(--page-pad) 80px;
    }

    .about__inner {
        width: 100%;
        max-width: 680px;

        grid-template-columns: 1fr;
        gap: 42px;

        margin-left: auto;
        margin-right: auto;
    }

    .about__portrait {
        position: static;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .about__body {
        width: 100%;
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 600px) {

    .about {
        padding-left: var(--page-pad);
        padding-right: var(--page-pad);
    }

    .about__inner {
        max-width: 100%;
    }

    .about__portrait {
        max-width: 100%;
    }
}
/* ============================================================
   Contact page
   ============================================================ */

.contact {
  width: min(100%, var(--content-max));
  margin-left: auto;
  margin-right: auto;
  padding: 56px var(--page-pad) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact__info h2 { font-size: var(--fs-h2); margin-bottom: 24px; }

.contact__row {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.contact__row .label {
  font-size: var(--fs-nav);
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 8px;
}
.contact__row a, .contact__row span {
  font-family: var(--font-display);
  font-size: 20px;
}
.contact__row a:hover { color: var(--accent); }

.contact__refs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 6px;
}
.contact__refs a {
  font-size: var(--fs-body);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}
.contact__refs a:hover { border-color: var(--accent); color: var(--accent); }

.contact__map {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-card);
  position: relative;
}
.contact__map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.6) contrast(1.05); }
.contact__map__label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  padding: 8px 14px;
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
}

.contact-form {
  margin-top: 44px;
  display: grid;
  gap: 22px;
}
.field { position: relative; }
.field label {
  display: block;
  font-size: var(--fs-nav);
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  padding: 10px 2px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.2s var(--ease);
}
.field textarea { min-height: 120px; }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.btn-submit {
  justify-self: start;
  margin-top: 8px;
  padding: 15px 34px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  font-size: var(--fs-nav);
  letter-spacing: 0.12em;
  font-weight: 600;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn-submit:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.form-note {
  margin-top: 14px;
  font-size: var(--fs-small);
  color: var(--accent);
}

@media (max-width: 899px) {
  .contact { grid-template-columns: 1fr; }
}

/* ============================================================
   YouTube modal  (deliberately compact — not fullscreen)
   ============================================================ */

.yt-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease);
}
.yt-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.yt-modal__box {
  width: 100%;
  max-width: 960px;
  background: #000;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.28s var(--ease);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.yt-modal.is-open .yt-modal__box { transform: scale(1); }

.yt-modal__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.yt-modal__frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

.yt-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.yt-modal__close svg { width: 20px; height: 20px; }
.yt-modal__close:hover { color: var(--accent-bright); }

.yt-modal__title {
  position: absolute;
  bottom: -34px;
  left: 0;
  color: rgba(255,255,255,0.65);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
}

@media (max-width: 599px) {
  .yt-modal { padding: 0; align-items: center; }
  .yt-modal__box { max-width: 100%; }
  .yt-modal__close { top: -40px; right: 6px; }
}

/* ============================================================
   Image lightbox
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0c0b0a;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__stage {
  max-width: 90vw;
  max-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 84vh;
  object-fit: contain;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.lightbox__img.is-visible { opacity: 1; transform: translateY(0); }

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__close {
  top: 22px; right: 26px;
  width: 40px; height: 40px;
}
.lightbox__close svg { width: 22px; height: 22px; }

.lightbox__prev, .lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
}
.lightbox__prev { left: 10px; }
.lightbox__next { right: 10px; }
.lightbox__prev svg, .lightbox__next svg { width: 24px; height: 24px; }
.lightbox__prev:hover, .lightbox__next:hover, .lightbox__close:hover { color: var(--accent-bright); }

.lightbox__counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

@media (max-width: 599px) {
  .lightbox__prev, .lightbox__next { width: 44px; height: 44px; }
  .lightbox__prev { left: 0; }
  .lightbox__next { right: 0; }
}

/* ============================================================
   Utility
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   Navigation stability
   Egyetlen navigációs DOM: .nav-primary.
   Desktopon fejlécmenü, mobilon ugyanaz a menü lenyíló panel.
   ============================================================ */

@media (max-width: 1199px) {
  .site-header__inner {
    display: flex;
    justify-content: space-between;
  }

  /* A mobil menü a sticky headerhez kötött absolute panel.
     Nem használ fixed pozíciót és nem módosítja az oldal scrollját. */
  .nav-primary {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px var(--page-pad) 32px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
    border-top: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition:
      opacity 0.25s var(--ease),
      transform 0.25s var(--ease),
      visibility 0.25s;
  }

  .nav-primary.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-primary a {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ink);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    text-align: center;
  }

  .nav-primary a::after {
    display: none;
  }

  .nav-primary a[aria-current="page"] {
    color: var(--accent);
  }

  .header-aux {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .brand-type .role {
    display: none;
  }

  .brand-type .name {
    font-size: 16px;
  }

  .header-aux {
    gap: 12px;
  }
}

@media (max-width: 380px) {
  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .nav-primary a {
    font-size: 24px;
    padding: 11px 0;
  }
}

@media (min-width: 1200px) {
  .hamburger { display: none !important; }

  .nav-primary {
    position: static;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    overflow: visible;
    background: transparent;
    border-top: 0;
  }

  html.no-scroll,
  body.menu-open {
    overflow: auto !important;
  }
}
