/* ═══════════════════════════════════════════════════════════════════════
   GOCOSYS — phone layer for the public site (loaded after style.css)
   One mobile template for every page: a smaller type scale, tighter
   section rhythm, app-like compact cards, swipe rows for long card sets
   and bottom-sheet dropdowns. ≤599px = phones, ≤380px = small phones.
   Desktop and tablet rules live in style.css; nothing here applies ≥600px.
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 599px) {
  /* ── Scale ─────────────────────────────────────────────────────────── */
  :root {
    --fs-display: 1.875rem;   /* 30 */
    --fs-h1: 1.75rem;         /* 28 */
    --fs-h2: 1.5rem;          /* 24 */
    --fs-h3: 1.0625rem;       /* 17 */
    --fs-title: 0.9375rem;    /* 15 */
    --fs-body-lg: 0.9375rem;
    --fs-body: 0.9375rem;
    --fs-body-sm: 0.875rem;   /* 14 */
    --fs-small: 0.8125rem;    /* 13 */
    --fs-caption: 0.75rem;    /* 12 */
    --section-y: 2.25rem;     /* 36 */
    --section-y-sm: 1.75rem;  /* 28 */
    --head-gap: 1rem;
    --grid-gap: 0.625rem;     /* 10 */
    --container-pad: 1rem;
    --navbar-height: 56px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 20px;
  }
  body { line-height: 1.55; }

  /* ── Type & buttons ───────────────────────────────────────────────── */
  .eyebrow { padding: 4px 10px 4px 8px; font-size: 10px; gap: 6px; }
  .section-title { margin-top: 8px; line-height: 1.15; }
  .section-subtitle { font-size: 0.875rem; line-height: 1.6; }
  .sec-head { gap: 8px; }
  .btn { min-height: 42px; padding: 0 16px; font-size: 0.875rem; border-radius: 10px; }
  .btn-sm { min-height: 36px; padding: 0 12px; }
  .btn-lg { min-height: 46px; padding: 0 18px; font-size: 0.9375rem; }
  .btn-row { margin-top: 18px; gap: 8px; }

  /* ── Header & drawer ──────────────────────────────────────────────── */
  .brand-logo { height: 24px; }
  .icon-btn, .nav-search-btn { height: 36px; min-width: 36px; padding: 0 8px; border-radius: 9px; }
  .mobile-menu-btn { width: 40px; height: 40px; border-radius: 10px; }
  .nav-link { height: 46px; font-size: 0.9375rem; }
  .nav-sub-toggle { width: 44px; height: 44px; }
  .mega-item { padding: 8px; gap: 10px; }
  .mega-icon { width: 30px; height: 30px; font-size: 12.5px; border-radius: 9px; }
  .announce-bar { padding: 6px 0; font-size: 11.5px; }

  /* ── Home hero ────────────────────────────────────────────────────── */
  .hero { padding: 20px 0 28px; }
  .hero-badge { padding: 5px 10px 5px 8px; font-size: 11px; gap: 8px; }
  .hero-title { margin: 12px 0 10px; line-height: 1.08; letter-spacing: -0.035em; }
  .hero-subtitle { font-size: 0.875rem; line-height: 1.6; }
  .hero-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 16px calc(-1 * var(--container-pad)) 0; padding: 2px var(--container-pad); gap: 6px; }
  .hero-chips::-webkit-scrollbar { display: none; }
  .hero-chip { flex: none; padding: 6px 10px; font-size: 12px; border-radius: 9px; white-space: nowrap; }
  .hero-cta { margin-top: 18px; gap: 8px; }
  .hero-cta .btn { flex: 1 1 100%; min-height: 46px; }
  .hero-trust { margin-top: 14px; gap: 6px 14px; font-size: 11.5px; }
  .hero-visual { padding: 0 0 8px; margin-top: 4px; }
  .app-window { border-radius: 14px; }
  .aw-bar { padding: 9px 12px; }
  .aw-main { padding: 10px; gap: 8px; }
  .aw-row { gap: 6px; }
  .aw-kpi { padding: 8px 9px; border-radius: 10px; }
  .k-label { font-size: 9.5px; }
  .k-value { font-size: 0.95rem; }
  .aw-chart { height: 84px; border-radius: 10px; }

  /* ── Trust bar ────────────────────────────────────────────────────── */
  .trustbar { padding: 10px 0; }
  .trustbar-label { font-size: 11.5px; }
  .logo-chip { padding: 6px 11px; font-size: 12px; }

  /* ── Inner page hero ──────────────────────────────────────────────── */
  .page-hero { padding: 22px 0 20px; }
  .page-hero-title { margin-top: 10px; line-height: 1.1; }
  .page-hero-sub { margin-top: 8px; font-size: 0.875rem; line-height: 1.6; }
  .page-hero .btn-row { margin-top: 16px; }

  /* ── Cards: compact, icon beside text ─────────────────────────────── */
  .card-icon { width: 36px; height: 36px; font-size: 14px; border-radius: 10px; }
  .service-card { padding: 12px 14px; column-gap: 12px; }
  .service-card .card-icon { width: 36px; height: 36px; font-size: 14px; }
  .service-card h3 { font-size: 0.9375rem; margin: 0 0 2px; }
  .service-card p { font-size: 0.8125rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .service-card .card-link { padding-top: 6px; font-size: 0.75rem; }

  .product-tile, .platform-tile { padding: 14px; }
  .suite-grid > *, .platform-grid > * { flex-basis: min(80%, 300px); }
  .pt-head, .pl-head { margin-bottom: 10px; }
  .pt-name { margin: 2px 0 4px; }
  .pt-desc { font-size: 0.8125rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .suite-tabs { margin-bottom: 14px; }
  .chip-tab { min-height: 34px; padding: 0 12px; }

  /* Why-us: two-up tiles instead of eight tall rows */
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .feature-card { flex-direction: column; gap: 8px; padding: 12px; }
  .feature-icon { width: 32px; height: 32px; font-size: 13px; border-radius: 9px; }
  .feature-card h3 { font-size: 0.84rem; line-height: 1.3; margin-bottom: 2px; }
  .feature-card p { font-size: 0.75rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

  .cap-grid { margin-top: 16px; gap: 8px; }
  .cap { padding: 10px 12px; gap: 10px; border-radius: 12px; }
  .cap-icon { width: 30px; height: 30px; font-size: 12.5px; border-radius: 9px; }

  .audience-band { margin-top: 16px; padding: 14px; }
  .audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .audience-card { padding: 10px; gap: 8px; flex-direction: column; }
  .audience-icon { width: 28px; height: 28px; font-size: 12px; }
  .industry-card { padding: 12px; }

  .process-card { padding: 14px; }
  .process-head { padding-bottom: 12px; gap: 12px; }
  .process-head-icon { width: 38px; height: 38px; font-size: 15px; border-radius: 11px; }
  .process-steps li { padding: 7px 0; gap: 12px; }
  .ps-num { width: 30px; height: 30px; font-size: 12px; }
  .process-steps::before, .process-steps::after { left: 14px; }

  .split { gap: 20px; }
  .ai-visual { gap: 80px; padding: 20px 10px; }
  .ai-visual::before { height: 80px; }

  /* ── Pricing & combos ─────────────────────────────────────────────── */
  .price-card { padding: 20px 16px 16px; gap: 12px; border-radius: 18px; }
  .price-name { font-size: 1.1rem; }
  .price-desc { font-size: 0.8125rem; }
  .price-block { padding-top: 12px; }
  .price-value { font-size: 2.25rem; }
  .price-cur { font-size: 1.15rem; margin-top: 6px; }
  .price-features { gap: 7px; }
  .price-features li { font-size: 0.8125rem; gap: 8px; }
  .price-features i { width: 18px; height: 18px; font-size: 9px; }
  .price-badge, .price-ribbon { padding: 5px 12px; font-size: 10px; }
  .price-group { margin-top: 28px; }
  .price-group-head { margin-bottom: 20px; }
  .price-notes { gap: 8px; }
  .price-note { padding: 12px; gap: 10px; }
  .combo-ends { padding: 7px 10px; }
  .price-footnote { margin-top: 14px; font-size: 11.5px; }
  .cur-picker .cselect-btn { min-height: 40px; }

  /* ── Stats, CTA band, values ──────────────────────────────────────── */
  .stat-cell { padding: 14px 8px; }
  .stat-value { font-size: 1.6rem; }
  .stat-label { margin-top: 5px; font-size: 11.5px; }
  .cta-band { padding: 22px 18px; gap: 16px; border-radius: 20px; }
  .cta-band h2 { margin: 10px 0 8px; }
  .cta-band p { font-size: 0.875rem; }
  .cta-band-actions .btn { flex: 1 1 100%; }
  .value-item { padding: 8px 12px; }

  /* ── Contact ──────────────────────────────────────────────────────── */
  .biz-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start; padding: 14px; }
  .biz-card > .card-icon { grid-row: span 4; }
  .biz-card h2 { margin: 0; font-size: 10.5px; }
  .biz-big { font-size: 0.9375rem; }
  .biz-dl { font-size: 0.8125rem; margin-top: 4px; }
  .biz-dl dd { margin-bottom: 6px; }
  .biz-policies { padding: 10px 12px; gap: 6px; font-size: 12px; }
  .biz-policies a { padding: 5px 10px; }
  .contact-info, .contact-form-wrapper { padding: 16px; }
  .contact-info h3 { font-size: 1.1rem; }
  .contact-details { margin-top: 12px; gap: 6px; }
  .contact-detail { padding: 8px; gap: 10px; }
  .contact-detail-icon { width: 32px; height: 32px; font-size: 13px; }

  /* ── Forms ────────────────────────────────────────────────────────── */
  .form-group { margin-bottom: 12px; gap: 5px; }
  .form-group label, .form-label { font-size: 12.5px; }
  .form-control { min-height: 44px; padding: 10px 12px; border-radius: 10px; }
  textarea.form-control { min-height: 104px; }
  .file-drop { padding: 12px; gap: 12px; }
  .file-drop-icon { width: 36px; height: 36px; font-size: 15px; }

  /* Custom dropdowns open as a bottom sheet over a dimmed page */
  .cselect-list {
    left: 8px !important; right: 8px !important; top: auto !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    width: auto !important; max-height: min(60vh, 440px) !important;
    border-radius: 18px; padding: 6px;
    box-shadow: 0 0 0 100vmax rgba(2, 6, 18, 0.5), var(--shadow-lg);
    animation: sheetUp 0.24s var(--ease-out);
  }
  .cselect-opt { min-height: 46px; font-size: 0.9375rem; }
  .cselect-search input { min-height: 42px; font-size: 16px; }

  /* ── Careers ──────────────────────────────────────────────────────── */
  .careers-stats { gap: 8px; }
  .careers-stat { padding: 10px 12px; border-radius: 12px; }
  .careers-stat b { font-size: 1.2rem; }
  .careers-stat span { font-size: 11.5px; line-height: 1.4; }
  .careers-form-card { padding: 14px; }
  .careers-form-head { padding-bottom: 12px; margin-bottom: 14px; gap: 12px; }
  .careers-form-icon { width: 38px; height: 38px; font-size: 15px; }
  .careers-form-title { font-size: 1.05rem; }
  .apply-panel { padding: 14px; }
  .apply-panel-title { font-size: 1.1rem; margin-top: 8px; }
  .role-chip { padding: 7px 8px; gap: 7px; font-size: 11.5px; }
  .role-chip-icon { width: 22px; height: 22px; font-size: 10px; }

  /* ── Blog: list rows with a square thumbnail ──────────────────────── */
  .blog-toolbar { margin-bottom: 14px; gap: 10px; }
  .tag-chip { min-height: 32px; padding: 0 10px; font-size: 12px; }
  .blog-grid { gap: 8px; }
  .blog-grid .blog-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .blog-grid .blog-card-media { aspect-ratio: auto; height: 100%; min-height: 104px; border-bottom: 0; border-right: 1px solid var(--border); }
  .blog-grid .blog-card-fallback { font-size: 22px; }
  .blog-grid .blog-card-tag { left: 6px; top: 6px; padding: 2px 7px; font-size: 9px; }
  .blog-grid .blog-card-body { gap: 4px; padding: 10px 12px; }
  .blog-grid .blog-card h3 { font-size: 0.875rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .blog-grid .blog-card p { font-size: 0.75rem; line-height: 1.45; -webkit-line-clamp: 2; }
  .blog-grid .blog-meta-row { padding-top: 6px; font-size: 10.5px; }
  .blog-grid .author { font-size: 11px; gap: 6px; }
  .blog-grid .author-avatar { width: 20px; height: 20px; font-size: 8.5px; }
  .blog-lead .blog-card-media { aspect-ratio: 2 / 1; }
  .blog-lead .blog-card-body { padding: 14px; gap: 8px; }
  .blog-lead .blog-card h3 { font-size: 1.15rem; }
  .blog-lead .blog-card p { font-size: 0.8125rem; -webkit-line-clamp: 3; }

  /* ── Post, legal, prose ───────────────────────────────────────────── */
  .post-title { font-size: 1.6rem; }
  .cms-prose { font-size: 0.9375rem; }
  .cms-prose h2 { font-size: 1.2rem; }
  .legal-h2 { font-size: 1.1rem; gap: 8px; }

  /* ── Footer ───────────────────────────────────────────────────────── */
  .footer { padding-top: 28px; }
  .footer-top { gap: 20px; }
  .brand-logo-foot { height: 28px; }
  .footer-desc { margin-top: 10px; font-size: 0.8125rem; line-height: 1.6; }
  .footer-newsletter { margin-top: 14px; }
  .footer-social { margin-top: 14px; }
  .social-link { width: 34px; height: 34px; }
  .footer-cols { gap: 18px 12px; }
  .footer-col-title { margin-bottom: 8px; font-size: 11px; }
  .footer-col ul { gap: 2px; }
  .footer-col a, .footer-col span { font-size: 0.8125rem; }
  .footer-legal { margin-top: 20px; padding: 12px 14px; gap: 10px; }
  .footer-bottom { margin-top: 14px; padding-top: 12px; }

  /* ── Floating buttons ─────────────────────────────────────────────── */
  .fab { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }
  .fab-whatsapp { font-size: 18px; }
  .fab-stack { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 48px); gap: 6px; }
}

@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } }

/* Small phones (iPhone SE / 360 Android and below) */
@media (max-width: 380px) {
  :root {
    --fs-display: 1.75rem;    /* 28 */
    --fs-h1: 1.625rem;
    --fs-h2: 1.375rem;        /* 22 */
    --container-pad: 0.875rem;
  }
  .feature-card p { -webkit-line-clamp: 2; }
  .blog-grid .blog-card { grid-template-columns: 92px minmax(0, 1fr); }
  .blog-grid .blog-card-media { min-height: 92px; }
}

/* ── Desktop & tablet density (owner: no dead space) ─────────────────── */
@media (min-width: 761px) {
  /* Combo cards keep their own height: no empty band above the button. */
  .combo-grid { align-items: start; }
}
@media (min-width: 1024px) {
  /* The AI diagram sits centred beside the copy instead of stretching. */
  .ai-visual { align-self: center; min-height: 400px; }
}
@media (min-width: 900px) {
  /* Plan cards fill the row instead of sitting narrow in the middle. */
  .price-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .price-grid:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
