/* ==========================================================================
   aisle-master.tws.hu — additions on top of tw.css (the original site's compiled Tailwind CSS, unchanged).
   Brand (from the original theme): orange #F39200, green #0D6938, ink #14110E, surface #F4F7F5, Exo 2.
   ========================================================================== */

/* Exo 2, self-hosted variable font (400–900), latin + latin-ext */
@font-face {
  font-family: "Exo 2"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/exo2-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;
}
@font-face {
  font-family: "Exo 2"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/exo2-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;
}

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body { overflow-x: clip; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(p, li, dd, label) { text-wrap: pretty; }
:where(.grid) > * { min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

/* phrase units from the build: kept on one line in headings on tablet/desktop only */
.ph { display: inline; }
@media (min-width: 768px) { :is(h1, h2, h3) .ph { display: inline-block; max-width: 100%; } }
.split-line .ph { display: inline; }
:is(a, button) .ph { display: contents; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 300; background: var(--color-ink); color: #fff; padding: 10px 16px; border-radius: 6px; }
.skip-link:focus { top: 12px; }

/* replaces the original inline style="aspect-ratio: 3 / 2" */
.ar-3-2 { aspect-ratio: 3 / 2; }

/* ---------------------------------------------------------------- header */
nav [aria-current="page"]:not([href^="/#"]) { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.mobile-menu [aria-current="page"] { color: var(--color-primary); }
.burger .lucide-x, .menu-open .burger .lucide-menu { display: none; }
.menu-open .burger .lucide-x { display: block; }
.mobile-sub[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-header { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }

/* products dropdown: pure CSS (hover / keyboard focus), a transparent bridge keeps it open across the gap */
.dd__panel { display: none; }
.dd__panel::before { content: ""; position: absolute; inset: -8px 0 auto; height: 8px; }
.dd:hover .dd__panel, .dd:focus-within .dd__panel { display: block; overflow: visible; }
.dd__panel > :first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.dd__panel > :last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.dd:hover > a .lucide-chevron-down, .dd:focus-within > a .lucide-chevron-down { transform: rotate(180deg); }

/* ------------------------------------------------------------------ forms */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.is-invalid { border-color: var(--color-primary) !important; }
input[type="range"] { accent-color: var(--color-primary); }

/* --------------------------------------------- YouTube (loads on click / consent) */
.yt { position: relative; display: block; overflow: hidden; padding: 0; border: 0; cursor: pointer; background: #000; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.yt:hover img { transform: scale(1.03); }
.yt__play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); }
.yt__play path:first-child { fill: #212121; fill-opacity: .8; transition: fill .2s, fill-opacity .2s; }
.yt:hover .yt__play path:first-child, .yt:focus-visible .yt__play path:first-child { fill: #f00; fill-opacity: 1; }
.yt__tri { fill: #fff; }
iframe.yt-frame { display: block; border: 0; }

/* ---------------------------------------------- Google Maps (loads after consent) */
.map { display: flex; align-items: center; justify-content: center; background: var(--color-surface); }
.map a { font-weight: 700; color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.map iframe { width: 100%; height: 100%; border: 0; }

/* ---------------------------------------------------------------- motion
   Initial states only when JS runs and motion is allowed; head.js adds .reduced as a safety net. */
.js:not(.reduced) [data-reveal],
.js:not(.reduced) [data-hero-in] { opacity: 0; transform: translateY(24px); }
.js:not(.reduced) [data-split] { visibility: hidden; }
.split-line { padding-bottom: .06em; margin-bottom: -.06em; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* The original legal pages use text-ink-foreground on bg-ink, but the theme never defined that colour,
   so the headings rendered almost black on black. Defined here as the theme's light foreground. */
.text-ink-foreground { color: var(--color-primary-foreground); }
.text-ink-foreground\/70 { color: color-mix(in srgb, var(--color-primary-foreground) 70%, transparent); }
.text-ink-foreground\/40 { color: color-mix(in srgb, var(--color-primary-foreground) 40%, transparent); }

/* Overflow fixes for the original layout ------------------------------------------------------- */
/* spec tiles: as many columns as fit, never narrower than the longest label word ("folyosószélesség") */
.spec-grid { grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr)) !important; }
/* Headings whose longest word is wider than their column at the original size (also on the live site):
   the size follows the column — font-size = min(original size, column / (longest word width in em)). */
:has(> .fit) { container-type: inline-size; }
.fit { font-size: min(var(--fs), calc(100cqi / var(--fit))) !important; }
.fit-home { --fit: 5.7; --fs: 3rem; }            /* "MAXIMÁLIS" — text-5xl md:text-6xl */
.fit-value { --fit: 9.3; --fs: 2.25rem; }        /* "kompromisszumok" — text-4xl md:text-5xl lg:text-6xl */
.fit-products { --fit: 9.2; --fs: 3rem; }        /* "termékcsaládok" — text-5xl md:text-7xl */
.fit-about { --fit: 12.6; --fs: 2.25rem; }       /* "az anyagmozgatásban." on one line — text-4xl md:text-6xl */
.fit-pedestrian { --fit: 10.4; --fs: 1.875rem; }  /* "Gyalogkíséretes" — text-3xl md:text-4xl */
@media (min-width: 768px) {
  .fit-home, .fit-about { --fs: 3.75rem; }
  .fit-value { --fs: 3rem; }
  .fit-products { --fs: 4.5rem; }
  .fit-pedestrian { --fs: 2.25rem; }
}
@media (min-width: 1024px) { .fit-value { --fs: 3.75rem; } }
