/* Nerra – a Figma „nerra (Copy)” Desktop - 1 terve alapján (1920px) */

/* DM Sans a saját tárhelyről (SIL OFL, lásd assets/fonts/OFL.txt) */
/* latin-ext: ő, ű */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/dm-sans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/dm-sans-latin.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;
}

/* Outfit Thin: a Sprinkler-kártyák nagy számai (SIL OFL, lásd assets/fonts/OFL-Outfit.txt) */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url("assets/fonts/outfit-latin-100-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* éjszakai (alap) színek, a Figma szerint */
  --bg: #131313;
  --surface: #282828;
  --surface-strong: #373737;
  --card: #f2f2f2;
  --accent: #fc3200;
  --accent-text: #fc3200;
  --text: #fff;
  --text-muted: #888;
  --text-note: #ececec;
  --border: #464646;
  --rule: #c9c9c9;
  --grid-line: rgba(101, 101, 101, 0.2);
  --header-line: rgba(255, 255, 255, 0.65);
  --shade: rgba(0, 0, 0, 0.5);
  --panel: #1c1c1c;
  --panel-shadow: rgba(0, 0, 0, 0.45);

  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Outfit", var(--font);

  --fs-xl: 40.49px;
  --fs-lg: 30px;
  --fs-md: 22.5px;
  --fs-body: 1.0625rem;                                   /* 17px */
  --fs-body-lg: 1.078rem;                                 /* 17.25px */
  --lh-body-lg: 1.42;                                     /* 24.5px */

  --gutter: 60px;
  --container: 1500px;
  --container-wide: 1800px;
  --header-h: 60px;
  --z: 1;
}

/* Nappali színek. A háttér a megrendelői próba szerint #e7e7e7, nem fehér.
   A kis méretű narancs szöveg (címkék, elemcímek, sorszámok) itt egy árnyalattal
   sötétebb, hogy a világos háttéren is jól olvasható legyen. */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #e7e7e7;
  --surface: #d6d6d6;
  --surface-strong: #cfcfcf;
  --accent-text: #d42a00;
  --text: #1a1a1a;
  --text-muted: #5f5f5f;
  --text-note: #1a1a1a;
  --border: #bdbdbd;
  --rule: #b0b0b0;
  --grid-line: rgba(0, 0, 0, 0.09);
  --header-line: rgba(0, 0, 0, 0.35);
  --shade: rgba(0, 0, 0, 0.12);
  --panel: #dcdcdc;
  --panel-shadow: rgba(0, 0, 0, 0.22);
}

/* ---------- Skálázás: két rajz, köztes állapot nélkül ----------
   1280 px-től mindig az 1920 px-es asztali rajz fut (a Figma terve), alatta
   a 390 px-es telefonos (a fájl végén). A <body> zoom-ja igazítja őket az
   ablakhoz: --z = belső szélesség / 1920, legfeljebb 1, így 1920 fölött a
   rajz nem nő tovább, csak a sávok háttere szélesedik.
   A --z-t az index.html <head>-jében lévő szkript írja a görgetősáv nélküli
   szélességből; az itteni érték csak tartalék JavaScript nélkül.
   Ezért a CSS-ben nincs vw és clamp(): minden méret fix px a saját rajzában.
   Méréskor a getBoundingClientRect() értékét --z-vel kell osztani. */
/* min-width / max-width, mint az Energotrendnél: a width >= jelölést az iOS 16.4
   előtti Safari nem ismeri. Az 1279.98 px: ne maradjon rés tört szélességnél. */
