/* =============================================
   MOBILE-TUNE.CSS — Portfolio desegnator.pro
   Font: Oswald 600 (display), Onest (body)
   Updated: typography fix for Cyrillic
   ============================================= */

/* ---- HAMBURGER TOGGLE (hidden on desktop) ---- */
.nav-toggle,
.nav-mobile-cta { display: none }

/* ============================================= */
/* TABLET / LANDSCAPE PHONES  max-width: 768px  */
/* ============================================= */
@media (max-width: 768px) {

  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-width: 0;
  }

  /* ---- NAV ---- */
  nav {
    align-items: center !important;
    position: fixed;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 16px 18px !important;
    gap: 16px;
  }
  .nav-links { display: none }
  .nav-cta   { display: none !important }

  .nav-logo, .logo {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: clamp(18px, 5vw, 21px) !important;
    line-height: 1;
    letter-spacing: .08em;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    min-width: 0;
  }

  /* ---- HAMBURGER BUTTON ---- */
  .nav-toggle {
    position: relative;
    z-index: 3;
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 4px;
    background: rgba(255,255,255,.04);
    color: var(--accent, var(--a, #C8FF00));
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px)  rotate(45deg) }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0 }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg) }

  /* ---- DROPDOWN MENU ---- */
  nav .nav-links {
    position: absolute !important;
    left: 18px;
    right: 18px;
    top: calc(100% + 1px);
    z-index: 2;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: auto;
    max-width: calc(100vw - 36px);
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    padding: 12px;
    background: rgba(10,10,10,.94);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border, var(--br, rgba(255,255,255,.08)));
    border-radius: 4px;
    box-shadow: 0 18px 50px rgba(0,0,0,.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  nav.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  nav .nav-links li  { display: block; width: 100% }
  nav .nav-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 12px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.15;
    letter-spacing: .12em;
    white-space: normal;
  }
  nav .nav-links a:hover { background: rgba(255,255,255,.04) }
  nav .nav-links .nav-ai {
    display: flex;
    background: transparent !important;
    border: 1px solid rgba(200,255,0,.24);
    color: var(--accent, var(--a, #C8FF00)) !important;
    padding: 14px 12px;
    box-shadow: none;
    transform: none;
  }
  nav .nav-mobile-cta { display: block }
  nav .nav-mobile-cta a {
    margin-top: 8px;
    background: var(--accent, var(--a, #C8FF00));
    color: var(--black, var(--b, #0A0A0A)) !important;
    justify-content: center;
    border: 1px solid rgba(200,255,0,.55);
  }

  .nav-back, .back { font-size: 10px; letter-spacing: .1em; white-space: nowrap }

  /* ---- DISPLAY TYPOGRAPHY ---- */
  h1,
  h2,
  .project-title,
  .hero-title,
  .contact-title,
  .modal-title,
  .mindmap-center-title {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: clamp(38px, 11vw, 58px) !important;
    line-height: .94 !important;
    letter-spacing: 0 !important;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    max-width: 100%;
  }

  h2,
  .content-title,
  .section-title,
  .narrative-title {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: clamp(30px, 9vw, 44px) !important;
    line-height: .96 !important;
    letter-spacing: 0 !important;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }

  .next-title {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: clamp(32px, 10vw, 48px) !important;
    line-height: .96 !important;
    letter-spacing: 0 !important;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    max-width: 100%;
  }

  .stat-num, .step-num, .approach-num, .concept-num, .num {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
  }

  /* ---- HERO / PROJECT HERO ---- */
  .project-hero, .hero {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 108px 18px 52px !important;
    gap: 30px;
    overflow: hidden;
    min-height: auto;
    align-items: start;
  }
  .hero-left, .hero-right,
  .project-hero-left, .project-hero-right,
  .hero > div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .project-hero-right { width: 100% }

  .project-title,
  body:has(.hero .meta) .hero h1 {
    font-size: clamp(38px, 11vw, 64px) !important;
    line-height: .94;
    letter-spacing: 0;
    margin-bottom: 16px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }

  .project-subtitle, .project-desc, .lead {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.65;
    word-break: normal;
    overflow-wrap: normal;
  }

  .hero-bg, .bg, .hero-bg-text {
    font-size: clamp(76px, 24vw, 128px) !important;
    max-width: 100%;
    overflow: hidden;
  }

  /* ---- META / TAGS ---- */
  .project-meta-grid, .meta {
    grid-template-columns: 1fr !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .project-meta-grid *, .meta * { min-width: 0; max-width: 100% }
  .meta-item, .mi, .meta-row { padding: 18px 20px }
  .meta-value, .mv { font-size: 13px; line-height: 1.45; white-space: normal; word-break: normal }
  .project-tags, .tags, .tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .tag { max-width: 100%; white-space: normal; line-height: 1.2; padding: 8px 14px }

  /* ---- SECTIONS / CONTENT ---- */
  .intro-section, .ai-content, .graphics-content, .approach-section,
  .section, .wrap, .stats, .pal, .slides,
  .project-content, .palette-section, .font-section, .values-section {
    width: 100%;
    max-width: 100%;
    padding-left: 18px !important;
    padding-right: 18px !important;
    box-sizing: border-box;
  }
  .cover, .project-cover {
    width: auto;
    max-width: calc(100% - 36px);
    margin-left: 18px !important;
    margin-right: 18px !important;
    box-sizing: border-box;
  }
  .values-section {
    max-width: calc(100% - 36px);
    margin-left: 18px !important;
    margin-right: 18px !important;
    box-sizing: border-box;
  }

  /* ---- GRIDS → SINGLE COLUMN ---- */
  .projects-grid, .process-grid, .modal-images,
  .ai-grid, .ai-grid.wide,
  .graphics-grid, .approach-grid, .apk-grid,
  .cards, .topics, .slides-grid,
  .images2, .images3, .deliver,
  .palette, .palette-grid, .grid4,
  .values-grid, .stats-grid, .images-grid,
  .images-grid-3, .deliverables-grid,
  .concept-grid, .steps-grid, .features-grid,
  .conversion-grid, .carriers-grid,
  .logo-split, .font-grid, .split, .narrative-item {
    grid-template-columns: 1fr !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .col-8, .col-4, .col-6 { grid-column: span 1 !important }

  .ai-card, .work-card, .approach-card, .card, .slide, .stat,
  .value-block, .color-card, .carrier-card, .phone-card,
  .feature-card, .conv-card, .concept-card, .step-card,
  .font-card, .deliver div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .ai-card-link, .ai-card-youtube { display: block; width: 100%; max-width: 100% }
  .ai-media, .work-media, .thumb { width: 100%; max-width: 100%; min-width: 0 }
  .ai-media img, .work-media img, .thumb img,
  .case-img, .cover img, .project-cover img {
    max-width: 100%;
    height: 100%;
    object-position: center center;
  }
  .work-card.is-vertical .work-media { aspect-ratio: 3/4 }
  .work-card.is-vertical .work-media img { object-fit: contain }

  /* ---- APK PHONES ---- */
  .apk-section {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 30px 18px !important;
    box-sizing: border-box;
  }
  .apk-grid { gap: 26px }
  .phone-shell {
    width: min(100%, 320px) !important;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 8px;
    border-radius: 26px;
  }
  .phone-screen { aspect-ratio: 9/19; border-radius: 22px; background: #050505 }
  .phone-screen img { width: 100%; height: 100%; object-fit: contain !important; object-position: center center }

  /* ---- NEXT PROJECT / FOOTER ---- */
  .next, .next-project {
    width: 100%;
    max-width: 100%;
    padding: 56px 18px !important;
    gap: 22px;
    align-items: flex-start;
  }
  .next-arrow, .arrow, .arr { flex: 0 0 auto }

  footer {
    width: 100%;
    max-width: 100%;
    padding: 20px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px;
    text-align: center;
    line-height: 1.5;
  }
  footer span { display: block; max-width: 100% }

  /* ---- BOYARKO / FORTRESS specific ---- */
  body:has(.font-card > div[style*="Georgia"]) .font-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
    min-width: 0;
  }
  body:has(.font-card > div[style*="Georgia"]) .font-card {
    max-width: 100%;
    min-width: 0;
    overflow: visible;
  }
  body:has(.font-card > div[style*="Georgia"]) .font-card > div[style] {
    max-width: 100%;
    font-size: clamp(26px, 8vw, 34px) !important;
    line-height: 1.05 !important;
    letter-spacing: .04em !important;
    word-break: normal;
    overflow-wrap: normal;
  }
  body:has(.slides-grid) .wrap .text { max-width: 100% }
  body:has(.slides-grid) .wrap .text p { font-size: 15px; line-height: 1.85 }
  body:has(.slides-grid) footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    line-height: 1.5;
  }
  body:has(.slides-grid) footer span { display: block }
}

/* ============================================= */
/* SMALL PHONES  max-width: 480px               */
/* ============================================= */
@media (max-width: 480px) {

  .hero, .project-hero {
    padding-top: 102px !important;
    padding-bottom: 46px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  h1,
  .project-title,
  .hero-title,
  .contact-title,
  .modal-title,
  .mindmap-center-title {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: clamp(34px, 10.5vw, 52px) !important;
    line-height: .96 !important;
  }

  h2,
  .content-title,
  .section-title,
  .narrative-title {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: clamp(28px, 9vw, 38px) !important;
  }

  .next-title {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: clamp(30px, 10vw, 42px) !important;
  }

  .intro-section, .ai-content, .graphics-content, .approach-section,
  .section, .wrap, .stats, .pal, .slides,
  .project-content, .palette-section, .font-section, .values-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .cover, .project-cover, .values-section {
    max-width: calc(100% - 32px);
    margin-left: 16px !important;
    margin-right: 16px !important;
  }

  .meta-item, .mi, .meta-row { padding: 16px 18px }
  .tag { font-size: 10px; padding: 7px 12px }
  .ai-card-body, .work-body, .card, .approach-card { padding: 20px }
  .apk-section { padding: 28px 16px !important }
  .phone-shell { width: min(100%, 300px) !important }
}

/* ============================================= */
/* INDEX-ONLY: hero section  max-width: 600px   */
/* ============================================= */
@media (max-width: 600px) {
  .hero-eyebrow      { margin-bottom: 22px }
  .hero-eyebrow-line { width: 34px }
  .hero-eyebrow-text { font-size: 10px; letter-spacing: .12em }
  .hero-desc         { max-width: 100%; font-size: 14px; line-height: 1.65 }
  .hero-scroll       { display: none }
  .hero-bg-text      { font-size: 118px; bottom: -18px; left: -6px }
  .hero-right        { width: 100%; padding-bottom: 0; align-items: flex-start; flex-direction: column; gap: 22px }
  .hero-photo-block  { width: 100%; max-width: 340px; height: auto; aspect-ratio: 3/4 }
  .hero-stats        { width: 100%; justify-content: space-between; gap: 12px }
  .stat              { align-items: flex-start }
  .stat-num          { font-size: 34px }
  .stat-label        { font-size: 9px }
  .marquee-wrap      { padding: 14px 0 }
  .marquee-item      { padding: 0 24px; gap: 16px; font-size: 10px }
  #projects, #skills, #process, #contact { padding: 56px 18px }
  .section-title     { font-size: 54px }
  .filter-wrap       { margin: 34px 0; gap: 7px }
  .filter-btn        { padding: 8px 14px; font-size: 10px; cursor: pointer }
  .projects-grid     { gap: 14px }
  .project-info      { padding: 18px 18px 20px }
  .project-name      { font-size: 17px }
  .project-desc      { font-size: 12px }
  .project-arrow     { width: 34px; height: 34px; opacity: 1; transform: none; margin-top: 0 }
  .skills-layout     { grid-template-columns: 1fr; gap: 34px; margin-top: 36px }
  .skill-row         { align-items: flex-start; gap: 14px; padding: 18px 0 }
  .skill-tools       { text-align: right; max-width: 48% }
  .skills-extra-item { padding: 14px 16px }
  .process-grid      { grid-template-columns: 1fr }
  .process-step      { padding: 30px 24px }
  .contact-title     { font-size: 58px }
  .contact-links     { width: 100% }
  .contact-link      { width: 100%; justify-content: center }
  footer             { padding: 20px 18px }
  body               { cursor: auto }
  .cursor            { display: none }
}
