/* ==========================================================================
   JJG Plus — Design Tokens
   Source: JJGPlus_Website_Implementation_Brief_V02_Approved_20260919.docx §1
   ========================================================================== */
:root {
  --navy: #072648;
  --navy-hover: #051E3C;
  --gold: #A8853A;
  --paper: #F7F5F0;
  --white: #FFFFFF;
  --ink: #1B2130;
  --muted: #5B6270;
  --muted-2: #454C59;
  --line: #E4DFD1;
  --line-2: #DCD6C8;
  --faint: #9AA0A9;
  --line-action: #06C755;
  --call-action: #2F8F7D;
  --close-action: #E2574C;

  --font-display: 'Taviraj', serif;
  --font-body: 'IBM Plex Sans Thai', sans-serif;

  --container-max: 1180px;
  --container-pad: 6vw;

  --sticky-bar-h: 64px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select {
  font-family: var(--font-body);
  font-size: 100%;
}

img { max-width: 100%; display: block; }
img[hidden] { display: none; }

.jjg-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  z-index: 200;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* Site-wide focus style (Brief §6) — reused everywhere, not just form fields */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 240, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.utility-bar {
  border-bottom: 1px solid #ECE7DA;
}
.utility-bar .jjg-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  height: 32px;
}
.utility-bar a {
  color: #8A8F99;
  display: flex;
  transition: color .15s ease, opacity .15s ease;
}
.utility-bar a:hover { color: var(--navy); }

.main-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav {
  display: flex;
  gap: 26px;
  font-size: 16px;
}
.main-nav a { opacity: .82; transition: opacity .15s ease; }
.main-nav a:hover { opacity: 1; }

.nav-toggle { display: none; }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  padding: 11px 20px;
  font-size: 14px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  display: inline-block;
  transition: background .15s ease;
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--navy-hover); }

.btn-primary.large { padding: 15px 28px; font-size: 15px; }

.btn-outline {
  border: 1px solid var(--navy);
  color: var(--navy);
  padding: 15px 28px;
  font-size: 15px;
  display: inline-block;
  background: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn-outline:hover, .btn-outline:focus-visible { background: var(--navy); color: var(--white); }

.btn-link {
  font-size: 14px;
  border-bottom: 1px solid #B9B2A0;
  color: var(--navy);
}

/* ==========================================================================
   Sections — shared
   ========================================================================== */
section { width: 100%; box-sizing: border-box; }

.section-pad { padding: 96px 0; }
.section-pad-sm { padding: 88px 0; }

.section-dark { background: var(--navy); }
.section-white { background: var(--white); }
.section-bordered { border-top: 1px solid var(--line); }
.section-bordered-both { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-2);
  background: var(--white);
  padding: 6px 14px;
  margin-bottom: 26px;
  font-size: 13px;
  color: var(--muted-2);
}
.eyebrow-dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; display: inline-block; }

.lede {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 36em;
  margin-top: 16px;
}

/* ==========================================================================
   1. Hero
   ========================================================================== */
.hero-section { padding: 92px 0 80px; }
.hero-grid { display: flex; align-items: center; gap: 64px; }
.hero-copy { flex: 1.1; min-width: 0; }
.hero-title { font-size: 42px; line-height: 1.32; color: var(--navy); max-width: 12em; }
.hero-text { font-size: 16.5px; line-height: 1.75; color: var(--muted-2); max-width: 33em; margin-top: 24px; }
.hero-cta-row { display: flex; align-items: center; gap: 16px; margin-top: 36px; flex-wrap: wrap; }

.hero-visual { flex: 1; min-width: 0; }
.media-frame {
  width: 100%;
  position: relative;
  background: var(--navy);
  overflow: hidden;
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-frame { aspect-ratio: 4/5; }
.media-fade {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(7,38,72,0.55) 0%, rgba(7,38,72,0) 45%);
}
.media-caption {
  position: absolute; left: 24px; bottom: 24px; color: var(--white);
  font-family: var(--font-display); font-size: 19px;
}
.media-dot {
  position: absolute; top: 24px; right: 24px;
  width: 10px; height: 10px; background: var(--gold); border-radius: 50%;
}

