/*
 * Jamsheed Atelier 5.0 — Responsive Design Layer
 * Deliberately separate from the editorial skin so future styling updates
 * do not overwrite mobile/tablet fixes. Mobile-first refinements below.
 */

:root {
  --content-gutter: clamp(18px, 3.8vw, 58px);
  --tap-size: 44px;
}

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }
main, .site-header, .site-footer, section { min-width: 0; }
.container { width: min(calc(100% - var(--content-gutter) - var(--content-gutter)), var(--wide)); }
/* Prevent unbroken email addresses, long product names and editable text from
   widening the page, while respecting the existing typography. */
:where(.hero-copy,.hero-visual,.inside-hero-copy,.inside-hero-photo,
       .section-heading-row > *, .introduction-content,.body-copy,
       .team-focus-text,.facility-copy,.leader-copy,.contact-sidebar,
       .contact-form-card,.footer-columns > div,.editorial-content,
       .cert-note > *, .quality-callout .container > *) {
  min-width: 0;
}
:where(.contact-detail a,.footer-contact a,.footer-contact p,.body-copy p,
       .contact-sidebar p,.editorial-content p,.editorial-content a,
       .value-card p,.facility-copy p,.cert-note p) {
  overflow-wrap: anywhere;
}
:where(.hero-copy h1,.inside-hero h1,.display-title,.leader-copy h3,
       .quality-callout h2,.footer-invitation h2,.statement-text) {
  overflow-wrap: normal;
  text-wrap: balance;
}
img, video, iframe, embed { max-width: 100%; }
img { height: auto; }
:where(.product-image img,.hero-slider img,.showcase-slide img,.inside-photo-wrap img,
       .gallery-img img,.service-card-photo img,.team-focus-image img,
       .facility-picture img,.quality-callout-image img,.qc-image img,
       .leader-image img,.category-image img,.photo-break-image img,
       .team-photo-large img,.about-photo-band img,.hero-visual img) {
  /* Match heights specified by the photographic card/slider styles. */
  height: 100%;
}
:where(button,[type="button"],[type="submit"],a,select,input,textarea) { touch-action: manipulation; }
:where(.nav-burger,.mode-toggle,.hero-slide-button,.hero-slide-pause,
       .showcase-buttons button,.lightbox-close,.lightbox-previous,
       .lightbox-next,.category-details > span) { min-width: var(--tap-size); min-height: var(--tap-size); }
:where(button,a,input,select,textarea):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.catalogue-tabs button { min-height: var(--tap-size); }
.editorial-content { width: min(calc(100% - var(--content-gutter) - var(--content-gutter)), 850px); }
.editorial-content :is(img,video,iframe,figure,table,pre,.wp-block-embed) { max-width: 100%; }
.editorial-content :is(iframe,video) { height: auto; aspect-ratio: 16 / 9; }
.editorial-content :is(table,pre) { display: block; width: 100%; overflow-x: auto; }
.editorial-content .wp-block-columns { gap: clamp(18px, 3vw, 32px); }
.editorial-content .wp-block-image, .editorial-content figure { margin-inline: 0; }
.editorial-content figure img { width: auto; max-width: 100%; height: auto; }

/* Some original editorial grids used percentages plus a separate gap; fractional
   tracks avoid exceeding the viewport at laptop and tablet widths. */
