/* mszamosi.hu — komponensek
   A vezérmotívum: POLIKARBONÁT BONBONFORMA — pontos, ismétlődő, lekerekített
   cellarács. A termékfotók a forma celláiban ülnek; ahol nincs fotó, a cella
   üresen marad, mint a még ki nem öntött bonbonhely. Ez a szerkezet, nem dísz. */

/* ---------- fejléc ---------- */
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 100;
  padding-block: 1.05rem;
  transition: background-color .4s var(--ease), padding .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.hdr.is-stuck {
  background: rgba(7, 43, 33, .92);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: rgba(203,168,98,.28);   /* arany hajszálvonal */
  padding-block: .7rem;
}
.hdr__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--cream); }
.brand__mark { width: 2.4rem; height: 2.4rem; flex: none; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: 'Manrope', sans-serif; font-weight: 700;
  font-size: .95rem; letter-spacing: .16em; text-transform: uppercase;
}
.brand__role {
  font-family: 'Fraunces', serif; font-size: .82rem; font-style: italic;
  color: var(--muted); letter-spacing: .01em;
}

.nav { display: none; align-items: center; gap: clamp(1.1rem, 2.2vw, 2.1rem); }
.nav a {
  font-size: .92rem; font-weight: 500; text-decoration: none; color: var(--cream-2);
  padding-block: .35rem; position: relative;
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--bronze); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--cream); }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 3rem; height: 3rem; padding: 0 .8rem;
  background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.nav-toggle span { display: block; height: 1.5px; background: var(--cream); transition: transform .4s var(--ease), opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* asztali nézet: menü ki, hamburger el — a sorrend számít, ezért van itt */
@media (min-width: 62rem) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
}

.drawer {
  position: fixed; inset: 0; z-index: 99; display: grid; place-content: center;
  background: var(--ink); gap: 1.4rem; text-align: center;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer a { font-family: 'Fraunces', serif; font-size: 1.9rem; text-decoration: none; color: var(--cream); }
.drawer a:hover { color: var(--bronze); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(92svh, 54rem); display: flex; align-items: flex-end; padding-block: 9rem var(--sec); overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 55%; }
/* keskeny kijelzőn jobbra tolva, hogy a bonbonok ne essenek ki a vágásból */
@media (max-width: 47.99rem) { .hero__media img { object-position: 76% 62%; } }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(4,30,22,.82) 0%, rgba(4,30,22,.34) 38%, rgba(4,30,22,.92) 100%),
    linear-gradient(90deg, rgba(4,30,22,.88) 0%, rgba(4,30,22,.18) 62%);
}
.hero__in { position: relative; max-width: 44rem; }
.hero h1 { margin-bottom: .35em; }
.hero h1 em {
  font-style: italic; font-variation-settings: 'opsz' 120;
  color: var(--bronze);
  /* a dőlt betűk jobb oldali túllógása elnyeli a szóközt — visszaadjuk */
  padding-right: .14em;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }

