/* ==========================================================================
   G-BÚTOR Kunhegyes — stylesheet
   Tokens → base → components → sections → utilities
   ========================================================================== */

/* ---------- Font (self-hosted Archivo, SIL OFL) ---------- */
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"), url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations"), url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --plaster: #EEECE7;
  --paper: #F8F7F4;
  --graphite: #1F1E1C;
  --graphite-2: #2A2926;
  --oak: #B8834E;
  --oak-light: #CFA173;
  --brass: #A8843A;
  --stone: #6E6B65;

  --bg: var(--plaster);
  --surface: var(--paper);
  --ink: var(--graphite);
  --ink-soft: #4A4843;
  --muted: var(--stone);
  --line: rgba(31, 30, 28, .14);
  --line-strong: rgba(31, 30, 28, .28);
  --accent: var(--oak);
  --accent-ink: #1F1E1C;
  --focus: #8A5A22;
  --error: #A6342A;
  --success: #3E6B45;

  --inverse-bg: var(--graphite);
  --inverse-surface: var(--graphite-2);
  --inverse-ink: #EFEDE8;
  --inverse-muted: #A9A59D;
  --inverse-line: rgba(239, 237, 232, .16);

  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --step--1: clamp(.84rem, .82rem + .1vw, .9rem);
  --step-0: clamp(1rem, .97rem + .15vw, 1.0625rem);
  --step-1: clamp(1.18rem, 1.1rem + .35vw, 1.35rem);
  --step-2: clamp(1.45rem, 1.3rem + .7vw, 1.9rem);
  --step-3: clamp(2rem, 1.5rem + 2.4vw, 3.6rem);
  --step-4: clamp(2.5rem, 1.6rem + 4.4vw, 5.9rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --max: 1320px;
  --header-h: 80px;
  --radius-s: 4px;
  --radius-m: 10px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #181715;
    --surface: #211F1C;
    --ink: #EFEDE8;
    --ink-soft: #CFCBC3;
    --muted: #A29E96;
    --line: rgba(239, 237, 232, .14);
    --line-strong: rgba(239, 237, 232, .3);
    --accent: var(--oak-light);
    --focus: #E0B784;
    --error: #F08A7E;
    --success: #8BC093;
    --inverse-bg: #0F0E0D;
    --inverse-surface: #1B1A18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #181715;
  --surface: #211F1C;
  --ink: #EFEDE8;
  --ink-soft: #CFCBC3;
  --muted: #A29E96;
  --line: rgba(239, 237, 232, .14);
  --line-strong: rgba(239, 237, 232, .3);
  --accent: var(--oak-light);
  --focus: #E0B784;
  --error: #F08A7E;
  --success: #8BC093;
  --inverse-bg: #0F0E0D;
  --inverse-surface: #1B1A18;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: inherit; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, picture { display: block; max-width: 100%; }
/* cropped media frames: the <picture> wrapper must fill the frame */
.hero__frame picture, .service__media picture, .why__media picture, .final__bg picture { width: 100%; height: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 200;
  background: var(--ink); color: var(--bg); padding: .7rem 1rem; border-radius: var(--radius-s);
  transition: top .2s;
}
.skip-link:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

/* Headline type: the expanded Archivo cut */
.section-title, .hero__title, .final__title, .service__title, .timeline h3, .why__item dt, .contact__big {
  font-variation-settings: "wdth" 118;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.02;
}
.section-title { font-size: var(--step-3); max-width: 16ch; text-wrap: balance; }
.section-lead { font-size: var(--step-1); color: var(--ink-soft); max-width: 46ch; line-height: 1.5; text-wrap: pretty; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head--split { display: grid; gap: 1.25rem; align-items: end; }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .section-head--split .section-lead { justify-self: end; }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent; --btn-ink: var(--ink); --btn-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.4rem;
  background: var(--btn-bg); color: var(--btn-ink);
  border: 1px solid var(--btn-line); border-radius: var(--radius-s);
  font-size: .86rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase;
  font-variation-settings: "wdth" 110;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn--primary { --btn-bg: var(--oak); --btn-ink: #1A1917; --btn-line: var(--oak); }
.btn--primary:hover { --btn-bg: #C79460; --btn-line: #C79460; }
.btn--outline:hover { --btn-bg: var(--ink); --btn-ink: var(--bg); --btn-line: var(--ink); }
.btn--sm { min-height: 40px; padding: .55rem 1rem; font-size: .78rem; }
.btn--lg { min-height: 56px; padding: 1rem 1.8rem; font-size: .9rem; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  height: var(--header-h); display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: block; flex: none; }
.brand .logo-on-light { display: block; }
.brand__img { height: 62px; width: auto; }
.logo-on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-on-light { display: none; }
  :root:not([data-theme="light"]) .logo-on-dark { display: block; }
}
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: clamp(1rem, 2.2vw, 2rem); }
.nav__list a {
  text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--ink-soft);
  padding-block: .4rem; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s var(--ease), color .2s;
}
.nav__list a:hover { color: var(--ink); background-size: 100% 1px; }
.nav__phone { display: none; }
.site-header__actions { display: flex; align-items: center; gap: .75rem; }
.lang-toggle {
  min-width: 44px; min-height: 40px; padding: 0 .6rem;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-s);
  font-size: .78rem; font-weight: 650; letter-spacing: .08em; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--line-strong); }
