/*
 * Shared responsive layer
 * -----------------------
 * The approved large-desktop composition starts at 1600px and is intentionally
 * left untouched. Everything below that point is scaled or reflowed here.
 */

@media (min-width: 1024px) and (max-width: 1599px) {
  html,
  body {
    overflow-x: hidden;
  }

  html {
    font-size: clamp(14px, 1.05vw, 16px);
  }

  :root {
    --container: min(90vw, 1500px);
  }

  .section {
    padding-block: clamp(52px, 5.25vw, 84px);
  }

  :is(.about, .company-story) {
    padding-bottom: 0 !important;
    padding-block-end: 0 !important;
  }

  .site-header {
    padding-block: clamp(12px, 1.35vw, 20px);
  }

  .header-inner {
    gap: clamp(10px, 1.1vw, 18px);
  }

  .brand {
    width: clamp(78px, 6.2vw, 90px);
  }

  .primary-nav {
    gap: clamp(32px, 3.2vw, 5rem);
    margin-left: auto;
    margin-right: auto;
  }

  .primary-nav > a,
  .nav-dropdown-toggle {
    font-size: clamp(0.98rem, 1.05vw, 1.15rem);
    font-weight: 500;
  }

  .header-actions {
    margin-left: 0;
    gap: clamp(20px, 1.8vw, 32px);
  }

  .header-actions .button {
    min-height: clamp(44px, 3.4vw, 50px);
    padding-inline: clamp(18px, 1.8vw, 28px);
    font-size: clamp(0.95rem, 0.98vw, 1.05rem);
  }

  .nav-dropdown-menu {
    width: clamp(260px, 22vw, 352px);
  }

  .hero {
    min-height: 100svh !important;
    padding-top: clamp(200px, 16vw, 240px) !important;
    padding-bottom: clamp(36px, 3.2vw, 54px) !important;
  }

  .hero-inner {
    padding-top: clamp(20px, 2vw, 0px) !important;
  }

  .hero-copy {
    max-width: clamp(680px, 52vw, 820px);
  }

  /* Enforce exact proportional font-size across all section headers in 1024px - 1599px viewport */
  .hero h1,
  .section-heading h2,
  .about-copy h2,
  .philosophy h2,
  .origin-copy h2,
  .markets-copy h2,
  .audience-heading h2,
  .cta-panel h2,
  .about-hero h1,
  .markets-hero h1,
  .sustainability-hero h1,
  .cotton-hero h1,
  .us-cotton-hero h1,
  .sourcing-origins-hero h1,
  .quality-hero h1,
  .spinning-mills-hero h1,
  .partners-hero h1,
  .supply-chain-hero h1,
  .contact-hero h1,
  .core-market-header h2,
  .future-markets h2,
  .trial-shipment-copy h2 {
    font-size: clamp(2.8rem, 3.2vw, 4.2rem) !important;
    line-height: 1.06;
  }

  .hero h1 {
    margin-bottom: clamp(18px, 1.8vw, 28px);
  }

  .hero-copy > p:not(.hero-note) {
    max-width: clamp(420px, 40vw, 660px);
    font-size: clamp(1.125rem, 1.25vw, 1.35rem) !important;
    line-height: 1.55;
    margin-bottom: clamp(20px, 1.8vw, 30px);
  }

  .hero .button-row {
    gap: clamp(12px, 1.2vw, 18px);
  }

  .hero .button-row .button {
    min-height: clamp(44px, 3.2vw, 52px);
    padding-inline: clamp(20px, 1.8vw, 28px);
    font-size: clamp(0.92rem, 0.98vw, 1.05rem);
  }

  .hero-note {
    font-size: clamp(0.95rem, 1vw, 1.12rem);
    margin: clamp(16px, 1.5vw, 24px) 0;
  }

  .hero-metrics {
    max-width: clamp(720px, 55vw, 860px);
    gap: 0;
    padding-top: clamp(16px, 1.6vw, 24px);
  }

  .hero-metrics > div {
    padding-left: clamp(20px, 2.2vw, 42px);
    padding-right: clamp(20px, 2.2vw, 42px);
  }

  .hero-metrics > div:first-child {
    padding-left: 0;
  }

  .hero-metrics > div:last-child {
    padding-right: 0;
  }

  .hero-metrics strong {
    font-size: clamp(1.15rem, 1.35vw, 1.75rem);
  }

  .hero-metrics span {
    font-size: clamp(0.92rem, 1.02vw, 1.15rem);
  }

  /* Tightly match section height to inner content & image heights for desktop viewports */
  .philosophy {
    min-height: clamp(440px, 32vw, 530px) !important;
    padding-block: clamp(32px, 3vw, 48px) !important;
    background-size: cover !important;
    background-position: right center !important;
    background-color: #f9ead1 !important;
  }

  .audience-carousel {
    height: clamp(620px, 45vw, 760px) !important;
    min-height: clamp(620px, 45vw, 760px) !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  .audience-side {
    display: none !important;
  }

  .audience-photo {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    background-size: cover !important;
    background-position: left center !important;
  }

  .audience-controls {
    position: absolute !important;
    z-index: 10 !important;
    left: clamp(36px, 4vw, 64px) !important;
    bottom: clamp(36px, 4vw, 54px) !important;
  }

  :is(.panorama, .cotton-panorama, .about-panorama, .markets-panorama, .sustainability-panorama, .quality-panorama, .us-export-panorama, .sourcing-team-panorama) {
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
    font-size: 0 !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  :is(.panorama, .cotton-panorama, .about-panorama, .markets-panorama, .sustainability-panorama, .quality-panorama, .us-export-panorama, .sourcing-team-panorama) img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .secondary-page :is(
    .about-hero,
    .markets-hero,
    .sustainability-hero,
    .cotton-hero,
    .us-cotton-hero,
    .sourcing-origins-hero,
    .quality-hero,
    .spinning-mills-hero,
    .partners-hero,
    .supply-chain-hero,
    .contact-hero
  ) {
    min-height: clamp(380px, 28vw, 440px) !important;
    height: auto !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding-top: clamp(140px, 10.5vw, 175px) !important;
    padding-bottom: clamp(55px, 4.5vw, 75px) !important;
  }

  :is(
    .about-hero-inner,
    .markets-hero-inner,
    .sustainability-hero-inner,
    .cotton-hero-inner,
    .us-cotton-hero-inner,
    .sourcing-origins-hero-inner,
    .quality-hero-inner,
    .spinning-mills-hero-inner,
    .partners-hero-inner,
    .supply-chain-hero-inner,
    .contact-hero-inner
  ) {
    width: min(90vw, 1320px);
  }

  :is(
    .about-hero,
    .markets-hero,
    .sustainability-hero,
    .cotton-hero,
    .us-cotton-hero,
    .sourcing-origins-hero,
    .quality-hero,
    .spinning-mills-hero,
    .partners-hero,
    .supply-chain-hero,
    .contact-hero
  ) h1 {
    font-size: clamp(2.8rem, 3.2vw, 4.2rem) !important;
    line-height: 1.06 !important;
  }

  :is(
    .about-hero-inner,
    .markets-hero-inner,
    .sustainability-hero-inner,
    .cotton-hero-inner,
    .us-cotton-hero-inner,
    .sourcing-origins-hero-inner,
    .quality-hero-inner,
    .spinning-mills-hero-inner,
    .partners-hero-inner,
    .supply-chain-hero-inner,
    .contact-hero-inner
  ) > p:not(.eyebrow) {
    font-size: clamp(1.125rem, 1.25vw, 1.35rem) !important;
    line-height: 1.55 !important;
  }

  .core-market-card {
    min-height: clamp(340px, 24vw, 420px) !important;
    padding: clamp(32px, 3vw, 46px) clamp(28px, 3.2vw, 50px) !important;
  }

  .core-market-header {
    margin-bottom: clamp(20px, 2vw, 32px) !important;
  }

  .core-market-header h2 {
    font-size: clamp(2.2rem, 2.8vw, 3.4rem) !important;
  }

  .market-flag {
    width: clamp(80px, 6.5vw, 110px) !important;
    height: clamp(80px, 6.5vw, 110px) !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    overflow: hidden !important;
  }

  .market-flag img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
  }

  .cotton-categories::before {
    background-attachment: fixed !important;
  }

  .core-market-copy > p:not(:last-child) {
    margin-bottom: clamp(16px, 1.5vw, 24px) !important;
  }

  .cta-panel,
  .markets-cta-panel,
  .sustainability-cta-panel {
    padding: clamp(56px, 6.8vw, 108px) clamp(30px, 5vw, 80px);
  }

  .core-market-card {
    min-height: clamp(390px, 39vw, 610px);
  }

  .technical-card,
  .us-benefit-card {
    min-height: 0;
  }

  .coordinated-step {
    min-height: clamp(390px, 38vw, 590px);
  }
}

/*
 * At the narrow end of desktop, three-column feature layouts need one
 * intermediate step before they become fully linear on phones.
 */
@media (min-width: 1024px) and (max-width: 1199px) {
  .company-story-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  }

  :is(.philosophy-layout, .responsibility-layout, .cotton-category-layout) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :is(.philosophy-image, .responsibility-image, .cotton-category-image) {
    order: -1;
    grid-column: 1 / -1;
    width: min(100%, 540px);
    min-height: clamp(520px, 58vw, 650px);
    margin-inline: auto;
  }

  .supplier-value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supplier-value-image {
    order: -1;
    grid-column: 1 / -1;
    width: min(100%, 540px);
    min-height: 520px;
    margin-inline: auto;
  }

  .contact-main-grid {
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  html,
  body {
    overflow-x: hidden;
  }

  html {
    font-size: clamp(13px, 1.36vw, 14px);
  }

  :root {
    --container: min(90vw, 920px);
  }

  .section {
    padding-block: clamp(56px, 7vw, 72px);
  }

  .site-header {
    padding-block: 13px;
  }

  .brand {
    width: clamp(70px, 7.5vw, 84px);
  }

  :is(
    .about-hero,
    .markets-hero,
    .sustainability-hero,
    .cotton-hero,
    .us-cotton-hero,
    .sourcing-origins-hero,
    .quality-hero,
    .spinning-mills-hero,
    .partners-hero,
    .supply-chain-hero,
    .contact-hero
  ) {
    min-height: 100svh;
    padding-top: clamp(145px, 17vw, 180px);
    padding-bottom: clamp(70px, 8vw, 90px);
  }

  .hero h1 {
    font-size: clamp(3rem, 6vw, 3.7rem);
  }

  .secondary-page :is(
    .about-hero,
    .markets-hero,
    .sustainability-hero,
    .cotton-hero,
    .us-cotton-hero,
    .sourcing-origins-hero,
    .quality-hero,
    .spinning-mills-hero,
    .partners-hero,
    .supply-chain-hero,
    .contact-hero
  ) h1 {
    font-size: clamp(2.9rem, 5.8vw, 3.7rem);
  }

  .cta-panel,
  .markets-cta-panel,
  .sustainability-cta-panel {
    padding: clamp(58px, 8vw, 78px) clamp(32px, 6vw, 60px);
  }

  .mobile-menu {
    max-height: calc(100svh - 96px);
    overflow-y: auto;
  }
}

@media (max-width: 767px) {
  :root {
    --container: calc(100% - 32px);
  }

  html {
    font-size: 15px;
  }

  body {
    overflow-x: hidden;
  }

  .container {
    width: var(--container);
  }

  .section {
    padding-block: 58px;
  }

  .site-header {
    padding-block: 11px;
  }

  .header-inner {
    min-height: 70px;
  }

  .brand {
    width: 68px;
  }

  .mobile-menu {
    max-height: calc(100svh - 92px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mobile-menu .button {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding-top: 134px !important;
    padding-bottom: 48px;
    background: linear-gradient(180deg, #ffffff 0%, #ebf4fb 45%, #073b63 100%) !important;
    border-bottom: none !important;
  }

  .hero-video-bg,
  .hero-video-overlay {
    display: none !important;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 16px;
    border-top: none !important;
    border-bottom: none !important;
    padding-top: 16px !important;
  }

  /* Mobile-Specific Asset Overrides */
  .secondary-page :is(
    .about-hero,
    .markets-hero,
    .sustainability-hero,
    .cotton-hero,
    .us-cotton-hero,
    .sourcing-origins-hero,
    .quality-hero,
    .spinning-mills-hero,
    .partners-hero,
    .supply-chain-hero,
    .contact-hero,
    .legal-hero
  ) {
    background: url("../assets/mobilespecificassets/mobilecompanyherobanner.png") center top / cover no-repeat !important;
  }

  .philosophy {
    min-height: auto !important;
    padding-top: clamp(36px, 7vw, 48px) !important;
    padding-bottom: clamp(32px, 6vw, 44px) !important;
    background: #f9ead1 url("../assets/mobilespecificassets/mobilehomesectionbanner2.png") center bottom / cover no-repeat !important;
  }

  /* Mobile Header Typography & Word Spacing */
  h1, h2, h3, h4, h5, h6,
  .eyebrow,
  [class*="-title"] {
    word-spacing: 0.14em !important;
    letter-spacing: 0.01em !important;
  }

  :is(h1, h2, h3, h4, h5, h6, .eyebrow) br {
    display: inline !important;
    content: " " !important;
  }

  .philosophy h2 {
    margin-bottom: 24px !important;
    white-space: normal !important;
    font-size: clamp(1.6rem, 6.8vw, 2.1rem) !important;
    word-spacing: 0.14em !important;
  }

  .philosophy h2 br {
    display: inline !important;
    content: " " !important;
  }

  .philosophy-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px 12px !important;
    margin-bottom: 28px !important;
  }

  .check-item {
    display: grid !important;
    grid-template-columns: 44px 1fr !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .check-item > span,
  .check-item img {
    width: 44px !important;
    height: 44px !important;
    padding: 10px !important;
  }

  .check-item p {
    font-size: clamp(0.86rem, 3.2vw, 0.98rem) !important;
    line-height: 1.25 !important;
  }

  .philosophy .button,
  .philosophy-copy .button {
    display: flex !important;
    width: fit-content !important;
    margin-inline: auto !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .segment-body > p {
    min-height: 0 !important;
    margin-bottom: 12px !important;
  }

  .segment-body ul {
    margin-top: 12px !important;
    gap: 14px !important;
  }

  .cotton-categories::before {
    background: url("../assets/mobilespecificassets/mobilecottonscrollbg.png") center center / cover no-repeat !important;
  }

  .priority-card {
    grid-template-columns: 76px 1fr !important;
    gap: 20px !important;
  }

  .icon-disc {
    width: 76px !important;
    height: 76px !important;
    min-width: 76px !important;
  }

  .icon-disc img,
  .icon-disc svg {
    width: 80% !important;
    height: 80% !important;
    object-fit: contain !important;
  }

  .cotton-category-card {
    grid-template-columns: 76px 1fr !important;
    gap: 20px !important;
  }

  .cotton-category-icon {
    width: 76px !important;
    height: 76px !important;
    min-width: 76px !important;
  }

  .cotton-category-icon img,
  .cotton-category-icon svg {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  .audience-photo {
    background-size: 100% auto !important;
    background-repeat: no-repeat !important;
    background-position: top center !important;
    background-color: #0c3354 !important;
  }

  .audience-card {
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: 135px !important;
    transform: translateX(-50%) !important;
    width: min(440px, 86vw) !important;
    max-width: 440px !important;
    margin-inline: auto !important;
  }

  .audience-slide:nth-child(1) .audience-photo {
    background-image: url("../assets/mobilespecificassets/mobilebottomhomectabanner1.jpg") !important;
  }

  .audience-slide:nth-child(2) .audience-photo {
    background-image: url("../assets/mobilespecificassets/mobilebottomhomectabanner2.jpg") !important;
  }

  /* Universal Mobile Typography Normalization */
  h1,
  .hero h1,
  [class*="-hero"] h1 {
    font-size: clamp(2.05rem, 7.8vw, 2.45rem) !important;
    line-height: 1.08 !important;
    text-wrap: balance !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  h2,
  .section-heading h2,
  main h2,
  [class*="heading"] h2,
  .core-market-header h2,
  :is(.about, .philosophy, .segments, .process, .origin, .supply, .markets, .audience, .cta, .cotton-categories) h2 {
    font-size: clamp(2.3rem, 9vw, 2.75rem) !important;
    line-height: 1.15 !important;
    text-wrap: balance !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  h1 span,
  h2 span {
    display: block !important;
    margin-top: 2px !important;
  }

  h3,
  main h3,
  [class*="card"] h3,
  .process-step h3,
  .cotton-category-card h3,
  .segment-body h3,
  .priority-card h3,
  .technical-card h3,
  .journey-card h3,
  .evaluation-card h3,
  .philosophy-card h3 {
    font-size: clamp(1.35rem, 5.2vw, 1.55rem) !important;
    line-height: 1.22 !important;
  }

  h4, h5, h6 {
    font-size: clamp(1.12rem, 4vw, 1.28rem) !important;
    line-height: 1.25 !important;
  }

  /* Universal Mobile Body Text Scaling */
  p,
  main p,
  [class*="card"] p,
  .section p,
  .hero-copy > p,
  .about-copy > p,
  .origin-copy > p,
  .markets-copy > p,
  .process-step p,
  .priority-card p,
  .segment-body > p,
  .technical-card p,
  .journey-card p,
  .evaluation-card p,
  .philosophy-card p,
  .audience-card p {
    font-size: clamp(0.95rem, 3.6vw, 1.02rem) !important;
    line-height: 1.52 !important;
  }

  /* Universal Mobile Eyebrow & Label Scaling */
  .eyebrow,
  .cotton-category-label,
  .market-label,
  .supply-label {
    font-size: clamp(0.76rem, 2.8vw, 0.85rem) !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
  }

  /* Universal Mobile Lead / Subheading Intro Paragraphs */
  p.lead,
  .section-heading p:not(.eyebrow),
  .cotton-availability-note {
    font-size: clamp(1.02rem, 3.8vw, 1.1rem) !important;
    line-height: 1.48 !important;
  }

  .hero-copy > p {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-actions {
    display: grid;
    width: 100%;
  }

  .hero-actions .button {
    width: 100%;
    min-height: 50px;
    padding-inline: 18px;
    white-space: normal;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 16px;
    border-top: none !important;
    border-bottom: none !important;
  }

  :is(
    .about-hero,
    .markets-hero,
    .sustainability-hero,
    .cotton-hero,
    .us-cotton-hero,
    .sourcing-origins-hero,
    .quality-hero,
    .spinning-mills-hero,
    .partners-hero,
    .supply-chain-hero,
    .contact-hero
  ) {
    min-height: auto;
    padding-top: 98px !important;
    padding-bottom: 54px;
  }

  :is(
    .about-hero-inner,
    .markets-hero-inner,
    .sustainability-hero-inner,
    .cotton-hero-inner,
    .us-cotton-hero-inner,
    .sourcing-origins-hero-inner,
    .quality-hero-inner,
    .spinning-mills-hero-inner,
    .partners-hero-inner,
    .supply-chain-hero-inner,
    .contact-hero-inner
  ) {
    width: var(--container);
  }

  :is(
    .about-hero,
    .markets-hero,
    .sustainability-hero,
    .cotton-hero,
    .us-cotton-hero,
    .sourcing-origins-hero,
    .quality-hero,
    .spinning-mills-hero,
    .partners-hero,
    .supply-chain-hero,
    .contact-hero
  ) p {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.6;
  }

  .secondary-page main p,
  .secondary-page main a,
  .secondary-page main label {
    overflow-wrap: anywhere;
  }

  :is(
    .about-grid,
    .priority-grid,
    .segment-grid,
    .process-grid,
    .origin-grid,
    .markets-grid,
    .company-story-grid,
    .philosophy-layout,
    .responsibility-layout,
    .core-market-grid,
    .us-foundation-grid,
    .us-benefit-grid,
    .origin-feature-grid,
    .quality-principles-grid,
    .trial-shipment-grid,
    .supply-program-grid,
    .export-channel-grid,
    .supplier-value-grid,
    .contact-main-grid,
    .cotton-category-layout,
    .coordinated-steps-grid
  ) {
    grid-template-columns: 1fr;
  }

  .process-step {
    border-bottom: 1px solid #d6b874 !important;
  }

  .process-column:last-child .process-step:last-child {
    border-bottom: 0 !important;
  }

  .supplier-benefit {
    border-bottom: 1px solid #d6aa60 !important;
  }

  .supplier-value-column:last-child .supplier-benefit:last-child {
    border-bottom: 0 !important;
  }

  /* Increase market cards height and bottom padding on mobile */
  :is(.market-card, .core-market-card) {
    padding-bottom: clamp(48px, 12vw, 64px) !important;
    padding-top: clamp(75px, 16vw, 95px) !important;
    padding-inline: clamp(20px, 5vw, 32px) !important;
  }

  /* Operating Philosophy Cards Mobile Layout Fix */
  .philosophy-card-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .philosophy-card {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    gap: 16px !important;
    padding: 18px !important;
    border-radius: 24px !important;
    background: linear-gradient(135deg, #1c486c 0%, #0c3354 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
  }

  .philosophy-card img {
    width: 100% !important;
    height: clamp(190px, 48vw, 240px) !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
    object-position: center 22% !important;
    border-radius: 16px !important;
  }

  .philosophy-card-copy {
    padding: 4px 6px 8px !important;
  }

  .philosophy-card h3 {
    font-size: clamp(1.35rem, 5.2vw, 1.6rem) !important;
    color: #fce4b8 !important;
    margin-bottom: 10px !important;
    line-height: 1.25 !important;
  }

  .philosophy-card p {
    font-size: clamp(0.98rem, 3.8vw, 1.08rem) !important;
    color: #ffffff !important;
    line-height: 1.48 !important;
  }

  :is(
    .philosophy-image,
    .responsibility-image,
    .cotton-category-image,
    .supplier-value-image
  ) {
    order: -1;
    grid-column: auto;
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  :is(
    .company-story-image,
    .us-foundation-image,
    .origin-feature-image,
    .quality-principles-image,
    .trial-shipment-image,
    .export-channel-image
  ) {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  :is(.technical-card, .us-benefit-card, .coordinated-step) {
    min-height: 0;
  }

  .core-market-card {
    min-height: 0;
  }

  .sourcing-map,
  .market-map {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding-block: 16px !important;
  }

  .sourcing-map-inner,
  .market-map-inner {
    width: max-content !important;
    min-width: 720px !important;
    margin-inline: 0 !important;
    padding-inline: 16px !important;
    transform: none !important;
  }

  .sourcing-map img,
  .market-map img,
  .sourcing-map-inner img,
  .market-map-inner img {
    width: 720px !important;
    min-width: 720px !important;
    max-width: none !important;
    height: auto !important;
    display: block !important;
  }

  .export-channel {
    padding-bottom: 20px !important;
  }

  .supplier-value {
    padding-top: 20px !important;
  }

  .supplier-value-heading {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .cta-panel,
  .markets-cta-panel,
  .sustainability-cta-panel {
    min-height: 0;
    padding: 54px 22px;
    border-radius: 24px;
  }

  :is(.cta-panel, .markets-cta-panel, .sustainability-cta-panel) h2 {
    font-size: clamp(2.2rem, 10vw, 2.8rem);
  }

  :is(
    .cta-actions,
    .markets-cta-actions,
    .sustainability-cta-actions
  ) {
    display: grid;
    width: 100%;
    gap: 12px;
  }

  :is(
    .cta-actions,
    .markets-cta-actions,
    .sustainability-cta-actions
  ) .button {
    width: 100%;
    min-height: 50px;
    padding-inline: 16px;
    white-space: normal;
  }

  .footer-top,
  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
  }

  .footer-top {
    gap: 28px;
  }

  /* Mobile Footer Accordion System */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-grid > div,
  .footer-grid > address {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    padding-block: 16px;
    gap: 0;
  }

  .footer-grid > address,
  .footer-grid > *:last-child,
  .footer-grid > div:last-child {
    border-bottom: none !important;
  }

  .footer-grid h3 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 1.28rem;
    font-weight: 600;
    user-select: none;
    padding-right: 20px;
  }

  .footer-grid h3::after {
    content: "+";
    position: absolute;
    right: 0;
    font-size: 1.4rem;
    font-weight: 300;
    color: #deb16e;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .footer-grid > div.is-open h3::after,
  .footer-grid > address.is-open h3::after {
    content: "−";
    color: #ffffff;
  }

  .footer-grid > div > a,
  .footer-grid > address > a {
    display: none;
    margin-top: 14px;
  }

  .footer-grid > div.is-open > a,
  .footer-grid > address.is-open > a {
    display: flex;
    animation: footerAccordionSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  footer.footer {
    display: flex !important;
    flex-direction: column !important;
  }

  .footer-top { order: 1; }
  .footer-grid { order: 2; }
  .footer-divider {
    order: 3;
    display: none !important;
  }

  .footer-bottom {
    display: contents !important;
  }

  .footer-bottom nav {
    order: 4 !important;
    margin-top: 24px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .legal-note {
    order: 5 !important;
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    text-align: center !important;
  }

  .footer-bottom p {
    order: 6 !important;
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 16px !important;
    color: #8c939e !important;
    font-size: 0.95rem !important;
    white-space: normal !important;
  }

  .footer-contact a,
  .footer-contact p {
    min-width: 0;
    overflow-wrap: anywhere;
    grid-template-columns: auto 1fr !important;
    gap: 14px !important;
  }

  .contact-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex-shrink: 0 !important;
  }

  .contact-icon img {
    width: 20px !important;
    height: 20px !important;
  }

  .contact-form-grid,
  .supplier-form-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes footerAccordionSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 479px) {
  :root {
    --container: calc(100% - 28px);
  }

  .section {
    padding-block: 52px;
  }

  .hero h1 {
    font-size: clamp(2.65rem, 12vw, 3rem);
  }

  .secondary-page :is(
    .about-hero,
    .markets-hero,
    .sustainability-hero,
    .cotton-hero,
    .us-cotton-hero,
    .sourcing-origins-hero,
    .quality-hero,
    .spinning-mills-hero,
    .partners-hero,
    .supply-chain-hero,
    .contact-hero
  ) h1 {
    font-size: clamp(2.35rem, 10.5vw, 2.75rem);
  }

  :is(.technical-carousel, .journey-carousel, .evaluation-carousel) {
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
    position: relative !important;
    transform: none !important;
    margin: 0 auto !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
    gap: 8px !important;
  }

  :is(.technical-card, .evaluation-card, .mill-evaluation-card) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    padding: clamp(28px, 6vw, 36px) clamp(18px, 4vw, 26px) !important;
    border-radius: 22px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    transform: none !important;
    transition: none !important;
    box-shadow: none !important;
  }

  :is(.technical-card, .evaluation-card, .mill-evaluation-card):hover {
    transform: none !important;
    box-shadow: none !important;
  }

  :is(.technical-card, .evaluation-card, .mill-evaluation-card) img {
    margin-inline: auto !important;
    margin-bottom: 16px !important;
  }

  :is(.technical-card, .evaluation-card, .mill-evaluation-card) h3 {
    text-align: center !important;
    margin-inline: auto !important;
    margin-bottom: 10px !important;
  }

  :is(.technical-card, .evaluation-card, .mill-evaluation-card) p {
    text-align: center !important;
    margin-inline: auto !important;
    max-width: 320px !important;
    width: 100% !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    font-size: clamp(0.95rem, 3.8vw, 1.05rem) !important;
    line-height: 1.5 !important;
  }

  /* Dedicated Mobile Format for Journey Cards (Supply Chain Carousel) */
  .journey-carousel {
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
    gap: 8px !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin-inline: auto !important;
  }

  .journey-card {
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 20px !important;
    background: #0c3354 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    transform: none !important;
    transition: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .journey-card img {
    width: 100% !important;
    aspect-ratio: 1.25 / 1 !important;
    object-fit: cover !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .journey-card h3 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    background: #0c3354 !important;
    color: #ffffff !important;
    text-align: center !important;
    padding: 12px 14px !important;
    border-radius: 0 0 20px 20px !important;
    font-size: clamp(0.9rem, 3.6vw, 1.05rem) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .journey-card::after,
  .journey-card:not(:last-child)::after {
    display: none !important;
  }

  /* Dedicated Mobile Rules for Supply Cards */
  .supply-card {
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    background: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    transform: none !important;
    transition: none !important;
    box-shadow: 0 4px 16px rgba(6, 47, 85, 0.08) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .supply-card:hover {
    transform: none !important;
    box-shadow: 0 4px 16px rgba(6, 47, 85, 0.08) !important;
  }

  .supply-card img {
    width: 100% !important;
    aspect-ratio: 1.25 / 1 !important;
    object-fit: cover !important;
    border-radius: 22px 22px 0 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .supply-card .supply-label {
    display: block !important;
    width: 100% !important;
    background: var(--navy) !important;
    color: #ffffff !important;
    text-align: center !important;
    padding: 14px 10px 15px !important;
    border-radius: 0 0 22px 22px !important;
    font-size: clamp(0.95rem, 3.8vw, 1.12rem) !important;
    font-weight: 500 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .supply-card::after,
  .supply-card:not(:last-child)::after {
    display: none !important;
  }

  :is(.technical-arrow, .journey-arrow, .evaluation-arrow) {
    width: 36px;
    height: 36px;
  }
}

/*
 * Short desktop composition
 * -------------------------
 * Keeps 1200–1599px-wide laptop windows (including 1440 × 748 and
 * 1280 × 720) within one complete first-screen composition. Taller desktop
 * windows and the approved 1600px+ layout remain unchanged.
 */
@media (min-width: 1200px) and (max-width: 1599px) and (max-height: 800px) {
  html {
    font-size: clamp(12px, 0.9vw, 14px);
  }

  .section {
    padding-block: clamp(44px, 7vh, 56px);
  }

  .site-header {
    padding-block: 10px;
  }

  .brand {
    width: clamp(72px, 5.5vw, 84px);
  }

  .header-actions .button {
    min-height: 42px;
  }

  .hero {
    min-height: 100svh;
    padding-top: clamp(148px, 22vh, 164px);
    padding-bottom: clamp(24px, 4vh, 32px);
  }

  .hero-video-overlay {
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.72) 0%,
      rgba(255, 255, 255, 0.48) 38%,
      rgba(255, 255, 255, 0) 66%
    );
  }

  .hero h1 {
    font-size: clamp(2.8rem, 3.45vw, 3.75rem);
    line-height: 1.08;
    margin-bottom: 24px;
  }

  .hero-copy > p:not(.hero-note) {
    font-size: clamp(1rem, 1.05vw, 1.2rem);
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .hero .button-row {
    gap: 12px;
  }

  .hero .button-row .button {
    min-height: 46px;
    padding: 11px 22px;
    font-size: 0.96rem;
  }

  .hero-note {
    margin: 20px 0;
    font-size: 1.05rem;
    line-height: 1.4;
  }

  .hero-metrics {
    gap: 14px;
    padding-top: 16px;
  }

  .hero-metrics strong {
    font-size: clamp(1.4rem, 1.8vw, 1.8rem);
  }

  .hero-metrics span {
    font-size: 1rem;
  }

  .secondary-page :is(
    .about-hero,
    .markets-hero,
    .sustainability-hero,
    .cotton-hero,
    .us-cotton-hero,
    .sourcing-origins-hero,
    .quality-hero,
    .spinning-mills-hero,
    .partners-hero,
    .supply-chain-hero,
    .contact-hero
  ) {
    min-height: 100svh;
    padding-top: clamp(126px, 18vh, 142px);
    padding-bottom: clamp(44px, 7vh, 56px);
  }

  .secondary-page :is(
    .about-hero,
    .markets-hero,
    .sustainability-hero,
    .cotton-hero,
    .us-cotton-hero,
    .sourcing-origins-hero,
    .quality-hero,
    .spinning-mills-hero,
    .partners-hero,
    .supply-chain-hero,
    .contact-hero
  ) h1 {
    font-size: clamp(3rem, 3.9vw, 3.9rem);
  }
}

/*
 * 1440 × 748 composition refinements
 * -----------------------------------
 * Keep these balance corrections isolated from taller 1440px desktops and
 * from the neighboring 1366px / 1536px layouts.
 */
@media (min-width: 1400px) and (max-width: 1479px) and (max-height: 780px) {
  /* Let both Mission / Vision panels follow their content instead of
     retaining the 900px large-desktop minimum height. This also removes the
     empty space below the About-page company copy. */
  .about .mission-card,
  .company-story .mission-card {
    min-height: 0;
  }

  /* Keep all five U.S.-cotton strengths on one compact, evenly spaced row. */
  .origin {
    padding-bottom: 36px;
  }

  .origin-pills {
    gap: 12px;
    margin-top: 34px;
  }

  .origin-pills span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 11px 9px;
    font-size: 1rem;
    line-height: 1.25;
    white-space: nowrap;
  }

  /* Preserve comfortable breathing room below the market descriptions. */
  .markets .market-card {
    padding-bottom: 42px;
  }
}

/* Hide footer social icons site-wide */
.socials {
  display: none !important;
}

/* ==========================================================================
   Mobile Fixed Bottom Contact Bar & Floating Contact Actions
   ========================================================================== */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #ffffff;
  padding: 10px 12px 12px;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 30px rgba(6, 47, 85, 0.16);
  border-top: 1px solid rgba(6, 47, 85, 0.08);
}

.mobile-bottom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1;
  text-decoration: none;
  font-family: var(--primary-font, inherit);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--navy, #062f55);
  padding: 8px 4px;
  border-radius: 12px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mobile-bottom-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.mobile-bottom-btn.btn-call .mobile-bottom-icon-img {
  filter: invert(16%) sepia(50%) saturate(2250%) hue-rotate(185deg) brightness(92%) contrast(98%);
}

.mobile-bottom-btn.btn-whatsapp .mobile-bottom-icon-img {
  filter: invert(41%) sepia(61%) saturate(1637%) hue-rotate(134deg) brightness(95%) contrast(92%);
}

.mobile-bottom-btn.btn-enquire .mobile-bottom-icon-img {
  filter: invert(54%) sepia(85%) saturate(1850%) hue-rotate(15deg) brightness(92%) contrast(98%);
}

.mobile-bottom-btn:active {
  background: rgba(6, 47, 85, 0.06);
  transform: scale(0.97);
}

@media (max-width: 767px) {
  .floating-desktop-actions {
    display: none !important;
  }
  body {
    padding-bottom: 60px !important;
  }
  .back-to-top {
    bottom: 72px !important;
  }
}

@media (min-width: 768px) {
  .mobile-bottom-bar {
    display: none !important;
  }

  .floating-desktop-actions {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    position: fixed;
    right: 18px;
    bottom: 82px;
    z-index: 9990;
  }

  .floating-action-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
  }

  .floating-action-btn svg,
  .floating-action-btn .whatsapp-icon-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: brightness(0) invert(1);
  }

  .floating-action-btn.btn-call {
    background: linear-gradient(135deg, #d48700 0%, #a66800 100%);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(212, 135, 0, 0.38);
  }

  .floating-action-btn.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.38);
  }

  .floating-action-btn:hover {
    transform: scale(1.12) translateY(-2px);
  }

  .floating-action-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 12px);
    left: auto;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: rgba(8, 40, 66, 0.94);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  }

  .floating-action-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}
