/*
 * Auditajus — Responsive CSS v10
 * Comprehensive mobile + tablet optimization
 *
 * Enqueue AFTER style.css and functions.php inline CSS.
 * Breakpoints:
 *   - Mobile:  max-width 768px
 *   - Tablet:  max-width 1024px (min-width 769px for tablet-only)
 *
 * @package Auditajus
 * @version 10.0.0
 */

/* ============================================================
   GLOBAL RESPONSIVE FIXES
   ============================================================ */

/* Ensure all images respect container bounds */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   TABLET — max-width: 1024px
   ============================================================ */

@media (max-width: 1024px) {

  /* ---- Container ---- */
  .container {
    padding: 0 clamp(1.25rem, 3vw, 2.5rem);
  }

  /* ---- Sections: reduce vertical padding ---- */
  .section {
    padding: clamp(4rem, 9vw, 7rem) 0;
  }

  /* ---- Hero ---- */
  .hero {
    min-height: 88vh;
    padding: clamp(6rem, 12vh, 9rem) 0 clamp(3rem, 6vh, 5rem);
  }

  .hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  }

  .hero__content {
    max-width: 58ch;
  }

  /* Hero meta: 3 columns on tablet, tighter padding */
  .hero__meta {
    max-width: 100%;
    gap: 1rem;
  }

  .hero__meta-item {
    padding: 1.3rem 1.2rem 1.4rem;
    font-size: 0.78rem;
  }

  .hero__meta-item strong {
    font-size: 1.05rem;
  }

  /* ---- Method layers: keep bento but tighter ---- */
  .method-layers {
    gap: 1rem;
  }

  .method-layer {
    padding: 1.5rem 1.5rem 1.7rem;
  }

  .method-layer .method-layer__desc {
    font-size: 0.84rem;
  }

  /* ---- Audience: tighter ---- */
  .audience-grid {
    gap: 1rem;
  }

  .audience-col,
  .audience-col + .audience-col {
    padding: 2rem 1.6rem 2.2rem;
  }

  /* ---- CTA Form: tighter card ---- */
  .cta-form {
    padding: 2rem 2rem 1.8rem;
  }

  /* ---- Detector: 2-col to 1-col at tablet ---- */
  .detector__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* ---- Objections: tighter ---- */
  .objections-list {
    max-width: 100%;
  }

  /* ---- Footer: 2fr 1fr 1fr stays but tighter gap ---- */
  .site-footer__grid {
    gap: 2.5rem;
  }
}


/* ============================================================
   MOBILE — max-width: 768px
   ============================================================ */

