/* ========================================================================== 
 * TRUE FBS v4 — narrow, requested-only corrections
 *
 * This module deliberately follows precision-fixes.css. It restores only the
 * layouts that were unintentionally widened in v3, switches the registration
 * action to the landing's teal brand colour, and adds a denser desktop scale.
 * Existing markup and interactions remain unchanged.
 * ========================================================================== */

/* --------------------------------------------------------------------------
 * Restore the original feature grid.
 * Only the Mini-WMS card (.feature-card--full) stays full-width.
 * -------------------------------------------------------------------------- */
@media (min-width: 1021px) {
  .feature-card--wide:not(.feature-card--full) {
    grid-column: span 2;
    min-height: 268px;
    grid-template-columns: 52px minmax(0, 1fr) minmax(180px, 0.7fr);
    align-items: start;
    gap: 18px;
    padding: 25px;
  }

  .feature-card--wide:not(.feature-card--full) > .feature-icon {
    align-self: auto;
  }

  .feature-card--wide:not(.feature-card--full) .feature-card__copy {
    align-self: auto;
    max-width: none;
  }

  .feature-card--wide:not(.feature-card--full) .feature-card__copy h3 {
    max-width: none;
  }
}

@media (min-width: 1021px) and (max-width: 1180px) {
  .feature-card--wide:not(.feature-card--full) {
    grid-template-columns: 48px minmax(0, 1fr) 170px;
  }
}

/* --------------------------------------------------------------------------
 * Restore the original marketplace card width and proportions.
 * Text corrections from v3 are intentionally preserved in the HTML.
 * -------------------------------------------------------------------------- */
@media (min-width: 761px) {
  .marketplace-cards {
    max-width: 870px;
  }

  .marketplace-card {
    min-height: 270px;
    padding: 28px;
  }

  .marketplace-card li {
    font-size: 0.84rem;
    line-height: 1.55;
  }
}

/* --------------------------------------------------------------------------
 * Phone layout: both wide feature cards use the full card width for copy.
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .feature-card--wide {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .feature-card--wide > .feature-icon,
  .feature-card--wide .feature-card__copy,
  .feature-card--wide .box-visual,
  .feature-card--wide .document-visual {
    grid-column: 1 !important;
  }

  .feature-card--wide .feature-card__copy {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .feature-card--wide .feature-card__copy h3,
  .feature-card--wide .feature-card__copy p {
    width: 100%;
    max-width: none;
  }
}

/* Keep the ruble sign with the price in all four order-volume cards. */
@media (max-width: 760px) {
  .tier-card strong {
    flex: 0 0 auto;
    font-size: clamp(1.55rem, 6.4vw, 2rem);
    white-space: nowrap;
  }
}

/* --------------------------------------------------------------------------
 * Registration uses the same primary teal action as the rest of TRUE FBS.
 * -------------------------------------------------------------------------- */
.auth-submit--primary,
.auth-registration-button {
  border-color: var(--brand-700);
  background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
  box-shadow: 0 13px 28px rgba(7, 136, 165, 0.22);
}

.auth-submit--primary:hover,
.auth-registration-button:hover {
  background: linear-gradient(135deg, var(--brand-800), var(--brand-700));
  box-shadow: 0 16px 34px rgba(7, 136, 165, 0.28);
}

/* --------------------------------------------------------------------------
 * Compact desktop density.
 *
 * The current laptop viewport is wide enough to use the desktop layout, but
 * has limited vertical CSS pixels because of OS/browser scaling. These rules
 * reduce only the desktop presentation; the already approved tablet/mobile
 * responsive rules at 1180px and below are left untouched.
 * -------------------------------------------------------------------------- */
@media (min-width: 1181px) {
  html {
    font-size: 15px;
  }

  :root {
    --header-height: 92px;
  }

  .site-header {
    height: var(--header-height);
  }

  .site-header__inner {
    min-height: 92px;
    padding-block: 14px;
  }

  .site-header .brand {
    gap: 13px;
  }

  .site-header .brand__mark {
    width: 52px;
    height: 52px;
    border-radius: 17px;
  }

  .site-header .brand__mark svg {
    width: 40px;
    height: 40px;
  }

  .site-header .brand__text strong {
    font-size: 20px;
    line-height: 24px;
  }

  .site-header .brand__text small {
    margin-top: 2px;
    font-size: 14px;
    line-height: 19px;
  }

  .section {
    padding-block: 88px;
  }

  .section-heading {
    margin-bottom: 44px;
  }

  h2 {
    font-size: clamp(2.2rem, 3vw, 3.35rem);
  }

  .section-heading p {
    font-size: 1rem;
  }

  .hero {
    min-height: 640px;
    padding-top: 42px;
    padding-bottom: 32px;
  }

  .hero__layout {
    grid-template-columns: minmax(0, 1.02fr) minmax(500px, 0.98fr);
    gap: 30px;
  }

  .hero__copy {
    max-width: 610px;
    padding: 0 0 8px;
  }

  .hero__title {
    max-width: 610px;
    margin-bottom: 18px;
    font-size: clamp(3.25rem, 3.75vw, 3.85rem);
    line-height: 1.025;
  }

  .hero__lead {
    max-width: 600px;
    margin-bottom: 22px;
    font-size: 1.05rem;
    line-height: 1.55;
  }

  .hero__actions {
    margin-bottom: 20px;
  }

  .hero__proof {
    padding: 10px 14px;
  }

  .hero-visual {
    min-height: 500px;
    scale: 0.89;
    transform-origin: center right;
  }

  .hero__logos {
    margin-top: 14px;
  }

  .comparison-card {
    min-height: 470px;
    padding: 26px;
  }

  .workflow-card {
    min-height: 355px;
    padding: 23px 18px 18px;
  }

  .scan-demo {
    min-height: 500px;
  }

  .warehouse-visual {
    min-height: 500px;
  }

  .marking-visual {
    min-height: 510px;
  }

  .product-preview {
    min-height: 540px;
  }

  .final-cta {
    padding: 62px 40px;
  }
}
