/* Şamil Veri Merkezi — mobile UX fixes (max-width: 900px) */

/* Co-founder block — all viewports */
.nx-founder__cofounder {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(107, 29, 58, 0.1);
}

.nx-founder__cofounder .nx-founder__name {
  font-size: 1.85rem;
  margin-bottom: 0.35rem;
}

.nx-founder__role {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nx-burgundy);
  margin-bottom: 0.55rem;
}

@media (max-width: 900px) {
  html {
    font-size: 15px;
    overflow-x: clip;
    max-width: 100%;
  }

  body {
    overflow-x: clip;
    max-width: 100%;
  }

  :root {
    /* WCAG 4.5:1 on #F2F0F4 */
    --nx-ink-muted: #5F555C;
    --nx-ink-subtle: #6B6368;
    --nx-radius-sm: 8px;
    --nx-radius-md: 12px;
    --nx-radius-lg: 16px;
  }

  /* ── Header: centered pill, logo left, toggle right ── */
  .nx-header {
    left: 0;
    right: 0;
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  .nx-header__inner {
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    gap: 12px;
    border-radius: var(--nx-radius-lg);
    padding: 8px 10px 8px 14px;
    box-sizing: border-box;
  }

  .nx-header__menu {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto;
    flex-shrink: 0;
    border-radius: var(--nx-radius-md);
  }

  /* ── Full-height drawer + backdrop (no horizontal overflow) ── */
  .nx-mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
    overflow: hidden;
    clip-path: inset(0);
  }

  .nx-mobile-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
    clip-path: none;
  }

  .nx-drawer-backdrop,
  .nx-drawer-panel {
    pointer-events: none;
  }

  .nx-mobile-drawer.is-open .nx-drawer-backdrop,
  .nx-mobile-drawer.is-open .nx-drawer-panel {
    pointer-events: auto;
  }

  .nx-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(42, 31, 36, 0.32);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .nx-mobile-drawer.is-open .nx-drawer-backdrop {
    opacity: 1;
  }

  .nx-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(100%, 20rem);
    display: flex;
    flex-direction: column;
    padding: calc(var(--nx-nav-height) + env(safe-area-inset-top, 0px) + 8px) 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    border-left: 1px solid var(--nx-glass-border);
    transform: translateX(100%);
    transition: transform 0.35s var(--nx-ease-out);
    overflow-y: auto;
    visibility: hidden;
  }

  .nx-mobile-drawer.is-open .nx-drawer-panel {
    transform: none;
    visibility: visible;
  }

  .nx-mobile-nav {
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border: none;
  }

  .nx-mobile-nav[hidden] {
    display: flex !important;
  }

  .nx-mobile-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 4px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--nx-ink-head);
    border-bottom: 1px solid rgba(107, 29, 58, 0.08);
  }

  .nx-mobile-nav__cta {
    margin-top: 16px;
    min-height: 44px;
    font-weight: 600;
    color: var(--nx-burgundy) !important;
    border-bottom: none !important;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  /* Hide legacy in-header mobile nav slot */
  .nx-header > .nx-mobile-nav {
    display: none !important;
  }

  body.nx-drawer-open {
    overflow: hidden;
  }

  /* ── Hero: full viewport, background bleed, readable text ── */
  .nx-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
    min-height: 100svh;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    padding-top: calc(var(--nx-nav-height) + env(safe-area-inset-top, 0px));
    overflow: hidden;
  }

  .nx-hero__visual {
    position: absolute;
    inset: 0;
    padding: 0;
    margin: 0;
    z-index: 0;
    max-width: 100%;
  }

  .nx-hero__picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    aspect-ratio: unset;
    max-height: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    background: var(--nx-bg-soft);
  }

  .nx-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center 30%;
    border-radius: 0;
  }

  .nx-hero__shade {
    display: block;
    z-index: 1;
    background: linear-gradient(
      180deg,
      transparent 0%,
      transparent 38%,
      rgba(242, 240, 244, 0.18) 68%,
      rgba(242, 240, 244, 0.42) 100%
    );
  }

  .nx-hero__content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px max(14px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    margin-top: 0;
  }

  .nx-hero__content > .nx-fade:first-child {
    background: rgba(242, 240, 244, 0.92);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border-radius: var(--nx-radius-md);
    padding: 14px 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 4px 24px rgba(107, 29, 58, 0.06);
  }

  .nx-eyebrow {
    margin-bottom: 6px;
    font-size: 0.62rem;
    padding: 0.25rem 0.6rem 0.25rem 0.4rem;
    background: rgba(255, 255, 255, 0.72);
  }

  .nx-hero__title {
    font-family: var(--nx-font-body);
    font-size: clamp(1.45rem, 5.2vw, 1.75rem);
    line-height: 1.18;
    margin-bottom: 6px;
    color: var(--nx-ink-head);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }

  .nx-hero__title em {
    font-family: inherit;
    font-style: normal;
    font-weight: 700;
    display: inline;
    margin-top: 0;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--nx-burgundy);
  }

  .nx-hero__lead {
    color: var(--nx-ink-muted);
    font-size: 0.8125rem;
    line-height: 1.55;
    margin-bottom: 12px;
  }

  .nx-hero__actions {
    gap: 6px;
    margin-bottom: 0;
  }

  .nx-hero__actions .nx-btn--primary {
    width: 100%;
    min-height: 44px;
    font-size: 0.875rem;
    padding: 0.65rem 1.1rem;
    border-radius: var(--nx-radius-pill);
  }

  .nx-hero__actions .nx-btn--ghost {
    width: auto;
    min-height: 44px;
    padding: 8px 4px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--nx-burgundy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    justify-content: flex-start;
  }

  /* Stats stay in hero but below fold on initial load */
  .nx-hero__stats {
    display: none;
  }

  .nx-hero__trust {
    display: none;
  }

  .nx-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .nx-wrap {
    padding-left: 14px;
    padding-right: 14px;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Cards: md radius; pill reserved for primary CTAs */
  .nx-glass:not(.nx-header__inner):not(.nx-drawer-panel) {
    border-radius: var(--nx-radius-md);
  }

  .nx-trust-bar__inner,
  .nx-kolokasyon__card,
  .nx-service,
  .nx-location,
  .nx-price,
  .nx-faq__item {
    border-radius: var(--nx-radius-md);
  }

  /* Prevent decorative bleed from causing scroll */
  .nx-kolokasyon__metrics::before {
    right: 0;
  }

  .nx-marquee {
    max-width: 100%;
  }

  .nx-cities {
    max-width: 100%;
    overflow: hidden;
  }

  /* ── Sticky CTA: after scroll, safe area, hide when drawer open ── */
  body.has-mobile-cta {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .nx-mobile-bar {
    display: flex;
    align-items: center;
    z-index: 40;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 6px;
    border-radius: var(--nx-radius-pill);
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--nx-ease-out), opacity 0.35s ease;
    box-sizing: border-box;
    max-width: calc(100% - 24px);
  }

  .nx-mobile-bar.is-visible {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  body.nx-drawer-open .nx-mobile-bar,
  body.nx-drawer-open .nx-mobile-bar.is-visible {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
  }

  .nx-mobile-bar .nx-btn {
    width: 100%;
    min-height: 48px;
    color: #fff;
    border-radius: var(--nx-radius-pill);
  }

  /* Co-founder stack on mobile */
  .nx-founder__cofounder .nx-founder__name {
    font-size: 1.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  @media (max-width: 900px) {
    .nx-mobile-bar,
    .nx-drawer-panel,
    .nx-drawer-backdrop {
      transition: none;
    }

    .nx-mobile-bar:not(.is-visible) {
      opacity: 0;
    }
  }
}