.menu-toggle { display: none; }

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .brand__img { height: 52px; }
  .site-header__actions { margin-left: auto; }
  .site-header__cta { display: none; }
  .menu-toggle {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer; margin-right: -.5rem;
  }
  .menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
    display: block; width: 22px; height: 1.6px; background: currentColor; transition: transform .3s var(--ease), opacity .2s;
  }
  .menu-toggle__bars { position: relative; }
  .menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle__bars::before { top: -7px; }
  .menu-toggle__bars::after { top: 7px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: fixed; left: 0; right: 0;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    height: calc(100dvh - var(--header-h) - env(safe-area-inset-top, 0px));
    background: var(--bg); padding: 2rem var(--gutter) calc(6rem + env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column; justify-content: space-between;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a {
    display: block; padding: 1rem 0; border-bottom: 1px solid var(--line);
    font-size: var(--step-2); font-weight: 600; color: var(--ink);
    font-variation-settings: "wdth" 115; background: none;
  }
  .nav__phone { display: block; font-size: var(--step-1); font-weight: 600; text-decoration: none; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}
.hero__text {
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
  display: flex; flex-direction: column; justify-content: center; gap: 1.5rem;
}
.hero__slogan {
  font-size: var(--step--1); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brass);
}
.hero__title { font-size: var(--step-4); max-width: 11ch; text-wrap: balance; line-height: .98; }
.hero__sub { font-size: var(--step-1); color: var(--ink-soft); max-width: 40ch; line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.hero__meta { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .95rem; color: var(--muted); }
.hero__meta a { color: var(--ink); font-weight: 600; text-decoration: none; }
.hero__meta a:hover { text-decoration: underline; }

.hero__media { position: relative; overflow: hidden; min-height: 70svh; background: var(--oak); }
.hero__frame { position: absolute; inset: -6% 0; will-change: transform; }
.hero__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero__caption {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem;
  font-size: .8rem; color: #F3F0EA; text-shadow: 0 1px 8px rgba(0,0,0,.45);
}

/* Slat reveal – the one orchestrated moment */
.slat-reveal { position: absolute; inset: 0; display: flex; pointer-events: none; }
.slat-reveal span {
  flex: 1; background: var(--bg);
  transform-origin: 50% 0;
  animation: slat 1.1s var(--ease) forwards;
}
.slat-reveal span:nth-child(odd) { transform-origin: 50% 100%; }
.slat-reveal span:nth-child(1) { animation-delay: .10s } .slat-reveal span:nth-child(2) { animation-delay: .16s }
.slat-reveal span:nth-child(3) { animation-delay: .22s } .slat-reveal span:nth-child(4) { animation-delay: .28s }
.slat-reveal span:nth-child(5) { animation-delay: .34s } .slat-reveal span:nth-child(6) { animation-delay: .40s }
.slat-reveal span:nth-child(7) { animation-delay: .46s } .slat-reveal span:nth-child(8) { animation-delay: .52s }
.slat-reveal span:nth-child(9) { animation-delay: .58s } .slat-reveal span:nth-child(10) { animation-delay: .64s }
.slat-reveal span:nth-child(11) { animation-delay: .70s } .slat-reveal span:nth-child(12) { animation-delay: .76s }
@keyframes slat { to { transform: scaleY(0); } }

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100svh; }
  .hero__text { padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); padding-right: clamp(2rem, 4vw, 4rem); }
  .hero__media { min-height: auto; }
  .hero__caption { left: 1.5rem; bottom: 1.5rem; }
}
@media (max-width: 899px) {
  .hero { grid-template-rows: auto auto; }
  .hero__media { order: -1; min-height: 46svh; }
  .hero__text { padding-top: 1.75rem; gap: 1.1rem; }
  .hero__actions .btn { flex: 1 1 160px; }
}

