/* =========================================================
   Beko-Elite — Responsive layer (mobile-first breakpoints)
   360 → 480 → 640 → 768 → 1024 → 1200 → 1600 → 2560 (4K)
   ========================================================= */

/* Very small phones */
@media (max-width: 379px) {
  .brand__word { font-size: 1.1rem; }
  .brand__tag { display: none; }
  .hero .btn-row { grid-template-columns: 1fr; }
  .mobile-bar a span { font-size: .82rem; }
  .skill-list { grid-template-columns: 1fr; }
}

@media (min-width: 480px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 640px) {
  .device-grid { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .contact-cards { grid-template-columns: 1fr 1fr; }
  .showcase__step { flex-basis: 70%; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .hero .btn-row { grid-template-columns: repeat(4, auto); max-width: none; display: flex; }
  .area-list { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  :root { --header-h: 74px; }
  .page-hero { padding-block: 36px 64px; }
  .page-hero__grid { grid-template-columns: 1.3fr 1fr; }
  .page-hero__art svg { height: 320px; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .process { grid-template-columns: repeat(4, 1fr); }
  .process__item { padding: 70px 20px 22px; }
  .process__item::before { top: 20px; inset-inline-start: 20px; }
  .progress-line { display: none; }
  .areas-wrap { grid-template-columns: 1fr 1fr; gap: 48px; }
  .area-list { grid-template-columns: 1fr; }
  .blog-toolbar { grid-template-columns: 1fr auto; align-items: center; }
  .blog-toolbar input { max-width: 420px; }
  .search-modal__panel { margin-top: 10vh; }
  .hero__inner { padding-block: 60px 56px; }
}

/* Tablet landscape / small laptop */
@media (min-width: 1024px) {
  .topbar { display: block; }
  .lang-link { display: inline-flex; }
  .header-cta { display: inline-flex; }
  .device-grid { grid-template-columns: repeat(4, 1fr); }
  .device-card__stage { height: 240px; }
  .device-card__stage svg { height: 210px; }
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .post-grid { grid-template-columns: repeat(3, 1fr); }
  .problem-grid { grid-template-columns: repeat(3, 1fr); }
  .layout-article { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }
  .sidebar { position: sticky; top: calc(var(--header-h) + 20px); }
  .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); }
  .footer-brand { grid-column: auto; }
  .footer-bottom { grid-template-columns: 1fr auto; align-items: center; padding-bottom: 22px; }

  /* Mobile bar → floating action buttons on desktop */
  .mobile-bar { display: none; }
  .fab-stack { display: grid; gap: 12px; position: fixed; inset-inline-start: 22px; bottom: 22px; z-index: 90; }
  .fab { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 14px 30px -10px rgba(0,0,0,.4); position: relative; transition: transform .3s var(--ease-spring); }
  .fab:hover { transform: scale(1.08); color: #fff; }
  .fab svg { width: 26px; height: 26px; }
  .fab--wa { background: var(--wa); }
  .fab--wa::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); animation: ring 2.4s var(--ease) infinite; }
  .fab--call { background: var(--blue-500); }
  .fab__tip { position: absolute; inset-inline-start: calc(100% + 10px); white-space: nowrap; background: var(--ink); color: #fff; font-size: .82rem; padding: 6px 10px; border-radius: 8px; opacity: 0; transform: translateX(-6px); transition: .25s; pointer-events: none; }
  html[dir="rtl"] .fab__tip { transform: translateX(6px); }
  .fab:hover .fab__tip { opacity: 1; transform: none; }

  /* Hero desktop composition */
  .hero { align-items: center; min-height: min(860px, calc(100svh - var(--header-h) - 38px)); }
  .hero__inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; padding-block: 80px; }
  .hero__floats { display: grid; gap: 16px; justify-items: end; }
  html[dir="ltr"] .hero__floats { justify-items: start; }
  .hero__floats .float-card:nth-child(2) { margin-inline-end: 60px; }
  .hero__floats .float-card:nth-child(3) { margin-inline-end: 20px; }
  .hero__media::after { background: linear-gradient(270deg, rgba(4,20,49,.92) 0%, rgba(4,20,49,.7) 40%, rgba(4,20,49,.25) 75%, rgba(4,20,49,.45) 100%), linear-gradient(180deg, transparent 70%, #041431 100%); }
  html[dir="ltr"] .hero__media::after { background: linear-gradient(90deg, rgba(4,20,49,.92) 0%, rgba(4,20,49,.7) 40%, rgba(4,20,49,.25) 75%, rgba(4,20,49,.45) 100%), linear-gradient(180deg, transparent 70%, #041431 100%); }
  .scroll-cue { display: flex; position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.4); border-radius: 14px; justify-content: center; padding-top: 8px; }
  .scroll-cue i { width: 3px; height: 8px; background: #fff; border-radius: 2px; animation: cue 1.8s var(--ease) infinite; }
  @keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
  .quick-search { padding-bottom: 40px; }
  .hero__video-note { top: auto; bottom: 22px; inset-inline-end: 64px; }
  .quick-search__box { max-width: 860px; margin-inline: auto; }
  .quick-search__chips { justify-content: center; }

  /* Showcase: pinned stage + steps */
  .showcase__wrap { grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
  .showcase__stage { display: block; position: sticky; top: calc(var(--header-h) + 40px); height: calc(100svh - var(--header-h) - 120px); max-height: 640px; }
  .showcase__stage-inner { position: relative; height: 100%; border-radius: var(--radius-lg); background: radial-gradient(60% 60% at 50% 60%, rgba(47,124,255,.25), transparent 70%), rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); display: grid; place-items: center; overflow: hidden; }
  .showcase__stage .stage-dev { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: translateY(30px) scale(.94) rotateY(-12deg); transition: opacity .7s var(--ease), transform .9s var(--ease); }
  .showcase__stage .stage-dev.is-active { opacity: 1; transform: none; }
  .showcase__stage .stage-dev svg { height: 74%; width: auto; filter: drop-shadow(0 40px 50px rgba(0,0,0,.5)); }
  .showcase__stage .stage-label { position: absolute; bottom: 20px; inset-inline-start: 22px; font-family: var(--font-en); font-weight: 800; font-size: 4.5rem; color: rgba(255,255,255,.06); line-height: 1; }
  .showcase__steps { display: grid; gap: 0; overflow: visible; margin: 0; padding: 0; }
  .showcase__step { min-height: 70svh; display: flex; flex-direction: column; justify-content: center; background: none; border: 0; padding: 0 0 0 0; opacity: .3; transition: opacity .5s; }
  .showcase__step.is-active { opacity: 1; }
  .showcase__step .step-art { display: none; }
  .showcase__step h3 { font-size: 2rem; }
  .showcase__dots { display: none; }

  .explode__pin { height: 300vh; }
  .explode__sticky { position: sticky; top: calc(var(--header-h) + 16px); }
  .explode__canvas-wrap { height: calc(100svh - var(--header-h) - 140px); }
  .split--wide { grid-template-columns: 1.1fr .9fr; }
}

@media (min-width: 1200px) {
  .main-nav { display: block; }
  .main-nav li:first-child { display: none; } /* logo already links home */
  .burger { display: none; }
  .header-actions { margin-inline-start: 12px; }
  .hero h1 { font-size: 4.6rem; }
  .problem-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) and (max-width: 1480px) {
  .main-nav a { padding: 8px 8px; font-size: .9rem; }
  .main-nav a::after { inset-inline: 8px; }
  .header-cta { padding: 0 14px; }
}

/* Large / 4K screens: scale up type & container rather than stretching */
@media (min-width: 1600px) {
  :root { --container: 1440px; }
  body { font-size: 17px; }
  .hero h1 { font-size: 5.4rem; }
}
@media (min-width: 2400px) {
  :root { --container: 1800px; }
  html { font-size: 20px; }
}

/* Touch devices: no tilt transforms */
@media (hover: none) {
  .device-card { transform: none !important; }
  .device-card__glare { display: none; }
}

/* Short landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; }
  .hero__inner { padding-block: 30px; }
  .drawer { padding-bottom: 90px; }
}

/* Reduced motion: keep layout, drop motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal, .split-words .w, .img-zoom > * { opacity: 1 !important; transform: none !important; }
  .intro { display: none; }
  .explode__pin { height: auto !important; }
}

@media print {
  .site-header, .topbar, .mobile-bar, .fab-stack, .site-footer, .hero__media, .search-modal, .intro { display: none !important; }
  .hero, .page-hero { color: #000; background: none; }
}
