/*
 * global.css - Nottworks Child Theme (Revision 02)
 *
 * Global styles, shared container, unified button system,
 * typography defaults, and editorial eyebrow label system.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-body);
  color: var(--color-ink-navy);
  background-color: var(--color-warm-white, #F5F3EE);
  line-height: var(--leading-normal);
  scrollbar-color: rgba(100, 116, 139, 0.35) transparent;
  scrollbar-width: thin;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle, transparent scrollbar track for clean edge rendering */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
}

/* Brand text selection color (Restrained accent tint, never saturated blue) */
::selection {
  background-color: rgba(77, 155, 232, 0.22);
  color: #111827;
}

::-moz-selection {
  background-color: rgba(77, 155, 232, 0.22);
  color: #111827;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-warm-white, #F5F3EE);
  color: var(--color-ink-navy, #111827);
  font-family: var(--font-body, 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html:has(body.nottworks-homepage),
body.nottworks-homepage {
  background-color: var(--color-deep-charcoal);
}

/* Force Manrope typography site-wide across all templates & Astra overrides */
body,
button,
input,
select,
textarea,
.ast-button,
.ast-custom-button,
.entry-content,
.site-content {
  font-family: var(--font-body, 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  font-family: var(--font-heading, 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
}

/* Accessibility: Skip Link */
.nw-skip-link {
  position: absolute;
  top: -999px;
  left: 24px;
  background: var(--color-ink-navy);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  z-index: 99999;
  text-decoration: none;
  font-weight: var(--weight-semibold);
  transition: top 0.2s ease;
}

.nw-skip-link:focus {
  top: 16px;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-ink-navy);
  margin-top: 0;
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
}

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
  color: var(--color-steel);
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =============================================================================
   SHARED CONTAINER (Rev 02: single source for all sections)
   Content in every section aligns to the same left/right bounds.
   Full-width section backgrounds extend to viewport edges;
   content inside sits within .nw-container.
   ============================================================================= */

/* =============================================================================
   UNIFIED GLOBAL SECTION LAYOUT SYSTEM
   Every section top boundary aligns exactly with the viewport top (y = 0).
   The section background extends behind the floating header.
   All section content begins below the header with a standardized visual gap.
   ============================================================================= */

.nw-section {
  padding-top: var(--section-padding-top);
  padding-bottom: var(--section-padding-bottom);
  position: relative;
  background-color: var(--color-warm-white);
  scroll-margin-top: 0 !important;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  :target {
    scroll-margin-top: 0 !important;
  }
}

/* One shared container — replaces both nw-container and nw-container-wide */
.nw-container,
.nw-container-wide {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
  box-sizing: border-box;
}

/* =============================================================================
   EDITORIAL SECTION EYEBROW SYSTEM (Rev 03: clean typographic section label)
   Typographic, restrained, section-specific. No decorative numbers or lines.
   ============================================================================= */

.nw-label {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-steel);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: var(--rhythm-eyebrow-gap);
  line-height: 1.2;
}

/* The section description text */
.nw-label__text {
  color: var(--color-steel);
}

/* Light-surface variant (on dark backgrounds like Why Nottworks & FAQ) */
.nw-label--light {
  color: #94a3b8;
}
.nw-label--light .nw-label__text {
  color: #94a3b8;
}

/* Safety reset: hide any stray decorative number or separator markup */
.nw-label__num,
.nw-label__sep {
  display: none;
}

/* Legacy class kept for backwards compat — reset to neutral style */
.nw-eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-steel);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: var(--rhythm-eyebrow-gap);
}

.nw-eyebrow::before {
  display: none; /* Remove old blue bar */
}

.nw-eyebrow--light {
  color: #94a3b8;
}

/* Section heading scale */
.nw-section-title {
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  letter-spacing: var(--tracking-tight);
  color: var(--color-ink-navy);
  margin-bottom: var(--rhythm-heading-gap);
  line-height: var(--leading-snug);
}

.nw-section-header {
  margin-bottom: var(--rhythm-desc-content);
}

.nw-section-desc {
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  line-height: var(--leading-relaxed);
  color: var(--color-steel);
  max-width: 640px;
  margin-bottom: 0;
}

/* =============================================================================
   UNIFIED BUTTON SYSTEM (Rev 02)
   All variants share the same radius, height, typography, and transition.
   ============================================================================= */

.nw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-gap);
  font-family: var(--font-body);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  min-height: var(--btn-height);
  border-radius: var(--btn-radius);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--btn-transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  position: relative;
  -webkit-user-select: none;
  user-select: none;
}

.nw-btn svg {
  width: var(--btn-icon-size);
  height: var(--btn-icon-size);
  flex-shrink: 0;
}

