/* ==========================================================================
   AMC Hungary — Vásárlási útmutató (interactive product advisor) v1
   Loaded only on /vasarlasi-utmutato. All rules scoped under .vu-page.
   Mirrors the editorial register of home.css / about.css / kontakt.css:
   Playfair Display headings, Inter body, champagne #C9A961 italic accent,
   single 60 px hairline above the eyebrow, generous editorial padding.

   The token palette is a 1:1 copy of kontakt.css so the advisor's lead
   form on Step 3/4 inherits the exact input/button treatment a contact-
   form visitor would see — visual continuity with no surprises.
   ========================================================================== */

.vu-page {
    --vu-container: 1100px;
    --vu-container-px: clamp(20px, 4vw, 56px);
    --vu-section-y: clamp(5rem, 8vw, 8rem);
    --vu-section-y-large: clamp(7rem, 10vw, 10rem);
    --vu-ivory: #FAF7F2;
    --vu-white: #FFFFFF;
    --vu-dark: #1A1410;
    --vu-ink: #0E1412;
    --vu-text: #3A3530;
    --vu-muted: #6B6760;
    --vu-gold: #C9A961;
    --vu-gold-dark: #A88A47;
    --vu-border: #E8E2D5;
    --vu-error: #B85450;
    --vu-shadow: 0 24px 60px rgba(14, 20, 18, 0.08);
    --vu-motion-fast: var(--amc-motion-fast, 240ms);
    --vu-motion-medium: var(--amc-motion-medium, 480ms);
    --vu-motion-slow: var(--amc-motion-slow, 720ms);
    --vu-ease: var(--amc-ease-premium, cubic-bezier(0.22, 1, 0.36, 1));
    background: var(--vu-ivory);
    color: var(--vu-ink);
    overflow-x: clip;
}

html:has(.vu-page),
body:has(.vu-page) {
    overflow-x: clip;
}

main:has(.vu-page) + .site-footer {
    margin-top: 0;
}

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

.vu-page :is(h1, h2, h3) {
    hyphens: none;
    overflow-wrap: normal;
    text-wrap: balance;
    word-break: normal;
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: 0;
}

.vu-page p {
    text-wrap: pretty;
}

.vu-page em {
    color: var(--vu-gold);
    font-style: italic;
}

.vu-page a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition:
        color var(--vu-motion-fast) var(--vu-ease),
        border-bottom-color var(--vu-motion-fast) var(--vu-ease);
}

.vu-page a:hover {
    color: var(--vu-gold-dark);
    border-bottom-color: var(--vu-gold);
}

.vu-page a:focus-visible {
    outline: 2px solid var(--vu-gold);
    outline-offset: 4px;
    border-bottom-color: transparent;
}

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

/* Hairline + eyebrow shared (single hairline above eyebrow, no flanking lines) */
.vu-hairline {
    display: block;
    width: 60px;
    height: 1px;
    margin: 0 auto 1.5rem;
    background: var(--vu-gold);
}

.vu-eyebrow,
.vu-advisor-title,
.vu-step-counter,
.vu-closing-label,
.vu-noscript-eyebrow {
    margin: 0;
    color: var(--vu-gold-dark);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    line-height: 1.35;
    text-transform: uppercase;
}

/* Reveal animation (mirrors kontakt-reveal pattern) */
.vu-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity var(--vu-motion-slow) var(--vu-ease),
        transform var(--vu-motion-slow) var(--vu-ease);
}

.vu-page.is-enhanced .vu-reveal.is-visible,
.vu-page:not(.is-enhanced) .vu-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Section 1 — Hero
   ========================================================================== */

.vu-hero {
    padding: clamp(6rem, 10vw, 9.5rem) var(--vu-container-px) clamp(3.5rem, 6vw, 5.5rem);
    background: var(--vu-white);
}

.vu-hero-inner {
    width: min(100%, 760px);
    margin-inline: auto;
    text-align: center;
}

.vu-hero .vu-eyebrow {
    margin: 0 auto 1.25rem;
    display: inline-block;
}

