/* ============================================================
   GSSI 2027 — Registration page
   ============================================================ */
:root {
    --primary:      #001689;
    --primary-dark: #020b2e;
    --accent:       #b8892b;
    --text:         #1f2937;
    --secondary:    #6b7280;
    --border:       #e3e6ee;
    --light:        #f8f9fc;
    --body-bg:      #eef1f6;
    --white:        #ffffff;
    --danger:       #dc2626;
    --success:      #16a34a;
    --radius:       10px;
    --transition:   .15s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--body-bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ---------- Animations (entrance only — no hover transforms) ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Page preloader ---------- */
#preloader {
    position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
    background: var(--body-bg); transition: opacity .35s ease, visibility .35s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.spinner {
    width: 46px; height: 46px; border-radius: 50%;
    border: 4px solid rgba(0,22,137,.15); border-top-color: var(--primary);
    animation: spin .7s linear infinite;
}

.anim-fade   { animation: fadeIn .6s ease both; }
.anim-up     { animation: fadeUp .55s cubic-bezier(.22,.61,.36,1) both; }

/* Scroll-reveal: hidden until observed, then fades up */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: none; }

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

img { max-width: 100%; display: block; }
a { color: var(--primary); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Top bar ---------- */
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.topbar img { height: 34px; width: auto; }
.topbar-right { display: flex; align-items: center; gap: 1.25rem; }
.topbar .help { font-size: .85rem; color: var(--secondary); }
.topbar .help a { font-weight: 600; text-decoration: none; }
.lang-select { display: flex; align-items: center; gap: .4rem; color: var(--secondary); }
.lang-select i { font-size: .85rem; }
.lang-select select {
    appearance: none; border: 1px solid var(--border); border-radius: 8px;
    background: var(--white); color: var(--text); font-family: inherit; font-weight: 600;
    font-size: .85rem; padding: .35rem 1.6rem .35rem .6rem; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .55rem center;
}
.lang-select select:focus { outline: none; border-color: var(--primary); }

/* ---------- Header (official banner) ---------- */
.page-kicker { color: var(--accent); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; margin-bottom: .35rem; }

/* ---------- Intro line ---------- */
.intro {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
}
.intro .container { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: center; align-items: center; }
.intro .item { display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 500; font-size: .95rem; }
.intro .item i { color: var(--accent); }
.intro .sep { width: 5px; height: 5px; border-radius: 50%; background: var(--border); }

/* ---------- Page layout ---------- */
.page { padding: 2.5rem 0 3.5rem; }
.page-head { text-align: center; margin-bottom: 2.25rem; }
.page-title { font-size: 1.75rem; color: var(--primary); font-weight: 800; margin-bottom: .4rem; }
.page-sub { color: var(--secondary); font-size: 1rem; margin-bottom: 1.75rem; }

.layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.75rem; align-items: start; }

