/* ========================================
   MOBILE ADAPTATION LAYER — V13 (Refined)
   All rules inside media queries only.
   Removing this file restores exact V12 desktop.
   
   Design philosophy:
   — Preserve brand moments (dark glass, floating overlay, dramatic name)
   — Maintain visual density (stats row, hooks pair, compact grids)
   — Keep typographic authority (generous sizes and spacing)
======================================== */


/* ----------------------------------------
   TABLET  (≤ 768px)
---------------------------------------- */
@media (max-width: 768px) {

  /* --- Global safety ---------------------------------- */
  html, body { overflow-x: hidden; }

  img, video, iframe { max-width: 100%; height: auto; }

  /* --- Cursor: disable on touch ----------------------- */
  .cursor-frame-square,
  .cursor-cross,
  .cursor-circle,
  .cursor-dot { display: none !important; }

  body { cursor: auto !important; }

  .video-reveal-layer { display: none; }

  .video-blur-layer .hero-video {
    filter: brightness(0.6);
  }


  /* ====================================================
     NAVIGATION
     Keep dark glass aesthetic — it's the brand signature
  ==================================================== */
  .nav {
    padding: 1rem 1.25rem;
  }

  .nav-logo img { height: 32px; }

  .social-toggle,
  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .social-toggle svg { width: 18px; height: 18px; }

  .nav-right { gap: 0.75rem; }

  /* Social icons — reposition for smaller screen */
  .social-icons-list { right: -10px; }

  /* Menu overlay — KEEP the dark glass, just go full-width */
  .menu-overlay {
    top: 64px;
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100dvh - 64px);
    /* Preserve the dark glass signature from desktop */
    background: rgba(14, 14, 14, 0.92);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .vertical-menu {
    padding: 0 2.5rem 2.5rem;
    gap: 2rem;
  }

  /* Larger menu links — keep the bold, editorial feel */
  .menu-link {
    font-size: 2rem;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: -1px;
    transform: none;
  }

  .menu-item:hover .menu-link {
    transform: none;
    color: rgba(255, 255, 255, 0.6);
  }

  /* Keep arrows visible (dimmed) — preserves the desktop language */
  .menu-arrow {
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.25;
    transform: none;
  }

  .menu-item:hover .menu-arrow {
    opacity: 0.7;
  }


  /* ====================================================
     HERO — Keep the floating, layered drama
     Name must be visible, overlay must not cover it
  ==================================================== */
  .hero {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    position: relative;
    overflow: hidden;
  }

  /* Ensure content overlay sits above video layers */
  .hero-content-overlay {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: auto;
    bottom: 22%;
    transform: none;
    width: auto;
    max-width: 100%;
    padding: 1.75rem 1.5rem;
    border-radius: 12px;
    z-index: 10;
  }

  .hero-title {
    font-size: clamp(1.55rem, 5.5vw, 2.1rem);
    max-width: 100%;
    line-height: 1.08;
  }

  .hero-subtitle {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    max-width: 100%;
  }

  .hero-support {
    font-size: 0.9rem;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .hero-cta-buttons {
    flex-direction: column;
    gap: 0.65rem;
  }

  .hero-cta-buttons .flow-button,
  .hero-cta-buttons .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Name at bottom — force visibility above all layers */
  .hero-video-name {
    padding: 1rem 1.25rem 1.5rem;
    z-index: 5;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .hero-video-name h1 {
    font-size: clamp(2.8rem, 15vw, 5.5rem);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }


  /* ====================================================
     STATS BANNER — Responsive 3-across, no clipping
  ==================================================== */
  .stats-banner {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem;
    padding: 2.5rem 0.75rem;
    overflow: visible;
  }

  .stat-banner-item {
    overflow: visible;
    min-width: 0;
  }

  .stat-banner-number {
    font-size: clamp(1.6rem, 6.5vw, 2.5rem);
    word-break: keep-all;
    white-space: nowrap;
  }

  .stat-banner-label {
    font-size: 0.6rem;
    letter-spacing: 0.04em;
    word-break: keep-all;
  }


  /* ====================================================
     HOOKS ROW — Preserve the paired contrast
     Two cards side-by-side, compact but paired
  ==================================================== */
  .hooks-row {
    grid-template-columns: 1fr 1fr;
    padding: 2rem 0.75rem;
    gap: 0.5rem;
  }

  .hook-section {
    padding: 2.5rem 1.25rem;
    min-height: 260px;
    border-radius: 14px;
  }

  .hook-main {
    font-size: clamp(1.15rem, 3.5vw, 1.5rem);
    max-width: 100%;
  }

  .hook-sub {
    font-size: clamp(0.78rem, 2.2vw, 0.92rem);
    margin-bottom: 1.5rem;
    max-width: 100%;
  }

  .hook-btn {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    min-width: auto;
  }

  .hook-watermark {
    width: 200px;
    height: 200px;
  }


  /* ====================================================
     PHILOSOPHY — Stack but keep generous spacing
  ==================================================== */
  .philosophy-section {
    padding: 4rem 1.25rem;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }


  /* ====================================================
     HOW I WORK / PROCESS STEPS
  ==================================================== */
  .work-process-section {
    padding: 4rem 1.25rem;
  }

  .process-step {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .step-number {
    font-size: 2rem;
  }


  /* ====================================================
     HORIZON SUITE — Mobile stacking (Home + Portfolio)
  ==================================================== */
  .hs {
    padding: clamp(3rem, 6vw, 5rem) 0;
  }

  .hs-inner {
    padding: 0 1.25rem;
  }

  .hs-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hs-text {
    padding-top: 0;
    text-align: center;
  }

  .hs-overline {
    justify-content: center;
  }

  .hs-title {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .hs-supporting {
    max-width: 100%;
    margin: 0 auto;
  }

  .hs-featured {
    justify-self: stretch;
  }

  .hs-chart {
    height: 110px;
  }

  .hs-tools {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
  }

  .hs-tool {
    padding: 1.5rem;
  }

  .hs-gov-list {
    gap: 1rem;
  }

  .hs-cta-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
  }

  /* Layer 1 public section (portfolio) */
  .hsp-inner { padding: 0 1.25rem; }
  .hsp-hero { grid-template-columns: 1fr; gap: 2rem; }
  .hsp-infographic { max-width: 280px; margin: 0 auto; }
  .hsp-title { font-size: clamp(2rem, 7vw, 2.8rem); }
  .hsp-why { grid-template-columns: 1fr; gap: 1.5rem; }
  .hsp-matters { grid-template-columns: 1fr; gap: 1.5rem; }
  .hsp-horizon-row { grid-template-columns: 1fr; gap: .5rem; }
  .hsp-access-cta { flex-direction: column; align-items: flex-start; }
  .hsp-btn-primary { width: 100%; justify-content: center; }

  /* Header login button — smaller on mobile */
  .hs-utility-btn { font-size: .6rem; padding: 4px 10px; }


  /* ====================================================
     EXPERTISE — 2-column grid to maintain "collection" feel
  ==================================================== */
  .expertise {
    padding: 4rem 1.25rem;
  }

  .expertise-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  .expertise-card {
    width: 100%;
    padding: 2rem;
  }

  .expertise-card:hover {
    transform: none;
  }

  .card-title {
    font-size: 1.3rem;
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: normal;
  }

  .card-description {
    font-size: 0.95rem;
  }

  .card-number {
    font-size: 2.5rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-title {
    font-size: clamp(1.75rem, 5.5vw, 2.25rem);
  }

  .section-label {
    font-size: 0.7rem;
  }


  /* ====================================================
     PRESSURE SECTION
  ==================================================== */
  .pressure-section {
    padding: clamp(40px, 5vw, 60px) 0;
  }

  .pressure-section .pressure-inner {
    width: calc(100% - 2.5rem);
  }

  .pressure-section .pressure-layout {
    grid-template-columns: 1fr;
  }

  .pressure-section .pressure-indicator {
    position: relative;
    top: auto;
  }


  /* ====================================================
     WORK ABSTRACTS (Home portfolio preview)
     Keep generous padding — these are premium content
  ==================================================== */
  .work-abstracts {
    gap: 2rem;
    padding: 0 1.25rem;
  }

  .work-abstract {
    padding: 2.25rem;
  }

  .abstract-title {
    font-size: 1.4rem;
  }


  /* ====================================================
     FEATURED WORK
  ==================================================== */
  .featured-work {
    padding: 4rem 1.25rem;
  }


  /* ====================================================
     CTA — Keep commanding presence
  ==================================================== */
  .cta {
    padding: 5rem 1.5rem;
  }

  .cta-title {
    font-size: clamp(1.65rem, 5.5vw, 2.25rem);
  }

  .cta-text {
    font-size: 1.05rem;
    margin-bottom: 2rem;
  }

  .btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
  }


  /* ====================================================
     FOOTER — 2x2 link grid, not full single-column
  ==================================================== */
  .footer {
    padding: 3rem 1.25rem 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2rem;
  }

  .footer-bottom {
    font-size: 0.8rem;
  }


  /* ====================================================
     PAGE HEADERS (Portfolio, About, Blog, Contact)
     Keep authoritative typography
  ==================================================== */
  .page-header {
    padding: 7rem 1.25rem 3rem;
  }

  .page-title {
    font-size: clamp(2rem, 6vw, 2.5rem);
  }

  .page-description {
    font-size: 1.05rem;
  }


  /* ====================================================
     CONTACT PAGE
  ==================================================== */
  .contact-section {
    padding: 2.5rem 1.25rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-form-container,
  .contact-info-container {
    padding: 2rem;
  }

  .contact-item a {
    font-size: 1.15rem;
    word-break: break-all;
  }

  /* Contact hero — larger + background photo more visible (mobile only) */
  /* !important needed: contact.html has inline @media(max-width:768px) that competes */
  section.ct-hero {
    min-height: 55vh !important;
    padding: 7.5rem 1.5rem 3.5rem !important;
  }

  .ct-hero .ct-hero-bg img {
    opacity: 0.38 !important;
  }

  .ct-hero .ct-hero-bg::after {
    background: linear-gradient(
      135deg,
      rgba(10, 10, 10, 0.75) 0%,
      rgba(10, 10, 10, 0.45) 50%,
      rgba(10, 10, 10, 0.70) 100%
    ) !important;
  }

  .ct-hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem) !important;
  }

  .ct-hero-sub {
    font-size: 1rem !important;
  }


  /* ====================================================
     CASE STUDIES (Portfolio / Blog)
     2-column to keep gallery feel
  ==================================================== */
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 1.25rem 4rem;
    gap: 1rem;
  }

  .case-study-card:hover {
    transform: none;
  }

  .case-content h3 {
    font-size: 1rem;
  }

  .case-content p {
    font-size: 0.85rem;
  }

  .case-metrics {
    font-size: 0.7rem;
    gap: 0.75rem;
  }


  /* ====================================================
     BLOG
  ==================================================== */
  .blog-search-bar {
    padding: 0 1.25rem 1.5rem;
    flex-direction: column;
  }

  .blog-search-bar input,
  .blog-search-bar select {
    width: 100%;
    min-width: 0;
  }

  .blog-article {
    padding: 0 1.25rem 3rem;
  }

  .blog-article h2 {
    font-size: 1.4rem;
  }

  .blog-article p {
    font-size: 1rem;
  }

  /* Final CTA (blog/pages) */
  .final-cta {
    padding: 4rem 1.5rem;
  }

  .final-cta-content h2 {
    font-size: clamp(1.65rem, 5.5vw, 2.25rem);
  }


  /* ====================================================
     DIAGNOSTIC ENTRY
  ==================================================== */
  .de-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .de-hero-graphic { display: none; }

  .de-hero-content {
    padding: 5rem 1.25rem 2.5rem;
  }

  .de-content {
    padding: 2rem 1.25rem 3rem;
  }

  .de-two-col {
    grid-template-columns: 1fr;
  }

  .de-is-grid {
    grid-template-columns: 1fr;
  }


  /* ====================================================
     DIAGNOSTIC QUESTIONNAIRE
  ==================================================== */
  .diag-hero {
    padding: 5rem 1.25rem 2.5rem;
  }

  .diag-body {
    padding: 2rem 1.25rem 3rem;
  }

  .diag-progress {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .diag-scale-legend {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .diag-scale-legend span {
    min-width: 55px;
    font-size: 0.62rem;
  }

  .diag-radio-group {
    flex-wrap: wrap;
    gap: 0.5rem;
  }


  /* ====================================================
     DIAGNOSTIC RESULTS
  ==================================================== */
  .result-actions {
    justify-content: center;
  }

  .actions-right {
    justify-content: center;
    flex-wrap: wrap;
  }

  .dr-interaction-content {
    flex-direction: column;
    align-items: center;
  }

  .dr-interaction-diagram {
    width: 100%;
    max-width: 200px;
  }

  .dr-crossroads {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .dr-crossroads-link { width: 18px; }

  .dr-evidence-grid {
    grid-template-columns: 1fr;
  }

  .dr-tension-strip {
    flex-direction: column;
    gap: 0.2rem;
  }

  .dr-tension-dash { display: none; }

  .dr-kpi-grid { gap: 0.65rem; }

  .dr-kpi-col { width: 48px; }

  /* Modal on mobile — full-width buttons */
  .modal-card {
    margin: 5vh auto 0;
    max-width: 92%;
    padding: 1.75rem;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-actions .btn-quiet {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Flow button — full width on mobile */
  .flow-button {
    min-width: unset;
    width: 100%;
    justify-content: center;
  }


  /* ====================================================
     KPI / INFOGRAPHIC — Prevent clipping on mobile
     Applies to diagnostic result KPIs and any data visuals
  ==================================================== */
  .dr-kpi-grid,
  .dr-kpi-band,
  .dr-heatmap,
  .dr-pressure-bands,
  .dr-interaction-map,
  .dr-cluster-diagram,
  .dr-intervention {
    overflow: visible;
    max-width: 100%;
  }

  .dr-kpi-grid {
    gap: 0.5rem;
  }

  .dr-kpi-col {
    width: 44px;
    min-width: 0;
  }

  .dr-kpi-band {
    overflow: visible;
  }

  /* Ensure SVG/canvas infographics scale properly */
  .dr-heatmap svg,
  .dr-interaction-diagram svg,
  .dr-cluster-diagram svg,
  .dr-intervention svg {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

}

/* ----------------------------------------
   TABLET  (769px – 1024px)
   Home page HS section: 2-column tools instead of 4
   Does NOT affect desktop (>1024px) at all.
---------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .hs-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .hs-tools {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}


/* ----------------------------------------
   SMALL PHONE  (≤ 480px)
   Fine-tuning only — tablet rules above are the foundation
---------------------------------------- */
@media (max-width: 480px) {

  .nav {
    padding: 0.85rem 1rem;
  }

  /* Hero — tighten slightly but keep absolute float */
  .hero-content-overlay {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 22%;
    padding: 1.5rem 1.25rem;
  }

  .hero-title {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }

  .hero-video-name h1 {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  /* Stats — stay 3-across but smaller */
  .stat-banner-number {
    font-size: clamp(1.6rem, 6.5vw, 2.15rem);
  }

  .stat-banner-label {
    font-size: 0.58rem;
  }

  /* Hooks — stack on very small phones */
  .hooks-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.5rem 0.75rem;
  }

  .hook-section {
    padding: 2.5rem 1.25rem;
    min-height: 240px;
  }

  .hook-main {
    font-size: 1.35rem;
  }

  .hook-sub {
    font-size: 0.88rem;
  }

  /* Expertise — already single-column from tablet rule */

  .expertise-card {
    padding: 1.5rem;
  }

  .card-title {
    font-size: 1.1rem;
  }

  /* Case studies — single column on very small */
  .case-studies-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem 3rem;
  }

  .case-content h3 {
    font-size: 1.1rem;
  }

  .case-content p {
    font-size: 0.9rem;
  }

  /* Work abstracts */
  .work-abstract {
    padding: 1.75rem;
  }

  .abstract-title {
    font-size: 1.25rem;
  }

  /* Page headers */
  .page-header {
    padding: 6rem 1rem 2.5rem;
  }

  .page-title {
    font-size: clamp(1.75rem, 6vw, 2.15rem);
  }

  /* Contact */
  .contact-form-container,
  .contact-info-container {
    padding: 1.5rem;
    border-radius: 12px;
  }

  /* Menu */
  .menu-link {
    font-size: 1.75rem;
  }

  .vertical-menu {
    gap: 1.75rem;
    padding: 0 2rem 2rem;
  }

  /* Footer — single column on very small only */
  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer {
    padding: 2.5rem 1rem 1.5rem;
  }

  /* CTA */
  .cta {
    padding: 4rem 1.25rem;
  }

  /* Diagnostic entry */
  .de-hero-content {
    padding: 4.5rem 1rem 2rem;
  }

  .de-content {
    padding: 1.5rem 1rem 2.5rem;
  }

  /* Diagnostic questionnaire */
  .diag-hero {
    padding: 4.5rem 1rem 2rem;
  }

  .diag-body {
    padding: 1.5rem 1rem 2.5rem;
  }

  /* Diagnostic result refinements */
  .dr-title {
    font-size: 1.35rem;
  }

  .dr-title--sub {
    font-size: 1.15rem;
  }
}
