/* MapBIS BI — Freemium kayıt sayfası */

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --navy: #07164b;
    --brand: #07166b;
    --brand-hover: #142989;
    --ink: #19263d;
    --muted: #536174;
    --line: #e2e7ec;
    --control: #798695;
    --focus: #006ca8;
    --error: #a23933;
    --accent: #78d3ff;
    --on-navy: #c6d1e3;
    --radius: 6px;
    --gutter: clamp(20px, 4vw, 48px);
    --consent-h: 0px;
    font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    font-synthesis: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
.consent-open { scroll-padding-bottom: calc(var(--consent-h) + 16px); }
.modal-open { overflow: hidden; }

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100svh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: #fff;
    font-size: 15px;
    line-height: 1.55;
}
.consent-open body { padding-bottom: var(--consent-h); }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-underline-offset: 3px; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
:where(button, a, input, [tabindex]) { scroll-margin-block: 24px; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.skip-link {
    position: absolute;
    left: 16px; top: 12px;
    z-index: 20;
    padding: 10px 14px;
    background: #fff;
    border-radius: var(--radius);
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Üst ve alt bilgi ---------- */
.site-header {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px var(--gutter);
    border-bottom: 1px solid var(--line);
}
.brand { width: 150px; height: auto; display: block; }
.header-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    border-left: 1px solid var(--line);
    padding-left: 24px;
}
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 20px;
    padding: 6px var(--gutter);
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer button, .link-btn {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.site-footer button:hover, .link-btn:hover { color: var(--ink); }

/* ---------- Düzen ---------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.intro {
    display: flex;
    align-items: center;
    padding: clamp(32px, 5vw, 72px);
    background: var(--navy);
    color: #fff;
}
.intro-content { max-width: 540px; }
.eyebrow {
    margin-bottom: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #b9d5ec;
}
.intro h1 {
    font-size: clamp(36px, 3.8vw, 58px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.04em;
    margin-bottom: 20px;
}
.intro h1 span { display: block; color: var(--accent); font-weight: 700; }
.intro-copy { max-width: 450px; font-size: 16px; line-height: 1.75; color: var(--on-navy); }
.benefits { list-style: none; margin: 32px 0 0; padding: 0; }
.benefits li {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, .24);
}
.benefit-number { font-size: 12px; font-weight: 700; color: #8ab4d4; padding-top: 3px; }
.benefits p { font-size: 14px; line-height: 1.65; color: var(--on-navy); }
.benefits strong { display: block; font-size: 16px; font-weight: 600; color: #fff; }

.registration {
    width: 100%;
    max-width: 620px;
    margin-inline: auto;
    align-self: center;
    padding: clamp(24px, 3.5vh, 40px) var(--gutter);
}

/* ---------- Form başlığı ---------- */
.form-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 10px; }
.plan-label {
    padding: 3px 8px;
    border: 1px solid #d6dcf0;
    border-radius: 4px;
    background: #f5f7fc;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand);
}
.registration h2 { font-size: 26px; line-height: 1.3; letter-spacing: -.03em; font-weight: 800; }
.form-description { margin: 6px 0 18px; font-size: 14px; color: var(--muted); }

/* ---------- Alanlar ---------- */
.fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "name surname" "email phone" "company company";
    gap: 12px 16px;
    align-items: start;
}
.f-name { grid-area: name; }
.f-surname { grid-area: surname; }
.f-email { grid-area: email; }
.f-phone { grid-area: phone; }
.f-company { grid-area: company; }

