/* =============================================
   SITE.CSS — globális stílusok
   - Alapváltozók, reset, tipó
   - Header/Nav, layout/wrap
   - Két­hasábos oldaltípusok
   - Linkek, képek, beágyazások
   - Footer
   - PhotoSwipe + Splide (globál override-ok)
============================================= */

/* ---------- 
sárga: #ffde21
piros: #ff0000
4csop-kék (--brand-blue): #1a74e5
sötétkék: #0a2244
sketchfab kék: #1ca9d9
ton.al kék:#124bac
szürke_ #222222
---------- */

/* ---------- DEFAULT: LIGHT theme ---------- */
:root {
  --bg: #ffffff;
  --fg: #0a2244;
  --muted: #0d366c;

  --header-bg: rgba(255, 255, 255, 0.5);
  --header-fg: #0a2244;
  --footer-bg: rgba(0, 0, 0, 0.03);

  --card: #0a2244;

  --accent: #ff0000;
  --brand-blue: #1a74e5;

  --radius: 12px;
  --pad: 12px;
  --gap: 20px;
  --wrap: 800px;
  --maxw: 1400px;
  --space: 1.6rem;
  --header-h: 100px;
}

/* ---------- DARK theme: csak felülírjuk a változókat ---------- */
html[data-theme="dark"] {
  --bg: #0a2244;
  --fg: #ffffff;
  --muted: #ffffff;

  --header-bg: rgba(0, 0, 0, 0.25);
  --header-fg: #ffffff;
  --footer-bg: rgba(0, 0, 0, 0.1);

  --card: #1a74e5;
}

/* ---------- GLOBAL RESET ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  padding-top: var(--header-h);
}

body:has(.hero) { padding-top: 0; }

/* Form elemek örököljék a body fontot */
button, .chip, input, select, textarea {
  font: inherit;
  font-family: inherit;
}