.team-focus > .container { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(30px, 5vw, 64px); }
.leader-row { grid-template-columns: minmax(0, .43fr) minmax(0, .57fr); gap: clamp(30px, 5vw, 70px); }
.contact-grid { grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: clamp(26px, 4vw, 50px); }
.facility-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.facility-card.facility-reverse { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.hero-grid, .inside-hero-grid { min-width: 0; }
.footer-columns { gap: clamp(22px, 3vw, 60px); }
.brand-rail img, .certification-board img { max-height: 100%; object-fit: contain; }

/* Responsive images in WordPress post/editor content. */
.wp-block-image img, .wp-block-cover img, .wp-block-media-text img { max-width: 100%; }
.wp-block-gallery { max-width: 100%; }
.wp-block-embed iframe { display: block; width: 100%; }

/* LAPTOP: usable header and comfortable page widths even at 1100–1240px. */
@media (min-width: 1061px) and (max-width: 1240px) {
  .site-header, .site-header.scrolled { height: 80px; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    margin: 0;
    background: var(--paper);
    padding: 22px var(--content-gutter) 32px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 45px rgba(0,0,0,.14);
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .main-nav.is-open { display: block; }
  .site-links { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .site-links li { border-bottom: 1px solid var(--line); }
  .site-links a { display: block; font-size: 14px; padding: 12px 0; }
  .site-links a::after { display: none; }
  .mobile-nav-cta { display: flex; justify-content: space-between; padding: 16px; margin-top: 18px; background: var(--ink); color: var(--bg); }
  .nav-burger { display: flex; width: var(--tap-size); height: var(--tap-size); flex-direction: column; justify-content: center; gap: 6px; border: 1px solid var(--line); padding: 10px; background: transparent; }
  .nav-burger span { height: 2px; background: var(--ink); width: 100%; transition: transform .2s; }
  .nav-burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
  .header-actions { margin-left: auto; }
}
@media (max-width: 1240px) {
  .main-nav { z-index: 99; }
  .main-nav:not(.is-open) { visibility: hidden; }
  .main-nav.is-open { visibility: visible; }
  body.jat-menu-open { overflow: hidden; }
  .site-links a { line-height: 1.3; }
  .mobile-nav-cta { min-height: 48px; align-items: center; gap: 16px; padding-inline: 18px; }
  .nav-burger, .mode-toggle { flex-shrink: 0; }
  .nav-burger { min-width: 44px; min-height: 44px; }
  .main-nav { max-height: calc(100dvh - 85px); overscroll-behavior: contain; }
  .main-nav .site-links a { min-height: 44px; display: flex; align-items: center; }
  .hero-copy h1 { font-size: clamp(55px, 6.7vw, 90px); }
  .inside-hero h1 { font-size: clamp(48px, 6.3vw, 78px); }
  .footer-columns { grid-template-columns: 1.3fr 1fr 1fr 1.1fr; }
}

/* TABLETS & compact laptops: image-led layouts instead of squeezed columns. */
@media (min-width: 761px) and (max-width: 1100px) {
  .hero-grid { display: grid; grid-template-columns: minmax(0,1fr); min-height: 0; }
  .hero-copy { padding: 66px 0 36px; max-width: 800px; }
  .hero-copy h1 { font-size: clamp(65px, 8.8vw, 96px); margin-top: 37px; }
  .hero-copy h1 span, .hero-copy h1 em { white-space: normal; }
  .hero-bottomline { margin-top: 40px; }
  .hero-visual { height: min(590px, 61vw); min-height: 430px; }
  .hero-slider { inset: 0 0 32px 0; }
  .hero-badge, .hero-visual .hero-badge { right: 16px; top: 18px; }
  .hero-slide-caption { bottom: 110px; }
  .hero-visual .hero-vertical { display: none; }
  .inside-hero-grid { grid-template-columns: minmax(0,1fr); min-height: 0; }
  .inside-hero-copy { padding-bottom: 45px; }
  .inside-hero-photo { padding: 0; }
  .inside-photo-wrap,.inside-photo-wrap img { height: 460px; min-height: 0; }
  .inside-hero h1 { font-size: clamp(61px, 8vw, 90px); margin-top: 30px; }
  .image-aside { display: none; }
  .story-layout { grid-template-columns: 1fr 1fr; gap: 40px; }
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .category-card:last-child { grid-column: 1/-1; }
  .category-card:last-child .category-image { height: 300px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gallery-mosaic { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .certification-list { gap: 0 22px; }
  .leader-row { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 30px; }
  .leader-copy { padding: 10px 0; }
  .team-focus > .container { gap: 35px; }
  .footer-columns { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 46px; padding-block: 70px; }
  .footer-columns > div { min-width: 0; }
}

@media (max-width: 980px) {
  .contact-grid { grid-template-columns: minmax(0,1fr); gap: 38px; }
  .contact-sidebar { max-width: 680px; margin-bottom: 0; }
  .contact-form-card { max-width: 900px; }
  .quality-callout .container { gap: 35px; }
  .quality-callout { padding-block: 72px; }
  .metric-blocks { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 50px; }
  .metric-blocks > div:nth-child(2) { border-right: 0; }
  .metric-blocks > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.2); }
  .value-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .team-focus > .container { grid-template-columns: minmax(0,1fr); gap: 30px; }
  .team-focus-image { height: 430px; }
  .leader-row, .leader-row:nth-child(2) { grid-template-columns: minmax(0, .9fr) minmax(0,1.1fr); gap: 25px; }
  .footer-invitation h2 { font-size: clamp(49px, 6.4vw, 78px); }
  .numbers-grid strong { font-size: clamp(31px,4vw,48px); }
}

/* TABLET portrait & large phones. */
@media (max-width: 760px) {
  :root { --content-gutter: clamp(17px, 4.2vw, 28px); }
  html { scroll-padding-top: 90px; }
  .utility-content { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-nav { padding-inline: var(--content-gutter); max-height: calc(100dvh - 80px); }
  .header-actions { gap: 9px; }
  .site-header { width: 100%; }
  .brand-lockup { gap: 10px; }
  .brand-words { min-width: 0; }
  .hero-grid { min-width: 0; }
  .hero-copy { max-width: 100%; }
  .hero-copy h1 { font-size: clamp(46px, 10.3vw, 79px); letter-spacing: -.075em; line-height: 1; }
  .hero-copy h1 span,.hero-copy h1 em { white-space: normal; }
  .hero-topline { flex-wrap: wrap; }
  .hero-copy > p { max-width: 570px; }
  .hero-visual { height: clamp(360px, 72vw, 480px); margin-top: 18px; }
  .hero-visual .hero-badge { right: 6px; }
  .hero-slide-caption { max-width: calc(100% - 45px); }
  .hero-slide-caption strong { font-size: clamp(27px, 5.3vw, 42px); }
  .hero-slide-button,.hero-slide-pause { min-width: 40px; min-height: 40px; }
  .section-space { padding-block: clamp(64px, 9vw, 82px); }
  .section-heading-row > p { font-size: 14px; }
  .display-title { font-size: clamp(39px, 8.1vw, 61px); }
  .introduction-content .display-title { font-size: clamp(43px, 8.5vw, 67px); }
  .photo-break-section { height: 390px; }
  .photo-break-note { gap: 15px; flex-wrap: wrap; }
  .inside-hero { padding-block: 55px 50px; }
  .inside-hero h1 { font-size: clamp(43px, 8.6vw, 73px); line-height: 1.08; }
  .inside-hero-photo { max-width: 100%; }
  .inside-photo-wrap,.inside-photo-wrap img { height: clamp(290px, 62vw, 440px); }
  .body-copy p,.facility-copy p,.contact-sidebar > p { font-size: 15px; }
  .service-card { min-width: 0; }
  .service-card-overlay strong { font-size: clamp(20px, 3.5vw, 28px); }
  .category-image { min-width: 0; }
  .category-details h3 { font-size: clamp(21px,3.5vw,28px); }
  .statement-text { font-size: clamp(41px, 7.8vw, 61px); }
  .process-row { min-width: 0; }
  .process-row h3 { font-size: clamp(20px, 4vw, 28px); }
  .showcase-slide figcaption { bottom: 35px; }
  .showcase-footer { display: flex; }
  .showcase-view { white-space: normal; line-height: 1.4; }
  .showcase-buttons button { min-width: 40px; min-height: 44px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-image { height: clamp(210px, 43vw, 335px); }
  .value-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .value-card { min-width: 0; }
  .facility-picture { height: clamp(290px,58vw,410px); }
  .facility-copy,.facility-reverse .facility-copy { padding: 30px 0 0; }
  .facility-copy h3 { font-size: clamp(36px, 8vw, 52px); }
  .leader-row,.leader-row:nth-child(2) { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .leader-row:nth-child(2) .leader-image,.leader-row:nth-child(2) .leader-copy { order: initial; }
  .leader-image { height: 420px; }
  .leader-copy { padding: 0 0 30px; }
  .certification-list { grid-template-columns: minmax(0,1fr); }
  .certification-list > div { min-width: 0; }
  .certification-list h3 { font-size: clamp(17px,3vw,22px); }
  .quality-callout .container { grid-template-columns: minmax(0,1fr); }
  .quality-callout-image { height: clamp(290px, 59vw, 420px); }
  .contact-form-card { padding: clamp(20px, 5vw, 35px); }
  .inquiry-form input,.inquiry-form select,.inquiry-form textarea { font-size: 16px; min-height: 46px; }
  .footer-columns { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; padding-block: 67px 65px; }
  .footer-bottom { row-gap: 14px; }
  .footer-contact a { overflow-wrap: anywhere; }
  .gallery-lightbox { padding: 70px 53px 52px; }
  .gallery-lightbox figure { max-width: calc(100vw - 110px); max-height: calc(100dvh - 140px); }
  .gallery-lightbox figure img { max-height: calc(100dvh - 200px); }
  .gallery-lightbox button { min-width: 44px; min-height: 44px; }
}

/* PHONES: reliable controls, legible type, compact cards and touch-friendly input. */
@media (max-width: 520px) {
  .hero-section { padding-bottom: 36px; }
  .hero-copy { padding-top: 40px; }
  .hero-copy h1 { font-size: clamp(43px, 10.7vw, 57px); margin: 27px 0 16px; }
  .hero-topline { font-size: 10px; }
  .hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .hero-actions .button-primary { width: 100%; }
  .hero-actions .text-arrow { align-self: flex-start; }
  .hero-visual { height: clamp(340px, 105vw, 435px); margin-top: 22px; }
  .hero-slider-navigation { left: 15px; right: 15px; bottom: 15px; gap: 7px; }
  .hero-slide-caption { left: 17px; bottom: 91px; right: 16px; }
  .hero-slide-caption strong { font-size: clamp(27px,7vw,34px); }
  .hero-visual .hero-badge { top: 14px; right: 6px; width: 83px; height: 83px; }
  .hero-badge strong { font-size: 25px; }
  .hero-slide-button,.hero-slide-pause { min-width: 38px; min-height: 40px; }
  .hero-slide-dot { min-width: 9px; min-height: 9px; }
  .numbers-grid > div { padding-block: 22px; }
  .numbers-grid > div + div { padding-left: 12px; }
  .numbers-grid strong { font-size: clamp(29px, 8.2vw, 36px); }
  .numbers-grid > div > span { font-size: 9px; }
  .display-title { font-size: clamp(36px,9.3vw,48px); }
  .introduction-content .display-title { font-size: clamp(38px,10vw,52px); }
  .section-heading-row { align-items: flex-start; }
  .section-heading-row > .underlined-link { white-space: normal; }
  .photo-break-section { height: 330px; }
  .photo-break-shield { width: 215px; height: 215px; }
  .photo-break-shield b { font-size: 60px; }
  .photo-break-note { font-size: 8px; bottom: 18px; }
  .service-grid { grid-template-columns: minmax(0,1fr); }
  .service-card, .service-card:nth-child(2), .service-card:nth-child(3) { grid-column: 1; height: 330px; }
  .category-grid { grid-template-columns: minmax(0,1fr); }
  .category-card:last-child { grid-column: 1; }
  .category-image,.category-card:last-child .category-image { height: 330px; }
  .statement-text { font-size: clamp(36px,9.2vw,50px); }
  .process-row { grid-template-columns: 22px minmax(0,1fr) 64px 20px; gap: 8px; }
  .process-row h3 { font-size: clamp(19px,5vw,25px); }
  .process-thumb { width: 64px; height: 64px; }
  .brand-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inside-hero { padding-block: 45px 46px; }
  .inside-hero h1 { font-size: clamp(41px, 10.4vw, 53px); margin: 27px 0 16px; }
  .inside-photo-wrap,.inside-photo-wrap img { height: 280px; }
  .value-grid { grid-template-columns: minmax(0,1fr); }
  .value-card { min-height: 0; }
  .vision-panel { padding: 45px 22px !important; }
  .leader-image { height: 345px; }
  .leader-copy h3 { font-size: clamp(43px,11vw,58px); }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 12px; }
  .product-image { height: clamp(192px,50vw,260px); padding: 16px 9px; }
  .product-info h3 { font-size: clamp(16px,4.1vw,19px); line-height: 1.23; }
  .product-info span { font-size: 8px; line-height: 1.35; }
  .catalogue-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .catalogue-tabs button { min-width: 0; padding: 12px 9px; font-size: 11px; }
  .catalogue-notice { padding: 20px; }
  .gallery-mosaic { grid-template-columns: minmax(0,1fr); }
  .gallery-item:nth-child(1), .gallery-item:nth-child(8) { grid-column: 1; }
  .gallery-img,.gallery-item:nth-child(1) .gallery-img,.gallery-item:nth-child(8) .gallery-img { height: 250px; }
  .gallery-lightbox { padding: 82px 10px 76px; }
  .gallery-lightbox figure { max-width: 100%; max-height: calc(100dvh - 160px); }
  .gallery-lightbox figure img { max-height: calc(100dvh - 213px); }
  .lightbox-previous, .lightbox-next { position: absolute; bottom: max(20px,env(safe-area-inset-bottom)); z-index: 2; }
  .lightbox-previous { left: calc(50% - 58px); }
  .lightbox-next { right: calc(50% - 58px); }
  .lightbox-close { right: 16px; top: max(16px,env(safe-area-inset-top)); }
  .quality-callout h2 { font-size: clamp(37px,9vw,55px); }
  .cert-note { padding: 22px; }
  .contact-form-card h3 { font-size: clamp(32px,8vw,43px); }
  .form-two-cols { grid-template-columns: minmax(0,1fr); gap: 0; }
  .form-two-cols label { min-width: 0; }
  .footer-invitation h2 { font-size: clamp(42px,9.8vw,58px); }
  .invitation-inner { align-items: flex-start; }
  .footer-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-about,.footer-contact { grid-column: 1 / -1; }
  .footer-bottom { font-size: 10px; }
  .showcase-stage { height: 330px; }
  .showcase-slide figcaption { left: 17px; right: 16px; bottom: 28px; }
  .showcase-slide figcaption strong { font-size: clamp(31px,8.5vw,45px); }
  .showcase-footer { justify-content: space-between; gap: 13px; }
  .showcase-view { flex: 1 1 100%; order: 5; }
  .showcase-buttons { order: 4; }
  .showcase-progress { flex: 1 1 38%; }
}

/* Narrower than 390px: one-column product grid helps avoid tiny clothing photos. */
@media (max-width: 390px) {
  :root { --content-gutter: 15px; }
  .brand-symbol { width: 37px; height: 37px; }
  .brand-words strong { font-size: 13px; }
  .brand-words > span { font-size: 6px; }
  .hero-copy h1 { font-size: clamp(40px, 11.2vw, 45px); }
  .hero-slide-dots { display: none; }
  .hero-slide-count { margin-right: auto; }
  .hero-slider-navigation { gap: 7px; }
  .hero-slide-button,.hero-slide-pause { min-width: 40px; min-height: 42px; }
  .product-grid { grid-template-columns: minmax(0,1fr); }
  .product-image { height: 290px; padding: 24px; }
  .product-info h3 { font-size: 20px; }
  .product-info span { font-size: 10px; }
  .numbers-grid strong { font-size: 29px; }
  .process-row { grid-template-columns: 17px minmax(0,1fr) 53px 15px; gap: 7px; }
  .process-thumb { width: 53px; height: 58px; }
  .footer-columns { gap: 26px 16px; }
  .footer-invitation h2 { font-size: 40px; }
}

/* Landscape phones have little vertical space: the menu stays scrollable. */
@media (max-height: 530px) and (max-width: 1240px) {
  .main-nav { max-height: calc(100dvh - 70px); padding-block: 10px; }
  .site-links a { min-height: 40px !important; padding-block: 8px !important; }
}

/* Respect accessible motion settings in every page including photo galleries. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  :where(.service-card-photo img,.gallery-img img,.category-image img,
         .hero-slide,.showcase-slide,.process-thumb img) { transition-duration: 0.01ms !important; }
}
