/* ==========================================================================
   Hireify Connect - a hireify.hu (website repo, v2-page.scss / v3-page.scss)
   arculati tokenjei alapján: Exo 2, zöld CTA (#10b981), tinta (#0e1726),
   háttér #f6f8fb, 14px kártya-radius, 999px pill gombok.
   ========================================================================== */

:root {
    --ink: #0e1726;
    --ink-soft: #16223a;
    --text: #33415c;
    --text-dim: #64748b;
    --bg: #f6f8fb;
    --surface: #ffffff;
    --border: rgba(14, 23, 38, 0.1);
    --green: #10b981;
    --green-dark: #0b9268;
    --cyan: #00d4ff;
    --amber: #f59e0b;
    --red: #ef4444;
    --red-text: #b91c1c;
    --dark-bg: #0a0f1e;
    --dark-border: rgba(255, 255, 255, 0.12);
    --dark-text: rgba(255, 255, 255, 0.82);
    --radius: 14px;
    --radius-sm: 9px;
    --font: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --nav-height: 64px;
    --shadow-sm: 0 2px 6px rgba(14, 23, 38, 0.06);
    --shadow-md: 0 6px 16px rgba(14, 23, 38, 0.08);
    --shadow-lg: 0 14px 30px rgba(14, 23, 38, 0.1);
    --shadow-xl: 0 24px 60px rgba(14, 23, 38, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green-dark); }

/* ---------- Fejléc (sticky, sötét, mint a hireify.hu navja) ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-height);
    background: rgba(14, 23, 38, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav--transparent {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.nav-inner {
    max-width: 1140px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-brand img {
    height: 26px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 8px;
}

/* ---------- Gombok ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 14px 26px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
    background: var(--green);
    color: #fff;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.btn--primary:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }
.btn--primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--ghost {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--border);
}

.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--ghost:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn--nav {
    padding: 9px 18px;
    font-size: 0.92rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn--nav:hover { color: #fff; border-color: var(--cyan); }
.btn--nav.is-active { background: var(--green); border-color: var(--green); color: #fff; }

.btn--block { display: flex; width: 100%; }

.btn-icon { display: inline-flex; }
.btn-icon svg { display: block; }

/* ---------- Űrlap oldal ---------- */

.main { padding: 44px 0 60px; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow { max-width: 620px; }

.intro { text-align: center; margin-bottom: 26px; }

.kicker {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green-dark);
    margin-bottom: 10px;
}

.kicker--cyan { color: var(--cyan); }

.title {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 10px;
}

.lead {
    font-size: 1.08rem;
    color: var(--text);
    max-width: 520px;
    margin: 0 auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.form-actions-top { margin-bottom: 22px; }

.hint {
    font-size: 0.82rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 8px;
}

.form { display: flex; flex-direction: column; gap: 14px; }

/* mező alatti magyarázat (Esemény): balra zárt, a hibaüzenet helyére simul */
.hint--field { text-align: left; margin-top: -10px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 5px; }

.field label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink);
}

.field input {
    width: 100%;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 13px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.field input:focus {
    outline: 2px solid rgba(16, 185, 129, 0.5);
    outline-offset: 1px;
    border-color: var(--green);
    background: #fff;
}

.field input[aria-invalid="true"] {
    border-color: var(--red);
    background: rgba(239, 68, 68, 0.06);
}

.field input[aria-invalid="true"]:focus { outline-color: rgba(239, 68, 68, 0.35); }

.field-error {
    display: block;
    min-height: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--red-text);
}

.alert {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: var(--red-text);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.alert--warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.4);
    color: #92400e;
}

.hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    overflow: hidden;
}

.form-privacy {
    font-size: 0.76rem;
    color: var(--text-dim);
    text-align: center;
}

#submitBtn { margin-top: 6px; }

/* Köszönő állapot (a hireify.hu .v2-success mintája) */

.success { text-align: center; padding: 20px 0 6px; }

.success-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.14);
    color: var(--green-dark);
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 6px;
}

.success p { font-size: 0.94rem; margin-bottom: 22px; }

.footnote {
    margin-top: 22px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-dim);
}

#canvas { display: none; }

/* ---------- QR nézet (sötét szekció a hireify.hu-ról) ---------- */

.page--qr {
    background: var(--dark-bg);
    background-image:
        radial-gradient(ellipse 900px 420px at 85% -10%, rgba(16, 185, 129, 0.12), transparent),
        radial-gradient(ellipse 700px 380px at -5% 30%, rgba(0, 212, 255, 0.1), transparent);
    color: var(--dark-text);
}