@media (max-width: 768px) {

  /* Touch target minimum: 44px (WCAG 2.5.8 / Apple HIG) */
  a, button, [role="button"], summary, input[type="submit"],
  .btn, .objection__q, .site-footer__menu-toggle,
  .site-footer__policy-title {
    min-height: 44px;
  }

  /* ---- Base typography ---- */
  html {
    font-size: 16px;
  }

  /* ---- Container gutter ---- */
  .container {
    padding: 0 1.25rem;
  }

  /* ---- Sections: reduce vertical padding ---- */
  .section {
    padding: clamp(3rem, 7vw, 5rem) 0;
  }

  /* ============ HERO ============ */
  .hero {
    min-height: 100svh;
    padding: clamp(5rem, 10vh, 7rem) 0 clamp(2rem, 4vh, 3rem);
  }

  .hero h1 {
    font-size: clamp(1.85rem, 7vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.8rem;
  }

  .hero h1 br {
    display: none;
  }

  .hero__eyebrow {
    font-size: 0.62rem;
    margin-bottom: 1.2rem;
  }

  .hero__sub {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 100%;
  }

  .hero__content {
    max-width: 100%;
  }

  /* Hero CTAs: stack vertically, full-width */
  .hero__ctas {
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 3rem;
    align-items: stretch;
  }

  .hero .btn-primary,
  .hero .btn-ghost {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    min-height: 52px;
  }

  /* Hero meta: single column stack */
  .hero__meta {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 2.5rem;
    max-width: 100%;
  }

  .hero__meta-item {
    padding: 1rem 1.1rem 1.1rem;
    font-size: 0.78rem;
  }

  .hero__meta-item strong {
    font-size: 1rem;
    margin-bottom: 0.4rem;
  }

  /* Hero overlay: stronger gradient on mobile for readability */
  .hero::after {
    background:
      linear-gradient(180deg,
        rgba(11, 10, 8, 0.60) 0%,
        rgba(11, 10, 8, 0.80) 40%,
        rgba(11, 10, 8, 0.95) 100%);
  }


  /* ============ DETECTOR ============ */
  .detector__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .detector__intro {
    padding-right: 0;
  }

  .detector h2 {
    max-width: 100%;
  }

  .detector .lead {
    max-width: 100%;
    margin-bottom: 2.5rem;
  }

  .detector-form {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .detector-form__submit {
    width: 100%;
  }

  .detector-form__submit.btn {
    width: 100%;
    justify-content: center;
  }

  .detector-form__note {
    max-width: 100%;
  }

  /* Detector result */
  .detector-result__score {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .detector-result__cta {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .detector-finding {
    grid-template-columns: 40px 1fr;
    gap: 1rem;
  }

  .detector-step {
    grid-template-columns: 40px 1fr auto;
    gap: 1rem;
  }


  /* ============ METHOD LAYERS ============ */
  .method {
    min-height: auto;
    padding: clamp(3.5rem, 7vw, 5rem) 0;
  }

  .method h2 {
    max-width: 100%;
  }

  .method-intro {
    text-align: left;
    max-width: 100%;
    margin-bottom: 2.5rem;
  }

  /* Single column stack on mobile */
  .method-layers {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 0.9rem;
  }

  .method-layer:nth-child(1),
  .method-layer:nth-child(2),
  .method-layer:nth-child(3),
  .method-layer:nth-child(4),
  .method-layer:nth-child(5) {
    grid-column: 1;
    grid-row: auto;
  }

  .method-layer {
    padding: 1.5rem 1.3rem 1.7rem;
  }

  .method-layer .method-layer__desc {
    font-size: 0.85rem;
  }

  /* Method footer: stack */
  .method__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
  }

  .method__foot .btn-primary {
    width: 100%;
    justify-content: center;
  }


  /* ============ AUDIENCE ============ */
  .audience {
    min-height: auto;
    padding: clamp(3.5rem, 7vw, 5rem) 0;
  }

  .audience h2 {
    max-width: 100%;
  }

  .audience-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .audience-col,
  .audience-col + .audience-col {
    padding: 1.8rem 1.3rem 2rem;
    border-left: 1px solid rgba(232, 185, 72, 0.32);
  }

  .audience-list {
    grid-template-rows: auto;
  }

  .audience-list li {
    font-size: 0.85rem;
    padding: 1.1rem 0;
  }


  /* ============ OBJECTIONS / FAQ ============ */
  .objections {
    min-height: auto;
    padding: clamp(3.5rem, 7vw, 5rem) 0;
  }

  .objections h2 {
    max-width: 100%;
    margin-bottom: 2rem;
  }

  .objections-list {
    gap: 0.7rem;
    max-width: 100%;
  }

  .objection__q {
    padding: 1.1rem 1.2rem;
    font-size: 0.95rem;
    gap: 1rem;
    min-height: 52px;
  }

  .objection__q::after {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    flex-shrink: 0;
  }

  .objection[open] > .objection__a {
    padding: 1rem 1.2rem 1.3rem;
  }


  /* ============ CTA FINAL FORM ============ */
  .cta-final {
    min-height: auto;
    padding: clamp(3.5rem, 7vw, 5rem) 0;
  }

  .cta-final h2 {
    max-width: 100%;
  }

  .cta-final .lead {
    max-width: 100%;
    margin-bottom: 2rem;
  }

  /* Form: single column, full-width */
  .cta-form {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 1.5rem 1.2rem 1.5rem;
  }

  .cta-form__field--full {
    grid-column: 1;
  }

  .cta-form__field input,
  .cta-form__select {
    font-size: 1rem;
    padding: 0.5rem 0 0.75rem;
    min-height: 44px;
  }

  .cta-form__field label {
    font-size: 0.6rem;
    margin-bottom: 0.5rem;
  }

  .cta-form__submit {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding-top: 1.5rem;
  }

  .cta-form__submit .btn-primary {
    width: 100%;
    min-width: 0;
    justify-content: center;
    min-height: 52px;
  }

  .cta-form__micro {
    text-align: left;
    max-width: 100%;
    font-size: 0.7rem;
  }


  /* ============ HEADER ============ */
  .site-header__inner {
    padding: 0.7rem 0;
    gap: 1rem;
  }

  .site-logo {
    font-size: 1.1rem;
  }

  .site-logo svg,
  .site-logo .brand-mark {
    height: 28px;
  }

  .site-header .btn-primary {
    padding: 0.7rem 1rem;
    font-size: 0.62rem;
    min-height: 44px;
  }

  /* Mobile nav: already hidden via existing @media(max-width:900px) */


  /* ============ FOOTER ============ */
  .site-footer {
    padding: 3.5rem 0 2rem;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }

  .site-footer .site-footer__logo .brand-mark {
    height: 42px;
  }

  .site-footer__brand p {
    max-width: 100%;
  }

  .site-footer__base {
    flex-direction: column;
    gap: 1rem;
    font-size: 0.72rem;
  }

  .site-footer__legal {
    grid-template-columns: 1fr;
  }

  .site-footer__menu-toggle {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .site-footer__policy-title {
    padding: 1rem 1.2rem;
    font-size: 0.72rem;
    min-height: 48px;
  }

  .site-footer__policy[open] > .site-footer__policy-body {
    padding: 0.6rem 1.2rem 1.1rem;
  }


  /* ============ GLOBAL TYPOGRAPHIC TWEAKS ============ */
  .section h2 {
    font-size: clamp(1.55rem, 5vw, 2.1rem);
  }

  .eyebrow {
    font-size: 0.62rem;
    margin-bottom: 1.8rem;
  }

  .lead {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    max-width: 100%;
  }

  p {
    font-size: 0.98rem;
  }

  /* ============ OVERFLOW PREVENTION ============ */
  .brand-mark {
    max-width: 100%;
    height: auto;
  }

  /* Long words: allow hyphenation to prevent overflow */
  h1, h2, h3, h4, p, li, td, th {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
}


/* ============================================================
   SMALL MOBILE — max-width: 420px
   Ultra-compact adjustments for very small screens
   ============================================================ */

@media (max-width: 420px) {

  .container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 8vw, 2.2rem);
  }

  .hero__sub {
    font-size: 0.9rem;
  }

  .hero .btn-primary,
  .hero .btn-ghost {
    font-size: 0.7rem;
    padding: 0.9rem 1.2rem;
  }

  .section h2 {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
  }

  .method-layer {
    padding: 1.3rem 1.1rem 1.5rem;
  }

  .audience-col,
  .audience-col + .audience-col {
    padding: 1.5rem 1.1rem 1.7rem;
  }

  .cta-form {
    padding: 1.2rem 1rem 1.2rem;
  }

  .objection__q {
    padding: 1rem 1rem;
    font-size: 0.9rem;
  }

  .hero__meta-item {
    padding: 0.9rem 1rem 1rem;
  }
}


/* ============================================================
   LANDSCAPE MOBILE — short viewport
   Prevent hero from being too tall on landscape phones
   ============================================================ */

@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 5rem 0 2rem;
  }

  .hero__meta {
    margin-top: 1.5rem;
  }

  .hero__ctas {
    margin-bottom: 2rem;
  }
}


/* ============================================================
   SAFE AREA INSETS — notched devices (iPhone X+)
   ============================================================ */

@supports (padding: env(safe-area-inset-bottom)) {
  .site-header__inner {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .site-footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }

  .cta-final {
    padding-bottom: calc(clamp(3.5rem, 7vw, 5rem) + env(safe-area-inset-bottom));
  }
}