@media (min-width: 1280px) {
  :root {
    --z: min(1, calc(100vw / 1920px));
  }

  body {
    zoom: var(--z);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* a <html> nincs nagyítva, a fejléc igen */
  scroll-padding-top: calc(var(--header-h) * var(--z));
  /* elfordított iPhone-on a Safari ne nagyítsa fel a szövegeket */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  /* a Figma „auto” sormagassága (17 px → 22,5 px), számként megadva:
     a böngésző „normal” értéke a nagyítástól és a kijelző pixelsűrűségétől
     függően soronként kerekedik, és a hosszabb szövegek így néhány
     képponttal rövidebbek vagy hosszabbak lennének */
  line-height: 1.3235;
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure, address {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

button {
  font: inherit;
}

/* Billentyűzetes fókusz: minden linken és gombon látható */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 16px;
  z-index: 20;
  padding: 8px 16px;
  background: var(--card);
  color: #000;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container,
.container-wide {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.container-wide {
  width: min(100% - 2 * var(--gutter), var(--container-wide));
}

/* A nyitókép a görgetés közben ragadós: az alatta következő szekciók takarják el */
main > * {
  position: relative;
  z-index: 1;
}

/* a szekciók tizedes képpontos illesztésénél ne lásson át a ragadós nyitókép */
main > :not(.hero-bg, .hero) {
  box-shadow: 0 1px 0 var(--bg);
}

/* ---------- Typography ---------- */

.title-xl,
.title-lg {
  font-weight: 600;
  font-variation-settings: "opsz" 18;
  text-transform: uppercase;
  line-height: 1.2;
}

.title-xl {
  font-size: var(--fs-xl);
}

.title-lg {
  font-size: var(--fs-lg);
}

.eyebrow {
  position: relative;
  padding-left: 17px;
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 40px;
}

.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;  /* az első sor közepe (40 px-es sor), több sornál is */
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: currentColor;
}

.eyebrow--accent { color: var(--accent-text); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--header-line);
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.2));
}

.site-header__inner {
  display: flex;
  align-items: center;
  width: calc(100% - 2 * var(--gutter));  /* 1920 px fölött is a kijelző széléig ér, mint az Energotrendnél */
  height: 100%;
  margin-inline: auto;
}

.site-header__logo {
  margin-right: auto;
}

.site-header__logo img {
  width: 38px;
  height: 40px;
}

.logo-dark { display: none; }
[data-theme="light"] .logo-light { display: none; }
[data-theme="light"] .logo-dark { display: block; }

/* a gombok jobb széle 79 px-re van a kijelző szélétől, mint az Energotrendnél */
.site-nav {
  display: flex;
  align-items: center;
  margin-right: 19px;
}

.site-nav ul {
  display: flex;
  gap: 20px;
}

.site-nav ul a {
  display: block;
  padding: 0 7px;
  line-height: 40px;
  transition: color 0.15s;
}

.site-nav ul a:hover,
.site-nav ul a:focus-visible {
  color: var(--accent-text);
}

.nav-toggle {
  display: none;
}

/* ---------- Nyelvváltó (az Energotrend mintájára, lekerekítés nélkül) ----------
   Zárva a kód és a nyíl látszik; kurzorral a fejléc alatt leugró sávban a
   másik nyelv neve áll, a zászlók egy vonalban. Kurzor nélküli eszközön
   (érintő, hamburger-menü) nincs lenyíló: ott mindkét nyelv egymás mellett áll. */
.lang {
  position: relative;
  display: flex;
  align-items: center;
  width: 9.7em;
  font-size: 16px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.lang__btn {
  display: flex;
  align-items: center;
  gap: 0.65em;
  padding: 6px 0;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.2s, opacity 0.2s;
}

.lang__flag {
  flex: none;
  width: 1.25em;
  height: 0.625em;
  border-radius: 2px;
  /* vékony gyűrű, hogy a magyar zászló fehér sávja se olvadjon bele */
  box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.45);
}

.lang__btn.is-active .lang__name { display: none; }
.lang__btn:not(.is-active) .lang__code { display: none; }

.lang__btn:hover { color: var(--accent-text); }

@media (hover: hover) {
  .lang::after {
    content: "";
    width: 0.4em;
    height: 0.4em;
    margin-left: 0.55em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateX(1px) rotate(135deg);
    transition: transform 0.24s;
  }

  .lang:hover,
  .lang:focus-within { color: var(--text); }

  .lang:hover::after,
  .lang:focus-within::after { transform: translateY(-1px) rotate(45deg); }

  /* híd a fejléc aljáig – e nélkül a lefelé mozgó kurzor becsukná a sávot */
  .lang:hover::before,
  .lang:focus-within::before {
    content: "";
    position: absolute;
    left: -1.1em;
    right: 0;
    top: 100%;
    height: calc(var(--header-h) / 2 - 50%);
  }

  .lang__btn:not(.is-active) {
    position: absolute;
    top: calc(50% + var(--header-h) / 2);
    left: -1.1em;
    right: 0;
    padding: 0.85em 1.1em;
    background: var(--panel);
    box-shadow: 0 5px 12px var(--panel-shadow);
    clip-path: inset(0 -20px 100% -20px);
    pointer-events: none;
    transition: clip-path 0.3s, color 0.2s;
  }

  .lang:hover .lang__btn:not(.is-active),
  .lang:focus-within .lang__btn:not(.is-active) {
    clip-path: inset(0 -20px -20px -20px);
    pointer-events: auto;
  }
}

