/* ==========================================================================
   motoros-jogositvany.hu — Dodgem Autós-Motoros Iskola
   Design system. No framework, no build step for CSS — this file is shipped
   as-is. Brand tokens mirror dodgemjogsi.hu (#ff9916 / #00a1d2).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Brand */
    --brand: #ff9916;
    --brand-strong: #ff7e00;
    --brand-tint: #fff4e4;
    --accent: #00a1d2;
    --accent-tint: #e6f6fb;

    /* Ink & surfaces */
    --ink: #14161a;
    --ink-soft: #4a5158;
    --ink-mute: #6f7780;
    --line: #e4e7eb;
    --line-soft: #eef0f3;
    --surface: #ffffff;
    --surface-2: #f6f7f9;
    --dark: #14161a;
    --dark-2: #1c1f26;

    /* Type — fluid, clamped so it never runs away on ultrawide */
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.9rem);
    --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
    --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
    --step-2: clamp(1.35rem, 1.22rem + 0.6vw, 1.7rem);
    --step-3: clamp(1.6rem, 1.36rem + 1.1vw, 2.25rem);
    --step-4: clamp(2rem, 1.5rem + 2.2vw, 3.2rem);
    --step-5: clamp(2.4rem, 1.5rem + 4vw, 4.4rem);

    /* Space */
    --gap: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    --section-y: clamp(3rem, 2rem + 5vw, 5.5rem);

    /* Shape */
    --r-sm: 8px;
    --r: 14px;
    --r-lg: 20px;
    --shadow: 0 1px 2px rgba(20, 22, 26, 0.04), 0 4px 16px rgba(20, 22, 26, 0.06);
    --shadow-lg: 0 2px 6px rgba(20, 22, 26, 0.06), 0 18px 42px rgba(20, 22, 26, 0.12);

    --header-h: 68px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--step-0);
    line-height: 1.65;
    color: var(--ink-soft);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4,
h5 {
    margin: 0 0 0.6em;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

h1 {
    font-size: var(--step-4);
}
h2 {
    font-size: var(--step-3);
}
h3 {
    font-size: var(--step-2);
}
h4 {
    font-size: var(--step-1);
}
h5 {
    font-size: var(--step-0);
    letter-spacing: 0;
}

p,
ul,
ol {
    margin: 0 0 1.1em;
}

ul,
ol {
    padding-left: 1.35em;
}

li + li {
    margin-top: 0.35em;
}

a {
    color: var(--brand-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--ink);
}

strong,
b {
    color: var(--ink);
    font-weight: 650;
}

hr {
    height: 1px;
    border: 0;
    background: var(--line);
    margin: clamp(2rem, 4vw, 3rem) 0;
}

sup {
    font-size: 0.7em;
    line-height: 0;
}

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

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
    width: min(100% - 2.5rem, 1180px);
    margin-inline: auto;
}

.wrap--narrow {
    width: min(100% - 2.5rem, 820px);
}

.section {
    padding-block: var(--section-y);
}

.section--tint {
    background: var(--surface-2);
    border-block: 1px solid var(--line-soft);
}

.section__head {
    max-width: 44rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__head p {
    font-size: var(--step-1);
    color: var(--ink-mute);
    margin-bottom: 0;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.9rem;
    font-size: var(--step--1);
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--brand-strong);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background: var(--ink);
    color: #fff;
    border-radius: 0 0 var(--r-sm) 0;
}

.skip-link:focus {
    left: 0;
    color: #fff;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
    --btn-bg: var(--brand);
    --btn-fg: #14161a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.72rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font: inherit;
    font-weight: 650;
    font-size: var(--step--1);
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease,
        box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    --btn-bg: var(--brand-strong);
    color: var(--btn-fg);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 126, 0, 0.32);
}

.btn--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--ink);
    border-color: var(--line);
}

.btn--ghost:hover {
    --btn-bg: var(--surface-2);
    --btn-fg: var(--ink);
    box-shadow: none;
    border-color: var(--ink-mute);
}

.btn--on-dark {
    --btn-bg: rgba(255, 255, 255, 0.1);
    --btn-fg: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
}

.btn--on-dark:hover {
    --btn-bg: rgba(255, 255, 255, 0.18);
    --btn-fg: #fff;
    border-color: #fff;
    box-shadow: none;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   5. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: var(--header-h);
}

.brand {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}

.brand img {
    width: 148px;
    height: auto;
}

.nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.nav a {
    padding: 0.5rem 0.7rem;
    border-radius: var(--r-sm);
    color: var(--ink-soft);
    font-size: var(--step--1);
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nav a:hover {
    color: var(--ink);
    background: var(--surface-2);
}

.nav a[aria-current="page"] {
    color: var(--ink);
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--brand);
    border-radius: var(--r-sm) var(--r-sm) 0 0;
}

/* `.nav a` above is more specific than `.btn`, so the pill shape and colours
   have to be restated for the CTA rather than inherited. */
.nav .btn {
    margin-left: 0.5rem;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    background: var(--brand);
    color: #14161a;
    font-weight: 650;
}

