/* ==========================================================================
   STORVIA — raktártechnika
   Dizájn-kánon: ipari, letisztult, nem túlzsúfolt. Narancs / fekete / fehér.
   Minden érték tokenen át megy (FRONTEND_APPLE_PLAYBOOK.md 1. szekció).
   ========================================================================== */

:root {
    /* Színek — az ügyfél-brief palettája */
    --clr-accent: #FF5A1F;
    --clr-accent-hover: #FF6E3B;
    --clr-accent-pressed: #E64A12;
    --clr-accent-soft: rgba(255, 90, 31, 0.08);

    --clr-dark: #111111;
    --clr-dark-2: #1D1D1D;

    --clr-text: #111111;
    --clr-text-secondary: #6B7280;
    --clr-text-on-dark: rgba(255, 255, 255, 0.72);

    --clr-border: #D8D8D8;
    --clr-border-subtle: #ECECEC;
    --clr-surface: #F5F5F5;
    --clr-bg: #FFFFFF;

    /* Spacing — 4pt rács */
    --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
    --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

    /* Tipográfia */
    --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --fs-xs: 12px;  --fs-sm: 14px;  --fs-base: 16px; --fs-lg: 18px;
    --fs-xl: 22px;  --fs-2xl: 28px; --fs-3xl: 36px;  --fs-4xl: 48px;
    --fs-5xl: 60px;

    /* Radius + árnyék + mozgás */
    --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px;
    --sh-sm: 0 1px 2px rgba(17, 17, 17, 0.06);
    --sh-md: 0 4px 16px rgba(17, 17, 17, 0.08);
    --sh-lg: 0 12px 40px rgba(17, 17, 17, 0.12);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur: 240ms;

    --wrap: 1200px;
    --nav-h: 76px;
}

/* --- Reset / alap --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--clr-text);
    background: var(--clr-bg);
    -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(34px, 5.2vw, var(--fs-5xl)); }
h2 { font-size: clamp(26px, 3.6vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-xl); font-weight: 700; }
p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-6); }
.section { padding: var(--sp-20) 0; }
.section--surface { background: var(--clr-surface); }
.section--dark { background: var(--clr-dark); color: #fff; }
.section--dark p { color: var(--clr-text-on-dark); }

.eyebrow {
    display: inline-block;
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--clr-accent);
    margin-bottom: var(--sp-3);
}
.lead { font-size: var(--fs-lg); color: var(--clr-text-secondary); max-width: 62ch; }
.section--dark .lead { color: var(--clr-text-on-dark); }
.section-head { max-width: 68ch; margin-bottom: var(--sp-12); }

/* --- Gombok --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    padding: 14px var(--sp-6);
    font-family: inherit; font-size: var(--fs-base); font-weight: 700;
    border: 2px solid transparent; border-radius: var(--r-sm);
    cursor: pointer; white-space: nowrap;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
                transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--clr-accent); color: #fff; }
.btn-primary:hover { background: var(--clr-accent-hover); }
.btn-primary:active { background: var(--clr-accent-pressed); }
.btn-ghost { background: transparent; border-color: var(--clr-border); color: var(--clr-text); }
.btn-ghost:hover { border-color: var(--clr-text); }
/* Sötét felületeken (hero, cta-band, section--dark) a ghost-gomb szövege fehér,
   különben a fekete felirat beleolvad a háttérbe. */
.section--dark .btn-ghost,
.hero .btn-ghost,
.cta-band .btn-ghost { border-color: rgba(255,255,255,0.28); color: #fff; }
.section--dark .btn-ghost:hover,
.hero .btn-ghost:hover,
.cta-band .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.06); }
.btn-lg { padding: 17px var(--sp-8); font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; }

/* --- Fejléc --- */
.nav {
    position: sticky; top: 0; z-index: 50;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--clr-border-subtle);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: var(--sp-6); }
.nav-logo img { height: 38px; width: auto; }
.nav-links { display: flex; align-items: center; gap: var(--sp-8); list-style: none; margin: 0; padding: 0; }
.nav-links a {
    font-size: var(--fs-sm); font-weight: 600; color: var(--clr-text);
    padding: var(--sp-2) 0; position: relative;
    transition: color var(--dur) var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--clr-accent); }