.vu-hero-title {
    margin: 0 auto 1.25rem;
    color: var(--vu-ink);
    font-size: clamp(2.4rem, 4.6vw, 4rem);
    line-height: 1.06;
    max-width: 22ch;
}

.vu-hero-lead {
    max-width: 56ch;
    margin: 0 auto;
    color: var(--vu-text);
    font-size: clamp(1rem, 1.18vw, 1.12rem);
    line-height: 1.7;
}

/* ==========================================================================
   Section 2 — Advisor card
   ========================================================================== */

.vu-advisor-section {
    padding: var(--vu-section-y) 0;
    background: var(--vu-ivory);
}

.vu-advisor-card {
    position: relative;
    padding: clamp(2rem, 4vw, 3.25rem);
    background: var(--vu-white);
    border: 1px solid var(--vu-border);
    box-shadow: var(--vu-shadow);
}

/* Card header — title (left) + step counter & progress bar (right) */
.vu-advisor-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
    padding-bottom: clamp(1.25rem, 2vw, 1.75rem);
    margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
    border-bottom: 1px solid var(--vu-border);
}

.vu-progress-block {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 180px;
}

.vu-step-counter {
    color: var(--vu-gold);
    white-space: nowrap;
}

.vu-progress-track {
    position: relative;
    width: clamp(120px, 14vw, 180px);
    height: 2px;
    background: var(--vu-border);
    overflow: hidden;
}

.vu-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 100%;
    background: var(--vu-gold);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--vu-motion-medium) var(--vu-ease);
}

/* Step stage — wraps the step content, sets the crossfade origin */
.vu-step-stage {
    position: relative;
    min-height: 240px;
}

.vu-step {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 3.5vw, 2.75rem);
}

/* Visible during crossfade — Anime.js controls opacity / translateY directly,
   the static state below is for JS-disabled / reduced-motion fallbacks. */
.vu-step.is-leaving {
    pointer-events: none;
}

/* ==========================================================================
   Question block
   ========================================================================== */

.vu-question {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vu-question + .vu-question {
    padding-top: clamp(1.75rem, 3vw, 2.5rem);
    border-top: 1px solid var(--vu-border);
}

.vu-question-title {
    margin: 0;
    color: var(--vu-ink);
    font-family: var(--font-serif);
    font-size: clamp(1.35rem, 2vw, 1.625rem);
    line-height: 1.2;
}

.vu-question-hint {
    margin: 0;
    color: var(--vu-muted);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    line-height: 1.55;
    max-width: 64ch;
}

/* ==========================================================================
   Option grid + option cards
   ========================================================================== */

.vu-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.vu-options > li {
    min-width: 0;
    display: flex;
}

.vu-options-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vu-options-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.vu-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 76px;
    padding: 1rem 1.1rem;
    background: var(--vu-ivory);
    border: 1px solid var(--vu-border);
    border-radius: 0;
    color: var(--vu-ink);
    font-family: var(--font-sans);
    text-align: left;
    cursor: pointer;
    transition:
        background-color var(--vu-motion-fast) var(--vu-ease),
        border-color var(--vu-motion-fast) var(--vu-ease),
        transform var(--vu-motion-medium) var(--vu-ease),
        box-shadow var(--vu-motion-medium) var(--vu-ease);
}

.vu-option:hover {
    border-color: rgba(201, 169, 97, 0.55);
    background: var(--vu-white);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(14, 20, 18, 0.055);
}

.vu-option:focus-visible {
    outline: none;
    border-color: var(--vu-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}

.vu-option[aria-pressed="true"] {
    border-color: var(--vu-gold);
    background: rgba(201, 169, 97, 0.06);
}

/* Selection mark — thin champagne ring outside selected, filled disc when
   pressed; for multi-select cards a checkmark ◆ in the center, for
   single-select cards a small dot. Both share the same external dimensions
   so the layout never shifts on selection. */
.vu-option-mark {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 1px solid var(--vu-border);
    border-radius: 50%;
    background: var(--vu-white);
    transition:
        border-color var(--vu-motion-fast) var(--vu-ease),
        background-color var(--vu-motion-fast) var(--vu-ease);
    position: relative;
}

.vu-option:hover .vu-option-mark {
    border-color: rgba(201, 169, 97, 0.55);
}

.vu-option[aria-pressed="true"] .vu-option-mark {
    border-color: var(--vu-gold);
    background: var(--vu-gold);
}

.vu-option[aria-pressed="true"] .vu-option-mark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 5px;
    border-left: 1.5px solid var(--vu-white);
    border-bottom: 1.5px solid var(--vu-white);
    transform: translate(-50%, -65%) rotate(-45deg);
}

