/* Shared polish for industry and subindustry pages only. */
@media (hover: none) and (pointer: coarse) {
  html {
    background: #061017;
  }

  body {
    background-color: #061017;
  }

  .header,
  .agri-header,
  .dairy-header {
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .page > .hero,
  .industrial-shell > .hero {
    min-height: calc(100svh - var(--header-height, 112px));
    padding-top: clamp(42px, 4.8vw, 60px);
    padding-bottom: clamp(58px, 6vw, 88px);
  }

  .hero:not(.poultry-hero),
  .hero.poultry-hero,
  .dairy-hero,
  .hero-card {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      inset 0 -1px 0 rgba(255, 255, 255, 0.04),
      0 30px 80px rgba(0, 0, 0, 0.24);
  }

  .hero-content,
  .hero-copy {
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  }

  .feature-list {
    gap: clamp(14px, 1.8vw, 22px);
  }

  .feature-card,
  .hero-placeholder-box,
  .foot-chip,
  .product-card,
  .stat-card,
  .orbit-stack {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  }

  .feature-card,
  .hero-placeholder-box,
  .foot-chip {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
      rgba(6, 12, 23, 0.62);
  }

  .hero-cta {
    box-shadow:
      0 16px 32px rgba(255, 165, 8, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  .hero-visual {
    min-height: clamp(430px, 46vw, 560px);
  }

  .feature-orbs {
    min-height: clamp(420px, 48vw, 560px);
  }

  .hero.poultry-hero {
    align-items: center;
    min-height: calc(100svh - var(--header-height, 112px));
    padding-top: clamp(50px, 5vw, 72px);
    padding-bottom: clamp(62px, 6vw, 92px);
  }

  .hero-highlights {
    gap: clamp(12px, 1.5vw, 18px);
  }

  .hero-showcase {
    width: min(520px, 48vw);
  }

  .dairy-hero {
    min-height: 100svh;
    padding-bottom: clamp(44px, 5vw, 74px);
  }

  .dairy-hero .hero-main {
    flex: initial;
    padding-top: clamp(28px, 3.8vw, 48px);
  }

  .products-row,
  .stats-row {
    margin-top: clamp(22px, 3vw, 40px);
  }

  .agri-shell {
    min-height: auto;
  }

  .agri-main {
    padding-top: clamp(24px, 3vw, 40px);
    padding-bottom: clamp(40px, 4.6vw, 72px);
  }

  .hero-card {
    min-height: clamp(640px, 74vh, 860px);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
      rgba(4, 10, 19, 0.38);
  }

  body > .card {
    position: relative;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.2);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
      rgba(7, 16, 28, 0.74);
    box-shadow: 0 28px 68px rgba(0, 0, 0, 0.46);
  }

  body > .card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 34%);
  }
}