/* ---------- Slogan band ---------- */
.band {
  overflow: hidden; border-block: 1px solid var(--line);
  padding-block: 1.1rem; white-space: nowrap;
}
.band__track { display: inline-flex; gap: 3rem; animation: band 60s linear infinite; }
.band__track span {
  font-size: var(--step-1); font-weight: 600; font-variation-settings: "wdth" 120; letter-spacing: .02em; text-transform: uppercase;
  color: var(--ink-soft); display: inline-flex; align-items: center; gap: 3rem;
}
.band__track span::after { content: ""; width: 7px; height: 7px; background: var(--brass); transform: rotate(45deg); }
@keyframes band { to { transform: translateX(-50%); } }

/* ---------- Portfolio ---------- */
.work__filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip {
  min-height: 42px; padding: .5rem 1.05rem; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-strong); cursor: pointer;
  font-size: .92rem; font-weight: 500; transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip__n { color: inherit; opacity: .55; margin-left: .35rem; font-size: .82em; }

.work__grid {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  /* masonry: 8px row tracks, each item spans enough rows for its own height (set in gallery.js) */
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 8px; column-gap: 1rem;
  align-items: start;
}
@media (max-width: 1000px) { .work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.work__item { grid-row-end: span var(--span, 48); }
.work__item[hidden] { display: none; }
.work__btn {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  background: color-mix(in srgb, var(--oak) 22%, var(--bg));
  aspect-ratio: var(--ar); overflow: hidden; border-radius: var(--radius-s);
}
.work__btn img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease), opacity .6s var(--ease);
  opacity: 0;
}
.work__btn img.is-loaded { opacity: 1; }
.work__btn:hover img { transform: scale(1.03); }
.work__meta { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem .1rem 0; font-size: .92rem; }
.work__name { font-weight: 550; }
.work__cat { color: var(--muted); white-space: nowrap; }
.work__swipe-hint { display: none; }
.work__after {
  margin-top: clamp(2.5rem, 5vw, 4rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  padding-top: 2rem; border-top: 1px solid var(--line);
}
.work__after p { font-size: var(--step-1); max-width: 44ch; }

/* Mobile: portfolio becomes a swipe carousel */
@media (max-width: 640px) {
  .work__grid {
    display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: .5rem;
  }
  .work__grid::-webkit-scrollbar { display: none; }
  /* width derived from a fixed height and the photo's own ratio, so nothing is cropped */
  .work__item { grid-row-end: auto; flex: none; margin: 0; scroll-snap-align: start; width: min(calc(min(62svh, 500px) * var(--arn)), 86vw); }
  .work__swipe-hint { display: block; padding: .75rem var(--gutter) 0; font-size: .85rem; color: var(--muted); }
}

/* ---------- Services ---------- */
.services { background: var(--surface); }
.services__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 3vw, 2.5rem); }
@media (min-width: 760px) {
  .services__grid { grid-template-columns: 1fr 1fr; }
  .service:nth-child(even) { margin-top: clamp(3rem, 8vw, 7rem); }
}
.service__media { overflow: hidden; border-radius: var(--radius-s); aspect-ratio: 5 / 4; background: var(--oak); }
.service:nth-child(3) .service__media, .service:nth-child(4) .service__media { aspect-ratio: 4 / 4.4; }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.service:hover .service__media img { transform: scale(1.03); }
.service__body { padding-top: 1.4rem; display: grid; gap: .7rem; max-width: 46ch; }
.service__title { font-size: var(--step-2); }
.service__body p { color: var(--ink-soft); }
.service__link {
  justify-self: start; margin-top: .3rem; padding: .35rem 0; font-weight: 650; font-size: .85rem;
  letter-spacing: .09em; text-transform: uppercase; text-decoration: none; color: var(--ink);
  border-bottom: 2px solid var(--oak);
}
.service__link:hover { color: var(--oak); }