/* ---------- Nappali / éjszakai kapcsoló ---------- */

.theme-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  margin: 0 19px 0 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s;
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: transparent;
  transition: fill 0.2s;
}

/* rámutatásra nemcsak a színe vált, az ikon ki is töltődik */
@media (hover: hover) {
  .theme-toggle:hover {
    color: var(--accent-text);
  }

  .theme-toggle:hover svg {
    fill: currentColor;
  }
}

.theme-toggle:focus-visible {
  color: var(--accent-text);
}

.theme-toggle:focus-visible svg {
  fill: currentColor;
}

/* éjszakai módban a nap (váltás nappalira), nappaliban a hold látszik */
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

html:not(.js) .theme-toggle {
  display: none;
}

/* ---------- Nyitókép ---------- */

/* A Figmában a nyitókép a fejléc alá is benyúlik (0–914 px), a fotó ragadós,
   a rajta álló logó viszont az oldallal együtt gördül. */
.hero-bg {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 914px;
  margin-top: calc(-1 * var(--header-h));
  margin-bottom: -914px;
  overflow: hidden;
  background: #020012;
}

.hero-bg img {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  max-width: none;
  height: calc(100% + 12px);
  object-fit: cover;
  opacity: 0.55;
  filter: blur(2px);
}

.hero {
  height: 914px;
  pointer-events: none;
}

.hero__logo {
  position: absolute;
  top: 278px;
  left: 50%;
  width: 792px;
  max-width: none;
  transform: translateX(-50%);
}

/* ---------- About ---------- */

.about {
  margin-top: -6px;  /* a Figma sötét csíkja a nyitókép aljára (908–920) */
  padding-block: 134px 124px;
  background: var(--bg);
  overflow: hidden;
}

/* Háttérrács: 6 függőleges vonal 350px-enként, 7 vízszintes 148px-enként */
.about::before {
  content: "";
  position: absolute;
  inset: 26px 0 auto;
  height: 888px;
  pointer-events: none;
  background:
    repeating-linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px 350px) center top / 1751px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--grid-line) 0 1px, transparent 1px 148px);
}

.about__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 648fr) minmax(0, 716fr);
  gap: 152px;
  align-items: center;
  max-width: 1516px;
}

.about__text .title-xl {
  margin-top: 3px;
}

.about__body {
  display: grid;
  gap: 24px;
  margin-top: 48px;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body-lg);
}

.about__media {
  aspect-ratio: 716 / 676;
}

.about__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Sprinkler steps ---------- */

.sprinkler {
  padding-block: 168px 103px;
  background:
    linear-gradient(182deg, transparent 68%, var(--shade) 96.5%),
    var(--surface-strong);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 451px));
  justify-content: center;
  gap: 70px;
}

.step {
  min-height: 529px;
  padding: 58px 63px 61px;
  background: var(--card);
  color: #000;
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.25));
}

.step__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 159px;
  margin-bottom: 44px;
}

.step__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  font-variation-settings: "opsz" 18;
  text-transform: uppercase;
  line-height: 1.2;
  padding-bottom: 10px;
}

.step__num {
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 161px;
  font-weight: 100;
  line-height: 0.95;
  color: var(--accent);
}

.sprinkler__note {
  margin-top: 40px;
  color: var(--text-note);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body-lg);
  text-align: center;
}

/* ---------- Extinguishing systems ---------- */

.systems {
  padding-block: 106px 93px;
  background: var(--bg);
}

.systems__header .title-xl {
  margin-top: 3px;
}

/* Narancs jelölők a Figma szerint: a lista tetején ┘ └, az alján ┐ ┌,
   a blokkok között ├ ┤ (Group 11 / 12 / 13–14) */