/* ==========================================================================
   2. Trust / About
   ========================================================================== */
.trust-title { font-size: 28px; color: var(--white); max-width: 16em; }
.trust-lede { font-size: 15px; line-height: 1.75; color: rgba(255,255,255,0.75); max-width: 38em; margin-top: 16px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 32px;
  margin-top: 48px;
}
.stat-item { border-left: 1px solid rgba(255,255,255,0.22); padding-left: 20px; }
.stat-value { font-family: var(--font-display); font-size: 21px; color: var(--gold); line-height: 1.3; }
.stat-label { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 8px; line-height: 1.5; }

/* ==========================================================================
   3. What We Make — editorial product index
   ========================================================================== */
.section-title { font-size: 30px; color: var(--navy); }
.section-title-sm { font-size: 28px; color: var(--navy); max-width: 14em; }

.editorial { display: flex; gap: 56px; align-items: flex-start; margin-top: 44px; }
.editorial-list { flex: 1; min-width: 0; }

.category-row {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  cursor: default;
}
.category-row-head { display: flex; align-items: baseline; gap: 18px; }
.category-n { font-family: var(--font-display); font-size: 15px; color: var(--gold); min-width: 22px; }
.category-title { font-size: 20px; color: var(--navy); }
.category-items { font-size: 13.5px; color: var(--muted); margin-top: 8px; margin-left: 40px; }

.editorial-foot { border-top: 1px solid var(--line); padding-top: 28px; }

.editorial-visual {
  flex: 0 0 400px;
  position: sticky;
  top: 110px;
}
.category-frame { aspect-ratio: 4/5; }
.category-shot-caption { font-size: 11px; opacity: .6; margin-top: 4px; }

/* ==========================================================================
   4. Process
   ========================================================================== */
.process-band { aspect-ratio: 21/5; margin-top: 40px; }

.process-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  gap: 18px;
  margin-top: 40px;
}
.process-step { border-top: 2px solid var(--navy); padding-top: 14px; }
.process-n { font-family: var(--font-display); font-size: 13px; color: var(--gold); }
.process-title { font-size: 14.5px; color: var(--navy); margin-top: 6px; }
.process-sub { font-size: 11px; color: var(--faint); margin-top: 6px; line-height: 1.5; }


/* ==========================================================================
   5. Fabric
   ========================================================================== */
.fabric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 16px;
  margin-top: 40px;
}
.fabric-swatch { aspect-ratio: 1/1; position: relative; overflow: hidden; }
.fabric-name { font-size: 14px; font-weight: 600; color: var(--navy); margin-top: 12px; }
.fabric-secondary-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fabric-desc { font-size: 12.5px; line-height: 1.6; color: var(--muted); margin-top: 8px; }
.fabric-note { font-size: 11px; line-height: 1.5; color: var(--faint); margin-top: 8px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.tag {
  border: 1px solid var(--line-2);
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted);
  background: none;
}
.tag-white { background: var(--white); color: var(--muted-2); }

/* ==========================================================================
   6. Why JJG Plus
   ========================================================================== */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 32px;
  margin-top: 48px;
}
.benefit-item { border-left: 1px solid rgba(255,255,255,0.22); padding-left: 20px; }
.benefit-title { font-size: 19px; line-height: 1.35; color: var(--white); }
.benefit-desc { font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,0.62); margin-top: 12px; }

/* ==========================================================================
   7. Who We Work With
   ========================================================================== */
.client-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.client-tag { border: 1px solid var(--line-2); background: var(--white); padding: 9px 18px; font-size: 13.5px; color: var(--muted-2); }

/* ==========================================================================
   8. Portfolio
   ========================================================================== */