.vu-option-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.vu-option-label {
    color: var(--vu-ink);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.3;
}

.vu-option-desc {
    color: var(--vu-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

/* Selection micro-bounce — 200 ms scale 1 → 1.02 → 1 fired by JS.
   Kept as a CSS keyframe so it doesn't depend on Anime.js for one-shots. */
.vu-option.is-bouncing {
    animation: vuOptionBounce 340ms var(--vu-ease) both;
}

@keyframes vuOptionBounce {
    0%   { transform: translateY(-1px) scale(1); }
    50%  { transform: translateY(-1px) scale(1.01); }
    100% { transform: translateY(-1px) scale(1); }
}

/* ==========================================================================
   Lead form (Step 3/4) — mirrors kontakt input + button styling exactly
   ========================================================================== */

.vu-form {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 1.8vw, 1.5rem);
}

.vu-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 1.8vw, 1.5rem);
}

.vu-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.vu-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vu-field-full {
    grid-column: 1 / -1;
}

.vu-field label {
    color: var(--vu-ink);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.vu-required {
    color: var(--vu-gold);
}

.vu-field input,
.vu-field textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--vu-ivory);
    border: 1px solid var(--vu-border);
    border-radius: 0;
    color: var(--vu-ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    transition:
        border-color var(--vu-motion-fast) var(--vu-ease),
        background-color var(--vu-motion-fast) var(--vu-ease),
        box-shadow var(--vu-motion-fast) var(--vu-ease);
}

.vu-field input::placeholder,
.vu-field textarea::placeholder {
    color: var(--vu-muted);
}

.vu-field input:hover,
.vu-field textarea:hover {
    border-color: rgba(201, 169, 97, 0.42);
}

.vu-field input:focus,
.vu-field textarea:focus {
    outline: none;
    background: var(--vu-white);
    border-color: var(--vu-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.16);
}

.vu-input-error {
    border-color: var(--vu-error) !important;
    background: rgba(184, 84, 80, 0.04) !important;
}

.vu-error {
    margin: 0;
    color: var(--vu-error);
    font-family: var(--font-sans);
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.45;
}

/* GDPR consent row */
.vu-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 0.25rem;
}

.vu-consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--vu-gold);
    cursor: pointer;
}

.vu-consent-label {
    color: var(--vu-text);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* Submit error message — surfaces network/abort failures from the n8n call */
.vu-submit-error {
    margin: 0;
    color: var(--vu-error);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* ==========================================================================
   Buttons (footer)
   ========================================================================== */

.vu-advisor-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: clamp(2rem, 3.5vw, 2.75rem);
    padding-top: clamp(1.25rem, 2vw, 1.75rem);
    border-top: 1px solid var(--vu-border);
}

.vu-button {
    min-height: 48px;
    padding: 1rem 2.25rem;
    border: 1px solid transparent;
    border-radius: 0;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        background-color var(--vu-motion-fast) var(--vu-ease),
        border-color var(--vu-motion-fast) var(--vu-ease),
        color var(--vu-motion-fast) var(--vu-ease),
        transform var(--vu-motion-medium) var(--vu-ease),
        box-shadow var(--vu-motion-medium) var(--vu-ease);
}

.vu-button-primary {
    margin-left: auto;
    background: var(--vu-gold);
    border-color: var(--vu-gold);
    color: var(--vu-dark);
}

.vu-button-primary:hover {
    background: var(--vu-gold-dark);
    border-color: var(--vu-gold-dark);
    transform: translateY(-1px);
    box-shadow: var(--vu-shadow);
}

.vu-button-primary:active {
    transform: translateY(0);
}

.vu-button-ghost {
    background: transparent;
    border-color: var(--vu-border);
    color: var(--vu-ink);
}

.vu-button-ghost:hover {
    border-color: var(--vu-gold);
    color: var(--vu-gold-dark);
    transform: translateY(-1px);
}

.vu-button[disabled],
.vu-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
    box-shadow: none;
}

