:root {
  --cream: #f0f0d8;
  --cream-soft: #f8f5e8;
  --brown: #4e2e28;
  --brown-deep: #2c1714;
  --ink: #3d2722;
  --white: #fffef7;
  --sidebar: 285px;
  --ease: cubic-bezier(.22, .8, .22, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--brown);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--cream-soft);
  background: var(--brown);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 18px;
}

button, input, textarea { font: inherit; }
a { color: inherit; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  min-height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 46px 34px 25px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,.28), transparent 40%),
    var(--cream);
  box-shadow: 8px 0 32px rgba(27, 11, 8, .14);
}

.brand {
  display: block;
  width: 180px;
  margin: 0 auto 30px;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.sidebar nav {
  display: grid;
  gap: 1px;
  margin: auto 0 0;
}

.sidebar nav a {
  position: relative;
  padding: 5px 0 5px 14px;
  text-decoration: none;
  font-size: 17px;
  line-height: 1.18;
  letter-spacing: .01em;
  transition: transform .25s var(--ease), color .25s ease;
}

.sidebar nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--brown);
  transform: translateY(-50%);
  transition: height .25s var(--ease);
}

.sidebar nav a:hover,
.sidebar nav a:focus-visible,
.sidebar nav a.active {
  color: #170b09;
  transform: translateX(4px);
}

.sidebar nav a.active::before { height: 17px; }

.language-switcher {
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid rgba(78, 46, 40, .2);
}

.language-switcher-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(61, 39, 34, .65);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.language-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.language-options button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(78, 46, 40, .28);
  border-radius: 2px;
  padding: 5px 8px;
  color: var(--ink);
  cursor: pointer;
  background: rgba(255, 255, 255, .14);
  font-size: 13px;
  letter-spacing: .08em;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.language-options button:hover,
.language-options button:focus-visible {
  border-color: var(--brown);
}

.language-options button.active {
  color: var(--cream);
  border-color: var(--brown);
  background: var(--brown);
}

.language-options .flag {
  width: 20px;
  height: 13px;
  flex: 0 0 auto;
  border: 1px solid rgba(78, 46, 40, .18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  background-position: center;
  background-size: cover;
}

.language-options .flag-hu {
  background: linear-gradient(
    to bottom,
    #ce2939 0 33.333%,
    #fff 33.333% 66.666%,
    #477050 66.666% 100%
  );
}

.language-options .flag-en {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Cpath fill='%23012169' d='M0 0h60v36H0z'/%3E%3Cpath stroke='%23fff' stroke-width='7' d='m0 0 60 36m0-36L0 36'/%3E%3Cpath stroke='%23C8102E' stroke-width='3' d='m0 0 60 36m0-36L0 36'/%3E%3Cpath stroke='%23fff' stroke-width='12' d='M30 0v36M0 18h60'/%3E%3Cpath stroke='%23C8102E' stroke-width='7' d='M30 0v36M0 18h60'/%3E%3C/svg%3E");
}

.copyright {
  margin: 22px 0 0;
  font-size: 14px;
  opacity: .68;
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 40;
  width: 47px;
  height: 47px;
  padding: 12px 10px;
  border: 0;
  border-radius: 50%;
  color: var(--brown);
  background: var(--cream);
  box-shadow: 0 8px 25px rgba(0,0,0,.25);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  transition: transform .25s ease, opacity .25s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#app {
  min-height: 100dvh;
  margin-left: var(--sidebar);
  outline: none;
}

.hero {
  position: relative;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background: var(--brown-deep);
}

.hero-slide {
  position: absolute;
  inset: -4%;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 1.6s ease;
  will-change: transform, opacity;
}

.hero-slide.active {
  opacity: 1;
  animation: kenburns 20s linear both;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(20,6,3,.2), transparent 45%, rgba(20,6,3,.12));
}

.hero-caption {
  position: absolute;
  z-index: 2;
  right: clamp(24px, 5vw, 80px);
  bottom: clamp(25px, 6vh, 70px);
  max-width: 530px;
  text-align: right;
  text-shadow: 0 2px 22px rgba(0,0,0,.55);
}

.hero-caption h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 82px);
  font-weight: 400;
  line-height: .92;
}

.hero-caption p {
  margin: 13px 3px 0;
  font-size: clamp(19px, 2vw, 27px);
  font-style: italic;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.15) translate3d(-1.2%, -.8%, 0); }
}

.page {
  min-height: 100dvh;
  padding: clamp(70px, 9vw, 130px) clamp(26px, 8vw, 125px);
  background:
    radial-gradient(circle at 100% 0, rgba(240,240,216,.055), transparent 34%),
    var(--brown);
}

.page-inner { max-width: 970px; margin: 0 auto; }

.eyebrow {
  margin: 0 0 8px;
  color: rgba(240,240,216,.64);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
}

.page h1 {
  position: relative;
  margin: 0 0 55px;
  padding-bottom: 17px;
  font-size: clamp(37px, 5vw, 66px);
  font-weight: 400;
  line-height: 1;
}

