/*
 * Contact page — light/dark via body.dark-theme + home.css tokens (#1E90FF / #FFB800)
 */

/* showModal() ile scrollbar kaybolunca içerik yatay kaymasın (iletişim başarı penceresi) */
html {
    scrollbar-gutter: stable;
}

.contact-page {
    padding-top: 80px;
    font-family: var(--font-sans);
    color: var(--text-color);
    background: var(--bg-color);
    overflow-x: clip;
}

.contact-page__wrap {
    padding-bottom: calc(clamp(100px, 16vw, 180px) + env(safe-area-inset-bottom, 0px));
}

.container-apple {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
}

.contact-flash {
    margin: 0 0 20px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box;
}

.contact-flash--err {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.22);
}

body.dark-theme .contact-flash--err {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Hero ── */
.contact-hero {
    position: relative;
    padding: clamp(72px, 12vw, 120px) 0 clamp(48px, 8vw, 80px);
    overflow: hidden;
}

.contact-hero__glow {
    position: absolute;
    inset: -40% -20% auto;
    height: 85%;
    background:
        radial-gradient(ellipse 70% 55% at 50% 40%, rgba(30, 144, 255, 0.14) 0%, transparent 58%),
        radial-gradient(ellipse 55% 45% at 70% 30%, rgba(255, 184, 0, 0.12) 0%, transparent 55%);
    pointer-events: none;
}

body.dark-theme .contact-hero__glow {
    background:
        radial-gradient(ellipse 70% 55% at 50% 40%, rgba(77, 163, 255, 0.12) 0%, transparent 58%),
        radial-gradient(ellipse 55% 45% at 70% 30%, rgba(255, 201, 51, 0.08) 0%, transparent 55%);
}

.contact-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 48px);
    align-items: center;
}

@media (max-width: 720px) {
    .contact-hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-hero__visual {
        justify-self: center;
        max-width: 160px;
    }
}

.contact-hero__illus {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 28px rgba(30, 144, 255, 0.15));
}

body.dark-theme .contact-hero__illus {
    filter: drop-shadow(0 12px 28px rgba(77, 163, 255, 0.12));
}

.contact-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw + 0.6rem, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 14px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-hero__lead {
    font-size: clamp(1.05rem, 1.5vw + 0.85rem, 1.25rem);
    color: var(--home-apple-muted);
    max-width: 34ch;
    line-height: 1.6;
}

body.dark-theme .contact-hero__lead {
    color: var(--text-muted);
}

@media (max-width: 720px) {
    .contact-hero__lead {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ── Main grid: form + aside ── */
.contact-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: clamp(32px, 5vw, 48px);
    align-items: start;
    padding-top: clamp(8px, 2vw, 24px);
}

@media (max-width: 1024px) {
    .contact-main-grid {
        grid-template-columns: 1fr;
    }
}

.contact-aside__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.contact-details-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 28px;
}

.contact-tile {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 22px 20px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: var(--shadow-light);
}

.contact-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(30, 144, 255, 0.35);
    box-shadow: var(--shadow-elevated);
}

body.dark-theme .contact-tile:hover {
    border-color: rgba(148, 163, 184, 0.28);
}

.contact-tile__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--primary-color);
    background: rgba(30, 144, 255, 0.1);
}

body.dark-theme .contact-tile__icon {
    background: rgba(77, 163, 255, 0.12);
}

.contact-tile__icon--whatsapp {
    color: #25d366;
    background: rgba(37, 211, 102, 0.12);
}

.contact-tile__name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.contact-tile__text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-tile__text a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-tile__text a:hover {
    color: var(--primary-color);
}

.whatsapp-link {
    color: #25d366 !important;
    font-weight: 600;
}

/* ── Form card ── */
.contact-form-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: clamp(32px, 5vw, 52px);
    box-shadow: var(--shadow-light);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.contact-form-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(30, 144, 255, 0.08);
}

body.dark-theme .contact-form-card:hover {
    box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.form-header {
    margin-bottom: 32px;
}

.form-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw + 0.9rem, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.form-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.55;
}

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

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

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

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

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 2px;
    color: var(--text-color);
}

.premium-form input,
.premium-form textarea {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.premium-form textarea {
    resize: none;
    min-height: 120px;
    max-height: 220px;
    overflow-y: auto;
    box-sizing: border-box;
}

body:not(.dark-theme) .premium-form input,
body:not(.dark-theme) .premium-form textarea {
    background: rgba(255, 255, 255, 0.92);
}

.premium-form input:focus,
.premium-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.18);
}

body.dark-theme .premium-form input:focus,
body.dark-theme .premium-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.2);
}

.form-group.form-group--error input,
.form-group.form-group--error textarea {
    border-color: #ef4444;
}

.form-field-error {
    font-size: 0.8rem;
    color: #ef4444;
    min-height: 1.1em;
}

.form-field-error:not([hidden]) {
    display: block;
}

.form-submit-btn {
    margin-top: 8px;
    padding: 16px 24px;
    background: #ffb800;
    color: #0f172a;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font-display);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    box-shadow: 0 6px 20px rgba(255, 184, 0, 0.35);
}

body.dark-theme .form-submit-btn {
    color: #0f172a;
    background: linear-gradient(135deg, #ffc933 0%, #ffb800 100%);
    box-shadow: 0 6px 24px rgba(255, 201, 51, 0.25);
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 10px 28px rgba(255, 184, 0, 0.42);
}

.form-submit-btn:active {
    transform: translateY(0);
}

/* ── Social dock ── */
.contact-social-section {
    margin-top: clamp(48px, 8vw, 72px);
    margin-bottom: clamp(56px, 10vw, 96px);
    text-align: center;
}

.social-dock {
    display: inline-flex;
    gap: 20px;
    padding: 14px 28px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
}

.dock-link {
    color: var(--text-color);
    transition: color 0.2s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dock-link:hover {
    color: var(--primary-color);
    transform: translateY(-4px) scale(1.08);
}

.dock-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ── Başarılı gönderim modalı (dialog) ── */
.contact-success-modal {
    padding: 0;
    border: none;
    max-width: calc(100vw - 32px);
    width: min(420px, 100%);
    max-height: calc(100vh - 32px);
    margin: auto;
    background: transparent;
    overflow: visible;
    box-sizing: border-box;
}

.contact-success-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

body.dark-theme .contact-success-modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.contact-success-modal__panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: clamp(28px, 5vw, 40px);
    box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(30, 144, 255, 0.08);
    text-align: center;
    max-height: min(85vh, calc(100vh - 48px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

body.dark-theme .contact-success-modal__panel {
    box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(148, 163, 184, 0.1);
}

.contact-success-modal__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.contact-success-modal__svg {
    display: block;
    margin: 0 auto;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(30, 144, 255, 0.25));
}

.contact-success-modal__title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.5vw + 0.5rem, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    color: var(--text-color);
    line-height: 1.2;
}

.contact-success-modal__text {
    margin: 0 0 24px;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.contact-success-modal__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

.contact-success-modal__btn {
    margin-top: 0;
    width: 100%;
    justify-content: center;
}

.contact-success-modal__secondary {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: opacity 0.2s ease, background 0.2s ease;
}

.contact-success-modal__secondary:hover {
    opacity: 0.9;
    background: rgba(30, 144, 255, 0.08);
}

body.dark-theme .contact-success-modal__secondary:hover {
    background: rgba(77, 163, 255, 0.12);
}

.contact-success-modal__secondary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
