/* Jamsheed Atelier v6.0 — measured responsive refinements across all templates.
   Enqueued last so upgrades cannot silently override the responsive navigation. */
:root { --page-gutter:clamp(16px,3.7vw,56px); }
html { scroll-padding-top:100px; }
body { max-width:100%; }
.site-header,.utility-bar,.site-footer,main { max-width:100%; }
.site-header .header-row { min-width:0; }
.brand-lockup,.header-actions,.main-nav { min-width:0; }
.header-custom-logo { width:auto; max-width:min(225px,42vw); max-height:65px; height:auto; object-fit:contain; }
.site-header { isolation:isolate; }
.site-header .header-row { justify-content:space-between; }
.site-header .brand-lockup { margin-right:auto; }
.site-header .header-actions { margin-left:0; }
/* Keep desktop navigation within the actual header: regular page containers can stay narrow. */
@media (min-width:1701px) {
  .site-header .container { width:min(calc(100% - 72px), 1680px); max-width:1680px; }
  .site-header .header-row { gap:clamp(12px,1.2vw,24px); }
  .site-header .brand-lockup { min-width:210px; flex:0 0 auto; }
  .site-header .site-links { gap:clamp(9px,1vw,19px); }
  .site-header .site-links a { font-size:clamp(9px,.55vw,10px); }
  .site-header .main-nav { margin-left:auto; }
}
/* Switch to a proper expandable navigation BEFORE the links can collide.
   Works at browser zoom as well as on tablets and narrow laptop displays. */