.systems__list {
  --c: var(--accent);
  --sys-gap: 96px;
  display: grid;
  gap: var(--sys-gap);
  margin-top: 61px;
  padding-block: 39px 62px;
  background:
    linear-gradient(var(--c) 0 0) left 0 top 9px / 13px 2px,
    linear-gradient(var(--c) 0 0) left 11px top 0 / 2px 11px,
    linear-gradient(var(--c) 0 0) right 0 top 9px / 13px 2px,
    linear-gradient(var(--c) 0 0) right 11px top 0 / 2px 11px,
    linear-gradient(var(--c) 0 0) left 0 bottom 9px / 13px 2px,
    linear-gradient(var(--c) 0 0) left 11px bottom 0 / 2px 11px,
    linear-gradient(var(--c) 0 0) right 0 bottom 9px / 13px 2px,
    linear-gradient(var(--c) 0 0) right 11px bottom 0 / 2px 11px;
  background-repeat: no-repeat;
}

.system {
  position: relative;
  display: grid;
  gap: 21px;
  padding-inline: max(0px, (100% - var(--container)) / 2);
}

.system + .system::before {
  content: "";
  position: absolute;
  top: calc(var(--sys-gap) / -2 - 10px);
  left: 0;
  right: 0;
  height: 20px;
  background:
    linear-gradient(var(--c) 0 0) left 0 top 0 / 2px 20px,
    linear-gradient(var(--c) 0 0) left 0 top 9px / 13px 2px,
    linear-gradient(var(--c) 0 0) right 0 top 0 / 2px 20px,
    linear-gradient(var(--c) 0 0) right 0 top 9px / 13px 2px;
  background-repeat: no-repeat;
}

.system > p {
  max-width: 1345px;
}

/* ---------- Benefits ---------- */

.benefits {
  padding-block: 82px 129px;
  background: var(--bg);
}

.benefits > .container {
  width: min(100% - 2 * var(--gutter), 1507px);
}

.benefits__title {
  text-align: center;
}

.benefits__grid {
  display: grid;
  grid-template-columns: minmax(0, 451fr) minmax(0, 490fr) minmax(0, 446fr);
  gap: 76px 60px;
  margin-top: 86px;
}

.benefit {
  position: relative;
}

.benefit--wide {
  grid-column: span 2;
}

/* Függőleges elválasztó a hasábok között (a sorkezdő elemek előtt nincs) */
.benefit:not(.benefit--row-start)::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 17px;
  width: 1px;
  height: 89.5px;
  background: var(--rule);
}

.benefit__title {
  position: relative;
  padding-left: 17px;
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 40px;
  color: var(--accent-text);
}

.benefit__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;  /* az első sor közepe */
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: currentColor;
}

.benefit p {
  max-width: 473px;
  margin-top: 5px;
  padding-left: 17px;
}

.benefit--wide p {
  max-width: none;
}

/* ---------- Széles képsáv ---------- */

.band {
  height: 458px;
  background: #888;
  overflow: hidden;
}

.band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Service blocks ---------- */

.services {
  background: var(--bg);
}

.services__intro {
  padding-block: 106px 124px;
}

.services__intro .title-xl {
  margin-top: 3px;
}

.services__lead {
  max-width: 1497px;
  margin-top: 37px;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body-lg);
}

.service {
  --row-icon: var(--surface);
  display: flex;
  align-items: center;
  min-height: 550px;
  background: var(--bg);
}

.service--raised {
  --row-icon: var(--bg);
  background: var(--surface);
}

.service__inner {
  display: grid;
  grid-template-columns: minmax(0, 736px) minmax(0, 313px);
  justify-content: space-between;
  align-items: center;
  gap: 48px;
}

.service__text {
  position: relative;
}

.service__num {
  position: absolute;
  left: -78px;
  top: 0;
  font-size: var(--fs-md);
  line-height: 40px;
  color: var(--accent-text);
}

.service__text .title-lg {
  line-height: 40px;
}

.service__desc {
  margin-top: 24px;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body-lg);
}

.service__list {
  margin-top: 56px;
  font-size: var(--fs-body-lg);
  line-height: 26px;
  font-variation-settings: "opsz" 18;
}

.service__list li {
  position: relative;
  padding-left: 30px;
}

.service__list li::before {
  content: "•";
  position: absolute;
  left: 0;
}