/* ---------- Header ---------- */
header{
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: var(--header-bg);
  margin: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.bar{
  max-width:var(--maxw);
  margin:auto;
  display:flex;
  gap:1rem;
  align-items:center;
  padding:1rem 2rem;
  color:var(--header-fg);
}
.brand{ font-weight:var(--w-semibold); font-size: 1.6rem; letter-spacing:.3px; }
.brand small{ color:var(--header-fg); font-size:.9rem; font-weight:500 }
.brand a{ color:inherit; text-decoration:none; display:inline-block; }

@media (max-width: 1080px){
  header .brand small { display: none; }
}
/* ---------- Navigáció ---------- */
.nav { margin-left:auto; }
.nav-list { display:flex; gap:.4rem; list-style:none; margin:0; padding:0; }
.nav-list a {
  display:inline-block;
  padding:.3rem 1rem;
  border-radius:999px;
  text-decoration:none;
  color:var(--header-fg);
  font-size:1rem;
  line-height: 1.3;
}
.nav-list a:hover,
.nav-list a:focus-visible { background: rgba(255,255,255,.18); outline:none; }
.nav-list a.active { background:var(--header-fg); color:var(--bg); font-weight:var(--w-semibold); }

/* Mobil hamburger */
.nav-toggle{
  display:none; border:none; background:transparent; color:var(--header-fg);
  font-size:1.35rem; line-height:1; padding:.2rem .4rem; border-radius:8px; cursor:pointer;
}
.nav-toggle:focus-visible{ outline:2px solid white; outline-offset:2px; }

@media (max-width:1080px){
  .nav-toggle{ display:block; margin-left:auto; }
  .nav{
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: 999;                     /* a headeren belül marad */
    background: var(--header-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
  }
  header[data-open="true"] .nav{ display:block; }
  .nav-list{
    flex-direction:column;
    align-items:flex-end;
    gap:.25rem;
    padding:.5rem 1rem 1rem;
  }
}

header.scrolled{ box-shadow:0 6px 18px rgba(0,0,0,.18); }

/* ---------- Layout + tartalom konténerek ---------- */
main{
  max-width:var(--wrap);
  margin:0 auto 3rem;
  padding:0 2rem;
  text-align: justify;
}

.wrap { max-width: var(--wrap); margin: 0 auto; }
.wrap img, .col img {
  width: 100%; height: auto; display:block; margin-bottom: var(--pad, 1rem);
}
main > :first-child { margin-top: 0; }

/* ===== tudományos cikk formázás: fejezetcím, lábjegyzet, buborék, tartalomjegyzék =====  */

h1.chapter {
  font-size: 1.65rem;
  font-weight: 600;
  margin-top: 2.4rem;
  margin-bottom: 1.2rem;
}

.fn-ref {
  text-decoration: none;
  font-size: .8rem;
  font-weight: var(--w-regular) !important;
  position: relative;
  cursor: pointer;
  color: var(--accent);
}

.fn-ref[data-fn]:hover::after,
.fn-ref[data-fn]:focus-visible::after {
  content: attr(data-fn);
  position: absolute;
  left: 50%;
  top: 1.8em;
  transform: translateX(-50%);
  width: 260px;
  max-width: none;
  padding: .55rem .8rem;
  border-radius: .6rem;
  background: color-mix(in srgb, var(--bg) 95%, black 5%);
  color: var(--fg);
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
  font-size: .85rem;
  line-height: 1.45;
  z-index: 10;
  white-space: normal;
}

.fn-back {
  text-decoration: none;
  margin-left: .35rem;
  font-size: .85em;
  color: var(--accent);
}

.toc {
  margin: 2rem 0 3rem;
  padding: 1.2rem 1.5rem;
  border-left: 0px solid var(--accent);
  background: color-mix(in srgb, var(--bg) 95%, black 5%);
  border-radius: var(--radius);
}

.toc h2 {
  margin: 0 0 .8rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li { margin: .25rem 0; }

.toc-list a {
  text-decoration: none;
  color: var(--fg);
  transition: opacity .2s;
}

.toc-list a:hover { opacity: .7; }

/* Behúzások alfejezetekhez */
.toc-list li.toc-sub { margin-left: 1.2rem; }
.toc-list li.toc-subsub { margin-left: 2.4rem; }

/* Fejezetcímek, amikhez a TOC ugrik */
h1.chapter[id],
h2[id],
h3[id],
/* Lábjegyzet jelölők a törzsszövegben */
sup[id^="fnref-"],
/* Lábjegyzetek a lista elején (ahová a jelölőről ugrunk) */
li[id^="fn-"] {
  scroll-margin-top: calc(var(--header-h));
}

/* ==== Két­hasábos layoutok ==== */
.two-col{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:clamp(1rem, 4vw, 2rem);
  align-items:start;
}

/* dőlt angol hasáb – extra „festési tér” jobbra */
.page-activity .col-en,
.page-project .col-en{
  font-style: italic;
  padding-right: .3em;   /* legyen helye a jobbra dőlő betűknek */
  margin-right: -.3em;   /* vizuálisan ne nőjön a hasáb */
  overflow: visible;     /* biztos ami biztos: ne vágjon */
}

  /* magyar hasáb (bal) – VAN elválasztás */
.col {
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  word-break: normal;
  }
  /* angol hasáb (jobb) – NINCS elválasztás */
.two-col .col-en{
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
}

@media (max-width: 512px){ .two-col{ grid-template-columns:1fr; } }


/* === HERO: slider és single === */
.hero {
  aspect-ratio: 16 / 9;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-bottom: var(--gap);
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;          /* arányt tart, magasság ebből jön */
}
.hero-slide  { position: absolute; inset: 0; transition: transform .7s ease; }
.hero-slide img { width:100%; height:100%; object-fit:cover; display:block; }
.hero-slider.no-anim .hero-slide { transition: none !important; }
.hero-slider.init-hide { visibility: hidden; } /* villanás ellen az első frame-ig */

.hero img,
.hero .hero-slide img,
.hero .splide__slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.hero-svg .hero-svg-box {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}
@media (max-width: 512px) {
  .hero { height: 100svh; aspect-ratio: auto; }
  .hero-slider{ height: 100%; aspect-ratio: auto; }
  .hero-slide{ height: 100%; }
  .hero img,
  .hero .hero-slide img { object-fit: cover; object-position: center; width: 100%; height: 100%; }
  .hero-svg { height: 100svh; }
}

/* PERSON kártyák (architects és press) */
.person{
  display:grid; grid-template-columns: 215px 1fr;
  gap:1rem; padding-top:2rem; background: transparent;
}
.person .avatar{
  width:200px; aspect-ratio:3/4; object-fit:cover; border-radius:10px;
  background: transparent; border:0px solid color-mix(in oklab, var(--fg) 12%, transparent); display:block;
  filter:grayscale(100%) brightness(1) contrast(1) saturate(1);
  transition: box-shadow .3s ease, transform .3s ease;
}
.person a.open-gallery:hover img.avatar,
.person img.avatar:hover { box-shadow:0 8px 16px rgba(0,0,0,.3); transform: scale(1.03); filter:none; }
.person .role{ text-transform:uppercase; letter-spacing:.04em; font-size:1rem; margin-bottom:.1rem; }

@media (max-width: 512px){
  .person{ grid-template-columns: 1fr; gap: .9rem; }
  .person > a:first-child,
  .person > img.avatar{ order: -1; }
  .person .avatar{ width: 100%; max-width: 400px; justify-self: start; }
  .person .role{ margin-top: .25rem; }
  .page-architects main,
  .page-press main{ text-align: justify; }
}

/* ======== Embedding ======== */

/* ---- Sketchfab-embed ---- */
.sf-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  margin: 0 auto var(--gap);
}

/* ---- Contact-map ---- */
.contact-map{ width:100%; height:700px; border:none; border-radius:12px; }

/* ====== SITE FOOTER ====== */

footer.site-footer {
  position: relative;
  background: var(--footer-bg);
  padding: var(--space) 0;
  margin-top: var(--space);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  color: var(--fg);
  font-size: .9rem;
}

.footer-inner p {
  margin: 0 0 .35rem;
  line-height: 1.5;
}

.footer-inner a {
  color: inherit;
  text-decoration: none;
  transition: opacity .2s;
}
.footer-inner a:hover { opacity: .7; }

.footer-right {
  text-align: right;
}

/* Téma-váltó gombok – KÖZÉPEN, csak az SVG rajzolja a kört */

.theme-switch {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;        /* távolság a nap és a hold között */
}

.theme-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-btn img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  /* box-shadow: 0 6px 15px rgba(0,0,0,.18);  */
  transition: transform .15s ease, box-shadow .15s ease;
}

/* hover – egyetlen enyhe árnyék, NINCS extra pötty */
.theme-btn:hover img {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}

.theme-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: left;
  }
  .footer-right {
    text-align: left;
    margin-top: .8rem;
  }
}