/* ---------- BONBONFORMA-RÁCS ---------- */
.mould {
  display: grid; gap: clamp(.5rem, 1.1vw, .9rem);
  grid-template-columns: repeat(2, 1fr);
  padding: clamp(.5rem, 1.1vw, .9rem);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
@media (min-width: 40rem) { .mould { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .mould--6 { grid-template-columns: repeat(3, 1fr); } }
.section--paper .mould, .section--light .mould { background: var(--paper-2); border-color: var(--line-light); }

.cell {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border-radius: 26%;                       /* a forma lekerekített üregének íve */
  background: #3A3128;
  box-shadow: inset 0 1px 0 rgba(247,242,234,.08), inset 0 -6px 18px rgba(0,0,0,.55);
}
.section--paper .cell, .section--light .cell { background: #DDE7E0; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -6px 18px rgba(14,59,46,.16); }
.cell img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.cell:hover img { transform: scale(1.06); }

/* üres üreg — a még ki nem öntött bonbon helye */
.cell--empty::after {
  content: ''; position: absolute; inset: 22%;
  border: 1px dashed var(--line); border-radius: 30%;
}
.section--paper .cell--empty::after, .section--light .cell--empty::after { border-color: #B9C8BE; }

/* töltődés görgetésre: a cella alulról "megtelik" */
.cell__fill { position: absolute; inset: 0; }
.cell__fill img { clip-path: inset(100% 0 0 0); transition: clip-path 1.1s var(--ease); }
.mould.is-in .cell__fill img { clip-path: inset(0 0 0 0); }
.mould.is-in .cell:nth-child(2) .cell__fill img { transition-delay: .09s; }
.mould.is-in .cell:nth-child(3) .cell__fill img { transition-delay: .18s; }
.mould.is-in .cell:nth-child(4) .cell__fill img { transition-delay: .27s; }
.mould.is-in .cell:nth-child(5) .cell__fill img { transition-delay: .36s; }
.mould.is-in .cell:nth-child(6) .cell__fill img { transition-delay: .45s; }
@media (prefers-reduced-motion: reduce) {
  .cell__fill img { clip-path: none !important; transition: none; }
}

/* ---------- kártyák ---------- */
.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; background: var(--ink-2);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover { border-color: var(--bronze-dim); transform: translateY(-4px); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: clamp(1.3rem, 2.4vw, 1.9rem); flex: 1; display: flex; flex-direction: column; }
.card__body p { flex: 1; }
.card__more { font-weight: 600; font-size: .93rem; color: var(--bronze); text-decoration: none; display: inline-flex; gap: .45rem; }
.card__more:hover { gap: .8rem; }
.section--paper .card, .section--light .card { background: #fff; border-color: var(--line-light); }
.section--paper .card__more, .section--light .card__more { color: var(--bronze-dim); }

/* ---------- lépéssor (workshop menete) ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.steps li {
  counter-increment: s; position: relative;
  padding: 1.6rem 0 1.6rem 4.2rem;
  border-bottom: 1px solid var(--line);
}
.steps li:first-child { border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 1.55rem;
  font-family: 'Fraunces', serif; font-size: 1.15rem; color: var(--bronze);
  font-variation-settings: 'opsz' 20;
}
.steps h3 { margin-bottom: .3rem; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); }
.section--paper .steps li, .section--paper .steps li:first-child,
.section--light .steps li, .section--light .steps li:first-child { border-color: var(--line-light); }
.section--paper .steps p, .section--light .steps p { color: var(--on-paper-muted); }

/* ---------- adatsor (ár, létszám, idő) ---------- */
.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
@media (min-width: 40rem) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts div { background: var(--ink-2); padding: 1.5rem 1.4rem; }
.facts dt { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.facts dd { margin: 0; font-family: 'Fraunces', serif; font-size: 1.5rem; line-height: 1.15; }
.section--paper .facts, .section--light .facts { background: var(--line-light); border-color: var(--line-light); }
.section--paper .facts div, .section--light .facts div { background: #fff; }

/* ---------- GYIK ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.35rem 2.5rem 1.35rem 0;
  font-family: 'Fraunces', serif; font-size: 1.12rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: .4rem; top: 50%; width: .7rem; height: .7rem;
  border-right: 1.5px solid var(--bronze); border-bottom: 1.5px solid var(--bronze);
  transform: translateY(-70%) rotate(45deg); transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq .faq__a { padding: 0 0 1.4rem; color: var(--muted); max-width: 60ch; }
.section--paper .faq, .section--paper .faq details,
.section--light .faq, .section--light .faq details { border-color: var(--line-light); }
.section--paper .faq .faq__a, .section--light .faq .faq__a { color: var(--on-paper-muted); }

/* ---------- űrlap ---------- */
.form { display: grid; gap: 1.1rem; }
@media (min-width: 40rem) { .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; } }
.field { display: grid; gap: .45rem; }
.field label { font-size: .84rem; font-weight: 600; letter-spacing: .04em; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .98rem; color: var(--on-paper);
  background: #fff; border: 1px solid #B9C8BE; border-radius: var(--r-sm);
  padding: .85rem 1rem; min-height: 3rem; width: 100%;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--bronze-dim); }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; line-height: 1.5; }
.consent input { width: 1.15rem; height: 1.15rem; min-height: 0; flex: none; margin-top: .18rem; }
.form__note { font-size: .82rem; color: var(--on-paper-muted); }
.form__status { font-size: .92rem; font-weight: 600; min-height: 1.4rem; }

/* hírlevél */
.news { border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.8rem, 4vw, 3rem); background: var(--ink-2); }
.news__form { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.news__form input {
  flex: 1 1 15rem; font: inherit; min-height: 3rem; padding: .8rem 1.1rem;
  background: var(--ink); color: var(--cream);
  border: 1px solid var(--line); border-radius: 999px;
}
.news__form input::placeholder { color: var(--muted); }

/* hírlevél világos szekcióban */
.section--light .news, .section--paper .news { background: #fff; border-color: var(--line-light); }
.section--light .news__form input, .section--paper .news__form input {
  background: var(--white); color: var(--on-paper); border-color: var(--line-light);
}
.section--light .news__form input::placeholder,
.section--paper .news__form input::placeholder { color: var(--on-paper-muted); }

/* ---------- mobil lebegő hívógomb ---------- */
.callbar {
  position: fixed; left: var(--pad); right: var(--pad); bottom: 1rem; z-index: 95;
  display: flex; gap: .6rem;
}
@media (min-width: 62rem) { .callbar { display: none; } }
.callbar a {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: .95rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.callbar__call { background: var(--cream); color: var(--ink); }
.callbar__mail { background: var(--ink-3); color: var(--cream); border: 1px solid var(--line); }
body { padding-bottom: 5.5rem; }
@media (min-width: 62rem) { body { padding-bottom: 0; } }

/* ---------- lábléc ---------- */
.ftr { background: #0B2E24; border-top: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.ftr__grid { display: grid; gap: 2.5rem; }
@media (min-width: 48rem) { .ftr__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.ftr .ftr__h { font-family: 'Manrope', sans-serif; font-size: .78rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.ftr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.ftr a { text-decoration: none; color: var(--cream-2); font-size: .95rem; }
.ftr a:hover { color: var(--bronze); }
.ftr__legal { margin-top: 2.8rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; justify-content: space-between; }

/* ---------- süti-sáv ---------- */
.cookie {
  /* jobb alsó sarok: a hero szövege és CTA-ja balra igazított, ne takarja el */
  position: fixed; right: var(--pad); bottom: 1rem; z-index: 120;
  width: min(28rem, calc(100% - var(--pad) * 2));
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1.3rem; font-size: .88rem; box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
@media (max-width: 61.99rem) { .cookie { bottom: 5.5rem; } }
.cookie[hidden] { display: none; }
.cookie__btns { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.cookie .btn { min-height: 2.6rem; padding: .55rem 1.2rem; font-size: .88rem; }

/* ---------- apróságok ---------- */
.badge {
  display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--bronze);
  border: 1px solid var(--bronze-dim); border-radius: 999px; padding: .35rem .85rem;
}
.figure { border-radius: var(--r-md); overflow: hidden; }
.figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.figure--wide img { aspect-ratio: 16 / 9; }

/* aloldali hero — alacsonyabb, mint a kezdőlapé */
.hero--page { min-height: min(66svh, 36rem); padding-block: 10rem clamp(3rem, 7vw, 5rem); }
.hero--page h1 { font-size: clamp(2.2rem, 1.6rem + 3.2vw, 4.2rem); }

/* ---------- workshop-katalógus (workshopok.html, adat: src/workshopok.json) ---------- */
.ws .card__body p { flex: 0 0 auto; }
.ws__meta { margin: 0 0 1.2rem; font-size: .9rem; }
.ws__dates { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: auto; }
.ws__label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; }
.ws__dates ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.ws__date { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .3rem .9rem; }
.ws__date > span { font-weight: 600; }
.ws__none { margin: 0; font-size: .92rem; }
.ws__notify { margin-top: 1.1rem; }
.ws__notify summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--bronze); }
.ws__notify .news__form { margin-top: .9rem; }
.ws__notify .news__form input[type="email"] { flex: 1 1 11rem; min-width: 0; }
.hero__media picture { display: contents; }
.ws .badge { align-self: flex-start; }
.ws__poster { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink-3); }
.ws__poster img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform var(--dur) var(--ease); }
.ws__poster:hover img { transform: scale(1.03); }

/* ---------- felugró üdvözlőablak (src/popup.json) ---------- */
.popup {
  width: min(28rem, calc(100vw - 2rem)); padding: 2rem 1.75rem 1.6rem;
  border: 1px solid var(--bronze-dim); border-radius: var(--r-md);
  background: var(--ink); color: var(--cream);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.popup::backdrop { background: rgba(4,30,22,.55); }
.popup h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); margin: .3rem 0 .8rem; }
.popup p { color: var(--cream-2); }
.popup__actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1.4rem; }
.popup__close { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; padding: .6rem .2rem; }
.popup__x { position: absolute; top: .6rem; right: .8rem; background: none; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .3rem; }
.popup__x:hover, .popup__close:hover { color: var(--cream); }
