@import './sheet.css';
@import './sheet-responsive.css';
@import './sheet-mobile.css';

/* ==========================================================================
   Főoldal – landing JPG (6260×13228) pixelpontos @ 1502px, reszponzív alatta
   ========================================================================== */

.page-home {
  --home-ink-title: #4b392d;
  --home-ink-body: #716965;
  --home-ink-label: var(--ink-near);
  --home-ink-stat: #4b392d;
  --home-stats-bg: #a89f94;
  --home-pattern: repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 18px
    ),
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.025) 0,
      rgba(0, 0, 0, 0.025) 1px,
      transparent 1px,
      transparent 18px
    );
  --home-beige: #f9f6f2;
  --home-cta-bg: #b0a69c;
  --home-cta-ink: #4d463e;
  --home-cta-text: var(--ink-deep);
  --home-btn: #3c281a;
  --logo-w: 8.625em;
  --pad: 11em;
  --pad-content: var(--pad);
  --gap-logo-title: 5.125em;
  --home-col-narrow: 35fr;
  --home-col-wide: 65fr;
  --home-col-gap: 4em;
  --sheet-design: 93.8975em;
  max-width: 100%;
}

/* Lap széle ↔ viewport széle */
.page-home .page-shell {
  --sheet-bleed: 0px;
  overflow-x: visible;
}

.page-home .sheet {
  overflow-x: visible;
}

@media (min-width: 1502px) {
  .page-home .page-shell {
    --sheet-bleed: max(0px, (100vw - var(--sheet-design)) / 2);
  }

  .page-home .sheet {
    width: var(--sheet-design);
    max-width: none;
  }
}

/* ---- Hero + about: minden nézetben felülírja a sheet.css alapértékeit ---- */
.page-home .sheet-top__left {
  padding-right: 0;
  padding-left: var(--pad-content);
  overflow: visible;
}

.page-home .sheet-top__hero {
  min-width: 0;
}

.page-home .sheet-top__logo {
  display: block;
  width: var(--logo-w);
  margin: 0;
}

.page-home .sheet-top__logo--on-photo {
  display: none;
}

.page-home .sheet-top__logo img {
  width: 100%;
  height: auto;
}

.page-home .sheet-top__title {
  margin: var(--gap-logo-title) 0 0;
  padding: 0;
  max-width: none;
  overflow-wrap: break-word;
  hyphens: auto;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 2.4375em;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--home-ink-title);
}

.page-home .sheet-top__taglines {
  margin: 2.75em 0 0;
  padding: 0;
  max-width: none;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.25em;
  line-height: 1.35;
  color: var(--ink-b);
}

.page-home .sheet-top__intro {
  margin: 1.5em 0 0;
  padding: 0;
  max-width: none;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9375em;
  line-height: 1.65;
  color: var(--home-ink-body);
}

/* PC hero: szövegblokk feljebb, intro nagyobb térközzel */
@media (min-width: 1024px) {
  .page-home {
    --gap-logo-title: 3.75em;
  }

  .page-home .sheet-top__left {
    padding-top: 1.25em !important;
  }

  .page-home .sheet-top__intro {
    margin-top: 2.25em;
  }
}

/* ---- Kik vagyunk / Miért mi ---- */
.home-about {
  position: relative;
  z-index: 2;
  padding: 3.125em var(--pad) 2.5em;
  background: #fff;
}

.home-about__grid {
  display: grid;
  gap: 3em;
}

@media (min-width: 768px) {
  .home-about__grid {
    grid-template-columns: minmax(0, var(--home-col-narrow)) minmax(0, var(--home-col-wide));
    column-gap: var(--home-col-gap);
    row-gap: 0;
  }
}

.home-about__label {
  margin: 0 0 1em;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.875em;
  line-height: 1.2;
  color: var(--home-ink-label);
  text-transform: none;
  letter-spacing: 0;
}