.qr-main {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 24px 48px;
}

.qr-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 640px;
}

.qr-logo {
    height: clamp(44px, 7vh, 72px);
    width: auto;
    margin-bottom: 26px;
}

.qr-card {
    display: block;
    background: #fff;
    border-radius: 16px;
    padding: clamp(14px, 3vw, 28px);
    box-shadow: var(--shadow-xl);
    width: min(78vw, 56vh, 520px);
    aspect-ratio: 1 / 1;
    margin-bottom: 22px;
    transition: transform 0.15s ease;
}

.qr-card:hover { transform: translateY(-3px); }

.qr-image {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.qr-url {
    font-size: clamp(2rem, 6vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 8px;
}

.qr-lead {
    font-size: 1.12rem;
    color: var(--dark-text);
    max-width: 440px;
}

/* ---------- Rólam nézet (névjegy, a namecard.hireify.hu/tamas tartalma) ---------- */

.card--profile { padding: 0; overflow: hidden; }

.profile-header {
    height: 150px;
    background: var(--ink);
    position: relative;
}

.profile-header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-body {
    padding: 0 30px 30px;
    text-align: center;
}

.profile-photo {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: var(--shadow-lg);
    margin: -64px auto 16px;
    display: block;
    background: var(--bg);
    position: relative; /* a pozicionált fejléc fölé kerüljön */
    z-index: 1;
}

.profile-name {
    font-size: clamp(1.7rem, 4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 6px;
}

.profile-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green-dark);
    margin-bottom: 18px;
}

.profile-bio {
    font-size: 1.02rem;
    color: var(--text);
    max-width: 420px;
    margin: 0 auto 24px;
}

.profile-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.profile-link {
    flex: 1;
    padding: 12px 10px;
    font-size: 0.9rem;
    gap: 8px;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 560px) {
    .profile-body { padding: 0 18px 22px; }
    .profile-header { height: 120px; }
    .profile-link span { display: none; }
    .profile-link { padding: 12px 8px; }
}

/* Névjegy QR-kód a Rólam nézet alján: nagy, messziről is olvasható */

.profile-qr {
    margin-top: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-qr-card {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: clamp(14px, 3vw, 24px);
    box-shadow: var(--shadow-lg);
    width: min(100%, 78vh, 560px);
    aspect-ratio: 1 / 1;
    margin-bottom: 12px;
    transition: transform 0.15s ease;
}

.profile-qr-card:hover { transform: translateY(-3px); }

.profile-qr-url {
    font-size: clamp(1.2rem, 3.4vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}

/* ---------- Modal (kamera) ---------- */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(10, 15, 30, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.2s ease;
    padding: 16px;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.25s ease;
    overflow: hidden;
}

.camera-modal-content { max-width: min(92vw, 720px); }

.modal-header {
    position: relative;
    background: var(--ink);
    color: #fff;
    padding: 18px 56px 18px 24px;
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
}

.close-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.modal-body { padding: 24px; }

.camera-modal-body { padding: 0; position: relative; }

.modal-footer { padding: 16px 24px 22px; }

#video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video {
    width: 100%;
    height: auto;
    max-height: 60vh;
    display: block;
}

.camera-placeholder {
    position: absolute;
    inset: 0;
    background: var(--ink-soft);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    min-height: 260px;
}

.camera-placeholder.show { display: flex; }

.camera-placeholder-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.16);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    display: none;
}

/* ---------- Értesítés (camera.js) ---------- */

.toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translate(-50%, -140%);
    z-index: 10000;
    max-width: min(92vw, 420px);
    padding: 12px 18px;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    background: var(--ink);
    text-align: center;
}

.toast.is-visible { transform: translate(-50%, 0); }
.toast--success { background: var(--green-dark); }
.toast--error { background: var(--red); }
.toast--warning { background: var(--amber); color: var(--ink); }
.toast--info { background: var(--ink); }

/* ---------- Animációk ---------- */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Reszponzív ---------- */

@media (max-width: 560px) {
    .nav-inner { padding: 0 16px; }
    .container { padding: 0 16px; }
    .main { padding: 28px 0 40px; }
    .card { padding: 22px 18px; }
    .form-row { grid-template-columns: 1fr; }
    .btn--nav { padding: 8px 14px; font-size: 0.85rem; }
    .lead { font-size: 1rem; }
}
