/* ================================
   PERLA PAINT - RESPONSIVE SYSTEM
   ================================ */


/* ================================
   1280px ve altı
   ================================ */

@media (max-width: 1280px) {
    :root {
        --container: 1080px;
        --container-wide: 1180px;
    }

    .main-nav a {
        padding-inline: 10px;
        font-size: 12px;
    }

    .header-inner {
        gap: 22px;
    }

    .footer-grid {
        gap: 42px;
    }
}


/* ================================
   1080px ve altı
   ================================ */

@media (max-width: 1080px) {
    :root {
        --section-padding: 96px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .header-phone {
        display: none;
    }

    .service-card {
        min-height: 310px;
    }
}


/* ================================
   Tablet / Mobil Menü Başlangıcı
   ================================ */

@media (max-width: 960px) {
    :root {
        --header-height: 82px;
    }

    body.menu-open {
        overflow: hidden;
    }

    .container,
    .container-wide {
        width: calc(100% - 36px);
    }

    .site-header {
        height: var(--header-height);
    }

    .site-header.is-scrolled {
        height: 72px;
    }

    .header-inner {
        width: calc(100% - 36px);
    }

    .main-nav,
    .header-actions {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-panel {
        display: block;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .page-hero {
        min-height: 62vh;
        padding-top: calc(var(--header-height) + 70px);
        padding-bottom: 74px;
    }

    .page-title {
        font-size: clamp(36px, 8vw, 56px);
    }

    .section-title {
        font-size: clamp(30px, 6.4vw, 44px);
    }

    .lead {
        font-size: 16px;
    }

    .image-frame.large {
        min-height: 460px;
    }

    .image-frame.medium {
        min-height: 360px;
    }

    .editorial-number {
        right: 18px;
        bottom: -18px;
        font-size: clamp(150px, 38vw, 320px);
    }
}


/* ================================
   768px ve altı
   ================================ */

@media (max-width: 768px) {
    :root {
        --section-padding: var(--section-padding-mobile);
    }

    .section-sm {
        padding-block: 56px;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .site-logo {
        gap: 12px;
    }

    .logo-mark {
        width: 39px;
        height: 39px;
        font-size: 23px;
    }

    .logo-text strong {
        font-size: 25px;
    }

    .logo-text span {
        font-size: 8px;
        letter-spacing: 0.22em;
    }

    .mobile-panel {
        padding-top: 112px;
    }

    .mobile-nav a {
        padding-block: 20px;
    }

    .page-hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + 58px);
        padding-bottom: 64px;
    }

    .page-title {
        font-size: clamp(34px, 9vw, 50px);
        line-height: 1.02;
    }

    .section-title {
        font-size: clamp(29px, 7.4vw, 42px);
        line-height: 1.08;
    }

    .title-md {
        font-size: clamp(28px, 7vw, 40px);
    }

    .title-sm {
        font-size: clamp(24px, 6vw, 34px);
    }

    .lead {
        max-width: 100%;
        font-size: 17px;
        line-height: 1.72;
    }

    .text {
        font-size: 15px;
        line-height: 1.8;
    }

    .section-label {
        gap: 12px;
        margin-bottom: 18px;
        font-size: 11px;
        letter-spacing: 0.16em;
    }

    .section-label::before {
        width: 32px;
    }

    .content-block {
        max-width: 100%;
    }

    .refined-box {
        padding: 28px;
    }

    .service-card {
        min-height: 300px;
        padding: 28px;
    }

    .service-card-number {
        margin-bottom: 64px;
    }

    .service-card h3 {
        font-size: 30px;
    }

    .service-card-link {
        left: 28px;
        bottom: 26px;
    }

    .project-card {
        min-height: 390px;
    }

    .project-card-content {
        padding: 28px;
    }

    .footer-main {
        padding: 66px 0 48px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}


/* ================================
   560px ve altı
   ================================ */

@media (max-width: 560px) {
    .container,
    .container-wide,
    .header-inner {
        width: calc(100% - 28px);
    }

    .site-header {
        height: 76px;
    }

    .site-header.is-scrolled {
        height: 68px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
        font-size: 21px;
    }

    .logo-text strong {
        font-size: 23px;
    }

    .logo-text span {
        display: none;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
    }

    .menu-toggle span {
        left: 12px;
    }

    .mobile-panel {
        padding: 104px 18px 30px;
    }

    .mobile-nav a {
        font-size: clamp(34px, 13vw, 52px);
    }

    .mobile-panel-footer {
        margin-top: 34px;
    }

    .page-hero {
        padding-top: 124px;
        padding-bottom: 58px;
    }

    .page-title {
        font-size: clamp(32px, 10vw, 46px);
        letter-spacing: -0.04em;
    }

    .page-hero .lead {
        margin-top: 22px;
    }

    .section-title {
        font-size: clamp(28px, 8vw, 40px);
    }

    .section {
        padding-block: 68px;
    }

    .image-frame.large {
        min-height: 360px;
    }

    .image-frame.medium {
        min-height: 300px;
    }

    .image-frame.rounded {
        border-radius: 20px;
    }

    .btn {
        width: 100%;
        min-height: 52px;
        padding-inline: 20px;
    }

    .refined-box {
        padding: 24px;
    }

    .service-card {
        padding: 26px;
    }

    .service-card-number {
        margin-bottom: 58px;
    }

    .service-card h3 {
        font-size: 28px;
    }

    .project-card {
        min-height: 360px;
    }

    .project-card-content {
        padding: 24px;
    }

    .project-card h3 {
        font-size: clamp(30px, 10vw, 44px);
    }

    .footer-logo .logo-mark {
        width: 42px;
        height: 42px;
    }

    .footer-logo .logo-text strong {
        font-size: 28px;
    }

    .footer-contact,
    .footer-links a,
    .footer-brand p {
        font-size: 14px;
    }

    .form-control {
        min-height: 52px;
    }
}


/* ================================
   390px ve altı
   ================================ */

@media (max-width: 390px) {
    .container,
    .container-wide,
    .header-inner {
        width: calc(100% - 22px);
    }

    .logo-text strong {
        font-size: 21px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }

    .page-title {
        font-size: 34px;
    }

    .section-title {
        font-size: 30px;
    }

    .mobile-nav a {
        font-size: 34px;
    }

    .service-card {
        min-height: 286px;
    }
}


/* ================================
   Hareket hassasiyeti olan kullanıcılar
   ================================ */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Mobil menü son düzen: ortalı ikon ve daha rafine menü tipografisi */
@media (max-width: 960px) {
    .header-inner {
        position: relative;
        justify-content: center;
    }

    .site-logo {
        position: absolute;
        left: calc(50vw - 18px);
        top: 50%;
        width: clamp(230px, 64vw, 320px) !important;
        height: 78px !important;
        transform: translate(-50%, -50%);
    }

    .site-logo .logo-image {
        object-position: center;
        transform: scale(1.3);
        transform-origin: center;
    }

    .menu-toggle {
        margin-left: auto;
    }

    .footer-logo {
        width: clamp(260px, 72vw, 340px) !important;
        height: 112px !important;
    }

    .footer-logo img {
        transform: scale(1.18);
        transform-origin: left center;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border-color: rgba(234, 233, 229, 0.62);
        background: rgba(255, 255, 255, 0.035);
        backdrop-filter: blur(10px);
    }

    .site-header.is-scrolled .menu-toggle {
        border-color: rgba(56, 10, 20, 0.28);
        background: rgba(56, 10, 20, 0.035);
    }

    .menu-toggle span {
        left: 50% !important;
        top: 50% !important;
        width: 18px;
        height: 1.5px;
        transform-origin: center;
    }

    .menu-toggle span:first-child {
        transform: translate(-50%, -5px);
    }

    .menu-toggle span:last-child {
        transform: translate(-50%, 5px);
    }

    .menu-toggle.is-open span:first-child {
        transform: translate(-50%, 0) rotate(45deg);
    }

    .menu-toggle.is-open span:last-child {
        transform: translate(-50%, 0) rotate(-45deg);
    }

    .mobile-panel {
        padding: calc(var(--header-height) + 34px) 24px 30px !important;
        background:
            radial-gradient(circle at 82% 12%, rgba(216, 197, 168, 0.12), transparent 32%),
            linear-gradient(145deg, #26070f 0%, var(--perla-bordo) 64%, #1c050b 100%);
    }

    .mobile-nav {
        gap: 6px;
        counter-reset: mobile-menu;
    }

    .mobile-nav a {
        counter-increment: mobile-menu;
        position: relative;
        min-height: 56px;
        padding: 15px 0 15px 44px !important;
        border-bottom: 1px solid rgba(234, 233, 229, 0.12);
        font-family: var(--font-body) !important;
        font-size: clamp(17px, 4.8vw, 22px) !important;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: 0.08em !important;
        text-transform: uppercase;
    }

    .mobile-nav a::before {
        content: counter(mobile-menu, decimal-leading-zero);
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        color: var(--perla-gold-light);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.12em;
    }

    .mobile-nav a::after {
        content: "";
        width: 8px;
        height: 8px;
        border-top: 1.5px solid currentColor;
        border-right: 1.5px solid currentColor;
        color: var(--perla-gold-light);
        transform: rotate(45deg);
    }

    .mobile-panel-footer {
        margin-top: 28px !important;
        padding-top: 22px;
        border-top: 1px solid rgba(234, 233, 229, 0.12);
        gap: 9px;
        font-size: 13px;
    }
}

@media (max-width: 390px) {
    .site-logo {
        left: calc(50vw - 11px);
        width: 218px !important;
        height: 72px !important;
        transform: translate(-50%, -50%);
    }

    .site-logo .logo-image {
        transform: scale(1.25);
        transform-origin: center;
    }

    .footer-logo {
        width: 248px !important;
        height: 96px !important;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }

    .mobile-panel {
        padding-inline: 18px !important;
    }

    .mobile-nav a {
        min-height: 52px;
        padding-left: 38px !important;
        font-size: 16px !important;
    }
}

/* Yeni footer düzeni için mobil logo dengesi */
@media (max-width: 960px) {
    .site-footer .footer-logo {
        width: clamp(220px, 58vw, 292px) !important;
        height: 88px !important;
    }

    .site-footer .footer-logo img {
        transform: scale(1.28);
        transform-origin: left center;
    }
}

@media (max-width: 390px) {
    .site-footer .footer-logo {
        width: 224px !important;
        height: 82px !important;
    }
}