.home-about__lead {
  margin: 0 0 1.25em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1875em;
  line-height: 1.45;
  color: var(--ink-b);
}

.home-about__text,
.home-about__list {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9375em;
  line-height: 1.65;
  color: var(--home-ink-body);
}

.home-about__list {
  padding: 0;
  list-style: none;
}

.home-about__list li {
  position: relative;
  padding-left: 1.25em;
  margin-bottom: 1.5em;
}

.home-about__list li:last-child {
  margin-bottom: 0;
}

.home-about__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35em;
  height: 0.35em;
  border-radius: 50%;
  background: var(--bronze);
}

/* ---- Hero: bal szöveg fehér háttérrel, fotó alatta / mellett – ne lógjon a szöveg a képbe ---- */
@media (min-width: 768px) {
  .page-home .sheet-top {
    overflow: visible;
  }

  .page-home .sheet-top__left {
    position: relative;
    z-index: 4;
    background: #fff;
  }

  .page-home .sheet-top__photo {
    z-index: 1;
    width: calc(100% + var(--sheet-bleed));
    max-width: none;
    margin-right: calc(-1 * var(--sheet-bleed));
    overflow: hidden;
  }
}

/* ---- Desktop nav kinézet (≥1302px, layout változatlan 1502-nél) ---- */
@media (min-width: 1302px) {
  .page-home .sheet-top__nav--desktop {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 10;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 1.125em;
    min-height: 4.5em;
    padding: 1.625em 2.1875em;
  }

  .page-home .sheet-top__nav--desktop > a {
    font-size: 0.84375em;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
  }

  .page-home .sheet-top__photo .menu-toggle {
    display: none;
  }
}

/* ---- Hero desktop (≥1502px) ---- */
@media (min-width: 1502px) {
  .page-home .sheet-top {
    display: grid;
    /* Ugyanaz a 35/65 + gap, mint az about: szöveg és kép között lélegző fehér sáv */
    grid-template-columns: minmax(0, var(--home-col-narrow)) minmax(0, var(--home-col-wide));
    column-gap: var(--home-col-gap);
    grid-template-rows: minmax(40.5625em, auto);
    align-items: stretch;
    overflow: visible;
    background: #fff;
  }

  .page-home .sheet-top__left {
    grid-column: 1;
    grid-row: 1;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    padding:
      1.25em
      0
      3.125em
      var(--pad-content);
    min-width: 0;
    background: #fff;
    overflow: visible;
  }

  .page-home .sheet-top__hero {
    max-width: none;
    width: 100%;
  }

  .page-home .sheet-top__photo {
    grid-column: 2;
    grid-row: 1;
    z-index: 1;
    align-self: stretch;
    height: auto;
    min-height: 40.5625em;
    width: calc(100% + var(--sheet-bleed));
    max-width: none;
    margin-right: calc(-1 * var(--sheet-bleed));
    overflow: hidden;
    background: #1e1a17;
  }

  .page-home .sheet-top__photo img {
    object-position: center 42%;
  }
}

/* ---- Számszerűsített bizonyíték – tartalom a konténer szélén, csak háttér jobbra ---- */
.home-stats-bleed {
  display: grid;
  max-width: none;
  padding-inline: var(--pad);
}

.home-stats-bleed__spacer {
  grid-column: 1;
}

.home-stats {
  grid-column: 2;
  position: relative;
  min-width: 0;
  margin-right: 0;
  padding: 2.75em 0 3.125em 2.5em;
  background-color: var(--home-stats-bg);
  background-image: var(--home-pattern);
}

.home-stats::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 100%;
  width: calc(var(--pad) + var(--sheet-bleed));
  background-color: var(--home-stats-bg);
  background-image: var(--home-pattern);
  pointer-events: none;
}