.filter-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
}
.filter-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 2px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--faint);
}
.filter-tab[aria-pressed="true"] {
  color: var(--navy);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

.pf-head { text-align: center; }
.pf-eyebrow { font-size: 12px; letter-spacing: 2.5px; color: var(--gold); font-weight: 600; margin-bottom: 10px; }
.pf-sub { font-size: 15px; line-height: 1.75; color: var(--muted); margin-top: 12px; }
#portfolio .filter-row { justify-content: center; margin-top: 32px; }

.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
  overflow: hidden;
  transition: height .2s ease;
}
@media (prefers-reduced-motion: reduce) {
  .pf-grid { transition: none; }
}
.pf-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line-2);
}
.pf-card[hidden] { display: none; }
.pf-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper); }
.pf-media img { width: 100%; height: 100%; object-fit: cover; }
.pf-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "num num" "title title" "th th" "cta cta";
  padding: 18px 20px 20px;
}
.pf-num { grid-area: num; font-size: 12px; letter-spacing: 1.5px; color: var(--gold); font-weight: 600; }
.pf-title { grid-area: title; font-size: 24px; line-height: 1.3; color: var(--navy); font-weight: 600; margin-top: 6px; }
.pf-th { grid-area: th; font-size: 15px; color: var(--muted); margin-top: 2px; }
.pf-cta {
  grid-area: cta;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--navy);
}
.pf-cta-text { font-size: 12px; letter-spacing: 1.5px; font-weight: 600; }
.pf-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.pf-cta:hover .pf-arrow, .pf-cta:focus-visible .pf-arrow { background: var(--navy-hover); }

.portfolio-note { font-size: 12px; color: var(--faint); margin-top: 16px; }

/* ==========================================================================
   9. MOQ
   ========================================================================== */
.moq-panel { border: 1px solid var(--navy); padding: 56px 6vw; text-align: center; }
.moq-figure { font-family: var(--font-display); font-size: 66px; line-height: 1; color: var(--navy); }
.moq-title { font-size: 24px; color: var(--navy); margin-top: 14px; }
.moq-text { font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 30em; margin: 12px auto 0; }
.moq-caption { font-size: 12.5px; color: var(--faint); margin-top: 24px; }
.moq-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.moq-cta { margin-top: 32px; }

/* ==========================================================================
   10. Easy to Start
   ========================================================================== */
.start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 44px; }
.start-label { font-size: 13px; color: #8A8F99; margin-bottom: 16px; }
.start-list-item { font-size: 14.5px; color: var(--muted-2); padding: 10px 0; border-top: 1px solid #EFEBDF; }
.start-cta { margin-top: 40px; }

/* ==========================================================================
   11. FAQ
   ========================================================================== */
.faq-container { max-width: 820px; }
.faq-list { margin-top: 40px; }
.faq-item { border-top: 1px solid var(--line-2); }
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q-text { font-size: 15.5px; color: var(--navy); }
.faq-chevron { min-width: 20px; transition: transform .15s ease; display: flex; }
@media (prefers-reduced-motion: reduce) { .faq-chevron { transition: none; } }
.faq-item[data-open="true"] .faq-chevron { transform: rotate(180deg); }
.faq-answer { font-size: 14px; line-height: 1.8; color: var(--muted); padding: 0 0 22px; max-width: 34em; }
.faq-item[data-open="false"] .faq-answer { display: none; }

/* ==========================================================================
   12. Request a Quote
   ========================================================================== */
.quote-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; }
.quote-title { font-size: 28px; color: var(--navy); max-width: 11em; }
.quote-text { font-size: 14.5px; line-height: 1.8; color: var(--muted); margin-top: 18px; max-width: 26em; }
.quote-contact { margin-top: 32px; font-size: 14px; line-height: 2.1; color: var(--muted-2); }

.quote-form { display: flex; flex-direction: column; gap: 18px; }
.quote-form[hidden] { display: none; }
.field-grid { display: grid; gap: 18px; }
.field-grid-2 { grid-template-columns: 1fr 1fr; }
.field-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.field-label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 7px; }
.field {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 14.5px;
  border: 1px solid var(--line-2);
  background: var(--white);
  color: var(--ink);
}
.field[aria-invalid="true"] { border-color: var(--close-action); }
.field-error {
  font-size: 12.5px;
  color: var(--close-action);
  margin-top: 6px;
  min-height: 1em;
}
.field-hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.char-counter { font-size: 12px; color: var(--faint); margin-top: 6px; text-align: right; }