/* Final mobile refinement for industry and subindustry pages. */
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.nav-open {
    overflow: hidden !important;
  }

  .page,
  .industrial-shell,
  .agri-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .header,
  .dairy-header {
    position: sticky !important;
    top: 0;
    z-index: 90;
    min-height: clamp(70px, 17vw, 88px) !important;
    height: auto !important;
    padding: 8px clamp(14px, 4vw, 20px) !important;
    display: flex;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    overflow: visible !important;
    background: rgba(2, 6, 12, 0.94) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .logo,
  .brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 64px);
    gap: 10px !important;
    overflow: hidden;
  }

  .logo img,
  .brand img {
    height: clamp(44px, 11.5vw, 58px) !important;
    width: auto;
    flex: 0 0 auto;
  }

  .pagetitle,
  .brand-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1rem, 4.7vw, 1.48rem) !important;
    line-height: 1.05;
    flex: 1 1 auto;
  }

  .header-mascot,
  .header-cow {
    display: none !important;
  }

  .brand-panel {
    min-width: 0 !important;
    min-height: 0 !important;
    width: auto !important;
    flex: 1 1 auto !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .nav-panel {
    width: auto !important;
    flex: 0 0 auto !important;
    padding-right: 0 !important;
  }

  .nav-toggle {
    display: inline-flex !important;
    position: fixed !important;
    top: clamp(12px, 3.8vw, 20px) !important;
    right: clamp(14px, 4vw, 20px) !important;
    z-index: 160 !important;
    flex: 0 0 46px;
    width: 46px !important;
    height: 46px !important;
    margin-left: auto;
    border-radius: 50% !important;
    color: #111827 !important;
    background: #ffa508 !important;
    border-color: rgba(255, 255, 255, 0.26) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3) !important;
    transform: none !important;
  }

  .nav {
    position: fixed !important;
    z-index: 130 !important;
    top: calc(clamp(70px, 17vw, 88px) + 10px) !important;
    left: clamp(12px, 4vw, 20px) !important;
    right: clamp(12px, 4vw, 20px) !important;
    width: auto !important;
    min-width: 0 !important;
    max-height: calc(100svh - clamp(70px, 17vw, 88px) - 22px) !important;
    min-height: 0 !important;
    display: grid !important;
    align-items: stretch !important;
    gap: 9px !important;
    padding: 14px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    white-space: normal !important;
    border-radius: 22px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background:
      linear-gradient(180deg, rgba(11, 16, 28, 0.98), rgba(3, 7, 13, 0.98)),
      rgba(3, 7, 13, 0.98) !important;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.46) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-10px) scale(0.98) !important;
    transition: opacity 0.22s ease, transform 0.22s ease !important;
  }

  .nav.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
  }

  .nav::before {
    display: none !important;
  }

  .nav > a,
  .nav .dropdown > a {
    width: 100% !important;
    min-height: 46px;
    display: flex !important;
    align-items: center;
    padding: 0 14px !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 0.94rem !important;
    line-height: 1.2;
  }

  .nav > a::after,
  .nav .dropdown > a::after {
    display: none !important;
  }

  .dropdown {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .dropdown-menu {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    gap: 8px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: none !important;
    transition: max-height 0.24s ease, opacity 0.18s ease, margin-top 0.18s ease !important;
  }

  .dropdown.is-open .dropdown-menu {
    max-height: 440px !important;
    margin-top: 8px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .dropdown-menu a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 14px !important;
    border-radius: 13px !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.055) !important;
    font-size: 0.88rem !important;
    transform: none !important;
  }

  .scale-overlay {
    padding: 12px !important;
  }

  .scale-modal {
    width: min(100%, 640px) !important;
    max-height: min(92svh, 760px) !important;
    border-radius: 22px !important;
  }

  .scale-expand-grid {
    grid-template-columns: repeat(auto-fit, minmax(154px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .page > .hero {
    grid-template-columns: 1fr !important;
    align-items: start !important;
    gap: 24px !important;
    padding-inline: clamp(14px, 5vw, 22px) !important;
  }

  .hero-content,
  .hero-copy {
    width: 100% !important;
    max-width: 100% !important;
  }

  .hero-cta {
    min-height: 50px;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .feature-card,
  .foot-chip,
  .product-card,
  .stat-card,
  .hero-placeholder-box {
    border-radius: 16px !important;
  }

  .feature-list {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .feature-card {
    grid-template-columns: 46px minmax(0, 1fr) !important;
    padding: 14px !important;
  }

  .feature-card h2 {
    font-size: clamp(1.08rem, 6vw, 1.58rem) !important;
    line-height: 1.14 !important;
  }

  .feature-card p {
    font-size: 0.86rem !important;
    line-height: 1.36 !important;
    overflow-wrap: anywhere;
  }

  .feature-icon {
    width: 44px !important;
    height: 44px !important;
  }

  .hero-foot {
    grid-template-columns: 1fr !important;
  }

  .hero-visual {
    width: 100% !important;
    min-height: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 28px 14px !important;
    justify-items: center;
    align-content: start;
    padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .hero-visual::before,
  .hero-visual::after {
    display: none !important;
  }

  .visual-node {
    position: relative !important;
    inset: auto !important;
    width: min(43vw, 158px) !important;
    transform: none !important;
  }

  .industrial-page .industrial-shell {
    grid-template-rows: auto auto !important;
    padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  }

  .industrial-page .hero {
    min-height: auto !important;
    height: auto !important;
    padding: 16px clamp(14px, 4vw, 22px) calc(34px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: visible !important;
  }

  .industrial-page .hero-content {
    grid-template-columns: 1fr !important;
    row-gap: 14px !important;
  }

  .industrial-page .hero-content h1 {
    max-width: 12ch !important;
    font-size: clamp(2rem, 10vw, 3.2rem) !important;
    line-height: 0.96 !important;
  }

  .industrial-page .hero-content h1 span {
    white-space: normal !important;
  }

  .industrial-page .hero-placeholder-boxes {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .industrial-page .hero-placeholder-box {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    padding: 13px 14px !important;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 0.84rem !important;
    line-height: 1.35 !important;
  }

  .industrial-page .hero-placeholder-box::before {
    width: 38px !important;
    height: 38px !important;
  }

  .industrial-page .feature-orbs {
    position: relative !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    transform: none !important;
    padding-bottom: 0 !important;
  }

  .industrial-page .feature-orb {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
  }

  .industrial-page .orb-icon {
    height: clamp(86px, 26vw, 116px) !important;
  }

  .poultry-single-popup:not(.dairy-page) .hero.poultry-hero {
    min-height: auto !important;
    height: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 24px !important;
    padding: 30px clamp(16px, 5vw, 24px) calc(46px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .poultry-single-popup:not(.dairy-page) .hero-content {
    max-width: 100% !important;
  }

  .poultry-single-popup:not(.dairy-page) .hero-highlights {
    gap: 12px !important;
  }

  .poultry-single-popup:not(.dairy-page) .hero-highlights li {
    font-size: clamp(0.9rem, 4vw, 1.04rem) !important;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .poultry-single-popup:not(.dairy-page) .hero-showcase {
    width: 100% !important;
    margin: 0 !important;
  }

  .poultry-single-popup:not(.dairy-page) .hero-showcase::before {
    display: none !important;
  }

  .poultry-single-popup:not(.dairy-page) .scale-picks {
    position: relative !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    padding: 0 0 calc(34px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .poultry-single-popup:not(.dairy-page) .scale-picks::before,
  .poultry-single-popup:not(.dairy-page) .scale-picks::after {
    display: none !important;
  }

  .poultry-single-popup:not(.dairy-page) .scale-pick {
    position: static !important;
    width: min(132px, 34vw) !important;
    transform: none !important;
    justify-self: center;
  }
}

@media (max-width: 900px) {
  .dairy-page .dairy-hero {
    min-height: auto !important;
    height: auto !important;
    padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .dairy-page .hero-main {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
    padding: 24px clamp(16px, 5vw, 26px) 0 !important;
  }

  .dairy-page .hero-content h1 {
    font-size: clamp(1.72rem, 7.8vw, 2.5rem) !important;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .dairy-page .hero-content p {
    font-size: clamp(0.96rem, 4vw, 1.2rem) !important;
  }

  .dairy-page .products-row {
    width: 100% !important;
    max-width: 520px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    padding-inline: clamp(16px, 5vw, 24px);
    padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .dairy-page .scale-pick {
    width: min(132px, 34vw) !important;
    justify-self: center;
  }

  .dairy-page .stats-row {
    width: min(100%, 520px) !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .farm-page .page {
    height: auto !important;
    min-height: 100svh !important;
    padding: 0 clamp(12px, 4vw, 18px) calc(30px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 14px !important;
  }

  .farm-page .hero {
    min-height: auto !important;
    padding: 22px clamp(16px, 5vw, 24px) !important;
  }

  .farm-page .hero-content {
    width: 100% !important;
  }

  .farm-page .hero-content h1 {
    font-size: clamp(2.05rem, 9vw, 3.2rem) !important;
  }

  .farm-page .product-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    justify-items: stretch !important;
    padding-inline: 0 !important;
  }

  .farm-page .product-card {
    width: 100% !important;
    max-width: none !important;
    min-height: 150px !important;
    aspect-ratio: auto !important;
    display: flex !important;
    align-items: flex-end !important;
    padding: 14px !important;
    overflow: hidden;
    background:
      linear-gradient(135deg, rgba(242, 194, 45, 0.22), rgba(7, 13, 16, 0.82)),
      rgba(7, 13, 16, 0.86) !important;
  }

  .farm-page .product-card img {
    opacity: 0 !important;
  }

  .farm-page .product-copy {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100%;
    border-radius: 16px !important;
    padding: 12px !important;
  }

  .farm-page .stats {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 10px 14px !important;
  }

  .farm-page .stats p {
    white-space: normal !important;
    font-size: clamp(0.78rem, 3.6vw, 0.98rem) !important;
  }

  .agriculture-page .agri-shell {
    min-height: 100svh !important;
    grid-template-rows: auto auto auto !important;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .agriculture-page .agri-header {
    position: sticky;
    top: 0;
    z-index: 80;
    min-height: auto !important;
    padding: 10px clamp(14px, 4vw, 20px) !important;
    flex-wrap: wrap !important;
    background: rgba(4, 10, 18, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .agriculture-page .brand {
    max-width: 100%;
  }

  .agriculture-page .breadcrumb {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
    font-size: clamp(0.78rem, 3.5vw, 0.94rem) !important;
    gap: 6px !important;
  }

  .agriculture-page .agri-main {
    padding: 12px !important;
  }

  .agriculture-page .hero-card {
    min-height: auto !important;
    padding: 16px 14px calc(22px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 18px !important;
  }

  .agriculture-page .hero-layout {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    align-items: start !important;
  }

  .agriculture-page .hero-copy {
    order: -1 !important;
    grid-column: auto !important;
    text-align: left !important;
  }

  .agriculture-page .hero-copy h2 {
    font-size: clamp(1.48rem, 7.2vw, 2.35rem) !important;
    line-height: 1.12;
  }

  .agriculture-page .hero-copy p {
    max-width: 100% !important;
    font-size: clamp(0.88rem, 3.8vw, 1rem) !important;
    margin-inline: 0 !important;
  }

  .agriculture-page .hero-cta {
    width: 100%;
    justify-content: center;
    margin-inline: 0 !important;
  }

  .agriculture-page .orbit {
    grid-column: auto !important;
    width: 100% !important;
    margin: 0 !important;
    transform: none !important;
  }

  .agriculture-page .orbit-stack {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  .agriculture-page .orbit-item {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 96px !important;
    height: auto !important;
    aspect-ratio: 1 / 0.72 !important;
    flex: none !important;
    border-radius: 14px !important;
    transform: none !important;
  }

  .agriculture-page .orbit-item:last-child {
    grid-column: 1 / -1 !important;
  }

  .agriculture-page .agri-stats {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    height: auto !important;
    overflow: visible !important;
    padding: 12px 14px !important;
  }

  .agriculture-page .agri-stats p {
    flex: 1 1 100%;
    white-space: normal !important;
    font-size: clamp(0.68rem, 3.2vw, 0.84rem) !important;
  }
}

@media (max-width: 460px) {
  .farm-page .product-grid {
    grid-template-columns: 1fr !important;
  }

  .scale-modal {
    padding: 14px !important;
  }

  body > .card {
    width: min(100%, 360px);
    padding: 22px 18px;
    border-radius: 18px;
  }

  body > .card h1 {
    font-size: clamp(1.65rem, 10vw, 2.35rem);
  }

  body > .card p {
    font-size: 0.94rem;
  }
}

@media (max-width: 360px) {
  .hero-visual,
  .industrial-page .feature-orbs,
  .poultry-single-popup:not(.dairy-page) .scale-picks,
  .dairy-page .products-row,
  .dairy-page .stats-row,
  .agriculture-page .orbit-stack {
    grid-template-columns: 1fr !important;
  }

  .visual-node,
  .poultry-single-popup:not(.dairy-page) .scale-pick,
  .dairy-page .scale-pick {
    width: min(190px, 72vw) !important;
  }
}