/* ≤1023px: háttér balra is kilóg a konténeren túl (tartalom marad) */
@media (max-width: 1023px) {
  .home-stats::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    right: 100%;
    width: calc(var(--pad) + var(--sheet-bleed));
    background-color: var(--home-stats-bg);
    background-image: var(--home-pattern);
    pointer-events: none;
  }
}

.home-stats__title {
  margin: 0 0 2.25em;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.875em;
  line-height: 1.2;
  color: var(--home-ink-stat);
}

.home-stats__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.875em;
  row-gap: 2.5em;
}

.home-stat {
  flex: 0 1 calc((100% - 2 * 0.875em) / 3);
  max-width: calc((100% - 2 * 0.875em) / 3);
  min-width: 0;
  text-align: center;
}

.home-stat__value {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 2.75em;
  line-height: 1;
  color: var(--home-ink-stat);
}

.home-stat__label {
  margin-top: 1.375em;
  font-size: 0.8125em;
  line-height: 1.45;
  color: var(--home-ink-stat);
}

@media (min-width: 768px) {
  .home-stats-bleed {
    grid-template-columns: minmax(0, var(--home-col-narrow)) minmax(0, var(--home-col-wide));
    column-gap: var(--home-col-gap);
  }
}

/* ---- Referenciák + pöttytérkép (wrapper: térkép nem tol el semmit) ---- */
.home-post-refs {
  position: relative;
  overflow: visible;
}

.home-refs {
  position: relative;
  overflow: visible;
  padding: 3.125em var(--pad) 3.75em;
  background: transparent;
}

.home-refs::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #fff;
}

.home-refs > * {
  position: relative;
  z-index: 2;
}

.home-refs__map {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  overflow: visible;
}

.home-refs__map img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right top;
}

.home-refs__title {
  margin: 0 0 2em;
  padding-inline: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.875em;
  line-height: 1.2;
  color: var(--ink-b);
}

.home-refs__grid {
  display: grid;
  gap: 1em;
}

@media (min-width: 768px) {
  .home-refs {
    --refs-gap: 0.75em;
    --refs-outer: 3.25em;
  }

  .home-refs__grid {
    grid-template-columns: repeat(3, 1fr);
    column-gap: var(--refs-gap);
    row-gap: 0;
    padding-inline: var(--refs-outer);
  }
}

@media (min-width: 1024px) {
  .home-post-refs .home-refs__map {
    top: 27em;
    right: max(-2em, calc(-1 * var(--sheet-bleed, 0px) - 1.5em));
    width: min(50%, 36em);
    height: auto;
    aspect-ratio: 580 / 544;
    max-width: none;
  }
}

@media (min-width: 1502px) {
  .home-post-refs .home-refs__map {
    top: 31em;
    right: max(-3em, calc(-1 * var(--sheet-bleed, 0px) - 2em));
    width: min(54%, 37.5em);
  }
}

/* PC: kártyák beljebb, gomb a konténer ¼ pontjánál */
@media (min-width: 1024px) {
  .home-refs {
    --refs-outer: 5em;
  }

  .home-refs__cta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-inline: 0;
    text-align: start;
  }

  .home-refs__btn {
    grid-column: 2;
    justify-self: start;
    margin-inline: 0;
    white-space: nowrap;
  }
}

/* Egymás alatti / 2+1 elrendezés: függőleges rések, gomb középen, szöveg egy sorban */
@media (max-width: 1023px) {
  .home-refs__grid {
    row-gap: 2em;
  }

  .home-refs__cta {
    text-align: center;
    padding-inline: 0;
  }

  .home-refs__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
    margin-inline: auto;
    padding-inline: 1.75em;
  }
}

.home-ref {
  margin: 0;
}

.home-ref__media {
  position: relative; /* F14: media-frame__spinner pozícionálási alap */
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #c8c4be;
}

.home-ref__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-ref__caption {
  margin: 0.75em 0 0;
  font-size: 0.75em;
  line-height: 1.4;
  color: var(--home-ink-body);
}