.upload-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.upload-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted-2);
  border: 1px solid var(--line-2); padding: 8px 12px; background: var(--white);
}
.upload-remove { background: none; border: none; color: var(--close-action); cursor: pointer; font-size: 13px; }

.form-banner {
  font-size: 13.5px;
  padding: 12px 16px;
  border: 1px solid var(--close-action);
  color: var(--close-action);
  background: rgba(226, 87, 76, 0.06);
}
.form-banner[hidden] { display: none; }
.form-banner a { text-decoration: underline; }

.quote-confirm { border: 1px solid var(--line-2); padding: 40px; text-align: center; }
.quote-confirm-title { font-size: 19px; color: var(--navy); }
.quote-confirm-text { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; }
.footer-brand-text { font-size: 14px; line-height: 1.7; color: var(--muted); margin-top: 16px; max-width: 26em; }
.footer-col-label { font-size: 13px; color: #8A8F99; margin-bottom: 14px; }
.footer-links { font-size: 14px; line-height: 2.1; }
.footer-links a { display: block; color: var(--muted-2); }
.footer-contact { font-size: 14px; line-height: 2.1; color: var(--muted-2); margin-top: 14px; }

/* Phone / email / LINE shown as text: tappable links in the surrounding colour */
.contact-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
}
.contact-link:hover { color: var(--navy); }
.form-banner a { text-underline-offset: 3px; }
.footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid #EFEBDF;
  font-size: 12.5px; color: var(--faint);
}

/* ==========================================================================
   Portfolio gallery (past work per category)
   ========================================================================== */
.gallery-modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.gallery-modal[hidden] { display: none; }
.gallery-backdrop {
  position: absolute; inset: 0;
  background: rgba(7, 38, 72, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: success-fade .2s ease-out both;
}
.gallery-dialog {
  position: relative;
  width: 100%; max-width: 1040px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--paper);
  padding: 32px 40px 0;
  animation: success-pop .3s ease-out both;
}
.gallery-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.gallery-num { font-size: 12px; letter-spacing: 1.5px; font-weight: 600; color: var(--gold); }
.gallery-title { font-size: 28px; color: var(--navy); margin-top: 6px; }
.gallery-count { font-size: 14px; color: var(--muted); margin-top: 6px; }
.gallery-close {
  flex: none; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line-2); color: var(--navy); cursor: pointer;
}
.gallery-close:hover { background: var(--white); }
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; margin-top: 24px;
}
.gallery-item { margin: 0; }
.gallery-thumb {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line);
  background: var(--white); cursor: zoom-in; aspect-ratio: 1 / 1; overflow: hidden;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.gallery-thumb:hover img { transform: scale(1.03); }
.gallery-item figcaption { font-size: 13px; line-height: 1.6; color: var(--muted-2); margin-top: 8px; }
.gallery-foot {
  position: sticky; bottom: 0;
  margin-top: 24px; padding: 16px 0 24px;
  background: var(--paper); border-top: 1px solid var(--line);
  text-align: center;
}
.gallery-viewer {
  position: fixed; inset: 0; z-index: 2;
  background: rgba(10, 16, 28, 0.94);
  display: flex; align-items: center; justify-content: center;
  padding: 64px 72px;
}
.gallery-viewer[hidden] { display: none; }
.gallery-viewer-figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.gallery-viewer-figure img { max-width: 100%; max-height: calc(100vh - 160px); width: auto; height: auto; object-fit: contain; margin: 0 auto; }
.gallery-viewer-figure figcaption { color: rgba(255,255,255,0.85); font-size: 14px; margin-top: 12px; }
.gallery-viewer-close, .gallery-nav {
  position: absolute; width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25);
  color: var(--white); cursor: pointer; border-radius: 50%;
}
.gallery-viewer-close:hover, .gallery-nav:hover { background: rgba(255,255,255,0.18); }
.gallery-viewer-close { top: 16px; right: 16px; }
.gallery-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.gallery-next { right: 16px; top: 50%; transform: translateY(-50%); }
.gallery-nav[hidden] { display: none; }
.gallery-viewer-count {
  position: absolute; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0;
  text-align: center; color: rgba(255,255,255,0.75); font-size: 13px; letter-spacing: 1px;
}
.gallery-viewer .gallery-viewer-close:focus-visible,
.gallery-viewer .gallery-nav:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