.nav .btn:hover {
    background: var(--brand-strong);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}

.nav-toggle svg {
    width: 22px;
    height: 22px;
}

.nav-toggle__close {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__open {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
    display: block;
}

@media (max-width: 1020px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.25rem 1.5rem;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        display: none;
    }

    .nav[data-open="true"] {
        display: flex;
    }

    .nav a {
        padding: 0.85rem 0.5rem;
        font-size: var(--step-0);
        border-radius: 0;
        border-bottom: 1px solid var(--line-soft);
    }

    .nav a[aria-current="page"] {
        box-shadow: inset 3px 0 0 var(--brand);
        border-radius: 0;
        padding-left: 1rem;
    }

    .nav .btn {
        margin: 1rem 0 0;
        padding: 0.8rem 1.2rem;
        font-size: var(--step-0);
        border-bottom: 0;
        border-radius: 999px;
    }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: clamp(420px, 62vh, 620px);
    padding-block: clamp(3rem, 8vw, 6rem);
    background-color: var(--dark);
    background-image: linear-gradient(
            to top,
            rgba(10, 11, 14, 0.9) 0%,
            rgba(10, 11, 14, 0.55) 45%,
            rgba(10, 11, 14, 0.35) 100%
        ),
        var(--hero-img, none);
    background-size: cover;
    background-position: center 62%;
    color: rgba(255, 255, 255, 0.82);
}

.hero__inner {
    max-width: 40rem;
}

.hero h1 {
    color: #fff;
    font-size: var(--step-5);
    margin-bottom: 0.5rem;
}

.hero__lead {
    font-size: var(--step-1);
    color: rgba(255, 255, 255, 0.86);
    margin-bottom: 1.75rem;
}

.hero .eyebrow {
    color: var(--brand);
}

/* --------------------------------------------------------------------------
   7. Page header (inner pages)
   -------------------------------------------------------------------------- */
.page-head {
    padding-block: clamp(2.25rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2.25rem);
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}

.page-head h1 {
    font-size: var(--step-3);
    margin-bottom: 0.35rem;
}

.page-head__lead {
    max-width: 46rem;
    color: var(--ink-mute);
    margin-bottom: 0;
}

.crumbs {
    margin: 0 0 0.9rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--step--1);
    color: var(--ink-mute);
}

.crumbs li {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.crumbs li + li::before {
    content: "/";
    color: var(--line);
}

.crumbs a {
    color: var(--ink-mute);
    text-decoration: none;
}

.crumbs a:hover {
    color: var(--brand-strong);
    text-decoration: underline;
}

.crumbs [aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   8. Prose (article body)
   -------------------------------------------------------------------------- */
.prose {
    max-width: 68ch;
}

.prose > h2 {
    margin-top: 2.2em;
    padding-top: 0.2em;
}

.prose > h3 {
    margin-top: 2em;
}

.prose > h4,
.prose > h5 {
    margin-top: 1.8em;
    color: var(--ink);
}

.prose > :first-child {
    margin-top: 0;
}

.prose > h5 {
    font-size: var(--step-0);
    font-weight: 700;
}

.prose .lead {
    font-size: var(--step-1);
    color: var(--ink-mute);
}

.prose ul {
    list-style: none;
    padding-left: 0;
}

.prose ul li {
    position: relative;
    padding-left: 1.6em;
}

.prose ul li::before {
    content: "";
    position: absolute;
    left: 0.25em;
    top: 0.62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.prose ol {
    padding-left: 1.4em;
}

.prose ol li::marker {
    color: var(--brand-strong);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   9. Cards & grids
   -------------------------------------------------------------------------- */
.grid {
    display: grid;
    gap: var(--gap);
}

.grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--4 {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
    display: flex;
    flex-direction: column;
    padding: clamp(1.35rem, 2.5vw, 1.9rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow);
}

.card h3,
.card h4 {
    margin-bottom: 0.5rem;
}

.card p:last-child {
    margin-bottom: 0;
}

/* Category card — the big letter badge is the visual identity */
.cat-card {
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand);
    color: inherit;
}

.cat-card__badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    justify-content: center;
    min-width: 3.4rem;
    height: 3.4rem;
    margin-bottom: 1.1rem;
    padding-inline: 0.6rem;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--brand-strong), var(--brand));
    color: #fff;
    font-size: var(--step-2);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cat-card__name {
    font-size: var(--step-1);
    margin-bottom: 0.3rem;
}

.cat-card__spec {
    margin-bottom: 1rem;
    font-size: var(--step--1);
    color: var(--ink-mute);
}

.cat-card__meta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--line-soft);
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: var(--step--1);
}

.cat-card__meta dt {
    color: var(--ink-mute);
}

.cat-card__meta dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.cat-card__meta > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

/* Feature card with a leading icon */
.feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 1rem;
    border-radius: var(--r-sm);
    background: var(--brand-tint);
    color: var(--brand-strong);
}

.feature__icon svg {
    width: 22px;
    height: 22px;
}