.home-refs__cta,
.home-herendi__cta {
  margin: 2.5em 0 0;
  text-align: start;
}

.home-refs__btn,
.home-herendi__btn {
  min-width: 18em;
  padding: 1em 2em;
  border-radius: 0.53125em;
  background: var(--home-btn);
  font-size: 0.84375em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Hogyan dolgozunk + Herendi ---- */
.home-work-band {
  position: relative;
  overflow: visible;
  max-width: none;
  background: transparent;
}

.home-work-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--home-beige);
  box-shadow: 0 0 0 100vmax var(--home-beige);
  clip-path: inset(0 -100vmax);
}

.home-work-band__layout {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 3em;
  padding: 3.125em var(--pad) 3.75em;
}

@media (min-width: 768px) {
  .home-work-band__layout {
    grid-template-columns: minmax(0, var(--home-col-narrow)) minmax(0, var(--home-col-wide));
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: var(--home-col-gap);
    row-gap: 2.5em;
    align-items: stretch;
  }

  .home-work {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
  }

  .home-intl {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  .home-herendi {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin-top: 4.5em;
    padding-top: 2.5em;
  }
}

.home-work__title {
  margin: 0 0 0.75em;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.875em;
  line-height: 1.2;
  color: var(--ink-b);
}

.home-work__lead {
  margin: 0 0 1.75em;
  font-weight: 600;
  font-size: 1.1875em;
  line-height: 1.45;
  color: var(--ink-b);
}

.home-work__pillar + .home-work__pillar {
  margin-top: 1.5em;
}

.home-work__pillar-title {
  margin: 0 0 0.35em;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-b);
}

.home-work__pillar-text,
.home-intl__text,
.home-herendi__text,
.home-work__footer {
  margin: 0;
  font-size: 0.9375em;
  line-height: 1.65;
  color: var(--home-ink-body);
}

.home-work__footer {
  margin-top: 2em;
}

.home-intl {
  position: relative;
  z-index: 2;
  max-width: 17.5em;
}

.home-herendi {
  position: relative;
  z-index: 3;
  margin-top: 2.5em;
  padding-top: 1.5em;
}

.home-herendi__grid {
  display: grid;
  gap: 2em;
  align-items: center;
}

@media (min-width: 768px) {
  .home-herendi__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 2.5em;
  }
}

.home-herendi__media {
  position: relative; /* F14: media-frame__spinner pozícionálási alap */
  aspect-ratio: 650 / 700;
  overflow: hidden;
  background: #c8c4be;
}

.home-herendi__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-herendi__copy {
  max-width: 22em;
}

/* ---- Projektindító konzultáció – teljes szélességű háttér; PC-n Herendi képével egy vonalban ---- */
.home-cta-band {
  position: relative;
  background-color: var(--home-cta-bg);
  background-image: var(--home-pattern);
  box-shadow: 0 0 0 100vmax var(--home-cta-bg);
  clip-path: inset(0 -100vmax);
}

.home-cta {
  position: relative;
  max-width: var(--sheet-design);
  width: 100%;
  margin-inline: auto;
  padding: 2.5em var(--pad) 2.75em;
  background: transparent;
  min-height: 19.4375em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (min-width: 1024px) {
  .home-cta-band {
    display: grid;
    grid-template-columns: minmax(0, var(--home-col-narrow)) minmax(0, var(--home-col-wide));
    column-gap: var(--home-col-gap);
    max-width: var(--sheet-design);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--pad);
  }

  .home-cta {
    grid-column: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    column-gap: 2.5em;
    align-content: center;
    align-items: start;
    max-width: none;
    width: auto;
    margin-inline: 0;
    padding: 2.5em 0 2.75em;
    text-align: start;
  }

  .home-cta__title,
  .home-cta__text,
  .home-cta__btn {
    grid-column: 1;
    justify-self: start;
  }

  .home-cta__btn {
    margin-inline: 0;
  }
}