.page h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 2px;
  background: var(--cream);
}

.page h2 {
  margin: 42px 0 16px;
  font-size: 29px;
  font-weight: 500;
}

.page h3 {
  margin: 31px 0 10px;
  color: var(--cream);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .05em;
}

.page p, .page li {
  max-width: 820px;
  line-height: 1.72;
}

.lead {
  font-size: clamp(22px, 2.4vw, 31px);
  font-style: italic;
  line-height: 1.42 !important;
}

.columns {
  columns: 2 310px;
  column-gap: 60px;
}

.timeline {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 28px;
}

.timeline dt {
  color: var(--cream);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.timeline dd { margin: 0 0 18px; line-height: 1.55; }

.gallery-page {
  min-height: 100dvh;
  padding: 58px clamp(18px, 4vw, 62px);
}

.gallery-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto 32px;
}

.gallery-header h1 {
  margin-bottom: 0;
  padding-bottom: 13px;
}

.gallery-header p {
  margin: 0 0 13px;
  color: rgba(240,240,216,.62);
  white-space: nowrap;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 9px;
  max-width: 1400px;
  margin: auto;
}

.gallery-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: var(--brown-deep);
}

.gallery-card:nth-child(9n + 1),
.gallery-card:nth-child(9n + 6) {
  grid-row: span 2;
  min-height: 449px;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease), opacity .4s ease;
}

.gallery-card::after {
  content: attr(data-title);
  position: absolute;
  inset: auto 0 0;
  padding: 38px 16px 13px;
  color: var(--white);
  text-align: left;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 17px;
  background: linear-gradient(transparent, rgba(25,8,5,.82));
  opacity: 0;
  transform: translateY(7px);
  transition: opacity .3s ease, transform .3s ease;
}

.gallery-card:hover img,
.gallery-card:focus-visible img { transform: scale(1.055); opacity: .82; }
.gallery-card:hover::after,
.gallery-card:focus-visible::after { opacity: 1; transform: none; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.video-grid iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #24120f;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(30px, 7vw, 90px);
}

.contact-form { display: grid; gap: 17px; }
.contact-form label { display: grid; gap: 7px; font-size: 14px; letter-spacing: .06em; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(240,240,216,.48);
  border-radius: 0;
  padding: 11px 2px;
  color: var(--white);
  outline: none;
  background: transparent;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--cream); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form button {
  justify-self: start;
  border: 1px solid var(--cream);
  padding: 10px 28px;
  color: var(--brown);
  cursor: pointer;
  background: var(--cream);
}
.form-note { color: rgba(240,240,216,.62); font-size: 14px; }

.empty-state {
  padding: 70px 20px;
  color: rgba(240,240,216,.72);
  text-align: center;
  border: 1px solid rgba(240,240,216,.16);
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 46px 70px;
  color: var(--cream);
  background: rgba(22, 8, 6, .94);
}

.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(18,5,3,.78); backdrop-filter: blur(6px); }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: calc(100vw - 150px); max-height: calc(100dvh - 115px); object-fit: contain; }
.lightbox figcaption { margin-top: 11px; }
.lightbox button {
  position: fixed;
  border: 0;
  color: var(--cream);
  cursor: pointer;
  background: transparent;
}
.lightbox-close { top: 18px; right: 25px; font-size: 42px; }
.lightbox-prev, .lightbox-next { top: 50%; font-size: 60px; transform: translateY(-50%); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

@media (max-width: 1120px) {
  :root { --sidebar: 250px; }
  .sidebar { padding-inline: 26px; }
  .brand { width: 160px; }
  .sidebar nav a { font-size: 16px; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .sidebar {
    width: min(88vw, 340px);
    padding-top: 36px;
    transform: translateX(-105%);
    transition: transform .35s var(--ease);
  }
  body.menu-open .sidebar { transform: none; }
  body.menu-open { overflow: hidden; }
  #app { margin-left: 0; }
  .hero-caption { left: 24px; right: 24px; text-align: left; }
  .gallery-page { padding-top: 80px; }
  .gallery-header { align-items: start; flex-direction: column; }
  .gallery-header p { margin-top: -8px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .gallery-card { min-height: 190px; }
  .gallery-card:nth-child(9n + 1),
  .gallery-card:nth-child(9n + 6) { min-height: 386px; }
  .video-grid, .contact-card { grid-template-columns: 1fr; }
  .lightbox { padding: 50px 12px; }
  .lightbox img { max-width: calc(100vw - 24px); max-height: calc(100dvh - 120px); }
}

@media (max-width: 430px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card,
  .gallery-card:nth-child(9n + 1),
  .gallery-card:nth-child(9n + 6) { min-height: 330px; grid-row: auto; }
  .timeline { grid-template-columns: 1fr; gap: 2px; }
  .timeline dd { margin-bottom: 25px; }
}

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