/* Az ikon színe mindig a sor hátterénél egy árnyalattal eltérő, témától függetlenül */
.service__icon {
  width: 313px;
  height: 313px;
  color: var(--row-icon);
}

/* ---------- Referenciák: leugró ablakok ----------
   Zárva egy sor a név és a nyíl; a kurzor rámutatására nyílik, és amint
   elhagyja a sort, visszacsukódik. Kattintani nem kell. Érintőn koppintásra,
   billentyűzettel fókuszra nyílik.
   A lista alatt a legmagasabb nyitott sornak (155 px) hely marad, hogy a
   nyitás-csukás ne mozgassa el az oldal alját. */

.references {
  padding-block: 106px 67px;
  background: var(--bg);
}

.references .title-xl {
  margin-top: 3px;
}

.refs {
  --ref-count: 13;
  width: min(100% - 2 * var(--gutter), 1536px);
  min-height: calc(var(--ref-count) * 81px + 155px);
  margin: 56px auto 0;
}

.ref {
  border: 1px solid var(--border);
}

.ref__heading {
  font: inherit;
}

.ref__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 79px;
  padding: 0 45px 0 69px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  cursor: default;
}

.ref__head:focus-visible {
  outline-offset: -6px;
}

.ref__arrow {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--accent-text);
  transition: transform 0.28s;
}

/* a panel magassága 0fr -> 1fr, így a nyitás animálható, a tartalom magasságát
   nem kell ismerni */
.ref__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.28s ease, visibility 0s 0.28s;
}

.ref__inner {
  min-height: 0;
  overflow: hidden;
}

.ref__text {
  max-width: 1433px;
  padding: 10px 69px calc(34.5px + var(--ref-extra, 0px));
}

.ref__text ul {
  margin-top: 20.5px;
  padding-left: 25.5px;
  list-style: disc;
}

.ref__text li {
  display: list-item;
}

/* nyitott állapot (a :has külön szabály, hogy ahol nincs, ott is működjön a többi) */
.ref.is-open .ref__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.28s ease, visibility 0s;
}

.ref:has(.ref__head:focus-visible) .ref__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.28s ease, visibility 0s;
}

.ref.is-open .ref__arrow {
  transform: rotate(180deg);
}

.ref:has(.ref__head:focus-visible) .ref__arrow {
  transform: rotate(180deg);
}

@media (hover: hover) {
  .ref:hover .ref__panel {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.28s ease 0.06s, visibility 0s;
  }

  .ref:hover .ref__arrow {
    transform: rotate(180deg);
  }
}

@media (hover: none) {
  .ref__head {
    cursor: pointer;
  }

  html:not(.js) .ref__panel {
    grid-template-rows: 1fr;
    visibility: visible;
  }
}

/* ---------- Kapcsolat (lábléc) ----------
   A háttér egy hullámos fotó, „lighten” módban a sötét alapra, majd a narancs
   „hue” réteg színezi át. Nappali módban előre kiszámolt, narancs változat áll. */

.endnote {
  --fn-bg: #131313;
  --fn-text: #f2f2f7;
  --fn-lead: rgba(242, 242, 247, 0.7);
  --fn-copy: rgba(255, 255, 255, 0.6);
  --fn-field: rgba(0, 0, 0, 0.15);
  --fn-field-text: rgba(255, 255, 255, 0.7);
  --fn-field-hover: rgba(60, 60, 60, 0.4);
  --fn-field-hover-text: #fff;
  --fn-field-active: rgba(0, 0, 0, 0.4);
  --fn-accent: #fc3200;
  position: relative;
  margin-top: -1px;  /* az illesztés tizedes képpontja az előző szekció alá kerüljön */
  height: 963px;
  overflow: hidden;
  isolation: isolate;
  background: var(--fn-bg);
  color: var(--fn-text);
}

[data-theme="light"] .endnote {
  --fn-bg: var(--bg);
  --fn-text: #1a1a1a;
  --fn-lead: rgba(26, 26, 26, 0.75);
  --fn-copy: #1a1a1a;
  --fn-field: rgba(255, 255, 255, 0.45);
  --fn-field-text: rgba(26, 26, 26, 0.85);
  --fn-field-hover: rgba(255, 255, 255, 0.75);
  --fn-field-hover-text: #000;
  --fn-field-active: rgba(255, 255, 255, 0.9);
  --fn-accent: var(--accent-text);
}