.nav-links a[aria-current="page"]::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0;
    height: 2px; background: var(--clr-accent);
}
.nav-cta { display: flex; align-items: center; gap: var(--sp-4); }
.nav-tel { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 700; font-size: var(--fs-sm); }
.nav-tel svg { width: 16px; height: 16px; stroke: var(--clr-accent); fill: none; stroke-width: 2.2; }
.nav-toggle { display: none; background: none; border: 0; padding: var(--sp-2); cursor: pointer; }
/* max-width:none KELL: a globális `svg { max-width:100% }` a nulla szélességű gomb-szülőre
   oldódna fel, és az ikon 0px széles lenne (mobilon eltűnne a hamburger). */
.nav-toggle svg { width: 26px; height: 26px; max-width: none; stroke: var(--clr-text); fill: none; stroke-width: 2.2; }

/* --- Hero --- */
.hero {
    position: relative; min-height: 620px;
    display: flex; align-items: center;
    background: var(--clr-dark) center/cover no-repeat;
    color: #fff; overflow: hidden;
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(17,17,17,0.94) 0%, rgba(17,17,17,0.82) 42%, rgba(17,17,17,0.15) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: var(--sp-20); padding-bottom: var(--sp-20); }
.hero-content { max-width: 660px; }
.hero h1 { margin-bottom: var(--sp-5); }
.hero h1 em { font-style: normal; color: var(--clr-accent); }
.hero .lead { color: rgba(255,255,255,0.82); margin-bottom: var(--sp-8); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--sp-4); }

/* --- USP sáv --- */
.usp { border-bottom: 1px solid var(--clr-border-subtle); }
.usp-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--sp-8); padding: var(--sp-12) 0;
}
.usp-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-3); }
.usp-item img { width: 64px; height: 64px; object-fit: contain; }
.usp-item span { font-size: var(--fs-sm); font-weight: 700; letter-spacing: -0.01em; }

/* --- Kártya-rács (termékek, szolgáltatások) --- */
.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-md);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--clr-border-subtle); }
.card-media { aspect-ratio: 3 / 2; background: var(--clr-surface); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.card-body h3 { letter-spacing: -0.015em; }
.card-body p { color: var(--clr-text-secondary); font-size: var(--fs-sm); }

/* Ikonos szolgáltatás-kártya (kép nélkül) */
.card-icon {
    width: 52px; height: 52px; border-radius: var(--r-sm);
    background: var(--clr-accent-soft);
    display: grid; place-items: center;
    margin-bottom: var(--sp-2);
}
.card-icon svg { width: 26px; height: 26px; stroke: var(--clr-accent); fill: none; stroke-width: 2; }

/* --- Kiemelt sáv: MSZ EN 15635 --- */
.feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--sp-16); align-items: center; }
.feature-media img { border-radius: var(--r-lg); width: 100%; }
.feature-list { list-style: none; margin: var(--sp-6) 0 var(--sp-8); padding: 0; display: grid; gap: var(--sp-3); }
.feature-list li { display: flex; gap: var(--sp-3); align-items: flex-start; }
.feature-list svg { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 3px; stroke: var(--clr-accent); fill: none; stroke-width: 2.4; }
.standard-tag {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4);
    background: var(--clr-accent); color: #fff;
    border-radius: var(--r-pill);
    font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}

/* --- Galéria --- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-4); }
.gallery a { display: block; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; background: var(--clr-surface); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.gallery a:hover img { transform: scale(1.05); }

/* --- CTA-sáv --- */
.cta-band { background: var(--clr-dark); color: #fff; border-radius: var(--r-lg); padding: var(--sp-16) var(--sp-12); text-align: center; }
.cta-band h2 { margin-bottom: var(--sp-4); }
.cta-band p { color: var(--clr-text-on-dark); max-width: 56ch; margin: 0 auto var(--sp-8); }
.cta-band .hero-cta { justify-content: center; }

/* --- Űrlap --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--sp-16); align-items: start; }
.info-card { background: var(--clr-surface); border-radius: var(--r-md); padding: var(--sp-8); }
.info-row { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) 0; }
.info-row svg { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 3px; stroke: var(--clr-accent); fill: none; stroke-width: 2; }
.info-row a:hover { color: var(--clr-accent); }

.form-field { margin-bottom: var(--sp-4); }
.form-field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--sp-2); }
.form-field input, .form-field textarea {
    width: 100%; padding: var(--sp-3) var(--sp-4);
    font-family: inherit; font-size: var(--fs-base); color: var(--clr-text);
    background: var(--clr-bg);
    border: 1.5px solid var(--clr-border); border-radius: var(--r-sm);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form-field textarea { min-height: 132px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus {
    outline: none; border-color: var(--clr-accent);
    box-shadow: 0 0 0 3px var(--clr-accent-soft);
}
.form-msg { display: none; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); margin-bottom: var(--sp-4); font-size: var(--fs-sm); }
.form-msg.is-ok { display: block; background: rgba(27,158,117,0.1); color: #12775a; }
.form-msg.is-err { display: block; background: rgba(217,83,79,0.1); color: #a8332f; }

.map-embed { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--clr-border); }
.map-embed iframe { display: block; width: 100%; height: 380px; border: 0; }

/* --- Lábléc --- */
.footer { background: var(--clr-dark); color: var(--clr-text-on-dark); padding: var(--sp-16) 0 var(--sp-8); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: var(--sp-12); margin-bottom: var(--sp-12); }
.footer-logo img { height: 40px; width: auto; margin-bottom: var(--sp-5); }
.footer h4 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--sp-5); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.footer a { font-size: var(--fs-sm); transition: color var(--dur) var(--ease); }
.footer a:hover { color: var(--clr-accent); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--sp-6);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-4);
    font-size: var(--fs-xs);
}