@media (max-width:1700px) {
  .site-header,.site-header.scrolled { height:clamp(72px,5.5vw,84px); }
  .site-header .container { width:calc(100% - 2 * var(--page-gutter)); max-width:var(--wide); }
  .site-header .header-row { gap:16px; }
  .site-header .brand-lockup { min-width:0; flex:0 1 auto; }
  .site-header .header-actions { margin-left:auto; gap:10px; }
  .site-header .main-nav {
    display:none; visibility:hidden; position:absolute; left:0; right:0; top:100%;
    width:100%; margin:0; padding:clamp(20px,3vw,35px) max(var(--page-gutter), calc((100vw - 1320px)/2));
    background:var(--paper); border-top:1px solid var(--line);
    border-bottom:1px solid var(--line); box-shadow:0 20px 35px rgba(0,0,0,.13);
    max-height:calc(100dvh - 100px); overflow-y:auto; overscroll-behavior:contain;
    z-index:110;
  }
  .site-header .main-nav.is-open { display:block; visibility:visible; }
  .main-nav .site-links { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 26px; margin:0; padding:0; align-items:stretch; }
  .main-nav .site-links li { min-width:0; list-style:none; border-bottom:1px solid var(--line); }
  .main-nav .site-links a { width:100%; display:flex; align-items:center; min-height:56px; padding:13px 3px; font-size:13px; letter-spacing:.06em; line-height:1.4; white-space:normal; }
  .main-nav .site-links a::after { display:none; }
  .main-nav .site-links a:hover,.main-nav .current-menu-item>a { color:var(--accent); }
  .site-header .mobile-nav-cta { display:flex; align-items:center; justify-content:space-between; margin-top:25px; max-width:390px; min-height:51px; padding:13px 19px; background:var(--ink); color:var(--bg); font-weight:800; }
  .site-header .nav-burger { display:flex; flex:0 0 46px; flex-direction:column; align-items:center; justify-content:center; gap:6px; width:46px; min-width:46px; height:46px; min-height:46px; padding:10px; border:1px solid var(--line); background:transparent; }
  .nav-burger span { display:block; height:2px; width:100%; background:var(--ink); 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); }
  .site-header .nav-quote { display:inline-flex; }
  .header-actions .mode-toggle { flex:0 0 46px; width:46px; height:46px; }
  .hero-copy h1 span,.hero-copy h1 em { white-space:normal; }
  body.jat-menu-open { overflow:hidden; }
}
/* Mid-sized desktops need a narrower editorial title and a wider image track. */
@media (min-width:1101px) and (max-width:1700px) {
  .hero-section { padding-block:25px 36px; }
  .hero-grid { grid-template-columns:minmax(0,45fr) minmax(0,55fr); min-height:590px; }
  .hero-copy { min-width:0; padding:45px clamp(14px,3vw,40px) 10px 0; }
  .hero-copy h1 { font-size:clamp(59px,5.55vw,83px); line-height:1.015; margin:54px 0 26px; letter-spacing:-.073em; max-width:100%; }
  .hero-copy>p { font-size:15px; max-width:390px; }
  .hero-visual { min-height:565px; padding:12px 0 12px 20px; }
  .hero-slider { inset:10px 0 28px 20px; }
  .hero-visual .hero-badge { right:8px; top:15px; width:115px; height:115px; }
  .hero-badge strong { font-size:35px; }
  .hero-vertical { display:none; }
  .hero-slide-caption strong { font-size:clamp(29px,3vw,42px); }
  .hero-bottomline { padding-top:22px; }
  .section-space { padding-block:clamp(70px,7vw,118px); }
  .display-title { font-size:clamp(44px,5vw,74px); }
  .inside-hero h1 { font-size:clamp(51px,5.9vw,85px); }
  .footer-invitation h2 { font-size:clamp(52px,5.7vw,84px); }
}
/* Stacked visuals on touch tablets; prevent cut-off headings on landscape tablets. */
@media (min-width:761px) and (max-width:1100px) {
  .hero-grid { grid-template-columns:minmax(0,1fr); }
  .hero-copy { padding:46px 0 16px; max-width:790px; }
  .hero-copy h1 { font-size:clamp(59px,7.6vw,82px); margin:35px 0 23px; }
  .hero-visual { width:100%; min-height:0; height:clamp(440px,56vw,590px); padding:0; }
  .hero-slider { inset:0 0 26px; }
  .hero-badge,.hero-visual .hero-badge { right:16px; top:16px; }
  .inside-hero h1 { font-size:clamp(52px,7.1vw,74px); }
  .section-space { padding-block:75px; }
  .footer-invitation h2 { font-size:clamp(48px,6.4vw,70px); }
}
/* Every internal page must obey the viewport, including editable WordPress blocks. */
:where(.container,.inside-hero-grid,.story-layout,.value-grid,.product-grid,.facility-card,.leader-row,.contact-grid,.quality-grid,.footer-columns,.service-grid,.category-grid,.gallery-mosaic,.certification-list) > * { min-width:0; }
:where(.display-title,.inside-hero h1,.vision-panel h2,.leader-copy h3,.contact-form-card h3,.footer-invitation h2,.statement-text) { max-width:100%; overflow-wrap:break-word; }
:where(.wp-block-columns,.wp-block-group,.wp-block-media-text) { max-width:100%; }
:where(.editorial-content,.entry-content) :is(img,video,iframe,figure,table,pre) { max-width:100%; }
:where(.editorial-content,.entry-content) :is(table,pre) { display:block; width:100%; overflow-x:auto; }
.contact-detail a,.footer-contact a,.footer-contact p { overflow-wrap:anywhere; }
img { max-width:100%; }
/* Percentage tracks plus a 6px gap previously caused horizontal scrolling on About. */
.about-photo-band { grid-template-columns:minmax(0,54fr) minmax(0,46fr); }
@media (max-width:760px) {
  .container,.site-header .container { width:calc(100% - 2 * var(--page-gutter)); }
  .utility-bar { height:auto; min-height:31px; }
  .utility-content { padding-block:7px; line-height:1.35; }
  .utility-tagline,.utility-divider { display:none; }
  .site-header,.site-header.scrolled { height:70px; }
  .site-header .header-row { gap:8px; }
  .brand-lockup { gap:9px; }
  .brand-symbol { flex:0 0 39px; width:39px; height:40px; }
  .brand-words strong { font-size:clamp(12px,3.7vw,15px); }
  .brand-words>span { font-size:clamp(6px,1.4vw,7px); letter-spacing:.09em; }
  .site-header .header-actions { gap:6px; }
  .header-actions .mode-toggle { width:42px; height:42px; flex-basis:42px; }
  .site-header .nav-burger { flex-basis:42px; width:42px; min-width:42px; height:42px; min-height:42px; }
  .site-header .nav-quote { display:none; }
  .site-header .main-nav { padding:12px var(--page-gutter) 24px; max-height:calc(100dvh - 92px); }
  .main-nav .site-links { grid-template-columns:minmax(0,1fr); gap:0; }
  .main-nav .site-links a { min-height:46px; padding:10px 2px; font-size:13px; }
  .site-header .mobile-nav-cta { margin-top:16px; }
  .hero-copy { padding-top:38px; }
  .hero-copy h1 { font-size:clamp(42px,8.8vw,65px); margin:28px 0 17px; line-height:1.04; }
  .hero-copy h1 span,.hero-copy h1 em { white-space:normal; }
  .hero-topline { font-size:10px; }
  .hero-visual { height:clamp(330px,65vw,465px); min-height:0; margin-top:15px; }
  .hero-slider { inset:0; }
  .hero-visual .hero-badge { right:10px; top:12px; width:96px; height:96px; }
  .hero-badge strong { font-size:29px; }
  .hero-slide-caption { bottom:95px; right:15px; left:19px; }
  .hero-slide-caption strong { font-size:clamp(26px,5.6vw,37px); }
  .hero-slide-navigation { max-width:100%; }
  .hero-slider-navigation { left:14px; right:14px; gap:6px; }
  .hero-slide-count { min-width:43px; }
  .section-heading-row { align-items:start; }
  .display-title { font-size:clamp(38px,7.7vw,57px); }
  .inside-hero h1 { font-size:clamp(39px,8.3vw,62px); }
  .inside-hero-copy { min-width:0; }
  .inside-photo-wrap,.inside-photo-wrap img { height:clamp(280px,60vw,420px); }
  .facility-card,.facility-card.facility-reverse { grid-template-columns:minmax(0,1fr); }
  .facility-copy,.facility-reverse .facility-copy { padding-inline:0; }
  .leader-row,.leader-row:nth-child(2) { grid-template-columns:minmax(0,1fr); }
  .product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .footer-invitation h2 { font-size:clamp(38px,8vw,58px); }
  .footer-columns { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .footer-bottom { justify-content:flex-start; }
}
@media (max-width:520px) {
  :root { --page-gutter:clamp(15px,4.5vw,22px); }
  .hero-copy h1 { font-size:clamp(39px,10.3vw,51px); }
  .hero-visual { height:clamp(345px,99vw,420px); }
  .hero-actions .button-primary { white-space:normal; }
  .hero-slide-dots { gap:4px; }
  .hero-slide-caption { bottom:94px; }
  .hero-slide-caption strong { font-size:clamp(24px,6.8vw,32px); }
  .numbers-grid strong { font-size:clamp(27px,7.6vw,36px); }
  .section-space { padding-block:60px; }
  .display-title { font-size:clamp(34px,8.5vw,44px); }
  .introduction-content .display-title { font-size:clamp(34px,8.7vw,44px); }
  .statement-text { font-size:clamp(34px,8.8vw,47px); }
  .inside-hero h1 { font-size:clamp(37px,9vw,49px); }
  .category-grid { grid-template-columns:minmax(0,1fr); }
  .category-card:last-child { grid-column:auto; }
  .catalogue-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .catalogue-tabs button { overflow-wrap:anywhere; }
  .gallery-mosaic { grid-template-columns:minmax(0,1fr); }
  .gallery-item:nth-child(1),.gallery-item:nth-child(8) { grid-column:auto; }
  .contact-form-card h3 { font-size:clamp(32px,8.5vw,41px); }
  .footer-invitation h2 { font-size:clamp(36px,8.8vw,49px); }
  .footer-columns { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .footer-about,.footer-contact { grid-column:1 / -1; }
}
@media (max-width:360px) {
  .brand-words>span { display:none; }
  .hero-copy h1 { font-size:clamp(35px,10.2vw,40px); }
  .hero-slide-dots { display:none; }
  .hero-slide-count { margin-right:auto; }
  .product-grid { grid-template-columns:minmax(0,1fr); }
  .product-image { height:280px; }
  .footer-columns { gap:25px 13px; }
}
/* WordPress toolbar overlaps sticky headers if the toolbar offset is not explicit. */
@media (min-width:783px) { body.admin-bar .site-header { top:32px; } }
@media (max-width:782px) { body.admin-bar .site-header { top:46px; } }
/* Hide transitions when reduced motion is requested; autoplay JS already respects it. */
@media (prefers-reduced-motion:reduce) { .nav-burger span { transition:none; } }