.home-cta::before {
  display: none;
}

.home-cta__title {
  margin: 0 0 0.65em;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.875em;
  line-height: 1.2;
  color: var(--home-cta-ink);
}

.home-cta__text {
  margin: 0;
  font-weight: 700;
  font-size: 0.9375em;
  line-height: 1.45;
  color: var(--home-cta-text);
}

.home-cta__btn {
  margin-top: 2.75em;
  min-width: 14.4125em;
  height: 3.25em;
  padding: 0 1.125em;
  border-radius: 0.53125em;
  background: var(--home-btn);
  font-size: 0.84375em;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (min-width: 1502px) {
  .home-cta__text {
    white-space: nowrap;
  }
}

/* ---- Footer ---- */
@media (min-width: 768px) {
  .page-home .sheet-footer {
    background-color: #292422 !important;
    line-height: 1.15;
    box-shadow: 0 0 0 100vmax #292422 !important;
    clip-path: inset(0 -100vmax) !important;
  }
}

@media (min-width: 1502px) {
  .page-home .sheet-footer {
    padding-block: 2.75em;
  }

  .page-home .sheet-footer__logo {
    width: 10.75em !important;
  }

  .page-home .sheet-footer__logo img {
    width: 100% !important;
    max-width: none !important;
    height: auto;
  }

  .page-home .sheet-footer__line--spaced {
    margin-top: 1.5em;
  }
}

/* =============================================================================
   Reszponzív – elrendezés-váltások, fix tipográfia (nincs clamp/vw betűméret)
   Kislaptop: 1024–1501 | Tablet: 768–1023 | Mobil: ≤767
   ============================================================================= */

/* ---- Közép szélesség (768–1199): szélesebb szövegoszlop, ne lógjon a képbe ---- */
@media (min-width: 768px) and (max-width: 1199px) {
  .page-home .sheet-top {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) !important;
    column-gap: var(--home-col-gap);
  }

  .page-home .sheet-top__left {
    overflow: hidden;
    padding-right: 0 !important;
  }

  .page-home .sheet-top__title {
    font-size: 2em;
    line-height: 1.12;
  }

  .page-home .sheet-top__taglines {
    font-size: 1.125em;
  }
}

/* ---- Kislaptop (1024–1501): 35/65 + oldalas hero, lélegző hero-gap ---- */
@media (min-width: 1024px) and (max-width: 1501px) {
  .page-home {
    --home-col-gap: 3.25em;
    --gap-logo-title: 3.75em;
  }

  .page-home .sheet-top {
    display: grid !important;
    grid-template-columns: minmax(0, var(--home-col-narrow)) minmax(0, var(--home-col-wide));
    column-gap: var(--home-col-gap);
    grid-template-rows: minmax(28em, auto);
    align-items: stretch;
    overflow: visible;
  }

  .page-home .sheet-top__left {
    display: flex !important;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1;
    z-index: 4;
    padding: 1.25em 0 3.125em var(--pad) !important;
    background: #fff;
    min-width: 0;
    overflow: visible;
  }

  .page-home .sheet-top__logo {
    width: var(--logo-w);
    margin: 0 !important;
  }

  .page-home .sheet-top__title {
    margin-top: var(--gap-logo-title) !important;
    max-width: none;
    color: var(--home-ink-title);
    font-weight: 500;
  }

  .page-home .sheet-top__taglines {
    margin-top: 2em !important;
    color: var(--ink-b);
  }

  .page-home .sheet-top__intro {
    margin-top: 1.5em !important;
    max-width: none;
    color: var(--home-ink-body);
    font-weight: 400;
  }

  .page-home .sheet-top__photo {
    grid-column: 2;
    grid-row: 1;
    min-height: 28em;
    aspect-ratio: 4080 / 1770;
    width: calc(100% + var(--sheet-bleed));
    max-width: none;
    margin-right: calc(-1 * var(--sheet-bleed));
    overflow: hidden;
  }

  .home-refs {
    --refs-gap: 0.75em;
    --refs-outer: 4em;
  }

  .home-post-refs .home-refs__map {
    top: 25em;
    right: -2em;
    width: min(52%, 34em);
    height: auto;
    aspect-ratio: 580 / 544;
  }

  .home-herendi {
    margin-top: 3.5em;
    padding-top: 2em;
  }

  .home-intl {
    max-width: 15em;
  }

  .home-cta__text {
    white-space: normal;
  }
}