/* --- Jogi oldalak (a közös legal.php rendereli, NEM a téma pages/-e) --- */
.breadcrumb { border-bottom: 1px solid var(--clr-border-subtle); background: var(--clr-surface); }
.breadcrumb ol {
    max-width: var(--wrap); margin: 0 auto; padding: var(--sp-4) var(--sp-6);
    list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2);
    font-size: var(--fs-sm); color: var(--clr-text-secondary);
}
.breadcrumb li + li::before { content: '/'; margin-right: var(--sp-2); color: var(--clr-border); }
.breadcrumb a:hover { color: var(--clr-accent); }

.legal-section { padding: var(--sp-16) 0 var(--sp-20); }
.legal-container { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 var(--sp-6); }
.legal-container > h1 { margin-bottom: var(--sp-10); }
.legal-content h2 {
    font-size: var(--fs-2xl); margin: var(--sp-12) 0 var(--sp-4);
    padding-top: var(--sp-6); border-top: 1px solid var(--clr-border-subtle);
}
.legal-content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-content h3 { font-size: var(--fs-lg); margin: var(--sp-6) 0 var(--sp-3); }
.legal-content p { color: var(--clr-text-secondary); }
.legal-content a { color: var(--clr-accent); font-weight: 600; }
.legal-content a:hover { text-decoration: underline; }
.legal-content ul { padding-left: var(--sp-5); margin: 0 0 var(--sp-4); display: grid; gap: var(--sp-2); }
.legal-content li { color: var(--clr-text-secondary); }
.legal-content li strong, .legal-content p strong { color: var(--clr-text); }
.legal-empty { padding: var(--sp-12); background: var(--clr-surface); border-radius: var(--r-md); text-align: center; }

/* --- Belépő animáció (mozgás céllal) ---
   A rejtés CSAK akkor aktív, ha a JS elindult (html.js). Így ha a script nem fut le
   (hiba, blokkolt CDN, régi böngésző), a tartalom NEM tűnik el, csak nem animál. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 80ms; }
.reveal[data-d="2"] { transition-delay: 160ms; }

/* --- Aloldal-fejléc --- */
.page-head { background: var(--clr-dark); color: #fff; padding: var(--sp-20) 0 var(--sp-16); }
.page-head h1 { margin-bottom: var(--sp-4); }
.page-head .lead { color: var(--clr-text-on-dark); }

/* --- Reszponzív --- */
@media (max-width: 960px) {
    .feature { grid-template-columns: 1fr; gap: var(--sp-10); }
    .feature-media { order: -1; }
    .contact-grid { grid-template-columns: 1fr; gap: var(--sp-10); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
}
@media (max-width: 768px) {
    .section { padding: var(--sp-16) 0; }
    .nav-links, .nav-tel { display: none; }
    .nav-toggle { display: block; }
    .nav.is-open .nav-links {
        display: grid; position: absolute; top: var(--nav-h); left: 0; right: 0;
        background: var(--clr-bg); border-bottom: 1px solid var(--clr-border);
        padding: var(--sp-6); gap: var(--sp-5);
    }
    .hero { min-height: 520px; }
    .hero::after { background: linear-gradient(180deg, rgba(17,17,17,0.86) 0%, rgba(17,17,17,0.92) 100%); }
    .hero-cta .btn { flex: 1 1 100%; }
    .cta-band { padding: var(--sp-12) var(--sp-6); }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal, .js .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}