/* --- Primary: Ink Navy background, white text --- */
.nw-btn-primary {
  background-color: var(--btn-primary-bg, var(--color-ink-navy));
  color: var(--btn-primary-text, #ffffff);
  border-color: var(--btn-primary-border, var(--color-ink-navy));
}

.nw-btn-primary:hover,
.nw-btn-primary:focus-visible {
  background-color: var(--btn-primary-hover-bg, #1f2937);
  border-color: var(--btn-primary-hover-border, #1f2937);
  box-shadow: var(--btn-primary-hover-shadow, 0 4px 14px rgba(17, 24, 39, 0.16));
  transform: translateY(-1px);
  color: var(--btn-primary-text, #ffffff);
}

.nw-btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* --- Secondary: white/neutral background, ink-navy text --- */
.nw-btn-secondary {
  background-color: var(--btn-secondary-bg, #ffffff);
  color: var(--btn-secondary-text, var(--color-ink-navy));
  border-color: var(--btn-secondary-border, rgba(17, 24, 39, 0.18));
}

.nw-btn-secondary:hover,
.nw-btn-secondary:focus-visible {
  background-color: var(--btn-secondary-hover-bg, var(--color-warm-white));
  border-color: var(--btn-secondary-hover-border, rgba(17, 24, 39, 0.35));
  color: var(--btn-secondary-text, var(--color-ink-navy));
  transform: translateY(-1px);
  box-shadow: var(--btn-secondary-hover-shadow, 0 4px 12px rgba(17, 24, 39, 0.06));
}

.nw-btn-secondary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* --- Outline White: for dark / video backgrounds --- */
.nw-btn-outline-white {
  background-color: var(--btn-dark-outline-bg, rgba(255, 255, 255, 0.08));
  color: var(--btn-dark-outline-text, #ffffff);
  border-color: var(--btn-dark-outline-border, rgba(255, 255, 255, 0.28));
  backdrop-filter: blur(4px);
}

.nw-btn-outline-white:hover,
.nw-btn-outline-white:focus-visible {
  background-color: var(--btn-dark-outline-hover-bg, rgba(255, 255, 255, 0.16));
  border-color: var(--btn-dark-outline-hover-border, rgba(255, 255, 255, 0.55));
  color: #ffffff;               /* stays white — no hue shift */
  transform: translateY(-1px);
}

.nw-btn-outline-white:active {
  transform: translateY(0);
  background-color: var(--btn-dark-outline-bg, rgba(255, 255, 255, 0.08));
}

/* --- Ghost / text CTA --- */
.nw-btn-text {
  background: transparent;
  padding: 0;
  min-height: auto;
  color: var(--color-ink-navy);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
}

.nw-btn-text:hover {
  color: var(--color-accent-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Accessible focus ring (applies to all interactive elements) --- */
:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-accent-blue, #4D9BE8) !important;
  outline-offset: 2px !important;
}

/* Language selector pill */
.nw-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-steel);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(17, 24, 39, 0.1);
  transition: var(--btn-transition);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nw-lang-switch:hover {
  background: var(--color-warm-white);
  color: var(--color-ink-navy);
  border-color: rgba(17, 24, 39, 0.2);
}

.nw-lang-switch__active {
  color: var(--color-ink-navy);
  font-weight: var(--weight-bold);
}

.nw-lang-switch__divider {
  color: rgba(17, 24, 39, 0.25);
  margin: 0 2px;
}

/* =============================================================================
   MODERNIZED BACK TO TOP BUTTON (#ast-scroll-top)
   ============================================================================= */

#ast-scroll-top,
.nw-scroll-top {
  display: none;
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  line-height: 44px;
  border-radius: 50% !important;
  background-color: var(--color-ink-navy, #111827) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.18), 0 1px 3px rgba(17, 24, 39, 0.08);
  cursor: pointer;
  z-index: 990;
  padding: 0;
  margin: 0;
  outline: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
  text-align: center;
}

/* Flex centering for the upward arrow icon */
#ast-scroll-top.nw-scroll-top,
#ast-scroll-top {
  align-items: center;
  justify-content: center;
}

#ast-scroll-top[style*="display: block"] {
  display: flex !important;
}

#ast-scroll-top svg,
.nw-scroll-top svg,
#ast-scroll-top .ast-arrow-svg,
.ast-scroll-top-icon svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  transform: rotate(180deg) !important;
  margin: 0 auto;
  pointer-events: none;
}

/* Hover state: restrained elevation & subtle shade shift, NO bright blue */
#ast-scroll-top:hover {
  background-color: #1f2937 !important;
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.26), 0 2px 4px rgba(17, 24, 39, 0.1);
}

/* Active / click state */
#ast-scroll-top:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.2);
}

/* Keyboard focus state */
#ast-scroll-top:focus-visible {
  outline: 2px solid var(--color-accent-blue, #4D9BE8);
  outline-offset: 3px;
  border-radius: 50% !important;
}

/* Tablet & Mobile positioning */
@media (max-width: 768px) {
  .nw-section-title {
    font-size: var(--nw-section-title-mobile, clamp(1.75rem, 7.2vw, 2.15rem)) !important;
    line-height: var(--nw-section-title-mobile-lh, 1.18) !important;
    letter-spacing: var(--nw-section-title-mobile-ls, -0.025em) !important;
    font-weight: var(--nw-section-title-mobile-weight, 800) !important;
  }

  #ast-scroll-top,
  .nw-scroll-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    line-height: 42px;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #ast-scroll-top,
  .nw-scroll-top {
    transition: none !important;
  }

  #ast-scroll-top:hover,
  #ast-scroll-top:active {
    transform: none !important;
  }
}