@media (max-width: 1023px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .gallery-modal { padding: 0; }
  .gallery-dialog { max-width: none; height: 100%; max-height: none; padding: 20px 16px 0; }
  .gallery-title { font-size: 22px; }
  .gallery-grid { gap: 10px; margin-top: 18px; }
  .gallery-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .gallery-foot .btn-primary { display: block; }
  .gallery-viewer { padding: 64px 12px 72px; }
  .gallery-nav { top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: none; }
  .gallery-prev { left: 16px; }
  .gallery-next { right: 16px; }
  .gallery-viewer-count { bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-backdrop, .gallery-dialog { animation: none; }
  .gallery-thumb img { transition: none; }
}

/* ==========================================================================
   Success modal (quote form sent)
   ========================================================================== */
.success-modal {
  --success: #15803D;        /* white text on it passes WCAG AA (5:1) */
  --success-hover: #166534;
  --success-soft: #DCFCE7;
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.success-modal[hidden] { display: none; }
.success-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(7, 38, 72, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: success-fade .2s ease-out both;
}
.success-modal-dialog {
  position: relative;
  width: 100%; max-width: 440px;
  max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(7, 38, 72, 0.22);
  padding: 40px 32px 32px;
  text-align: center;
  animation: success-pop .35s cubic-bezier(.34, 1.56, .64, 1) both;
}
.success-modal-dialog:focus { outline: none; }
.success-modal-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--success-soft); color: var(--success);
  display: flex; align-items: center; justify-content: center;
}
.success-modal-title {
  font-family: var(--font-body);
  font-size: 21px; font-weight: 600; line-height: 1.4;
  color: var(--ink);
}
.success-modal-text {
  font-size: 15px; line-height: 1.75; color: var(--muted);
  margin-top: 12px;
}
.success-modal-actions { display: flex; gap: 12px; margin-top: 28px; }
.success-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px; font-weight: 500; line-height: 1.3;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.success-btn-primary { background: var(--success); color: var(--white); border: 1px solid var(--success); }
.success-btn-primary:hover, .success-btn-primary:focus-visible { background: var(--success-hover); border-color: var(--success-hover); }
.success-btn-secondary { background: var(--white); color: var(--muted-2); border: 1px solid var(--line-2); }
.success-btn-secondary:hover, .success-btn-secondary:focus-visible { background: #F3F1EC; color: var(--ink); }
.success-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
body.modal-open { overflow: hidden; }

@keyframes success-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes success-pop {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 480px) {
  .success-modal-dialog { padding: 32px 20px 20px; border-radius: 14px; }
  .success-modal-title { font-size: 19px; }
  .success-modal-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .success-modal-backdrop, .success-modal-dialog { animation: none; }
}

/* ==========================================================================
   Floating contact widget (desktop)
   ========================================================================== */
.contact-widget {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.widget-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  border: none; cursor: pointer;
}
.widget-toggle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  border: none; cursor: pointer;
}
.widget-line { background: var(--line-action); }
.widget-call { background: var(--call-action); }
.widget-close { background: var(--close-action); }
.contact-widget[hidden] { display: none; }
.widget-expanded { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.widget-expanded[hidden] { display: none; }

/* ==========================================================================
   Mobile sticky CTA bar
   ========================================================================== */
.mobile-cta-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--white);
  border-top: 1px solid var(--line-2);
  transition: transform .15s ease;
}
@media (prefers-reduced-motion: reduce) { .mobile-cta-bar { transition: none; } }
.mobile-cta-bar.is-hidden { transform: translateY(100%); }
.mobile-cta-link {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 0;
  font-size: 11px;
}
.mobile-cta-call { color: var(--call-action); }
.mobile-cta-line { color: var(--line-action); border-left: 1px solid #EFEBDF; }
.mobile-cta-quote {
  flex: 1.4;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--white); font-size: 13px;
}