/* ---- Tablet (768–1023): hero oldalt, blokkok átrendezve ---- */
@media (min-width: 768px) and (max-width: 1023px) {
  .page-home {
    --home-col-gap: 2em;
    --gap-logo-title: 2.75em;
  }

  .page-home .sheet-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: var(--home-col-gap);
    grid-template-rows: minmax(22em, auto);
    align-items: stretch;
    overflow: visible;
  }

  .page-home .sheet-top__left {
    display: flex !important;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1;
    z-index: 4;
    padding: 1.5em 0 2.5em var(--pad) !important;
    background: #fff;
    min-width: 0;
    overflow: visible;
  }

  .page-home .sheet-top__logo {
    width: var(--logo-w);
    margin: 0 !important;
  }

  .page-home .sheet-top__title {
    margin-top: var(--gap-logo-title) !important;
    max-width: none;
  }

  .page-home .sheet-top__taglines,
  .page-home .sheet-top__intro {
    max-width: none;
  }

  .page-home .sheet-top__photo {
    grid-column: 2;
    grid-row: 1;
    min-height: 22em;
    aspect-ratio: 4080 / 1770;
    width: calc(100% + var(--sheet-bleed));
    max-width: none;
    margin-right: calc(-1 * var(--sheet-bleed));
  }

  .home-cta-band {
    display: block;
  }

  .home-cta {
    min-height: 0;
    padding: 2.5em var(--pad);
  }

  /* About: egymás alatt, olvashatóbb keskeny hasábon */
  .home-about__grid {
    grid-template-columns: 1fr;
    row-gap: 2.5em;
  }

  /* Stats: teljes szélességű taupe sáv viewport széléig */
  .home-stats-bleed {
    display: block;
  }

  .home-stats-bleed__spacer {
    display: none;
  }

  .home-stats {
    margin-right: 0;
    padding: 2.5em 0 2.5em 2.5em;
  }

  .home-stats__grid {
    column-gap: 1em;
  }

  .home-stat {
    flex: 0 1 calc((100% - 2 * 1em) / 3);
    max-width: calc((100% - 2 * 1em) / 3);
  }

  /* Referenciák: 2+1 elrendezés */
  .home-refs {
    --refs-gap: 1em;
    --refs-outer: 0;
    padding-block: 2.75em;
  }

  .home-refs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 0;
  }

  .home-ref:last-child {
    grid-column: 1 / -1;
    width: min(100%, 22em);
    justify-self: center;
  }

  /* Work band: egy oszlop, logikus sorrend */
  .home-work-band__layout {
    display: flex;
    flex-direction: column;
    row-gap: 0;
    padding-block: 2.75em;
  }

  .home-work {
    order: 1;
    padding-bottom: 2.25rem;
  }

  .home-intl {
    order: 2;
    padding-bottom: 2.25rem;
    border-bottom: 1px solid rgb(75 57 45 / 0.08);
  }

  .home-herendi {
    order: 3;
    padding-block: 2.25rem;
  }

  .home-work,
  .home-intl,
  .home-herendi {
    grid-column: unset;
    grid-row: unset;
  }

  .home-herendi {
    margin-top: 3em;
    padding-top: 1.5em;
  }

  .home-post-refs .home-refs__map {
    top: 36em;
    right: -1em;
    width: min(62%, 26em);
    height: auto;
    aspect-ratio: 580 / 544;
    opacity: 0.92;
  }

  .home-intl {
    max-width: none;
  }

  .home-herendi__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    gap: 2em;
  }

  .home-cta__btn {
    width: min(100%, 18em);
  }
}