/* ========== Lightbox rács ========== */

.ncg-lightbox { --gap: 5px; }
.ncg-lightbox__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--gap);
}
.ncg-lightbox__item {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  aspect-ratio: 1 / 1;
}
.ncg-lightbox__item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .25s ease;
}
.ncg-lightbox__item:hover img { transform: scale(1.03); }
.ncg-lightbox__badge {
  position: absolute; left: .5rem; bottom: .5rem; color:#fff;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  padding: .25rem .5rem; border-radius: .5rem; font-size: .8rem;
}

/* ---------- Splide galéria ---------- */
.ncg-gallery .splide { border-radius: var(--radius); overflow: hidden; box-shadow: none; }
.ncg-gallery .splide__slide img { width:100%; height:100%; object-fit:cover; display:block; }
.ncg-gallery.ncg-gallery--contain .splide__slide img { object-fit: contain; background:transparent; }
.ncg-gallery figure { margin:0; }
.ncg-gallery figcaption { display:none; }
.ncg-gallery__meta { display:flex; align-items:center; gap:.75rem; margin:.1rem 0 1rem; }
.ncg-gallery__caption { flex:1 1 auto; font-size:.95rem; line-height:1.4; }                        /* caption balra, kitölti a helyet */
.ncg-gallery .splide__pagination { position: static; display:flex; gap:.5rem; margin:0 0 0 auto; } /* Pöttyök a meta-sor jobb oldalán */
.ncg-gallery .splide__pagination__page { width:8px; height:8px; aspect-ratio:1/1; border-radius:50%; background-color:#c5c5c5; border:none; margin:0 .15rem; opacity:1; transition: background-color .3s, transform .3s; padding:0; line-height:0; }
.ncg-gallery .splide__pagination__page.is-active { background-color:#000; transform: scale(1.2); } /* vagy var(--fg) / theme szerinti */

.ncg-gallery .splide__arrows { pointer-events:none; }
.ncg-gallery .splide__arrow { position:absolute; top:50%; transform:translateY(-50%); width:40px; height:40px; border:0; border-radius:999px; background:none; color:rgba(0,0,0,.3); display:grid; place-items:center; pointer-events:auto; z-index:2; transition: background .2s, transform .2s; }
.ncg-gallery .splide__arrow svg { width:24px; height:24px; }
.ncg-gallery .splide__arrow--prev svg { transform: rotate(180deg); }
.ncg-gallery .splide__arrow:hover { background:none; color:rgba(0,0,0,.6); transform: translateY(-50%) scale(1.1); }
.ncg-gallery .splide__arrow--prev { left:8px; }
.ncg-gallery .splide__arrow--next { right:8px; }

@media (max-width: 512px) {
  .ncg-gallery .splide__arrow { display: none; }
  .ncg-gallery__meta { flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: .25rem; }
  .ncg-gallery .splide__pagination { justify-content: center; gap: .25rem; }
}

/* ---------- Splide-ból felugró galéria  ---------- */
.splide__slide figure { margin: 0; }
.splide__slide a.lightbox { display:block; }
.splide__slide img { width:100%; height:auto; display:block; }

/* Mobil: menü nyitva is lehessen a háttérben görgetni */
@media (max-width:1080px){
  .nav{ pointer-events: none; }           /* pass-through */
  .nav-list,
  .nav-list a { pointer-events: auto; }   /* maguk a menüpontok maradjanak kattinthatók */
}

/* Tartalomszélességű, reszponzív videó és map */
.video, .map-block { width: 100%; margin: var(--space) auto; border-radius: 12px; overflow: hidden; background: var(--bg); }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-3x2 { aspect-ratio: 3 / 2; }
.video iframe, .map-block iframe { width: 100%; height: 100%; display:block; border:0; }

/* figure KÉPEK, KÉPFELIRATOK - globál*/
figure.image-block { margin: var(--space) auto; display: block; max-width: var(--wrap); }
figure.image-block > :not(figcaption) { margin-bottom: .5rem; }
figure.image-block img { width: 100%; height: auto; display: block; border-radius: var(--radius, 0); }
figure.image-block figcaption { font-size: .9rem; color: color-mix(in srgb, var(--fg) 80%, var(--bg)); text-align: left; line-height: 1.3; }

/* lekerekítés nélküli, sarkos képekhez*/
.image-block.-square img { border-radius: 0; }

/* ========== KREDITEK ========== */

/* Projekt kreditek – finom leválasztás a fő tartalomról */
.project-credits{
  position:relative;
  margin-top:calc(1.5rem  * 2);
  padding-top:1.5rem;
  font-size:0.95rem;                 /* body-hoz közeli, de kicsit kisebb */
  line-height:1;
  color: color-mix(in srgb, var(--fg) 85%, black);
}

/* vonal fölötte */
.project-credits::before{
  content:"";
  position:absolute; top:0; left:0;
  width:4rem; height:1px;
  background: color-mix(in srgb, var(--fg) 80%, var(--bg));
}

.project-credits .credits{
  display:grid;
  grid-template-columns:auto 1fr;    /* bal: címke / jobb: érték */
  column-gap:1rem;
  row-gap:calc(1rem * .5);
  margin:0;
  margin-left: 3rem;
}
@media (max-width: 512px){
  .project-credits .credits{ margin-left:0; }
}
.project-credits .credits dt{
  margin:0;
  font-weight:var(--w-regular);
  color:color-mix(in srgb, var(--fg) 80%, var(--bg));
}
.project-credits .credits dd{ margin:0; }
.project-credits .credits > div{ display:contents; }

/* ==== Kártyák megjelenése ==== */

/* kezdeti állapot: eltolva és áttetszően */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}

/* amikor láthatóvá válik */
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal { transition-delay: var(--reveal-delay, 0ms); }

/* === SCROLL REVEAL – általános === */
[data-reveal],
.two-col,
h1,
.ncg-lightbox,
figure.image-block,
.ncg-gallery,
article.person {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease-out, transform 1.2s cubic-bezier(.25,.8,.25,1);
  will-change: opacity, transform;
}

[data-reveal].is-visible,
.two-col.is-visible,
h1.is-visible,
.ncg-lightbox.is-visible,
figure.image-block.is-visible,
.ncg-gallery.is-visible,
article.person.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Galériák külön tempója --- */
.ncg-gallery,
h1,
figure.image-block {
  transition-duration: 2s;
  transform: translateY(50px);
}

/* ==== PSW Gallery ==== */

.pswp { --pswp-bg: rgba(0,0,0,.94); } /* Sötétebb háttér a „doboz-hatásért” */
.pswp__img { border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.45); } /* (Opcionális) képlekerekítés + enyhe árnyék a „lebegéshez” */
.pswp__counter { display: none !important; } /* A számláló maradjon rejtve */