/* nappali módban előre kiszámolt kép: ugyanúgy néz ki minden böngészőben
   (eszkozok/kepek.ps1), a sötét változat keverési módjai itt nem kellenek */
[data-theme="light"] .endnote__bg {
  background: url("assets/images/kapcsolat-hatter-vilagos.jpg") 0 67.87% / 100% 132.93% no-repeat;
  mix-blend-mode: normal;
}

[data-theme="light"] .endnote__bg img,
[data-theme="light"] .endnote__tint {
  display: none;
}

.endnote__bg,
.endnote__tint {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.endnote__bg {
  mix-blend-mode: lighten;
}

.endnote__bg img {
  position: absolute;
  top: -22.35%;
  left: 0;
  width: 100%;
  max-width: none;
  height: 132.93%;
  object-fit: fill;
}

.endnote__tint {
  background: #fc3200;
  mix-blend-mode: hue;
}

.endnote__inner {
  position: relative;
  width: 1920px;
  max-width: 100%;
  height: 100%;
  margin-inline: auto;
}

.endnote__logo {
  position: absolute;
  top: 106px;
  left: 155px;
  width: 197px;
}

.endnote__head {
  position: absolute;
  top: 111px;
  left: 921px;
  width: 836px;
}

/* A cím, az alcím és a címkék betűje Acumin Pro, görbévé alakítva (beágyazott SVG,
   eszkozok/acumin-gorbek.ps1). Az svg mérete em-ben van, a font-size méretezi. */
.outline {
  display: inline-block;
  overflow: visible;
  vertical-align: -0.24em;  /* a rajz alja ennyivel lóg az alapvonal alá */
}

.endnote__title {
  font-size: 74px;
  line-height: 90px;
  white-space: nowrap;
}

.endnote__lead {
  margin: 4.5px 0 0 5.5px;
  color: var(--fn-lead);
  font-size: 24.5px;
  line-height: 1.302;
}

.contact {
  position: absolute;
  top: 602px;
  left: 926px;
  width: 828px;
}

.contact__item {
  position: absolute;
  width: 396px;
}

.contact__item--phone { top: 0; right: 0; }
.contact__item--office { top: 0; left: 0; }
.contact__item--seat { top: 146px; left: 0; }
.contact__item--email { top: 146px; right: 0; }

/* a hosszabb cím a tervben is szűkebb betűközzel fér ki egy sorban */
.contact__item--seat .copyfield__text {
  letter-spacing: -0.01em;
}

.contact__label {
  display: flex;
  align-items: center;
  height: 23px;
  margin: 0 0 26px 11px;
  font-size: 24px;
}

.copyfield {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 62px;
  padding: 0 48px 0 31px;
  border: 0;
  border-radius: 35px;
  background: none;
  color: var(--fn-field-text);
  font-size: var(--fs-body);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}

.copyfield::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--fn-field);
  transition: background-color 0.2s;
}

.copyfield svg {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
}

.copyfield:hover {
  color: var(--fn-field-hover-text);
}

.copyfield:hover::before {
  background: var(--fn-field-hover);
  mix-blend-mode: multiply;
}

[data-theme="light"] .copyfield:hover::before {
  mix-blend-mode: normal;
}

.copyfield:active,
.copyfield.is-copied {
  color: var(--fn-accent);
}

.copyfield:active::before,
.copyfield.is-copied::before {
  background: var(--fn-field-active);
  mix-blend-mode: normal;
}

.endnote__copy {
  position: absolute;
  left: 155px;
  bottom: 109px;
  color: var(--fn-copy);
  font-size: 15px;
  line-height: 20px;
}

/* ---------- Felugró visszajelzés (másolás) ----------
   Ugyanaz, mint az Energotrendnél (forma, betűméret, 2,6 mp): alul középen úszik
   be. A színei ehhez az oldalhoz igazodnak: a panel színe, a szöveg Nerra-piros. */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 150;
  width: max-content;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 16px 30px;
  border-radius: 88px;
  background: var(--panel);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 22.5px;
  text-align: center;
  box-shadow: 0 12px 40px var(--panel-shadow), inset 0 0 0 1px var(--border);
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