/* ---- Phablet (600–767): 2 oszlopos referenciák, oldalas Herendi ---- */
@media (min-width: 600px) and (max-width: 767px) {
  .home-refs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25em;
  }

  .home-ref:last-child {
    grid-column: 1 / -1;
    width: min(100%, 20em);
    justify-self: center;
  }

  .home-herendi__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    gap: 1.75em;
    align-items: center;
  }

  .home-herendi__media {
    aspect-ratio: 650 / 700;
    max-width: none;
  }
}

/* ---- Mobil (≤767): kép felül, logó + menü rajta, szöveg alatta konténerben ---- */
@media (max-width: 767px) {
  .page-home {
    --gap-logo-title: 1.5em;
    --pad: 1.25rem;
  }

  .page-home .sheet-top {
    display: flex;
    flex-direction: column;
  }

  .page-home .sheet-top__photo {
    position: relative;
    order: 1;
    flex: none;
    width: 100%;
    min-height: clamp(12rem, 52vw, 20rem);
    aspect-ratio: 4080 / 1770;
    margin-right: 0;
    overflow: hidden;
  }

  .page-home .sheet-top__logo--on-photo {
    display: block;
    position: absolute;
    top: 1.25rem;
    left: var(--pad);
    z-index: 5;
    width: var(--logo-w);
    margin: 0;
  }

  .page-home .sheet-top__logo--in-column {
    display: none;
  }

  .page-home .sheet-top__photo .menu-toggle {
    display: inline-flex !important;
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 280;
    color: var(--ink-b);
  }

  .page-home .sheet-top__left {
    display: block;
    order: 2;
    flex: none;
    width: 100%;
    padding: 0;
    background: #fff;
  }

  .page-home .sheet-top__hero {
    display: block;
    padding: 1.5rem var(--pad) 1.75rem;
  }

  .page-home .sheet-top__title {
    margin: 0 !important;
    padding: 0;
    max-width: none;
    font-size: 2rem;
    line-height: 1.12;
    color: var(--home-ink-title);
    font-weight: 500;
  }

  .page-home .sheet-top__taglines {
    margin: 1rem 0 0 !important;
    padding: 0;
    max-width: none;
    font-size: 1.125rem;
    color: var(--ink-b);
    font-weight: 400;
  }

  .page-home .sheet-top__intro {
    margin: 1rem 0 0 !important;
    padding: 0;
    max-width: none;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--home-ink-body);
    font-weight: 400;
  }

  .home-about {
    padding: 2.5em var(--pad);
  }

  .home-about__grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .home-about__col + .home-about__col {
    padding-top: 2.25rem;
    border-top: 1px solid rgb(75 57 45 / 0.08);
  }

  .home-stats-bleed {
    display: block;
  }

  .home-stats-bleed__spacer {
    display: none;
  }

  .home-stats {
    margin-right: 0;
    padding: 2.5em 0 2.5em 2.5em;
  }

  .home-stats__title {
    margin-bottom: 1.75em;
  }

  .home-stats__grid {
    column-gap: 1.25em;
    row-gap: 2em;
  }

  .home-stat {
    flex: 0 1 calc((100% - 1.25em) / 2);
    max-width: calc((100% - 1.25em) / 2);
  }

  .home-stat__value {
    font-size: 2.75em;
  }

  .home-refs {
    --refs-outer: 0;
    padding: 2.5em var(--pad) 2.75em;
  }

  .home-refs__title {
    padding-inline: 0;
    margin-bottom: 1.5em;
  }

  .home-refs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75em;
    padding-inline: 0;
  }

  .home-ref:last-child {
    grid-column: 1 / -1;
    width: min(100%, 18em);
    justify-self: center;
  }

  .home-ref__caption {
    font-size: 0.6875em;
    line-height: 1.35;
  }

  .home-ref__media {
    aspect-ratio: 1 / 1;
  }

  .home-refs__cta {
    margin-top: 2.5em;
    text-align: center;
  }

  .home-refs__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
    white-space: normal;
    text-align: center;
  }

  .home-post-refs {
    display: flex;
    flex-direction: column;
  }

  .home-refs {
    order: 1;
  }

  .home-work-band {
    order: 3;
    display: flex;
    flex-direction: column;
  }

  .home-post-refs .home-refs__map {
    order: 2;
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(100%, 14em);
    aspect-ratio: 580 / 544;
    height: auto;
    margin: -0.5em auto 0;
    opacity: 0.85;
  }

  .home-work-band__layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 2.5em var(--pad) 2.5em;
    order: 1;
  }

  .home-work {
    order: 1;
    padding-bottom: 2.25rem;
  }

  .home-intl {
    order: 2;
    padding-bottom: 2.25rem;
    border-bottom: 1px solid rgb(75 57 45 / 0.08);
  }

  .home-herendi {
    order: 3;
    padding-block: 2.25rem;
    margin-top: 2rem;
    padding-top: 2.5rem;
  }

  .home-cta-band {
    display: block;
  }

  .home-cta {
    min-height: 0;
    padding: 2.5rem var(--pad);
  }

  .home-intl {
    max-width: none;
  }

  .home-herendi__grid {
    grid-template-columns: 1fr;
    gap: 1.5em;
    align-items: start;
  }

  .home-herendi__media {
    aspect-ratio: 16 / 11;
    max-width: 24em;
  }

  .home-herendi__copy {
    max-width: none;
  }

  .home-cta__title,
  .home-cta__text {
    text-align: center;
  }

  .home-cta__text {
    white-space: normal;
    max-width: 22em;
    margin-inline: auto;
  }

  .home-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 20em;
    margin-inline: auto;
    margin-top: 2.25em;
  }

  .page-home .sheet-footer {
    box-shadow: 0 0 0 100vmax #292422 !important;
    clip-path: inset(0 -100vmax) !important;
  }
}