/* ---------- Summary card ---------- */
.summary { position: sticky; top: 1.25rem; }
.summary-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.summary-card h3 { background: var(--primary); color: #fff; font-size: 1rem; font-weight: 700; padding: 1rem 1.25rem; }
.summary-body { padding: 1.25rem 1.25rem 1.4rem; }
.sum-event { font-weight: 800; color: var(--primary); font-size: 1.05rem; margin-bottom: .9rem; }
.sum-facts { list-style: none; }
.sum-facts li { display: flex; align-items: flex-start; gap: .55rem; color: var(--text); font-size: .9rem; padding: .3rem 0; }
.sum-facts li i { color: var(--accent); margin-top: .2rem; width: 14px; text-align: center; }
.sum-divider { height: 1px; background: var(--border); margin: 1.1rem 0; }
.sum-row { display: flex; justify-content: space-between; gap: .75rem; font-size: .9rem; margin-bottom: 1rem; }
.sum-label { color: var(--secondary); }
.sum-ticket { font-weight: 600; color: var(--text); text-align: right; }
.sum-total { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding-top: 1rem; border-top: 2px solid var(--border); }
.sum-total > span:first-child { font-weight: 700; color: var(--text); }
.sum-amount { font-size: 1.35rem; font-weight: 800; color: var(--primary); }
.sum-amount small { font-size: .8rem; font-weight: 600; color: var(--secondary); }
.sum-secure { margin-top: 1.1rem; font-size: .78rem; color: var(--secondary); line-height: 1.5; }
.sum-secure i { color: var(--success); margin-right: .3rem; }

/* ---------- Step indicator ---------- */
.steps { display: flex; justify-content: center; align-items: flex-start; max-width: 460px; margin: 0 auto; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; text-align: center; }
/* connector line: runs from the previous circle's centre to this one's, behind the numbers */
.step::before {
    content: ""; position: absolute; top: 17px; left: calc(-50% + 18px); width: calc(100% - 36px);
    height: 2px; background: var(--border); z-index: 0;
}
.step:first-child::before { display: none; }
.step.active ~ .step::before { background: var(--border); }
.step-number {
    width: 36px; height: 36px; border-radius: 50%; background: #fff;
    border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--secondary); position: relative; z-index: 1; font-size: .95rem;
}
.step.active .step-number { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-label { margin-top: .55rem; font-size: .85rem; font-weight: 600; color: var(--secondary); }
.step.active .step-label { color: var(--primary); }

/* ---------- Form ---------- */
.form-wrap { padding-bottom: 3.5rem; }
.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.form-body { padding: 2rem 2.25rem; }

.form-section { padding: 1.75rem 0; border-bottom: 1px solid var(--border); }
.form-section:first-child { padding-top: 0; }
.form-section:last-of-type { border-bottom: none; }
.section-title {
    display: flex; align-items: flex-start; gap: .7rem; margin-bottom: 1.4rem;
}
.section-title .n {
    width: 26px; height: 26px; border-radius: 7px; background: var(--primary); color: #fff;
    font-size: .82rem; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.section-title .st-main { font-size: 1.05rem; font-weight: 700; color: var(--primary); line-height: 1.3; }
.section-title .st-sub { font-size: .85rem; color: var(--secondary); font-weight: 400; margin-top: .1rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.form-group { margin-bottom: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .4rem; color: var(--text); }
.form-group label .req { color: var(--danger); margin-left: 2px; }

.form-control {
    width: 100%; padding: .72rem .85rem; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: .95rem; font-family: inherit; color: var(--text); background: var(--white);
    transition: border-color var(--transition);
}
.form-control::placeholder { color: #aab1c0; }
.form-control:focus { outline: none; border-color: var(--primary); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.25rem; }
textarea.form-control { resize: vertical; min-height: 80px; }
.phone-row { display: grid; grid-template-columns: 110px 1fr; gap: .6rem; }

/* checkbox lines */
.check-line { display: flex; align-items: flex-start; gap: .6rem; }
.check-line input[type=checkbox] { margin-top: .15rem; width: 17px; height: 17px; accent-color: var(--primary); flex-shrink: 0; }
.check-line label { font-weight: 500; font-size: .92rem; color: var(--text); }

#payerFields { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px dashed var(--border); }
#payerFields.hidden { display: none; }

.hint { font-size: .82rem; color: var(--secondary); margin-top: .35rem; }

/* price summary */
.price-box {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
    background: var(--light); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1rem 1.25rem; margin-top: 1.25rem;
}
.price-box .label { font-weight: 600; color: var(--secondary); font-size: .9rem; }
.price-box .amount { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.price-box .amount small { font-size: .85rem; font-weight: 600; color: var(--secondary); }

/* submit */
.actions { padding-top: 1.5rem; }
.btn {
    display: inline-block; width: 100%; text-align: center; padding: .9rem 1.5rem;
    background: var(--primary); color: #fff; border: none; border-radius: var(--radius);
    font-size: 1rem; font-weight: 700; cursor: pointer; font-family: inherit;
    transition: background var(--transition); position: relative;
}
.btn:hover { background: #001270; }
.btn.loading { color: transparent; pointer-events: none; }
.btn.loading::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px;
    margin: -10px 0 0 -10px; border: 3px solid rgba(255,255,255,.45); border-top-color: #fff;
    border-radius: 50%; animation: spin .7s linear infinite;
}
.secure-note { text-align: center; color: var(--secondary); font-size: .82rem; margin-top: .9rem; }
.secure-note i { color: var(--success); }

/* errors */
.form-error {
    display: flex; align-items: center; gap: .5rem;
    background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
    padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: .9rem; font-weight: 500;
}
.field-error { color: var(--danger); font-size: .8rem; margin-top: .3rem; }
.form-control.invalid { border-color: var(--danger); }

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed; right: 1.5rem; bottom: 1.5rem; width: 46px; height: 46px;
    border-radius: 50%; border: 1px solid var(--primary); background: var(--primary); color: #fff;
    font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity var(--transition), background var(--transition);
    z-index: 60;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: #001270; }

/* ---------- Footer ---------- */
.footer { background: var(--primary-dark); color: #aab3d8; padding: 1.75rem 0; text-align: center; font-size: .85rem; }
.footer a { color: #cdd5f0; text-decoration: none; }
.footer a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .summary { position: static; order: -1; }   /* show the summary above the form on mobile */
}
@media (max-width: 640px) {
    .form-body { padding: 1.5rem 1.25rem; }
    .grid-2, .phone-row { grid-template-columns: 1fr; }
    .step { padding: 0 1.1rem; }
    .topbar .help { display: none; }
    .page-title { font-size: 1.45rem; }
}
