/* Bangladesh registration page (base-bd.html + form/new/bd.html). */

body { margin: 0; background: #ffffff; }

.bd-reg {
    --brand: #ffc600;
    --brand-light: #ffdc55;
    --brand-deep: #d8a900;
    --brand-soft: #fff3bd;
    --charcoal: #1d1c18;
    --card: #ffffff;
    --ink: #26241d;
    --muted: #706852;
    --line: #deded7;
    --terracotta: #b3492d;
    --amber: #9a6b12;
    --radius: 10px;
    --body: "Schibsted Grotesk", ui-sans-serif, sans-serif;
    --display: "Fraunces", Georgia, serif;

    font-family: var(--body);
    color: var(--ink);
    line-height: 1.5;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}
.bd-reg *, .bd-reg *::before, .bd-reg *::after { box-sizing: border-box; }

.bd-reg .layout { display: grid; grid-template-columns: minmax(320px, 42%) 1fr; min-height: 100vh; }

/* ---------- brand panel ---------- */
.bd-reg .brand {
    position: sticky; top: 0; height: 100vh;
    background:
        radial-gradient(120% 90% at 85% -10%, rgba(255, 239, 168, .72) 0%, transparent 55%),
        radial-gradient(90% 70% at -15% 110%, rgba(216, 169, 0, .42) 0%, transparent 60%),
        linear-gradient(160deg, var(--brand-light) 0%, var(--brand) 62%, var(--brand-deep) 100%);
    color: var(--charcoal);
    padding: clamp(32px, 5vw, 64px);
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
}
.bd-reg .brand::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bd-reg .brand > * { position: relative; z-index: 1; }
.bd-reg .brand-lockup { display: flex; align-items: center; gap: 14px; }
.bd-reg .brand-icon { display: block; width: clamp(44px, 12vw, 64px); height: auto; }
.bd-reg .brand-logo { display: block; width: min(249px, 78%); height: auto; }
.bd-reg .brand h2 {
    font-family: var(--display);
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    font-weight: 500; line-height: 1.12;
    margin: 18px 0 0; max-width: 15ch;
    color: var(--charcoal);
    text-wrap: balance;
}
.bd-reg .brand .sub { margin: 14px 0 0; color: #514a37; max-width: 34ch; font-size: .98rem; }
.bd-reg .brand .foot { margin: 0; font-size: .8rem; color: #5f563e; }
.bd-reg .brand .foot strong { color: var(--charcoal); font-weight: 700; }

/* ---------- form side ---------- */
.bd-reg .content { padding: clamp(24px, 4vw, 56px) clamp(20px, 5vw, 72px); max-width: 860px; }

.bd-reg .form-error {
    display: none;
    background: #f9e9e4; border: 1px solid #e2b4a5; color: var(--terracotta);
    border-radius: var(--radius); padding: 12px 16px; margin-bottom: 24px; font-size: .92rem;
}
.bd-reg .form-error.show { display: block; }
.bd-reg .form-error ul { margin: 0; padding-left: 18px; }

.bd-reg fieldset { border: 0; padding: 0; margin: 0 0 clamp(28px, 4vw, 44px); min-width: 0; }
.bd-reg .sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.bd-reg .sec-head .no {
    font-family: var(--display); font-style: italic; font-size: 1.35rem; color: var(--brand-deep);
}
.bd-reg .sec-head h3 {
    margin: 0;
    font-family: var(--display); font-weight: 500; font-size: 1.3rem; color: var(--charcoal);
    letter-spacing: .01em;
}
.bd-reg .sec-head::after { content: ""; flex: 1; height: 1px; background: var(--line); transform: translateY(-4px); }

.bd-reg .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.bd-reg .grid .full { grid-column: 1 / -1; }

.bd-reg label {
    display: block; font-size: .74rem; font-weight: 700; letter-spacing: .09em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.bd-reg label .req { color: var(--terracotta); }

.bd-reg input:not([type="checkbox"]), .bd-reg select {
    width: 100%; height: auto; font-family: var(--body); font-size: 1rem; color: var(--ink);
    background-color: var(--card);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
    appearance: none;
}
.bd-reg select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7a6e' stroke-width='1.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 32px;
}
.bd-reg input:hover, .bd-reg select:hover { border-color: #b9b5a4; }
.bd-reg input:focus, .bd-reg select:focus {
    outline: none; border-color: var(--brand-deep);
    box-shadow: 0 0 0 3.5px rgba(255, 198, 0, .25);
}
.bd-reg input[readonly] { color: var(--muted); background: #f1efe7; }
.bd-reg input:disabled, .bd-reg select:disabled { color: var(--muted); background-color: #f1f1ee; cursor: not-allowed; opacity: .85; }
.bd-reg input::placeholder { color: #a9b3aa; }
.bd-reg [aria-invalid="true"]:not([type="checkbox"]) { border-color: var(--terracotta); }

.bd-reg .hint { display: block; font-size: .78rem; color: var(--muted); margin-top: 5px; }
.bd-reg .err { display: none; color: var(--terracotta); font-size: .82rem; margin-top: 5px; }
.bd-reg .err.show { display: block; }

/* sponsor verification chip */
.bd-reg .chip { display: none; margin-top: 10px; align-items: center; gap: 8px;
    font-size: .88rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; width: fit-content; }
.bd-reg .chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.bd-reg .chip.bad { display: inline-flex; background: #f9e9e4; color: var(--terracotta); }
.bd-reg .chip.bad::before { background: var(--terracotta); }
.bd-reg .chip.good { display: inline-flex; background: #e7f0e5; color: #3f6b39; }
.bd-reg .chip.good::before { background: #4f8446; }
.bd-reg .chip.warn { display: inline-flex; background: #f6ecd4; color: var(--amber); }
.bd-reg .chip.warn::before { background: var(--amber); }
.bd-reg .chip.busy { display: inline-flex; background: #edece4; color: var(--muted); }
.bd-reg .chip.busy::before { background: var(--muted); animation: bd-pulse 1s ease-in-out infinite; }
@keyframes bd-pulse { 50% { opacity: .3; } }

.bd-reg .sponsor-dialog-backdrop[hidden] { display: none; }
.bd-reg .sponsor-dialog-backdrop {
    position: fixed; inset: 0; z-index: 1050; display: grid; place-items: center;
    padding: 20px; background: rgba(29, 28, 24, .48); backdrop-filter: blur(5px);
}
.bd-reg .sponsor-dialog {
    width: min(100%, 440px); padding: 30px; border: 1px solid var(--line);
    border-top: 5px solid var(--brand); border-radius: var(--radius);
    background: var(--card); box-shadow: 0 24px 70px rgba(29, 28, 24, .26);
}
.bd-reg .sponsor-dialog h3 {
    margin: 0; color: var(--charcoal); font-family: var(--display); font-size: 1.55rem; font-weight: 600;
}
.bd-reg .sponsor-dialog p { margin: 12px 0 0; color: var(--ink); line-height: 1.55; }
.bd-reg .sponsor-dialog p strong { color: var(--brand-deep); font-weight: 700; }
.bd-reg .sponsor-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.bd-reg .dialog-button {
    min-width: 96px; padding: 10px 18px; border-radius: var(--radius);
    font-family: var(--body); font-size: .9rem; font-weight: 700; cursor: pointer;
}
.bd-reg .dialog-cancel { color: var(--ink); background: var(--card); border: 1px solid var(--line); }
.bd-reg .dialog-ok { color: var(--charcoal); background: var(--brand); border: 1px solid var(--brand-deep); }
.bd-reg .dialog-button:focus-visible { outline: 3px solid rgba(255, 198, 0, .45); outline-offset: 3px; }

.bd-reg button[type="submit"] {
    width: 100%; margin-top: 18px;
    font-family: var(--body); font-size: 1.02rem; font-weight: 700; letter-spacing: .04em;
    color: var(--charcoal); background: linear-gradient(170deg, var(--brand-light), var(--brand));
    border: 1px solid var(--brand-deep); border-radius: var(--radius); padding: 16px;
    cursor: pointer;
    box-shadow: 0 10px 24px -12px rgba(130, 99, 0, .55);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.bd-reg button[type="submit"]:hover { filter: brightness(1.12); transform: translateY(-1px);
    box-shadow: 0 14px 28px -12px rgba(130, 99, 0, .62); }
.bd-reg button[type="submit"]:active { transform: translateY(0); }
.bd-reg button[type="submit"]:disabled { filter: grayscale(.5) brightness(1.1); cursor: wait; transform: none; }

.bd-reg .agreements { display: grid; gap: 12px; margin-top: 22px; }
.bd-reg .check-row {
    display: flex; align-items: flex-start; gap: 10px; margin: 0;
    color: var(--ink); font-size: .86rem; font-weight: 500; letter-spacing: 0;
    line-height: 1.45; text-transform: none; cursor: pointer;
}
.bd-reg .check-row input[type="checkbox"] {
    flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0;
    accent-color: var(--brand-deep);
}
.bd-reg .check-row input[aria-invalid="true"] { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.bd-reg .agree-toggle {
    display: inline; margin: 0; padding: 0; vertical-align: baseline;
    background: none; border: 0; cursor: pointer;
    font-family: inherit; font-size: inherit; font-weight: 600; line-height: inherit;
    color: var(--brand-deep); text-decoration: underline; text-underline-offset: 2px;
    white-space: nowrap;
}
.bd-reg .agree-toggle:hover { color: var(--amber); }
.bd-reg .agree-toggle:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; border-radius: 3px; }

/* ---------- success ---------- */
.bd-reg .success {
    text-align: center; padding: clamp(40px, 8vw, 90px) 20px;
    animation: bd-rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
.bd-reg .success:focus { outline: none; }
.bd-reg .success .leafmark { font-size: 2rem; color: var(--brand-deep); }
.bd-reg .success h2 {
    font-family: var(--display); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.4rem);
    color: var(--charcoal); margin: 10px 0 0;
}
.bd-reg .success p { color: var(--muted); margin: 10px 0 0; }
.bd-reg .success .fbo-label {
    font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    margin-top: 34px; color: var(--muted);
}
.bd-reg .success .fbo {
    font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600;
    color: var(--brand-deep); letter-spacing: .06em; margin-top: 6px;
}
.bd-reg .success .note {
    display: block; max-width: 44ch; margin: 30px auto 0;
    font-size: .95rem; line-height: 1.55; text-align: center;
    background: var(--brand-soft); color: #5d4900; border-radius: 14px; padding: 16px 22px;
}
.bd-reg .success .note strong { color: var(--charcoal); overflow-wrap: anywhere; }
.bd-reg .success-action {
    display: inline-block; margin-top: 34px;
    font-family: var(--body); font-size: .96rem; font-weight: 700; letter-spacing: .03em;
    color: var(--charcoal); background: var(--card); text-decoration: none;
    border: 1.5px solid var(--brand-deep); border-radius: var(--radius);
    padding: 13px 28px; cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.bd-reg .success-action:hover { color: var(--charcoal); background: var(--brand-soft); transform: translateY(-1px); text-decoration: none; }
.bd-reg .success-action:active { transform: translateY(0); }
.bd-reg .success-action:focus-visible { outline: 3px solid rgba(255, 198, 0, .45); outline-offset: 3px; }

/* entrance animation */
@keyframes bd-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.bd-reg .anim { animation: bd-rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.bd-reg fieldset:nth-of-type(1) { animation-delay: .05s; }
.bd-reg fieldset:nth-of-type(2) { animation-delay: .13s; }
.bd-reg fieldset:nth-of-type(3) { animation-delay: .21s; }
.bd-reg fieldset:nth-of-type(4) { animation-delay: .29s; }
.bd-reg .submit-wrap { animation-delay: .37s; }
@media (prefers-reduced-motion: reduce) {
    .bd-reg .anim, .bd-reg .success { animation: none; }
}

@media (max-width: 900px) {
    .bd-reg .layout { grid-template-columns: 1fr; }
    .bd-reg .brand { position: static; height: auto; padding: 28px 22px; }
    .bd-reg .brand h2 { font-size: 1.6rem; }
    .bd-reg .brand .foot { display: none; }
    .bd-reg .brand .sub { margin-top: 8px; }
    .bd-reg .grid { grid-template-columns: 1fr; gap: 16px; }
    .bd-reg .content { padding: 26px 18px 48px; }
}