/* === CV végére - munkák=== */
.person-works__list { margin:.5rem 0 0; padding-left:1.1rem; }
.person-works__list li { margin:.15rem 0; }
.person-works__more { margin:.6rem 0 0; font-size:.95rem; opacity:.8; }

/* === SVG stílusok === */

/* --- Vonalak --- */
.outline { stroke: var(--fg); stroke-width: 1.2px; fill: none; }
.thin    { stroke-width: 0.6px; }
.thick   { stroke-width: 4px; }
.red     { stroke: var(--accent); }
.dashed { stroke-dasharray: 30 15; stroke-linecap: butt; stroke-miterlimit: 1.5; }
.hatch1 { stroke-dasharray: 18 6; stroke-dashoffset: -6; }
.hatch2 { stroke-dasharray: 18 6; stroke-dashoffset: -18; }

/* --- Kombinációk --- */
.outline.dashed { stroke-width: 1.1px; }

/* --- Kitöltések --- */
.mass   { fill: var(--bg); }
.wall   { fill: var(--bg); }
.ground { fill: var(--brand-blue); }
.frame { fill-rule: evenodd; clip-rule: evenodd; }
.glass  { fill: rgba(26,116,229,0.25); }
.shadow { fill: rgba(0,0,0,0.12); }
.shadow_dark { fill: rgba(0,0,0,0.25); }
.shadow_red  { fill: rgba(255,0,0,0.25); }