/* --------------------------------------------------------------------------
   10. Callout
   -------------------------------------------------------------------------- */
.callout {
    margin-block: 2rem;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: var(--r-sm);
    background: var(--brand-tint);
}

.callout h3,
.callout h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.callout > :last-child {
    margin-bottom: 0;
}

.callout--info {
    border-left-color: var(--accent);
    background: var(--accent-tint);
}

.callout--plain {
    border-left-color: var(--ink-mute);
    background: var(--surface-2);
}

/* --------------------------------------------------------------------------
   11. Price table — real table on desktop, stacked cards on mobile
   -------------------------------------------------------------------------- */
.price-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    margin-bottom: 1.25rem;
    font-size: var(--step--1);
    color: var(--ink-mute);
}

.price-table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--step--1);
}

.price-table th,
.price-table td {
    padding: 0.7rem 0.85rem;
    text-align: right;
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}

.price-table thead th {
    position: sticky;
    top: 0;
    background: var(--surface-2);
    color: var(--ink);
    font-size: var(--step--1);
    font-weight: 700;
    text-align: right;
    border-bottom: 1px solid var(--line);
}

.price-table thead tr:first-child th {
    text-align: center;
}

.price-table th[scope="row"] {
    text-align: left;
    white-space: normal;
    min-width: 13rem;
    color: var(--ink);
    font-weight: 650;
}

.price-table tbody tr:hover {
    background: var(--brand-tint);
}

.price-table tbody tr:last-child td,
.price-table tbody tr:last-child th {
    border-bottom: 0;
}

.price-table .is-total {
    color: var(--ink);
    font-weight: 750;
}

.price-table .is-none {
    color: var(--ink-mute);
}

.cat-tag {
    display: inline-block;
    min-width: 2.1rem;
    margin-right: 0.4rem;
    padding: 0.05rem 0.4rem;
    border-radius: 5px;
    background: var(--ink);
    color: #fff;
    font-size: 0.78em;
    font-weight: 700;
    text-align: center;
    vertical-align: 0.05em;
}

@media (max-width: 800px) {
    .price-table-scroll {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
    }

    .price-table,
    .price-table tbody,
    .price-table tr,
    .price-table th,
    .price-table td {
        display: block;
        width: auto;
    }

    .price-table thead {
        display: none;
    }

    .price-table tbody tr {
        margin-bottom: var(--gap);
        border: 1px solid var(--line);
        border-radius: var(--r);
        background: var(--surface);
        box-shadow: var(--shadow);
        overflow: hidden;
    }

    .price-table tbody tr:hover {
        background: var(--surface);
    }

    .price-table th[scope="row"] {
        min-width: 0;
        padding: 0.9rem 1rem;
        background: var(--surface-2);
        border-bottom: 1px solid var(--line);
        font-size: var(--step-0);
    }

    .price-table td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 1rem;
        padding: 0.6rem 1rem;
        text-align: right;
        white-space: normal;
    }

    .price-table td::before {
        content: attr(data-label);
        flex: 0 1 auto;
        text-align: left;
        color: var(--ink-mute);
        font-weight: 500;
    }

    .price-table td.is-total {
        background: var(--brand-tint);
        border-bottom: 0;
        font-size: var(--step-0);
    }
}

/* --------------------------------------------------------------------------
   12. Contact / detail lists
   -------------------------------------------------------------------------- */
.detail-list {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.detail-list > div {
    display: grid;
    gap: 0.15rem;
}

.detail-list dt {
    font-size: var(--step--1);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.detail-list dd {
    margin: 0;
    color: var(--ink);
    font-size: var(--step-1);
}

.detail-list dd a {
    text-decoration: none;
}

.detail-list dd a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    padding-block: clamp(2.75rem, 5vw, 4rem) 0;
    background: var(--dark);
    color: rgba(255, 255, 255, 0.66);
    font-size: var(--step--1);
}

.site-footer h2,
.site-footer h3 {
    color: #fff;
    font-size: var(--step-0);
    margin-bottom: 1rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--brand);
    text-decoration: underline;
}

.footer-grid {
    display: grid;
    gap: clamp(2rem, 4vw, 3rem);
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.footer-grid li {
    margin: 0;
}

.footer-brand img {
    width: 150px;
    margin-bottom: 1rem;
}

.footer-phone {
    display: inline-block;
    margin-top: 0.35rem;
    color: #fff !important;
    font-size: var(--step-1);
    font-weight: 700;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-block: 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: var(--step--1);
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
    margin: 0;
}

/* --------------------------------------------------------------------------
   14. Back to top
   -------------------------------------------------------------------------- */
.to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 40;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.to-top[data-visible="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top svg {
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   15. Utilities
   -------------------------------------------------------------------------- */
.u-center {
    text-align: center;
}

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

/* --------------------------------------------------------------------------
   16. Motion & print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .site-header,
    .site-footer,
    .to-top,
    .hero {
        display: none;
    }

    body {
        color: #000;
    }

    .price-table-scroll {
        overflow: visible;
        box-shadow: none;
    }
}