/* =============================================================================
   ASTRA PARENT THEME RESET FOR CUSTOM INTERACTIVE CONTROLS
   Guarantees Astra's global button hover styles never leak into our components.
   ============================================================================= */
button.nw-form-dropdown-trigger,
button.nw-phone-prefix-btn,
button.nw-nav__link,
button.nw-faq-trigger,
button.nw-hamburger,
button.nw-service-tab,
button.nw-process-tab,
.nw-form-dropdown-trigger,
.nw-phone-prefix-btn,
.nw-header__logo,
.nw-footer__logo {
  text-transform: none !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Ensure logo links never inherit Astra's a:focus dotted outline or border on mouse click */
.nw-header__logo:focus:not(:focus-visible),
.nw-header__logo:active,
.nw-footer__logo:focus:not(:focus-visible),
.nw-footer__logo:active {
  outline: none !important;
  outline-style: none !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* =============================================================================
   SECTION TRANSITIONS & ENTRANCE ANIMATIONS (Rev 05)
   Lightweight, subtle, performant. Content never remains invisible.
   ============================================================================= */

/* Subtle section entrance transitions (progressive enhancement via JS) */
.nw-reveal-init .nw-container {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease-out, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.nw-reveal-init.nw-revealed .nw-container,
.nw-revealed .nw-container {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Subtle staggered card entrance */
.nw-card-reveal-init {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nw-card-reveal-init.nw-card-revealed,
.nw-card-revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* =============================================================================
   GLOBAL ACCORDION SYSTEM UTILITIES
   ============================================================================= */

details.nw-accordion-initialized,
details.nw-accordion-initialized *,
.nw-faq,
.nw-faq *,
.nw-sd-faq,
.nw-sd-faq * {
  overflow-anchor: none;
}

details.nw-accordion-initialized {
  overflow: hidden;
}

details.nw-accordion-initialized summary {
  cursor: pointer;
  user-select: none;
}

details.nw-accordion-initialized summary::-webkit-details-marker {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .nw-reveal-init .nw-container,
  .nw-card-reveal-init,
  details.nw-accordion-initialized * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* =============================================================================
   MOBILE SECTION ALIGNMENT & HEADER CLEARANCE SYSTEM
   Matches desktop full-screen slide architecture:
   1. Section top edge aligns exactly with the viewport top (scroll-margin-top: 0).
   2. Floating header overlays top of section; internal padding-top reserves clearance.
   3. All 6 menu-linked homepage sections have at least 100svh height (expanding naturally).
   ============================================================================= */
@media (max-width: 900px) {
  html,
  body,
  .nw-main,
  main {
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
  }

  span.nw-anchor-target,
  span#services,
  .nw-anchor-target {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  section#hizmetler,
  section#services,
  #hizmetler,
  #surec,
  #process,
  #nasil-calisiyoruz,
  #neden-biz,
  #why-us,
  #neden-nottworks,
  #sss,
  #faq,
  #blog,
  #iletisim,
  #contact,
  #hizmetler:target,
  #surec:target,
  #process:target,
  #nasil-calisiyoruz:target,
  #neden-biz:target,
  #why-us:target,
  #neden-nottworks:target,
  #sss:target,
  #faq:target,
  #blog:target,
  #iletisim:target,
  #contact:target,
  section.nw-section,
  .nw-contact-section {
    scroll-margin-top: 0 !important;
    min-height: auto !important;
    height: auto !important;
    box-sizing: border-box !important;
    padding-top: var(--nw-mobile-header-clearance, 86px) !important;
  }

  /* Ensure first content block has zero top margin so header bottom gap matches top gap */
  .nw-section > .nw-container:first-child,
  .nw-section .nw-container > *:first-child,
  .nw-contact-section .nw-container > *:first-child,
  .nw-faq__wrapper > *:first-child,
  .nw-blog__header,
  .nw-contact-header {
    margin-top: 0 !important;
  }
}