/* ==========================================================================
   Responsive — Tablet / Mobile (Brief §2: Desktop >=1024 / Tablet 780-1023 / Mobile <780)
   ========================================================================== */
@media (max-width: 1023px) {
  /* Scales with the narrower hero column so the H1 stays on 2 lines (≈29px at 781px, 38px at 1023px) */
  .hero-title { font-size: clamp(28px, calc(4vw - 3px), 38px); }
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  #portfolio .filter-row { justify-content: flex-start; }
  .fabric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  /* Mobile header: logo + menu only (utility icons and CTA live in the drawer / sticky bar) */
  .utility-bar { display: none; }
  .main-nav-row { height: 60px; }
  .nav-actions > .btn-primary { display: none; }

  /* Mobile section rhythm (desktop 88–96px) */
  .section-pad { padding: 64px 0; }
  .section-pad-sm { padding: 56px 0; }
  .hero-section { padding: 48px 0 64px; }

  .hero-grid { flex-direction: column; }
  .hero-visual { width: 100%; margin-top: 40px; }
  .hero-title { font-size: 30px; }
  .hero-text { font-size: 15px; }
  .hero-cta-row a { flex: 1 1 auto; text-align: center; }
  .nowrap-m { white-space: nowrap; }
  .contact-link, .form-banner a { padding: 6px 0; }

  .stat-grid { grid-template-columns: 1fr 1fr; }
  .benefit-grid { grid-template-columns: 1fr; }

  .process-grid { grid-template-columns: repeat(2, 1fr); }

  .fabric-grid { grid-template-columns: repeat(2, 1fr); }

  .editorial { flex-direction: column; }
  .editorial-visual { display: none; }

  .pf-grid { grid-template-columns: 1fr; gap: 16px; }
  #portfolio .filter-row { justify-content: flex-start; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .quote-grid { grid-template-columns: 1fr; }
  .field-grid-2, .field-grid-3 { grid-template-columns: 1fr; }

  .start-grid { grid-template-columns: 1fr; }

  .contact-widget { display: none; }
  .mobile-cta-bar { display: flex; padding-bottom: env(safe-area-inset-bottom, 0px); }
  body { padding-bottom: calc(var(--sticky-bar-h) + env(safe-area-inset-bottom, 0px)); }

  .main-nav { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: none; border: 1px solid var(--line-2); cursor: pointer;
  }
  .nav-drawer {
    position: fixed; inset: 0; z-index: 80;
    background: var(--paper);
    padding: 8px 6vw calc(24px + env(safe-area-inset-bottom, 0px));
    display: none;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
  }
  .nav-drawer.is-open { display: flex; }
  .nav-drawer a { font-size: 18px; color: var(--navy); padding: 10px 0; }
  .nav-drawer a.btn-primary { color: var(--white); font-size: 15px; padding: 15px 20px; margin-top: 16px; }
  .nav-drawer-close {
    align-self: flex-end; background: none; border: none; cursor: pointer;
    width: 44px; height: 44px; margin-right: -10px;
    display: inline-flex; align-items: center; justify-content: center; color: var(--navy);
  }
}

@media (min-width: 781px) {
  .nav-toggle, .nav-drawer { display: none; }
}

/* Hero H1 sizes itself to its own column so it stays on two lines at any
   width (desktop, tablet, mobile, very wide screens). The longest line is
   ~11.3em wide, so 8.6% of the column leaves a small safety margin.
   Browsers without container queries keep the fixed sizes above. */
@supports (container-type: inline-size) {
  .hero-copy { container-type: inline-size; width: 100%; }
  .hero-title { font-size: clamp(24px, 8.6cqi, 42px); }
}
@supports (container-type: inline-size) {
  @media (max-width: 780px) {
    /* Mobile keeps its approved 30px ceiling on wide phones / small tablets */
    .hero-title { font-size: clamp(24px, 8.6cqi, 30px); }
  }
}