/* nappali módban világosabb alap, hogy a piros szöveg jól olvasható maradjon */
[data-theme="light"] .toast {
  background: var(--card);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Telefonos rajz (1280 px alatt) ----------
   A 390 px széles telefonos rajz, ugyanúgy nagyítva, mint az asztali:
   --z = szélesség / 390, legfeljebb 600 / 390. Onnan a 310 px-es
   tartalomoszlop középre zárva marad, a sávok háttere a kijelző széléig fut.
   Minden méret fix px ebben a rajzban is. */
@media (max-width: 1279.98px) {
  :root {
    --z: min(1.5385, calc(100vw / 390px));  /* a felső határ 600 / 390 */
    --gutter: 40px;                         /* az Energotrendnél kért kétszeres margó */
    --container: 310px;                     /* 390 − 2 × 40 */
    --container-wide: 310px;
    --header-h: 56px;
    --fs-xl: 28px;
    --fs-lg: 22px;
    --fs-md: 18px;
  }

  body {
    zoom: var(--z);
  }

  .site-header__inner {
    width: min(100% - 2 * var(--gutter), var(--container-wide));
  }

  .nav-toggle {
    position: relative;
    order: 3;
    display: block;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
  }

  .nav-toggle__bar,
  .nav-toggle__bar::before,
  .nav-toggle__bar::after {
    position: absolute;
    left: 11px;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s, opacity 0.2s;
  }

  .nav-toggle__bar {
    top: 21px;
  }

  .nav-toggle__bar::before,
  .nav-toggle__bar::after {
    content: "";
    left: 0;
  }

  .nav-toggle__bar::before { top: -7px; }
  .nav-toggle__bar::after { top: 7px; }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    margin: 0;
    padding: 8px max(var(--gutter), calc(50% - var(--container-wide) / 2)) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--header-line);
    visibility: hidden;
  }

  .site-nav.is-open {
    visibility: visible;
  }

  /* a kapcsoló a menüpanel gyereke, de zárt menünél is a fejlécsorban áll */
  .theme-toggle {
    position: absolute;
    top: calc((var(--header-h) + 40px) / -2);
    right: calc(max(var(--gutter), 50% - var(--container-wide) / 2) + 34px);
    margin: 0;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav ul a {
    padding: 4px 0;
    line-height: 40px;
    font-size: 1.125rem;
  }

  /* a hamburger-panelben nincs lenyíló: mindkét nyelv egymás mellett áll */
  .lang {
    width: auto;
    gap: 22px;
    margin-top: 12px;
  }

  .lang::after {
    display: none;
  }

  .lang__btn:not(.is-active) {
    position: static;
    padding: 6px 2px;
    background: transparent;
    box-shadow: none;
    clip-path: none;
    opacity: 0.6;
    pointer-events: auto;
  }

  .lang__btn:not(.is-active) .lang__code { display: inline; }
  .lang__btn:not(.is-active) .lang__name { display: none; }

  /* JavaScript nélkül a gomb nem működne: a menü ilyenkor nyitva áll a fejlécben */
  html:not(.js) {
    scroll-padding-top: 0;
  }

  html:not(.js) .nav-toggle {
    display: none;
  }

  html:not(.js) .site-header {
    position: static;
    height: auto;
  }

  html:not(.js) .site-header__inner {
    display: block;
    padding-top: 8px;
  }

  html:not(.js) .site-nav {
    position: static;
    display: block;
    visibility: visible;
    padding-inline: 0;
    border-bottom: 0;
  }

  html:not(.js) .hero-bg {
    margin-top: 0;
  }

  .hero-bg {
    height: 420px;
    margin-bottom: -420px;
  }

  .hero {
    height: 420px;
  }

  .hero__logo {
    top: 156px;
    width: 260px;
  }

  .about {
    margin-top: 0;
    padding-block: 72px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__body {
    margin-top: 28px;
  }

  .systems {
    padding-block: 72px 32px;
  }

  .systems__list {
    --sys-gap: 64px;
    margin-top: 40px;
    padding-block: 32px 44px;
  }

  .system {
    padding-inline: 20px;
  }

  .sprinkler {
    padding-block: 56px 72px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .step {
    min-height: 0;
    padding-inline: 28px;
  }

  .step__num {
    font-size: 110px;
  }

  .sprinkler__note {
    margin-top: 32px;
  }

  .benefits {
    padding-block: 64px 72px;
  }

  .benefits > .container {
    width: min(100% - 2 * var(--gutter), var(--container));
  }

  .benefits__grid {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-top: 48px;
  }

  .benefit--wide {
    grid-column: auto;
  }

  .benefit:not(.benefit--row-start)::before {
    display: none;
  }

  .band {
    height: 220px;
  }

  .services__intro {
    padding-block: 96px 56px;
  }

  .service {
    min-height: 0;
    padding-block: 56px;
  }

  .service__inner {
    grid-template-columns: 1fr;
  }

  .service__num {
    position: static;
    display: block;
    margin-bottom: 4px;
  }

  .service__icon {
    display: none;
  }

  .service__list {
    margin-top: 32px;
  }

  .references {
    padding-block: 72px;
  }

  .refs {
    min-height: 0;
    margin-top: 32px;
  }

  .ref__head {
    min-height: 64px;
    padding: 12px 16px 12px 20px;
  }

  .ref__text {
    padding: 4px 20px calc(24px + var(--ref-extra, 0px));
  }

  .endnote {
    height: auto;
  }

  .endnote__inner {
    width: min(100% - 2 * var(--gutter), var(--container));
    height: auto;
    padding-block: 72px 40px;
  }

  .endnote__logo,
  .endnote__head,
  .contact,
  .contact__item,
  .endnote__copy {
    position: static;
    width: auto;
  }

  .endnote__logo {
    width: 96px;
  }

  .endnote__head {
    margin-top: 48px;
  }

  .toast {
    bottom: 20px;
  }

  .endnote__title {
    font-size: 28.5px;
    line-height: 34px;
    white-space: normal;
  }

  .endnote__lead {
    margin: 12px 0 0;
    font-size: 17px;
  }

  .contact {
    display: grid;
    gap: 28px;
    margin-top: 48px;
  }

  .contact__label {
    height: 24px;
    font-size: 18px;
  }

  /* keskeny mezőben a cím ne törjön ketté a kötőjelnél */
  .copyfield {
    padding-right: 60px;
  }

  .endnote__copy {
    margin-top: 56px;
    font-size: 13px;
  }
}

/* ---------- Csökkentett mozgás ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ---------- Nyomtatás ---------- */

@media print {
  /* papíron nincs nagyítás, és a szöveg a lap teljes szélességét kapja */
  :root {
    color-scheme: light;
    --container: 100%;
    --container-wide: 100%;
    --text: #000;
    --accent-text: #c22700;
    --bg: transparent;
    --surface: transparent;
  }

  body {
    zoom: 1 !important;
  }

  .skip-link,
  .toast,
  .site-header,
  .hero-bg,
  .hero,
  .about__media,
  .band,
  .service__icon,
  .endnote__bg,
  .endnote__tint,
  .endnote__logo,
  .copyfield svg,
  .about::before,
  .system + .system::before {
    display: none;
  }

  body,
  .about,
  .systems,
  .sprinkler,
  .benefits,
  .services,
  .step,
  .service,
  .service--raised,
  .systems__list,
  .references,
  .endnote {
    background: none;
    color: #000;
  }

  .step {
    min-height: 0;
    border: 1px solid #000;
    filter: none;
  }

  .ref__panel {
    grid-template-rows: 1fr;
    visibility: visible;
  }

  .ref__arrow {
    display: none;
  }

  .refs {
    min-height: 0;
  }

  .ref {
    break-inside: avoid;
  }

  .sprinkler__note,
  .endnote__lead,
  .endnote__copy,
  .copyfield,
  .copyfield::before {
    color: #000;
    background: none;
    opacity: 1;
  }

  .about,
  .systems,
  .sprinkler,
  .benefits,
  .services__intro,
  .service,
  .references,
  .endnote {
    min-height: 0;
    height: auto;
    padding-block: 16px;
  }

  .about {
    overflow: visible;
  }

  .about__grid {
    display: block;
  }

  .endnote__inner,
  .endnote__head,
  .contact,
  .contact__item,
  .endnote__copy {
    position: static;
    width: auto;
    height: auto;
  }

  .step,
  .benefit,
  .service {
    break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }
}
