/* =========================================================
   PAPRIA BİLİŞİM — MOBILE UI LAYER
   Responsive override for style.css
   Load AFTER /static/style.css
   ========================================================= */

/*
   Bu dosya yalnızca görünüm katmanıdır.
   Backend, yetkilendirme, doğrulama ve güvenlik kararları
   istemci CSS'ine bırakılmaz.
*/

:root {
    --mobile-gutter: 18px;
    --mobile-radius: 20px;
    --mobile-nav-height: 68px;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    width: 100%;
    min-width: 0;
    overflow-x: clip;
    overscroll-behavior-x: none;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

button,
a,
input,
textarea,
select {
    touch-action: manipulation;
}

input,
textarea,
select {
    max-width: 100%;
}

#main-content,
section,
article,
div {
    min-width: 0;
}

/* =========================================================
   TABLET / NARROW DESKTOP
   ========================================================= */

@media (max-width: 1120px) {
    :root {
        --mobile-gutter: 24px;
    }

    .nav-inner,
    .section-block,
    .services-v2-shell,
    .services-v2-content,
    .pricing-v3-shell,
    .pricing-shell-v3,
    .contact-v3-shell,
    .contact-layout-v3,
    .services-leadership-section,
    .services-visual-showcase,
    .realestate-showcase {
        width: min(calc(100% - (var(--mobile-gutter) * 2)), var(--max-width, 1240px));
        margin-inline: auto;
    }

    .hero-shell,
    .product-panel,
    .founder-panel,
    .services-v2-shell,
    .services-leadership-panel,
    .realestate-showcase,
    .contact-layout-v3 {
        grid-template-columns: 1fr !important;
    }

    .hero-system-card,
    .architecture-console,
    .product-visual,
    .mock-window,
    .realestate-ui {
        width: 100%;
        max-width: 760px;
    }

    .mock-window,
    .realestate-ui {
        transform: none !important;
    }

    .sector-grid,
    .industry-grid,
    .pricing-cards,
    .pricing-cards.pricing-4,
    .puantaj-license-grid,
    .project-grid-v3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* =========================================================
   MOBILE NAVIGATION + GLOBAL LAYOUT
   ========================================================= */

@media (max-width: 900px) {
    :root {
        --nav-height: var(--mobile-nav-height);
        --mobile-gutter: 18px;
    }

    .navbar {
        height: var(--mobile-nav-height);
        padding-inline:
            max(var(--mobile-gutter), env(safe-area-inset-left))
            max(var(--mobile-gutter), env(safe-area-inset-right));
    }

    .nav-inner {
        width: 100%;
        min-height: var(--mobile-nav-height);
        padding: 0;
    }

    .brand {
        min-width: 0;
        gap: 10px;
    }

    .brand-mark {
        flex: 0 0 auto;
    }

    .brand-mark img {
        width: 36px;
        height: 36px;
        object-fit: contain;
    }

    .logo {
        min-width: 0;
    }

    .logo-strong {
        font-size: 15px;
        letter-spacing: .08em;
    }

    .logo-small {
        font-size: 9px;
    }

    .nav-links {
        display: none !important;
    }

    .nav-toggle {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        display: inline-grid !important;
        place-content: center;
        gap: 5px;
        padding: 0;
        border: 1px solid rgba(148, 170, 205, .16);
        border-radius: 13px;
        background:
            radial-gradient(circle at 50% 0%, rgba(255, 10, 120, .12), transparent 70%),
            rgba(255, 255, 255, .025);
        box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
        cursor: pointer;
    }

    .nav-toggle span {
        width: 19px;
        height: 2px;
        border-radius: 999px;
        background: #d8dfeb;
        transition: transform .22s ease, opacity .22s ease;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-navigation:not([hidden]) {
        position: fixed;
        top: var(--mobile-nav-height);
        right: 0;
        left: 0;
        z-index: 998;
        display: block;
        padding:
            12px
            max(var(--mobile-gutter), env(safe-area-inset-right))
            calc(18px + env(safe-area-inset-bottom))
            max(var(--mobile-gutter), env(safe-area-inset-left));
        border-top: 1px solid rgba(255, 10, 120, .10);
        border-bottom: 1px solid rgba(148, 170, 205, .12);
        background:
            radial-gradient(circle at 12% 0%, rgba(255, 10, 120, .11), transparent 42%),
            rgba(5, 8, 17, .975);
        -webkit-backdrop-filter: blur(22px);
        backdrop-filter: blur(22px);
        box-shadow: 0 22px 50px rgba(0, 0, 0, .38);
        animation: papriaMobileMenuIn .22s ease both;
    }

    .mobile-navigation nav {
        display: grid;
        gap: 7px;
    }

    .mobile-navigation a {
        min-height: 48px;
        display: flex;
        align-items: center;
        padding: 12px 14px;
        border: 1px solid transparent;
        border-radius: 12px;
        color: #cbd4e1;
        text-decoration: none;
        font-size: 14px;
        font-weight: 800;
    }

    .mobile-navigation a:active,
    .mobile-navigation a:hover {
        border-color: rgba(255, 10, 120, .13);
        background: rgba(255, 10, 120, .055);
        color: #fff;
    }

    @keyframes papriaMobileMenuIn {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    #particles-js {
        opacity: .55;
        pointer-events: none;
    }

    .papria-grid {
        opacity: .45;
    }

    .section-block {
        width: min(calc(100% - (var(--mobile-gutter) * 2)), var(--max-width, 1240px));
        padding-block: 72px;
    }

    .hero-shell,
    .solution-grid,
    .service-cards,
    .services-v2-shell,
    .services-v2-content,
    .services-v2-grid,
    .services-grid-v2,
    .services-leadership-panel,
    .services-visual-showcase,
    .papria-visual-row,
    .realestate-showcase,
    .architecture-section,
    .founder-panel,
    .contact-layout-v3 {
        grid-template-columns: 1fr !important;
    }

    .cta-panel {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .hero-system-card,
    .architecture-console,
    .mock-window,
    .realestate-ui {
        max-width: 100%;
    }

    .mock-window,
    .realestate-ui,
    .papria-mini-ui {
        transform: none !important;
    }
}

/* =========================================================
   PHONE — MAIN RESPONSIVE DESIGN
   ========================================================= */

@media (max-width: 720px) {
    :root {
        --mobile-gutter: 16px;
        --mobile-radius: 18px;
    }

    main {
        width: 100%;
        overflow: clip;
    }

    .section-block {
        width: calc(100% - (var(--mobile-gutter) * 2));
        padding-block: 58px;
    }

    /* ---------- GLOBAL TYPOGRAPHY ---------- */

    h1,
    h2,
    h3,
    p {
        max-width: 100%;
    }

    .eyebrow,
    .section-kicker,
    .leadership-kicker,
    .services-v2-eyebrow {
        letter-spacing: .12em;
    }

    /* ---------- HOME HERO ---------- */

    .hero-v2,
    .hero {
        padding:
            46px
            var(--mobile-gutter)
            24px;
    }

    .hero-shell {
        min-height: auto !important;
        gap: 36px !important;
    }

    .hero-title {
        max-width: 100%;
        margin-bottom: 20px;
        font-size: clamp(39px, 12.2vw, 54px) !important;
        line-height: .98 !important;
        letter-spacing: -.055em;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .hero-desc {
        max-width: 100%;
        font-size: 15px !important;
        line-height: 1.72;
    }

    .hero-ctas {
        width: 100%;
        align-items: stretch !important;
        flex-direction: column !important;
        gap: 10px;
    }

    .btn-main,
    .btn-ghost {
        width: 100% !important;
        min-height: 50px;
        justify-content: center;
        text-align: center;
    }

    .hero-tags,
    .services-v2-tags {
        gap: 7px;
    }

    .hero-tags span,
    .services-v2-tags span {
        font-size: 9px;
    }

    .hero-system-card {
        border-radius: var(--mobile-radius);
    }

    /* ---------- HOME CARDS ---------- */

    .solution-grid,
    .sector-grid,
    .industry-grid,
    .pricing-cards,
    .pricing-cards.pricing-4,
    .puantaj-license-grid,
    .project-grid-v3,
    .service-cards {
        grid-template-columns: 1fr !important;
    }

    .solution-card,
    .product-panel,
    .founder-panel,
    .cta-panel {
        padding: 24px !important;
        border-radius: var(--mobile-radius) !important;
    }

    .solution-card {
        grid-template-columns: 1fr !important;
    }

    .product-panel {
        min-height: 0 !important;
        gap: 30px !important;
    }

    .product-copy h2,
    .founder-copy h2,
    .cta-panel h2 {
        font-size: clamp(31px, 9vw, 43px) !important;
        line-height: 1.02;
    }

    .product-stats {
        grid-template-columns: 1fr !important;
    }

    .mock-window {
        min-height: 0 !important;
        border-radius: 15px;
    }

    .mock-window-top {
        height: 40px;
    }

    .mock-body {
        min-height: 280px;
    }

    .founder-principles {
        grid-template-columns: 1fr !important;
    }

    /* ---------- SERVICES PAGE ---------- */

    .services-v2-hero,
    .services-hero {
        padding:
            54px
            var(--mobile-gutter)
            34px !important;
    }

    .services-v2-shell,
    .services-v2-content,
    .services-leadership-section,
    .services-visual-showcase {
        width: calc(100% - (var(--mobile-gutter) * 2)) !important;
        margin-inline: auto !important;
    }

    .services-v2-copy h1,
    .services-hero .neon-title {
        max-width: 100%;
        font-size: clamp(40px, 12vw, 56px) !important;
        line-height: .98 !important;
        letter-spacing: -.05em;
    }

    .services-v2-copy > p,
    .services-hero .neon-sub {
        font-size: 15px;
        line-height: 1.7;
    }

    .architecture-console {
        border-radius: var(--mobile-radius);
    }

    .architecture-console-head {
        align-items: flex-start;
        gap: 12px;
    }

    .architecture-console-head > span {
        flex: 0 0 auto;
    }

    .architecture-layer {
        grid-template-columns: 34px minmax(0, 1fr) auto !important;
        gap: 10px !important;
        padding: 13px !important;
    }

    .architecture-layer small {
        white-space: normal;
    }

    .service,
    .services-v2-card,
    .service-card-v2,
    .papria-visual-row {
        padding: 22px !important;
        border-radius: var(--mobile-radius) !important;
    }

    .service h2,
    .services-v2-card h2,
    .service-card-v2 h2 {
        font-size: 24px !important;
        line-height: 1.15;
    }

    .service p,
    .service li,
    .services-v2-card p,
    .services-v2-card li,
    .service-card-v2 p,
    .service-card-v2 li {
        font-size: 14px;
        line-height: 1.65;
    }

    .papria-visual-row {
        gap: 28px !important;
    }

    .papria-visual-row.reverse .papria-visual-copy,
    .papria-visual-row.reverse .papria-mini-ui {
        order: initial !important;
    }

    .papria-mini-ui {
        width: 100% !important;
        max-width: 100% !important;
    }

    .realestate-showcase {
        width: calc(100% - (var(--mobile-gutter) * 2)) !important;
        gap: 28px !important;
        padding: 24px !important;
        border-radius: var(--mobile-radius) !important;
    }

    .realestate-showcase h2 {
        font-size: clamp(35px, 10vw, 48px) !important;
        line-height: 1.02;
    }

    .realestate-ui {
        min-width: 0 !important;
        overflow: hidden;
    }

    .services-leadership-panel {
        gap: 22px !important;
        padding: 24px !important;
        border-radius: var(--mobile-radius) !important;
    }

    .leadership-badge {
        width: 52px;
        height: 52px;
    }

    .leadership-copy h2 {
        font-size: clamp(31px, 9vw, 43px) !important;
        line-height: 1.03;
    }

    .leadership-principles {
        grid-template-columns: 1fr !important;
    }

    .services-final-cta .cta-panel {
        gap: 20px;
    }

    /* ---------- PRICING PAGE ---------- */

    .pricing-hero,
    .pricing-hero-v3 {
        padding:
            54px
            var(--mobile-gutter)
            30px !important;
    }

    .pricing-hero-v3,
    .pricing-v3-shell,
    .pricing-shell-v3 {
        width: calc(100% - (var(--mobile-gutter) * 2)) !important;
        margin-inline: auto !important;
    }

    .pricing-title,
    .pricing-hero-v3 h1 {
        max-width: 100% !important;
        font-size: clamp(40px, 11.5vw, 55px) !important;
        line-height: .98 !important;
        letter-spacing: -.05em;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .pricing-sub,
    .pricing-hero-v3 p {
        font-size: 15px;
        line-height: 1.7;
    }

    .price-card,
    .license-card-v3,
    .project-card-v3,
    .cyber-card-v3 {
        width: 100%;
        padding: 22px !important;
        border-radius: var(--mobile-radius) !important;
    }

    .price-card h2,
    .license-card-v3 h3,
    .project-card-v3 h3,
    .cyber-card-v3 h3 {
        font-size: 23px !important;
    }

    .price {
        font-size: 18px;
    }

    .price .amount,
    .license-price-v3 strong {
        font-size: clamp(31px, 9vw, 42px) !important;
    }

    .price-btn,
    .pricing-btn-primary,
    .pricing-btn-secondary {
        width: 100%;
        min-height: 50px;
        justify-content: center;
        text-align: center;
    }

    /* ---------- CONTACT PAGE ---------- */

    .contact-hero,
    .contact-hero-v3 {
        padding:
            54px
            var(--mobile-gutter)
            30px !important;
    }

    .contact-hero-v3,
    .contact-v3-shell,
    .contact-layout-v3 {
        width: calc(100% - (var(--mobile-gutter) * 2)) !important;
        margin-inline: auto !important;
    }

    .contact-title,
    .contact-hero-v3 h1 {
        font-size: clamp(40px, 12vw, 55px) !important;
        line-height: 1 !important;
        letter-spacing: -.05em;
    }

    .contact-sub,
    .contact-hero-v3 p {
        font-size: 15px;
        line-height: 1.7;
    }

    .contact-panel-v3,
    .contact-side-v3,
    .contact-panel {
        width: 100%;
        padding: 22px !important;
        border-radius: var(--mobile-radius) !important;
    }

    .contact-side-v3 {
        position: static !important;
        top: auto !important;
    }

    .contact-panel-head {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 12px;
    }

    .contact-required-note {
        align-self: flex-start;
    }

    .contact-form-v3 input,
    .contact-form-v3 textarea,
    .contact-form-v3 select,
    .contact-panel input,
    .contact-panel textarea {
        width: 100%;
        min-height: 50px;
        font-size: 16px !important; /* iOS focus zoom engeli */
        border-radius: 12px;
    }

    .contact-form-v3 textarea,
    .contact-panel textarea {
        min-height: 150px;
        resize: vertical;
    }

    .send-btn-v3,
    .send-btn {
        width: 100%;
        min-height: 52px;
    }

    .field-help-v3,
    .field-error-v3,
    .form-status-v3 {
        overflow-wrap: anywhere;
    }

    /* ---------- FOOTER ---------- */

    .footer {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .footer-inner {
        width: calc(100% - (var(--mobile-gutter) * 2));
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 18px;
        padding-block: 28px;
    }

    .footer-meta {
        width: 100%;
        text-align: left !important;
    }

    .footer-contacts {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    /* ---------- TOUCH BEHAVIOUR ---------- */

    .solution-card:hover,
    .service:hover,
    .services-v2-card:hover,
    .service-card-v2:hover,
    .price-card:hover,
    .license-card-v3:hover,
    .project-card-v3:hover,
    .cyber-card-v3:hover,
    .industry-card:hover {
        transform: none;
    }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 480px) {
    :root {
        --mobile-gutter: 14px;
    }

    .navbar {
        padding-inline:
            max(var(--mobile-gutter), env(safe-area-inset-left))
            max(var(--mobile-gutter), env(safe-area-inset-right));
    }

    .brand {
        gap: 8px;
    }

    .brand-mark img {
        width: 34px;
        height: 34px;
    }

    .logo-strong {
        font-size: 14px;
    }

    .logo-small {
        font-size: 8px;
    }

    .hero-title {
        font-size: clamp(36px, 12vw, 46px) !important;
    }

    .services-v2-copy h1,
    .services-hero .neon-title,
    .pricing-title,
    .pricing-hero-v3 h1,
    .contact-title,
    .contact-hero-v3 h1 {
        font-size: clamp(36px, 11.5vw, 48px) !important;
    }

    .product-copy h2,
    .founder-copy h2,
    .leadership-copy h2,
    .cta-panel h2 {
        font-size: clamp(29px, 8.8vw, 39px) !important;
    }

    .solution-card,
    .product-panel,
    .founder-panel,
    .cta-panel,
    .service,
    .services-v2-card,
    .service-card-v2,
    .papria-visual-row,
    .realestate-showcase,
    .services-leadership-panel,
    .price-card,
    .license-card-v3,
    .project-card-v3,
    .cyber-card-v3,
    .contact-panel-v3,
    .contact-side-v3,
    .contact-panel {
        padding: 19px !important;
    }

    .architecture-console-head {
        flex-direction: column;
    }

    .architecture-layer {
        grid-template-columns: 32px minmax(0, 1fr) !important;
    }

    .architecture-layer em {
        grid-column: 2;
        justify-self: start;
    }

    .mock-window-top small {
        max-width: 55%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 360px) {
    :root {
        --mobile-gutter: 12px;
    }

    .logo-small {
        display: none;
    }

    .hero-title,
    .services-v2-copy h1,
    .services-hero .neon-title,
    .pricing-title,
    .pricing-hero-v3 h1,
    .contact-title,
    .contact-hero-v3 h1 {
        font-size: 34px !important;
        letter-spacing: -.045em;
    }

    .hero-tags span,
    .services-v2-tags span {
        padding-inline: 8px;
    }

    .architecture-layer {
        padding: 11px !important;
    }
}

/* =========================================================
   LANDSCAPE PHONE
   ========================================================= */

@media (max-height: 520px) and (orientation: landscape) and (max-width: 950px) {
    .mobile-navigation:not([hidden]) {
        max-height: calc(100dvh - var(--mobile-nav-height));
        overflow-y: auto;
    }

    .hero-v2,
    .services-v2-hero,
    .pricing-hero-v3,
    .contact-hero-v3 {
        padding-top: 30px !important;
    }
}

/* =========================================================
   TOUCH DEVICES — expensive hover animation azaltma
   ========================================================= */

@media (hover: none) and (pointer: coarse) {
    .mock-window,
    .realestate-ui,
    .papria-mini-ui,
    .architecture-console,
    .hero-system-card {
        transform: none !important;
    }

    .solution-card,
    .service,
    .services-v2-card,
    .service-card-v2,
    .price-card,
    .license-card-v3,
    .project-card-v3,
    .cyber-card-v3,
    .industry-card {
        transition:
            border-color .2s ease,
            background-color .2s ease,
            box-shadow .2s ease !important;
    }
}

/* =========================================================
   REDUCED MOTION / ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    #particles-js {
        display: none !important;
    }

    .mock-window,
    .realestate-ui,
    .papria-mini-ui {
        transform: none !important;
    }
}