/* ============================================================
   MegaMC Staff — public pages (homepage + apply form)
   Same look as the main MegaMC site. Theme colours come from
   config.php (THEME_PRIMARY / THEME_SECONDARY) via the header.
   ============================================================ */

:root {
    --bg: #0d0618;
    --bg-2: #150a26;
    --surface: rgba(var(--primary-rgb, 120, 0, 255), .06);
    --surface-2: rgba(var(--primary-rgb, 120, 0, 255), .12);
    --border: rgba(var(--primary-rgb, 120, 0, 255), .18);
    --border-2: rgba(var(--primary-rgb, 120, 0, 255), .32);
    --text: #f6efff;
    --text-2: #d8cbf2;
    --muted: #a493c6;
    --light-primary: #c9a0ff;
    --ok: #34d399;
    --bad: #f87171;
    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 20px 60px -20px rgba(6, 0, 16, .8);
    --ease: cubic-bezier(.2, .8, .2, 1);
    --nav-h: 72px;
    --font-pixel: 'Press Start 2P', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: 'Inter', system-ui, sans-serif; font-size: 16px; line-height: 1.6;
    overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 2px solid var(--light-primary); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(780px, 100% - 2.5rem); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.ico-xs { width: 13px; height: 13px; }
.ico-sm { width: 16px; height: 16px; }
.ico-md { width: 20px; height: 20px; }

/* ---------- Background effects ---------- */
#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#cursor-glow {
    position: fixed; z-index: 0; pointer-events: none; width: 600px; height: 600px; left: 0; top: 0; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), .09), transparent 60%);
    transform: translate(-50%, -50%); transition: opacity .3s; opacity: 0;
}
.noise {
    position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .footer, .nav { position: relative; z-index: 2; }

/* ---------- Typography (pixel headings, like megamc.nl) ---------- */
h1, h2, .logo span, .stat b, .pixel { font-family: var(--font-pixel); font-weight: 400; letter-spacing: 0; }
h1 { line-height: 1.3; }
h2 { font-size: clamp(1.2rem, 3vw, 1.9rem); line-height: 1.45; }
h3 { font-size: 1.2rem; font-weight: 800; }
.eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: var(--light-primary); margin-bottom: 1rem; padding: .35rem .8rem; border-radius: 99px;
    background: rgba(var(--primary-rgb), .12); border: 1px solid rgba(var(--primary-rgb), .3);
}
.lead { font-size: 1.12rem; color: var(--text-2); }
.grad-text {
    background: linear-gradient(135deg, #fff 15%, var(--light-primary) 45%, var(--secondary));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 8px 30px rgba(var(--primary-rgb), .35));
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .9rem 1.5rem; border-radius: 12px; font-weight: 700; font-size: .98rem; white-space: nowrap;
    transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-sm { padding: .6rem 1.1rem; font-size: .9rem; border-radius: 10px; }
.btn-lg { padding: 1.05rem 1.8rem; font-size: 1.02rem; }
.btn-primary {
    color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 30px -10px rgba(var(--primary-rgb), .7), inset 0 -3px 0 rgba(0, 0, 0, .2), inset 0 2px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(var(--primary-rgb), .9), inset 0 -3px 0 rgba(0, 0, 0, .2), inset 0 2px 0 rgba(255, 255, 255, .25); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(var(--primary-rgb), .6); }
.btn-mode {
    color: #fff; background: var(--mc); text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    box-shadow: 0 10px 30px -10px rgba(var(--mc-rgb), .8), inset 0 -3px 0 rgba(0, 0, 0, .2);
}
.btn-disabled { background: rgba(255, 255, 255, .06); color: var(--muted); cursor: not-allowed; border: 1px solid var(--border); }
.btn-disabled:hover { transform: none; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .4rem; font-size: .68rem; font-weight: 800; letter-spacing: .08em;
    text-transform: uppercase; padding: .28rem .6rem; border-radius: 6px; border: 1px solid currentColor; white-space: nowrap;
}
.badge-open { color: var(--ok); background: rgba(52, 211, 153, .1); }
.badge-open::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 1.6s infinite; }
.badge-closed { color: var(--bad); background: rgba(248, 113, 113, .08); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .25), 0 0 12px var(--ok); animation: pulse 1.8s infinite; flex-shrink: 0; }
@keyframes pulse { 50% { opacity: .55; } }
@keyframes float { 50% { transform: translateY(-14px); } }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.nav.is-scrolled { background: rgba(13, 6, 24, .78); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-color: var(--border); }
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 100%; }
.logo { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.logo img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(var(--primary-rgb), .5)); transition: transform .4s var(--ease); }
.logo:hover img { transform: rotate(-12deg) scale(1.1); }
.logo span { font-size: .9rem; display: flex; align-items: baseline; gap: .5rem; }
.logo small { font-family: 'Inter', sans-serif; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--light-primary); }
.nav-top { display: flex; align-items: center; gap: .25rem; margin-right: auto; }
.nav-link { display: inline-flex; align-items: center; gap: .3rem; padding: .55rem .9rem; border-radius: 10px; font-weight: 600; font-size: .94rem; color: var(--text-2); transition: color .2s, background .2s; }
.nav-link:hover { color: #fff; background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: .7rem; margin-left: auto; }
.lang-switch { display: flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.lang-switch a { padding: .35rem .6rem; border-radius: 7px; font-size: .78rem; font-weight: 800; letter-spacing: .05em; color: var(--muted); transition: .2s; }
.lang-switch a:hover { color: #fff; }
.lang-switch a.is-active { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; }
.burger { display: none; flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: .3s var(--ease); }
.burger span:nth-child(1) { top: 15px; } .burger span:nth-child(2) { top: 21px; } .burger span:nth-child(3) { top: 27px; }
.nav-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Sidebar (mobile menu) ---------- */
.sidebar-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(6, 2, 12, .6); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.sidebar {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 91; width: min(360px, 88vw);
    display: flex; flex-direction: column; gap: 1.2rem; padding: 1.1rem 1.1rem 1.4rem;
    background: #120822; border-left: 1px solid var(--border-2); box-shadow: -30px 0 60px -20px rgba(0, 0, 0, .8);
    overflow-y: auto; transform: translateX(105%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s;
}
.nav-open { overflow: hidden; }
.nav-open .sidebar { transform: none; visibility: visible; }
.nav-open .sidebar-backdrop { opacity: 1; visibility: visible; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.sidebar-close { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; }
.sidebar-links { display: flex; flex-direction: column; gap: .3rem; }
.sidebar-link { display: flex; align-items: center; gap: .9rem; padding: .75rem .8rem; border-radius: 12px; font-weight: 700; color: var(--text-2); transition: background .2s, color .2s; }
.sidebar-link > span:nth-child(2) { flex: 1; }
.sidebar-link:hover { background: var(--surface-2); color: #fff; }
.sidebar-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--light-primary); }
.sidebar-icon svg { width: 18px; height: 18px; }
.sidebar-arrow { width: 15px; height: 15px; color: var(--muted); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: .9rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.sidebar-foot .lang-switch { align-self: flex-start; }

/* ---------- Sections ---------- */
.section { padding: 6rem 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(var(--primary-rgb), .035) 15%, rgba(var(--primary-rgb), .035) 85%, transparent); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3.5rem; }
.section-head p { color: var(--muted); margin-top: 1rem; font-size: 1.08rem; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; padding: 3rem 0 7rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.orb-1 { width: 520px; height: 520px; background: rgba(var(--primary-rgb), .55); top: -160px; left: -120px; animation: orb 14s ease-in-out infinite alternate; }
.orb-2 { width: 460px; height: 460px; background: rgba(var(--secondary-rgb), .38); bottom: -160px; right: -100px; animation: orb 18s ease-in-out infinite alternate-reverse; }
@keyframes orb { to { transform: translate(120px, 80px) scale(1.15); } }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.hero-chip {
    display: inline-flex; align-items: center; gap: .6rem; padding: .45rem 1rem .45rem .8rem; border-radius: 99px;
    background: var(--surface-2); border: 1px solid var(--border-2); font-size: .9rem; color: var(--text-2); margin-bottom: 1.6rem;
}
.hero-chip b { color: #fff; }
.hero-title { font-size: clamp(1.9rem, 5.2vw, 3.9rem); margin-bottom: 1.4rem; }
.hero-sub { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--text-2); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; align-items: center; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 420px; }
.hero-logo {
    width: clamp(220px, 30vw, 340px); height: auto; position: relative; z-index: 2;
    filter: drop-shadow(0 30px 50px rgba(var(--primary-rgb), .45)) drop-shadow(0 6px 14px rgba(0, 0, 0, .6));
    animation: float 6s ease-in-out infinite;
}
.hero-ring { position: absolute; border-radius: 50%; border: 1px dashed rgba(var(--primary-rgb), .35); animation: spin 40s linear infinite; }
.hero-ring-1 { width: 380px; height: 380px; }
.hero-ring-2 { width: 480px; height: 480px; border-style: solid; border-color: rgba(var(--secondary-rgb), .14); animation-duration: 70s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-float {
    position: absolute; z-index: 3; display: flex; align-items: center; gap: .55rem; padding: .6rem .9rem; border-radius: 12px;
    background: rgba(22, 10, 40, .85); border: 1px solid var(--border-2); backdrop-filter: blur(10px); font-size: .85rem; font-weight: 700;
    box-shadow: var(--shadow); animation: float 7s ease-in-out infinite;
}
.hero-float svg { width: 18px; height: 18px; color: var(--light-primary); }
.hero-float-1 { top: 14%; left: 2%; }
.hero-float-2 { bottom: 18%; right: 0; animation-delay: -2.5s; }
.hero-float-3 { bottom: 4%; left: 12%; animation-delay: -4.5s; }

/* ---------- Stats bar ---------- */
.stats-bar { position: relative; z-index: 3; margin-top: -4rem; }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: rgba(22, 10, 40, .8); backdrop-filter: blur(16px); border: 1px solid var(--border-2); border-radius: 20px; box-shadow: var(--shadow);
}
.stat { padding: 1.8rem 1rem; text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-icon { display: block; margin: 0 auto .6rem; width: 20px; height: 20px; color: var(--light-primary); opacity: .85; }
.stat b { display: block; font-size: 1.5rem; line-height: 1.6; background: linear-gradient(135deg, #fff, var(--light-primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: .88rem; font-weight: 600; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.step { position: relative; padding: 1.7rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .35s var(--ease), border-color .3s; }
.step:hover { transform: translateY(-6px); border-color: rgba(var(--primary-rgb), .5); }
.step-num {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 1.1rem;
    font-family: var(--font-pixel); font-size: .8rem; color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 24px -8px rgba(var(--primary-rgb), .8);
}
.step-ico { position: absolute; top: 1.6rem; right: 1.6rem; width: 26px; height: 26px; color: var(--light-primary); opacity: .55; }
.step p { color: var(--muted); margin-top: .4rem; font-size: .94rem; }
.step:not(:last-child)::after {
    content: ''; position: absolute; top: 2.95rem; right: -1.2rem; width: 1.2rem; height: 2px;
    background: linear-gradient(90deg, rgba(var(--primary-rgb), .6), transparent);
}

/* ---------- Position cards ---------- */
.positions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 1.4rem; }
.pos-card {
    position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; padding: 1.7rem; border-radius: 22px;
    background: linear-gradient(160deg, rgba(var(--mc-rgb), .13), rgba(var(--primary-rgb), .03) 55%);
    border: 1px solid rgba(var(--mc-rgb), .22);
    transition: transform .4s var(--ease), border-color .3s, box-shadow .4s;
}
.pos-card:hover { transform: translateY(-6px); border-color: rgba(var(--mc-rgb), .6); box-shadow: 0 30px 60px -20px rgba(var(--mc-rgb), .45); }
.glow-card::before {
    content: ''; position: absolute; z-index: -1; width: 340px; height: 340px; border-radius: 50%; left: var(--mx, 50%); top: var(--my, 0%);
    background: radial-gradient(circle, rgba(var(--mc-rgb, var(--primary-rgb)), .3), transparent 65%); transform: translate(-50%, -50%);
    opacity: 0; transition: opacity .3s; pointer-events: none;
}
.glow-card:hover::before { opacity: 1; }
.pos-card.is-closed { opacity: .55; filter: saturate(.4); }
.pos-card.is-closed:hover { transform: none; box-shadow: none; border-color: rgba(var(--mc-rgb), .22); }
.pos-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; margin-bottom: 1.3rem; }
.pos-icon {
    width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; flex-shrink: 0;
    background: rgba(var(--mc-rgb), .16); border: 1px solid rgba(var(--mc-rgb), .35); color: var(--mc);
    box-shadow: 0 10px 30px -12px rgba(var(--mc-rgb), .9);
}
.pos-icon svg { width: 26px; height: 26px; }
.pos-card h3 { font-size: 1.25rem; }
.pos-desc { color: var(--muted); font-size: .94rem; margin: .5rem 0 1.1rem; }
.pos-reqs { list-style: none; margin: 0 0 1.3rem; padding: 0; display: grid; gap: .45rem; }
.pos-reqs li { display: flex; gap: .55rem; font-size: .88rem; color: var(--text-2); line-height: 1.5; }
.pos-reqs svg { width: 16px; height: 16px; color: var(--mc); flex-shrink: 0; margin-top: .15rem; }
.pos-more { font-size: .8rem; color: var(--muted); font-style: italic; }
.pos-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.1rem; border-top: 1px solid rgba(var(--mc-rgb), .18); }
.pos-count { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.pos-count svg { width: 14px; height: 14px; }
.empty { text-align: center; padding: 4rem 1rem; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--border-2); color: var(--muted); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 1rem; color: var(--light-primary); }

/* ---------- Features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature { padding: 1.8rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .35s var(--ease), border-color .3s, background .3s; }
.feature:hover { transform: translateY(-6px); border-color: rgba(var(--primary-rgb), .5); background: rgba(var(--primary-rgb), .08); }
.feature-icon {
    width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 1.1rem; border-radius: 14px;
    background: rgba(var(--primary-rgb), .14); border: 1px solid rgba(var(--primary-rgb), .3); color: var(--light-primary);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature p { color: var(--muted); margin-top: .4rem; }

/* ---------- CTA ---------- */
.cta {
    position: relative; overflow: hidden; text-align: center; padding: 5rem 2rem; border-radius: 32px;
    background: radial-gradient(ellipse at 50% 120%, rgba(var(--primary-rgb), .45), transparent 60%), linear-gradient(180deg, rgba(var(--primary-rgb), .07), rgba(var(--primary-rgb), .02));
    border: 1px solid var(--border-2);
}
.cta p { color: var(--text-2); margin: 1rem auto 2rem; max-width: 540px; font-size: 1.08rem; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }
.cta-deco { position: absolute; width: 70px; opacity: .35; animation: float 6s ease-in-out infinite; pointer-events: none; }
.cta-deco-1 { top: 14%; left: 6%; }
.cta-deco-2 { bottom: 12%; right: 7%; width: 54px; animation-delay: -3s; }

/* ---------- IP box ---------- */
.ip-box {
    display: inline-flex; align-items: center; gap: .9rem; padding: .5rem .55rem .5rem 1rem; border-radius: 14px;
    background: rgba(0, 0, 0, .4); border: 1px solid var(--border-2); transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.ip-box:hover, .ip-box.is-copied { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 10px 40px -10px rgba(var(--primary-rgb), .6); }
.ip-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.ip-text { font-family: ui-monospace, monospace; font-weight: 800; }
.ip-copy { display: grid; place-items: center; padding: .5rem .7rem; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary)); }

/* ---------- Footer ---------- */
.footer { margin-top: 2rem; padding: 4rem 0 2rem; background: #09040f; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.footer-brand .logo img { width: 56px; height: 56px; }
.footer-brand p { color: var(--muted); margin: 1rem 0 1.4rem; max-width: 380px; font-size: .95rem; }
.footer h4 { margin-bottom: 1rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.footer-grid > div:not(.footer-brand) a { display: block; padding: .3rem 0; color: var(--text-2); transition: color .2s, transform .2s; }
.footer-grid > div:not(.footer-brand) a:hover { color: var(--light-primary); transform: translateX(4px); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; z-index: 100; left: 50%; bottom: 2rem; transform: translate(-50%, calc(100% + 3rem)); opacity: 0; visibility: hidden;
    padding: .9rem 1.4rem; border-radius: 14px; font-weight: 700; background: rgba(22, 10, 40, .95); backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--primary-rgb), .5); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .8); transition: transform .45s var(--ease), opacity .3s, visibility .45s;
}
.toast.is-show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ============================================================
   APPLY PAGE
   ============================================================ */
.apply { padding: 2.5rem 0 5rem; }
.back-link { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-weight: 600; font-size: .92rem; margin-bottom: 1.6rem; transition: color .2s, transform .2s; }
.back-link:hover { color: #fff; transform: translateX(-3px); }
.back-link svg { width: 16px; height: 16px; }
.card { background: rgba(22, 10, 40, .78); border: 1px solid var(--border-2); border-radius: 20px; backdrop-filter: blur(14px); box-shadow: var(--shadow); }

.pos-banner { display: flex; align-items: center; gap: 1.3rem; padding: 1.7rem; margin-bottom: 1.4rem; position: relative; overflow: hidden; border-color: rgba(var(--accent-rgb), .4); }
.pos-banner::after { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--accent), var(--secondary)); }
.pos-banner .pos-icon { --mc: var(--accent); --mc-rgb: var(--accent-rgb); width: 64px; height: 64px; }
.pos-banner small { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .35rem; }
.pos-banner h1 { font-size: clamp(1.05rem, 3vw, 1.5rem); line-height: 1.5; }
.pos-banner p { color: var(--muted); font-size: .94rem; margin-top: .35rem; }

.reqs { padding: 1.3rem 1.6rem; margin-bottom: 1.4rem; }
.reqs h4 { display: flex; align-items: center; gap: .5rem; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.reqs h4 svg { width: 15px; height: 15px; }
.reqs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: .5rem 1.4rem; }
.reqs li { display: flex; gap: .55rem; font-size: .92rem; color: var(--text-2); }
.reqs li svg { width: 17px; height: 17px; color: var(--ok); flex-shrink: 0; margin-top: .15rem; }

.errors { padding: 1.1rem 1.4rem; margin-bottom: 1.4rem; border-radius: 16px; background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .3); color: #fecaca; }
.errors b { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.errors b svg { width: 17px; height: 17px; }
.errors ul { margin: 0; padding-left: 1.2rem; font-size: .92rem; }

/* Step indicator */
.steps-bar { display: flex; align-items: center; padding: 1.1rem 1.4rem; margin-bottom: 1.4rem; }
.sb-item { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.sb-num {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
    font-family: var(--font-pixel); font-size: .7rem; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--muted); transition: .3s var(--ease);
}
.sb-item.is-active .sb-num { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: 0 8px 22px -8px rgba(var(--primary-rgb), .9); }
.sb-item.is-done .sb-num { color: var(--ok); border-color: rgba(52, 211, 153, .5); background: rgba(52, 211, 153, .1); }
.sb-text { min-width: 0; }
.sb-text small { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sb-text b { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.sb-item.is-active .sb-text b { color: #fff; }
.sb-line { flex: 1; height: 2px; margin: 0 1rem; min-width: 18px; background: var(--border); border-radius: 2px; overflow: hidden; }
.sb-line::after { content: ''; display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width .45s var(--ease); }
.sb-line.is-filled::after { width: 100%; }

/* Form */
.form-step { display: none; }
.form-step.is-active { display: block; animation: fade-up .45s var(--ease); }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }
.fs-head { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 1.7rem; border-bottom: 1px solid var(--border); }
.fs-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: rgba(var(--accent-rgb), .14); border: 1px solid rgba(var(--accent-rgb), .3); color: var(--accent); }
.fs-icon svg { width: 22px; height: 22px; }
.fs-head h2 { font-size: .95rem; }
.fs-head p { color: var(--muted); font-size: .9rem; margin-top: .3rem; }
.fs-body { padding: 1.7rem; display: grid; gap: 1.2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field label { font-size: .88rem; font-weight: 700; color: var(--text-2); }
.field .req { color: var(--secondary); margin-left: .15rem; }
.field .opt { color: var(--muted); font-weight: 500; }
.field input, .field textarea {
    width: 100%; padding: .85rem 1rem; border-radius: 12px; font: inherit; font-size: .96rem; color: var(--text);
    background: rgba(0, 0, 0, .35); border: 1px solid var(--border-2); transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #6f5f91; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: rgba(0, 0, 0, .45); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(248, 113, 113, .15); }
.field-hint { font-size: .8rem; color: var(--muted); }
.char-count { align-self: flex-end; font-size: .78rem; font-weight: 700; color: var(--bad); font-variant-numeric: tabular-nums; }
.char-count.is-ok { color: var(--ok); }
.fs-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.2rem 1.7rem; border-top: 1px solid var(--border); background: rgba(0, 0, 0, .15); border-radius: 0 0 20px 20px; }
.fs-nav-end { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.step-count { font-size: .82rem; color: var(--muted); }
/* Turnstile on its own row, above the submit button */
.fs-nav-end .cf-turnstile { order: -1; flex-basis: 100%; display: flex; justify-content: flex-end; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* Success */
.success { text-align: center; padding: 4rem 2rem; }
.success-icon {
    width: 88px; height: 88px; border-radius: 24px; margin: 0 auto 1.6rem; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: 0 20px 50px -14px rgba(var(--primary-rgb), .9);
    animation: pop .55s cubic-bezier(.36, 1.56, .64, 1) both;
}
.success-icon svg { width: 42px; height: 42px; }
@keyframes pop { from { transform: scale(0) rotate(-12deg); opacity: 0; } }
.success h1 { font-size: clamp(1.1rem, 3.5vw, 1.7rem); line-height: 1.5; margin-bottom: 1rem; }
.success p { color: var(--text-2); max-width: 480px; margin: 0 auto 2rem; }
.success p strong { color: #fff; }
.success-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
    .nav-top { display: none; }
    .burger { display: block; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .step:nth-child(2)::after { display: none; }
}
@media (max-width: 900px) {
    .hero { min-height: auto; padding: 2.5rem 0 7rem; }
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-sub { margin-inline: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { min-height: 320px; order: -1; }
    .hero-ring-1 { width: 280px; height: 280px; }
    .hero-ring-2 { width: 350px; height: 350px; }
    .hero-logo { width: 200px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(3) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .section { padding: 4.5rem 0; }
    .nav-cta { display: none; }
    .nav .lang-switch { display: none; }
    .logo small { display: none; }
    .steps { grid-template-columns: 1fr; }
    .step::after { display: none; }
    .hero-float { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .steps-bar { padding: 1rem; }
    .sb-text { display: none; }
    .sb-item.is-active .sb-text { display: block; }
    .sb-line { margin: 0 .6rem; }
    .fs-head, .fs-body, .fs-nav { padding-left: 1.2rem; padding-right: 1.2rem; }
    .fs-nav .btn { flex: 1; }
    .fs-nav-end { width: 100%; }
    .pos-banner { padding: 1.3rem; gap: 1rem; }
    .pos-banner .pos-icon { width: 52px; height: 52px; }
    .cta { padding: 3.5rem 1.2rem; }
    .cta-deco { display: none; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}