/* --- Dark mód --- */
html[data-theme="dark"] .glass  { fill: rgba(255, 255, 255, 0.2); }
/* html[data-theme="dark"] .wall   { fill: rgba(255, 255, 255, 0.4); } */
html[data-theme="dark"] .ground { fill: rgba(255, 255, 255, 0.1); }
html[data-theme="dark"] .shadow_dark { fill: rgba(255, 255, 255, 0.2); }

.level_mark {
  font-size: 15px;
  fill: var(--fg);
  dominant-baseline: auto;
}

.legend {
  font-size: 20px;
  font-weight: var(--w-bold);
  fill:  var(--accent);
  dominant-baseline: auto;
}

/* --- Scroll-narratíva színpad --- */
.scroll-stage{
  height: 360vh;            /* mennyi scroll-időt adsz */
}

/* a hero „színpad” rögzítése egy ideig */
.scroll-stage .hero{
  position: sticky;
  top: 0;
  height: 100vh;
}

/* induló állapot: teljes rajz kicsit lejjebb */
#rk-stage svg.drawing{
  transform: translateY(50px);
  will-change: transform;
}

/* induló állapot: új rétegek rejtve */
#rk-stage #glass,
#rk-stage #uvegbordak{
  opacity: 0;
  transform: translateY(12px);
  will-change: opacity, transform;
}

/* aki nem kér animációt */
@media (prefers-reduced-motion: reduce){
  #rk-stage #glass,
  #rk-stage #uvegbordak{
    opacity: 1;
    transform: none;
  }
}

/* ==== Utils ==== */
.is-hidden { display: none; }

/* képernyőolvasóbarát, vizuálisan rejtett cím (footerben) */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}