/* ---------- Quote ---------- */
.quote {
  position: relative; background: var(--inverse-bg); color: var(--inverse-ink); isolation: isolate;
  --ink: var(--inverse-ink); --ink-soft: #CFCBC3; --muted: var(--inverse-muted);
  --line: var(--inverse-line); --line-strong: rgba(239,237,232,.32); --focus: #E0B784; --error: #F29A8E;
}
/* slat rhythm, echoing the portfolio's slatted wall */
.quote::before {
  content: ""; position: absolute; inset: 0 0 auto auto; width: min(38vw, 520px); height: 100%; z-index: -1;
  background: repeating-linear-gradient(90deg, rgba(184,131,78,.11) 0 18px, transparent 18px 26px);
  -webkit-mask-image: linear-gradient(to left, #000 10%, transparent);
  mask-image: linear-gradient(to left, #000 10%, transparent);
}
.quote__layout { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); }
@media (min-width: 1000px) {
  .quote__layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
  .quote__intro { position: sticky; top: calc(var(--header-h) + 3rem); }
}
.quote__intro { display: grid; gap: 1.5rem; }
.quote__alt { display: grid; gap: .25rem; padding-top: 1.5rem; border-top: 1px solid var(--line); margin-top: .5rem; }
.quote__alt p { color: var(--muted); }
.quote__phone { font-size: var(--step-2); font-weight: 650; font-variation-settings: "wdth" 115; text-decoration: none; }
.quote__mail { color: var(--ink-soft); }
.quote__phone:hover, .quote__mail:hover { color: var(--oak-light); }

.quote__panel {
  background: var(--surface); color: var(--graphite);
  --ink: var(--graphite); --ink-soft: #4A4843; --muted: #6E6B65; --line: rgba(31,30,28,.14); --line-strong: rgba(31,30,28,.3);
  --focus: #8A5A22; --error: #A6342A;
  border-radius: var(--radius-m); padding: clamp(1.25rem, 4vw, 2.75rem);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .quote__panel { background: #F3F1EC; }
}
:root[data-theme="dark"] .quote__panel { background: #F3F1EC; }

.form__grid { display: grid; gap: 1.1rem 1rem; }
@media (min-width: 620px) {
  .form__grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}
.field { display: grid; gap: .4rem; align-content: start; }
.field__label { font-size: .92rem; font-weight: 600; }
.req { color: var(--oak); }
.opt { font-weight: 400; color: var(--muted); font-size: .88em; }
.field__input {
  width: 100%; min-height: 52px; padding: .8rem .95rem;
  font-size: 16px; /* prevents iOS zoom */
  background: #FFFFFF; color: var(--graphite);
  border: 1px solid rgba(31,30,28,.22); border-radius: var(--radius-s);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field__input::placeholder { color: #8F8B84; }
.field__input:hover { border-color: rgba(31,30,28,.4); }
.field__input:focus { outline: none; border-color: var(--graphite); box-shadow: 0 0 0 3px rgba(184,131,78,.35); }
textarea.field__input { min-height: 120px; resize: vertical; line-height: 1.5; }
.field__input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field__error { font-size: .86rem; color: var(--error); min-height: 0; }
.field__error:empty { display: none; }
.select { position: relative; }
.select::after {
  content: ""; position: absolute; right: 1rem; top: 50%; width: 8px; height: 8px; pointer-events: none;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-70%) rotate(45deg);
}
.select .field__input { padding-right: 2.5rem; }

.form__summary, .form__error, .form__notice {
  border-radius: var(--radius-s); padding: .9rem 1rem; margin-bottom: 1.25rem; font-size: .95rem;
}
.form__summary, .form__error { background: rgba(166,52,42,.08); border: 1px solid rgba(166,52,42,.35); color: #7E2219; }
.form__error { margin: 1rem 0 0; }
.form__error a { font-weight: 650; }
.form__notice { background: rgba(168,132,58,.12); border: 1px solid rgba(168,132,58,.45); color: #5A4418; }

/* Upload */
.upload { border: 0; padding: 0; margin: 1.6rem 0 0; min-width: 0; }
.upload__title { padding: 0; font-weight: 650; font-size: var(--step-1); font-variation-settings: "wdth" 112; }
.upload__hint { margin-top: .35rem; color: var(--ink-soft); font-size: .95rem; max-width: 60ch; }
.upload__drop {
  margin-top: 1rem; padding: 1.25rem; border: 1.5px dashed rgba(31,30,28,.3); border-radius: var(--radius-m);
  background: #FFFFFF; display: grid; gap: .6rem; justify-items: start;
  transition: border-color .2s, background-color .2s;
}
.upload__drop.is-dragover { border-color: var(--oak); background: #FBF4EC; }
.upload__buttons { display: flex; flex-wrap: wrap; gap: .6rem; width: 100%; }
.btn--upload {
  --btn-bg: var(--graphite); --btn-ink: #F3F0EA; --btn-line: var(--graphite);
  text-transform: none; letter-spacing: .01em; font-size: .98rem; font-weight: 600;
}
.btn--upload:hover { --btn-bg: #3A3834; }
.btn--upload:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.upload__camera { display: none; }
.upload__dropnote { color: var(--muted); font-size: .9rem; }
.upload__limits { color: var(--muted); font-size: .85rem; }
.upload__error { margin-top: .8rem; color: var(--error); font-size: .9rem; }
.upload__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; margin-top: 1rem; }
.upload__list:empty { display: none; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--radius-s); overflow: hidden; background: #E6E2DA; border: 1px solid rgba(31,30,28,.12); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__pdf { display: grid; place-content: center; gap: .3rem; height: 100%; padding: .5rem; text-align: center; font-size: .75rem; word-break: break-all; color: #4A4843; }
.thumb__pdf strong { font-size: .95rem; color: #A6342A; letter-spacing: .06em; }
.thumb__name { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem .45rem .35rem; font-size: .7rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb__remove {
  position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(20,19,17,.78); color: #fff;
}
.thumb__remove:hover { background: #A6342A; }
.thumb.is-processing::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.6); }
.upload__count { margin-top: .5rem; font-size: .85rem; color: var(--muted); }
.upload__count:empty { display: none; }

@media (hover: none) and (pointer: coarse) {
  .upload__camera { display: inline-flex; }
  .upload__dropnote { display: none; }
  .upload__buttons .btn { flex: 1 1 200px; }
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__privacy { margin: 1.5rem 0 1rem; font-size: .85rem; color: var(--muted); }
.form__submit { position: relative; }
.spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(26,25,23,.3); border-top-color: #1A1917; animation: spin .8s linear infinite;
}
.form.is-sending .spinner { display: inline-block; }
.form.is-sending .form__submit { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success { display: grid; gap: 1.25rem; justify-items: start; padding: clamp(1rem, 4vw, 2.5rem) 0; }
.form-success:focus { outline: none; }
.form-success__logo { width: 150px; height: auto; margin-bottom: .25rem; }
.form-success__icon { color: var(--success); color: #3E6B45; }
.form-success__text { font-size: var(--step-2); font-weight: 600; font-variation-settings: "wdth" 112; line-height: 1.2; max-width: 24ch; }

/* Showcase: email preview */
.demo-mail { width: 100%; margin-top: 1rem; padding-top: 1.5rem; border-top: 1px solid rgba(31,30,28,.14); }
.demo-mail__label { font-weight: 650; margin-bottom: .75rem; }
.demo-mail__head { background: #fff; border: 1px solid rgba(31,30,28,.14); border-bottom: 0; border-radius: var(--radius-s) var(--radius-s) 0 0; padding: .9rem 1rem; font-size: .88rem; display: grid; gap: .15rem; }
.demo-mail__head span { color: #6E6B65; display: inline-block; min-width: 5.5rem; }
.demo-mail__subject { margin-top: .4rem; font-weight: 650; font-size: 1rem; }
.demo-mail__table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid rgba(31,30,28,.14); font-size: .9rem; }
.demo-mail__table th, .demo-mail__table td { text-align: left; vertical-align: top; padding: .55rem 1rem; border-top: 1px solid rgba(31,30,28,.08); }
.demo-mail__table th { color: #6E6B65; font-weight: 500; width: 38%; }
.demo-mail__table td { white-space: pre-wrap; overflow-wrap: anywhere; }
.demo-mail__att { margin-top: 1rem; font-weight: 600; font-size: .92rem; }
.demo-mail__files { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; margin-top: .5rem; }
.demo-mail__files li { display: grid; gap: .25rem; font-size: .72rem; color: #6E6B65; min-width: 0; }
.demo-mail__files span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-mail__files img, .demo-mail__pdf { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-s); border: 1px solid rgba(31,30,28,.12); }
.demo-mail__pdf { display: grid; place-items: center; background: #E6E2DA; color: #A6342A; font-weight: 700; letter-spacing: .06em; }

/* ---------- Why ---------- */
.why__layout { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
@media (min-width: 900px) { .why__layout { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); } }
.why__media { overflow: hidden; border-radius: var(--radius-s); aspect-ratio: 3 / 4; background: var(--oak); }
.why__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) { .why__media { aspect-ratio: 4 / 3.4; } }
.why__list { margin-top: clamp(2rem, 4vw, 3rem); display: grid; }
.why__item { display: grid; gap: .4rem; padding: 1.4rem 0 1.4rem 1.25rem; border-top: 1px solid var(--line); position: relative; }
.why__item::before { content: ""; position: absolute; left: 0; top: 1.65rem; width: 3px; height: 1.1em; background: var(--oak); }
.why__item:last-child { border-bottom: 1px solid var(--line); }
.why__item dt { font-size: var(--step-1); }
.why__item dd { color: var(--ink-soft); max-width: 44ch; }

/* ---------- Process ---------- */
.process { background: var(--surface); }
.timeline { display: grid; gap: 0; counter-reset: step; }
.timeline__step { position: relative; display: grid; gap: .45rem; padding: 0 0 2.2rem 3.5rem; }
.timeline__step::before { /* vertical rail on mobile */
  content: ""; position: absolute; left: 1.1rem; top: 2.4rem; bottom: 0; width: 1px; background: var(--line-strong);
}
.timeline__step:last-child { padding-bottom: 0; }
.timeline__step:last-child::before { display: none; }
.timeline__num {
  position: absolute; left: 0; top: 0; width: 2.3rem; height: 2.3rem; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--oak); color: var(--ink);
  font-size: .8rem; font-weight: 650; background: var(--surface);
}
.timeline h3 { font-size: var(--step-1); padding-top: .35rem; }
.timeline p { color: var(--ink-soft); font-size: .95rem; max-width: 30ch; }
@media (min-width: 1000px) {
  .timeline { grid-template-columns: repeat(6, 1fr); gap: 1.5rem; }
  .timeline__step { padding: 3.6rem 0 0 0; }
  .timeline__step::before { left: 2.3rem; right: -1.5rem; top: 1.15rem; bottom: auto; width: auto; height: 1px; }
  .timeline__step:last-child::before { display: none; }
  .timeline h3 { padding-top: 0; min-height: 2.1em; }
}

/* ---------- Contact ---------- */
.contact__layout { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 1000px) { .contact__layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; } }
.contact__list { display: grid; }
.contact__list > div { display: grid; gap: .2rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.contact__list > div:last-child { border-bottom: 1px solid var(--line); }
.contact__list dt { font-size: .88rem; color: var(--muted); }
.contact__list dd { font-size: var(--step-1); font-weight: 500; }
.contact__big { font-size: var(--step-2); text-decoration: none; overflow-wrap: anywhere; }
.contact__big:hover { color: var(--oak); }
.contact__big--mail { font-variation-settings: "wdth" 105; }
.contact__buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.contact__buttons .btn { flex: 1 1 220px; }

/* ---------- Final CTA ---------- */
.final { position: relative; overflow: hidden; color: #F3F0EA; isolation: isolate; min-height: 72svh; display: grid; align-items: end; }
.final__bg { position: absolute; inset: -10% 0; z-index: -2; will-change: transform; }
.final__bg img { width: 100%; height: 100%; object-fit: cover; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20,19,17,.72) 0%, rgba(20,19,17,.2) 70%), linear-gradient(180deg, rgba(20,19,17,.2) 0%, rgba(20,19,17,.7) 85%); }
.final__content { padding-block: clamp(5rem, 12vw, 9rem); display: grid; gap: 1.25rem; justify-items: start; }
.final__title { font-size: var(--step-4); max-width: 12ch; }
.final__sub { font-size: var(--step-1); max-width: 38ch; color: #E4E0D8; margin-bottom: .75rem; }

/* ---------- Footer ---------- */
.footer { background: var(--inverse-bg); color: var(--inverse-ink); padding-top: clamp(3.5rem, 7vw, 5.5rem); }
.footer__layout { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .footer__layout { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer__brand img { width: 240px; height: auto; }
.footer__tag { margin-top: 1rem; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; color: var(--inverse-muted); }
.footer__nav ul { display: grid; gap: .6rem; }
.footer__nav a, .footer__contact a { text-decoration: none; color: var(--inverse-ink); }
.footer__nav a:hover, .footer__contact a:hover { color: var(--oak-light); }
.footer__contact { font-style: normal; display: grid; gap: .6rem; align-content: start; color: var(--inverse-muted); }
.footer__legal { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer__legal a { color: var(--inverse-muted); text-decoration: none; }
.footer__legal a:hover { color: var(--oak-light); }
.form__privacy a { color: inherit; }
.footer__bottom { margin-top: 3rem; padding-block: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; border-top: 1px solid var(--inverse-line); font-size: .85rem; color: var(--inverse-muted); }

/* ---------- Mobile CTA bar ---------- */
.mobile-bar { display: none; }
@media (max-width: 960px) {
  .footer { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: 1.6fr 1fr; gap: 1px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--graphite);
    transition: transform .35s var(--ease);
  }
  .mobile-bar.is-hidden { transform: translateY(110%); }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 60px;
    font-weight: 650; font-size: .88rem; letter-spacing: .09em; text-transform: uppercase; text-decoration: none;
  }
  .mobile-bar__quote { background: var(--oak); color: #1A1917; }
  .mobile-bar__call { background: var(--graphite); color: #F3F0EA; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(14,13,12,.96); color: #F3F0EA; overflow: hidden;
}
.lightbox::backdrop { background: rgba(14,13,12,.9); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; animation: lb-in .3s var(--ease); }
@keyframes lb-in { from { opacity: 0; } }
.lightbox__stage {
  display: grid; place-items: center; min-height: 0;
  padding: calc(4rem + env(safe-area-inset-top, 0px)) clamp(.5rem, 6vw, 5.5rem) .5rem; touch-action: pan-y;
}
.lightbox__img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  transition: opacity .25s var(--ease), transform .35s var(--ease);
}
.lightbox__img.is-switching { opacity: 0; transform: scale(.985); }
.lightbox__bar {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: .9rem clamp(1rem, 6vw, 5.5rem) calc(1rem + env(safe-area-inset-bottom, 0px));
}
.lightbox__caption { font-size: .95rem; }
.lightbox__count { font-size: .85rem; color: #A9A59D; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lightbox__btn {
  position: absolute; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(243,240,234,.08); border: 1px solid rgba(243,240,234,.18); color: #F3F0EA; cursor: pointer;
  transition: background-color .2s;
}
.lightbox__btn:hover { background: rgba(243,240,234,.2); }
.lightbox__close { top: calc(.9rem + env(safe-area-inset-top, 0px)); right: .9rem; }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: .9rem; }
.lightbox__next { right: .9rem; }
@media (max-width: 640px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: calc(3.8rem + env(safe-area-inset-bottom, 0px)); transform: none; }
  .lightbox__stage { padding-bottom: 4.5rem; }
}

/* ---------- Scroll reveal (only on key elements) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .slat-reveal { display: none; }
  .band__track { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Legal pages (impresszum, adatkezelés) ---------- */
.legal-header { border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.legal-header .site-header__inner { height: 84px; }
.legal-header .brand__img { height: 58px; }
.legal-back { margin-left: auto; font-weight: 600; text-decoration: none; font-size: .95rem; }
.legal-back:hover { color: var(--oak); }
.legal { padding-block: clamp(3rem, 7vw, 5.5rem); }
.legal__inner { max-width: 760px; }
.legal h1 { font-size: var(--step-3); font-variation-settings: "wdth" 118; font-weight: 650; letter-spacing: -.02em; line-height: 1.05; }
.legal__updated { margin-top: 1rem; color: var(--muted); font-size: .95rem; }
.legal h2 { margin-top: 2.75rem; font-size: var(--step-1); font-variation-settings: "wdth" 112; font-weight: 650; }
.legal p, .legal li, .legal dd { color: var(--ink-soft); }
.legal p { margin-top: .75rem; max-width: 68ch; }
.legal ul.legal__list { list-style: disc; padding-left: 1.25rem; margin-top: .75rem; display: grid; gap: .35rem; }
.legal dl { margin-top: 1rem; display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; border-top: 1px solid var(--line); }
.legal dt, .legal dd { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.legal dt { color: var(--muted); font-size: .92rem; padding-right: 1rem; }
@media (max-width: 560px) { .legal dl { grid-template-columns: 1fr; } .legal dt { border-bottom: 0; padding-bottom: 0; } }
.fill { background: #FFE9A8; color: #5A4418; padding: .05em .35em; border-radius: 3px; font-weight: 600; }
.legal-note { margin-top: 1.5rem; padding: 1rem 1.1rem; border-radius: var(--radius-s); background: rgba(168,132,58,.12); border: 1px solid rgba(168,132,58,.45); color: #5A4418; font-size: .92rem; }
.legal .footer__bottom { margin-top: 0; }

/* Contact person */
.contact__list .contact__name { font-size: var(--step-2); font-weight: 650; font-variation-settings: "wdth" 118; letter-spacing: -.02em; }
.footer__name { color: var(--inverse-ink); font-weight: 600; }
.hero__person { color: var(--ink); font-weight: 600; }