/* ---- Footer: főoldalon később törjön oszlopba ---- */
@media (min-width: 600px) and (max-width: 899px) {
  .page-home .sheet-footer {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    text-align: left !important;
    gap: 1.75rem 3rem;
    padding: 2.25rem var(--pad) !important;
  }

  .page-home .sheet-footer__logo {
    width: var(--footer-logo-w) !important;
    max-width: var(--footer-logo-w);
    margin-inline: 0 !important;
  }

  .page-home .sheet-footer__col {
    width: auto;
    text-align: left !important;
    margin-left: 0 !important;
  }

  .page-home .sheet-footer__logo + .sheet-footer__col {
    margin-left: 0 !important;
  }
}

@media (max-width: 599px) {
  .page-home .sheet-footer {
    flex-direction: column !important;
    align-items: center;
    text-align: center !important;
    gap: 2rem;
    padding: 2.5rem 1.25rem !important;
  }

  .page-home .sheet-footer__col {
    width: 100%;
    text-align: center !important;
    margin-left: 0 !important;
  }

  .page-home .sheet-footer__logo {
    width: var(--footer-logo-w);
    max-width: var(--footer-logo-w);
    margin-inline: auto !important;
  }
}

/* ---- Mobil keskeny (≤479): stat 1 oszlop ---- */
@media (max-width: 479px) {
  .home-stats__grid {
    row-gap: 1.75em;
  }

  .home-stat {
    flex: 0 1 100%;
    max-width: 100%;
    text-align: center;
  }

  .home-stat__value {
    font-size: 2.75em;
  }
}