label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 700; }
.req { color: #c0262d; font-weight: 700; }

input:not([type=checkbox]) {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--control);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-size: 16px; /* iOS yakınlaştırmasını önler */
}
input::placeholder { color: #647184; opacity: 1; font-size: 14px; }
input:not([type=checkbox]):focus-visible,
input:not([type=checkbox]):focus { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
input[aria-invalid=true] { border-color: var(--error); border-width: 2px; }

.field-hint { margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.field-error { margin-top: 4px; font-size: 13px; line-height: 1.45; font-weight: 600; color: var(--error); }
.field-error::before { content: "! "; content: "! " / ""; }
.error-text { color: var(--error); }
.status:empty { margin: 0; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Onaylar ---------- */
.consents { margin: 14px 0 12px; padding: 0; border: 0; min-width: 0; }
.consent-item + .consent-item { margin-top: 4px; }
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding-block: 2px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--muted);
    cursor: pointer;
}
.checkbox-label input {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin: -1px 0 0;
    accent-color: var(--brand);
    cursor: pointer;
}
.checkbox-label a { font-weight: 700; }
.consent-item .field-error { margin-left: 34px; }

/* ---------- Güvenlik kodu ---------- */
.captcha-section { margin-bottom: 16px; }
.captcha-wrapper { display: flex; align-items: stretch; gap: 8px; }
.captcha-image-box {
    display: flex;
    flex: 0 0 132px;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    overflow: hidden;
    border: 1px solid var(--control);
    border-radius: var(--radius);
    background: #f3f5f7;
    font-size: 12px;
    color: var(--muted);
}
.captcha-image-box img { max-width: 100%; max-height: 44px; object-fit: contain; }
.captcha-refresh {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    min-height: 46px;
    border: 1px solid var(--control);
    border-radius: var(--radius);
    background: #fff;
    color: #34445c;
}
.captcha-refresh:hover { background: #f0f5fa; }
.captcha-refresh:disabled { cursor: wait; color: #8a95a5; }
.captcha-wrapper input { flex: 1 1 auto; }

/* ---------- Düğmeler ---------- */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid var(--brand);
    border-radius: var(--radius);
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    transition: background-color .15s;
}
.submit-btn .arrow { margin-left: auto; font-size: 18px; font-weight: 400; }
.submit-btn:hover { background: var(--brand-hover); }
.submit-btn:disabled, .submit-btn:disabled:hover { background: #aab8f4; border-color: #aab8f4; cursor: not-allowed; }
form[aria-busy=true] .submit-btn:disabled { background: var(--brand); border-color: var(--brand); opacity: .75; cursor: wait; }
.submit-hint { margin-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.btn-secondary {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--brand);
    border-radius: var(--radius);
    background: #fff;
    color: var(--brand);
    font-weight: 700;
}
.btn-secondary:hover { background: #f0f3fb; }
.loading {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff60;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sonuç mesajı ---------- */
.message { margin-top: 14px; padding: 12px 14px; border: 1px solid; border-radius: var(--radius); font-size: 14px; }
.message.error { background: #fff5f4; color: var(--error); border-color: #e7b9b5; }
.message.success { background: #eff8f3; color: #1f5a3c; border-color: #b9dcc7; }

/* ---------- Belge penceresi ---------- */
dialog {
    width: min(740px, calc(100% - 32px));
    max-height: min(85dvh, 900px);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    box-shadow: 0 20px 80px #09154033;
}
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #0b183b99; }
.modal-header, .modal-actions { flex-shrink: 0; padding: 14px 24px; }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}
.modal-header h2 { font-size: 16px; }
.modal-header button {
    min-width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--radius);
    background: #f3f5f7;
    font-size: 24px;
    line-height: 1;
    color: #3f4b5e;
}
.modal-actions { display: flex; gap: 10px; border-top: 1px solid var(--line); }
.modal-actions .submit-btn { flex: 1; }
#kvkkContent {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 20px 24px;
    font-size: 16px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
#kvkkContent :is(p, ul, ol, table) { margin: 0 0 14px; }
#kvkkContent h3 { margin: 22px 0 10px; font-size: 18px; }
#kvkkContent h4 { margin: 18px 0 8px; font-size: 16px; }
#kvkkContent table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
#kvkkContent th, #kvkkContent td { padding: 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; }

/* ---------- Çerez bandı ---------- */
.consent {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 14px var(--gutter);
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 30px #0915401f;
    font-size: 14px;
}
.consent h2 { font-size: 15px; margin-bottom: 2px; }
.consent p { color: var(--muted); max-width: 760px; }
.consent .link-btn { min-height: 24px; color: var(--brand); font-weight: 700; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-actions button { min-width: 110px; }

/* ---------- Duyarlı düzen ---------- */
@media (max-height: 820px) and (min-width: 801px) {
    .benefits li { padding: 10px 0; }
    .benefits { margin-top: 24px; }
    .intro h1 { font-size: clamp(34px, 3.4vw, 50px); }
}

@media (max-height: 780px) and (min-width: 801px) {
    .site-header { padding-block: 10px; }
    .registration { padding-block: 8px; }
    .form-heading { margin-bottom: 4px; }
    .submit-hint { margin-top: 4px; }
    .registration h2 { font-size: 23px; }
    .form-description { margin: 2px 0 12px; }
    .fields { row-gap: 8px; }
    label { margin-bottom: 3px; }
    input:not([type=checkbox]), .captcha-image-box, .captcha-refresh { min-height: 44px; padding-block: 8px; }
    .consents { margin: 10px 0 8px; }
    .captcha-section { margin-bottom: 12px; }
    .submit-btn { min-height: 46px; padding-block: 10px; }
}

@media (max-width: 800px) {
    .header-label { display: none; }
    .brand { width: 132px; }
    .layout { grid-template-columns: minmax(0, 1fr); }
    .intro { padding: 24px var(--gutter) 26px; }
    .eyebrow { margin-bottom: 10px; font-size: 11px; }
    .intro h1 { font-size: 30px; margin-bottom: 8px; }
    .intro h1 span { display: inline; }
    .intro-copy { font-size: 15px; line-height: 1.6; }
    .benefits { display: none; }
    .registration { padding-block: 24px 28px; }
    .registration h2 { font-size: 23px; }
    .consent { flex-direction: column; align-items: stretch; }
    .consent-actions button { flex: 1; }
}

@media (max-width: 560px) {
    .intro-copy { display: none; }
    .fields { grid-template-areas: "name surname" "email email" "phone phone" "company company"; }
}

@media (max-width: 420px) {
    .captcha-wrapper { flex-wrap: wrap; }
    .captcha-image-box { flex: 1 1 auto; }
    .captcha-wrapper input { flex-basis: 100%; }
    .modal-header, #kvkkContent, .modal-actions { padding-inline: 16px; }
}

@media (max-width: 359px) {
    .fields { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "surname" "email" "phone" "company"; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

@media (forced-colors: active) {
    .intro { background: Canvas; color: CanvasText; }
    .intro h1 span, .intro p, .benefits strong, .benefit-number, .eyebrow { color: CanvasText; }
    .submit-btn, .btn-secondary, .captcha-refresh, input { border: 1px solid ButtonText; }
    :focus-visible { outline-color: Highlight; }
    .consent { border-top: 2px solid CanvasText; }
}
/* ---------- Kübra geri bildirimi: açık gri kutular + yeşil CTA ---------- */
:root { --field-bg: #f4f6f9; --field-border: #d5dae1; --cta: #3050e8; --cta-hover: #2440c9; }
input:not([type=checkbox]) { background: var(--field-bg); border-color: var(--field-border); }
input:not([type=checkbox]):focus { background: #fff; }
.captcha-image-box { background: var(--field-bg); border-color: var(--field-border); }
.captcha-refresh { background: var(--field-bg); border-color: var(--field-border); }
.captcha-refresh:hover { background: #e9edf2; }
.submit-btn { background: var(--cta); border-color: var(--cta); }
.submit-btn:hover { background: var(--cta-hover); }
form[aria-busy=true] .submit-btn:disabled { background: var(--cta); border-color: var(--cta); }
.modal-actions .submit-btn { background: var(--brand); border-color: var(--brand); }
.modal-actions .submit-btn:hover { background: var(--brand-hover); }


/* ---------- Sol panel: Kübra'nın gönderdiği mavi geçiş görseli ---------- */
.intro { position: relative; overflow: hidden; isolation: isolate;
    background: #07164b url("img/intro-bg.webp") center / cover no-repeat; }
@media (forced-colors: active) { .intro { background: Canvas; } }
.benefit-number { color: #d4e6f7; }

/* ---------- Soft form görünümü (referans: gri zemin, beyaz alanlar) ---------- */
:root { --form-bg: #f7f8fa; --field-bg: #fff; --field-border: #e3e6ea; --field-radius: 10px; --field-shadow: 0 1px 2px rgba(16, 24, 40, .05); --ring: #3b6fd8; }
.layout { background: var(--form-bg); }
label { font-weight: 600; color: #1f2937; }
input:not([type=checkbox]),
.captcha-image-box,
.captcha-refresh {
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: var(--field-radius);
    box-shadow: var(--field-shadow);
}
.captcha-refresh:hover { background: #f3f5f8; }
input::placeholder { color: #7b8594; }
input:not([type=checkbox]):focus,
input:not([type=checkbox]):focus-visible {
    outline: none;
    background: #fff;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgba(59, 111, 216, .25), var(--field-shadow);
}
input[aria-invalid=true] { border: 1px solid var(--error); box-shadow: 0 0 0 3px rgba(162, 57, 51, .12); }
.submit-btn { border-radius: var(--field-radius); }

/* Onay kutuları: yumuşak köşeli, beyaz */
.checkbox-label input[type=checkbox] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    border: 1px solid #cfd5dd;
    border-radius: 6px;
    background: #fff center / 14px no-repeat;
    box-shadow: var(--field-shadow);
    transition: background-color .15s, border-color .15s;
}
.checkbox-label input[type=checkbox]:checked {
    background-color: var(--brand);
    border-color: var(--brand);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}
.checkbox-label input[type=checkbox]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(59, 111, 216, .35); border-color: var(--ring); }
.checkbox-label input[type=checkbox][aria-invalid=true] { border-color: var(--error); }
/* 24 px hedef boyutu (WCAG 2.5.8): kutu 20 px, etiketin tamamı tıklanabilir */
.checkbox-label { min-height: 24px; }
.consent-item .field-error { margin-left: 30px; }

@media (forced-colors: active) {
    .checkbox-label input[type=checkbox] { appearance: auto; -webkit-appearance: auto; }
    input:not([type=checkbox]):focus { outline: 2px solid Highlight; }
}

/* ---------- Üst bilgi: slogan logonun altında, küçük ---------- */
.site-header { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding-block: 10px; }
.header-label {
    display: block;
    border-left: 0;
    padding-left: 0;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .16em;
    line-height: 1.2;
}
@media (max-width: 800px) { .header-label { display: block; font-size: 8.5px; } }
@media (max-height: 780px) and (min-width: 801px) { .site-header { padding-block: 6px; } .brand { width: 140px; } }

/* Slogan, logodaki "MapBIS BI" yazısının altına tam hizalı:
   yazı logo genişliğinin %19,75'inde başlıyor, %75,25'i kadar sürüyor. */
.site-header { --logo-w: 150px; }
.site-header .brand { width: var(--logo-w); }
.site-header .header-label {
    margin-left: calc(var(--logo-w) * .1975);
    font-size: 8px;
    letter-spacing: .8px;
    white-space: nowrap;
}
@media (max-height: 780px) and (min-width: 801px) {
    .site-header { --logo-w: 140px; }
    .site-header .header-label { letter-spacing: .44px; }
}
@media (max-width: 800px) {
    .site-header { --logo-w: 132px; }
    .site-header .header-label { font-size: 8px; letter-spacing: .16px; }
}