.vu-button[hidden] {
    display: none;
}

.vu-button:focus-visible {
    outline: 2px solid var(--vu-gold);
    outline-offset: 3px;
}

/* ==========================================================================
   Success state (Step 4/4) — replaces the step content in place
   ========================================================================== */

.vu-success {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: clamp(1.5rem, 4vw, 3rem) 0;
    text-align: center;
}

.vu-success-eyebrow {
    margin: 0 auto 0.75rem;
    color: var(--vu-gold-dark);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    line-height: 1.35;
    text-transform: uppercase;
}

.vu-success-headline {
    margin: 0 auto 1rem;
    color: var(--vu-ink);
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    font-weight: 400;
    line-height: 1.1;
    max-width: 22ch;
}

.vu-success-headline:focus,
.vu-success-headline:focus-visible {
    outline: none;
}

.vu-success-body {
    margin: 0 auto;
    color: var(--vu-text);
    font-family: var(--font-sans);
    font-size: 1.04rem;
    line-height: 1.7;
    max-width: 52ch;
}

/* No-script fallback */
.vu-noscript {
    padding: 1.5rem;
    background: var(--vu-ivory);
    border: 1px solid var(--vu-border);
    text-align: center;
}

.vu-noscript-body {
    margin: 0.5rem 0 0;
    color: var(--vu-text);
    font-size: 0.96rem;
    line-height: 1.65;
}

/* Privacy note below the advisor */
.vu-privacy-note {
    max-width: 56ch;
    margin: clamp(1.5rem, 2.5vw, 2.25rem) auto 0;
    text-align: center;
    color: var(--vu-muted);
    font-family: var(--font-sans);
    font-size: 0.86rem;
    line-height: 1.6;
}

.vu-privacy-note a {
    border-bottom: 1px solid var(--vu-border);
}

.vu-privacy-note a:hover {
    color: var(--vu-gold-dark);
    border-bottom-color: var(--vu-gold);
}

/* ==========================================================================
   Section 3 — Closing mantra
   ========================================================================== */

.vu-closing {
    padding: var(--vu-section-y-large) var(--vu-container-px);
    background: var(--vu-white);
    text-align: center;
}

.vu-closing-inner {
    width: min(100%, 760px);
    margin-inline: auto;
}

.vu-mantra {
    margin: 0 auto 1.5rem;
    color: var(--vu-ink);
    font-size: clamp(2rem, 4.2vw, 3.4rem);
    line-height: 1.1;
}

.vu-mantra em {
    color: var(--vu-gold);
    font-style: italic;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .vu-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vu-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .vu-hero {
        padding-top: clamp(4.5rem, 14vw, 6rem);
    }

    .vu-advisor-card {
        padding: 1.5rem 1.25rem;
    }

    .vu-advisor-header {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        text-align: left;
    }

    .vu-progress-block {
        justify-content: flex-start;
    }

    .vu-progress-track {
        width: 100%;
    }

    .vu-options {
        grid-template-columns: 1fr;
    }

    .vu-advisor-footer {
        gap: 8px;
    }

    .vu-button {
        flex: 1 1 auto;
        padding: 0.875rem 1.25rem;
        text-align: center;
    }

    .vu-button-primary {
        order: -1;
        margin-left: 0;
        flex: 1 1 100%;
    }
}

@media (max-width: 430px) {
    .vu-page {
        --vu-container-px: 18px;
    }

    .vu-hero-title {
        font-size: clamp(2.05rem, 9vw, 2.5rem);
    }

    .vu-success-headline {
        font-size: clamp(1.85rem, 8.5vw, 2.4rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vu-page *,
    .vu-page *::before,
    .vu-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .vu-page.is-enhanced .vu-reveal,
    .vu-page.is-enhanced .vu-reveal.is-visible {
        opacity: 1;
        transform: none;
    }
}
