@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;1,700&display=swap');

/* Declare our override layer FIRST, before the Tailwind CDN script (which
   loads after this stylesheet) gets a chance to declare its own `base` /
   `components` / `utilities` layers. Layer order is fixed by declaration
   order, not load timing, so this pins `sw-overrides` as the first layer
   on the page. That matters specifically for the !important .container
   rule below: per the CSS Cascade Layers spec, layer priority is REVERSED
   for !important declarations — the earliest-declared layer wins ties
   among !important rules (the opposite of normal-weight rules, where the
   latest layer wins). Un-layered CSS is treated as an implicit *last*
   layer for importance purposes, i.e. the *lowest* priority — so without
   this explicit layer, our !important override could still lose to a
   layered !important rule from Tailwind. Declaring `sw-overrides` first
   removes that risk entirely, regardless of Tailwind's config or script
   timing. */
@layer sw-overrides;

/* Smartway Textiles — Global Design System (additive only)
   Page layouts, colors and imagery are driven by Tailwind utilities on the HTML.
   This layer provides shared tokens and micro-adjustments for consistency. */

:root{
  --sw-primary:#fbbf24;
  --sw-primary-hover:#f59e0b;
  --sw-teal:#0e7490;
  --sw-teal-dark:#0f3f32;
  --sw-ink:#1f2937;
  --sw-muted:#6b7280;
  --sw-surface:#ffffff;
  --sw-border:#e5e7eb;
  --sw-radius:8px;
  --sw-shadow:0 8px 24px rgba(15,63,50,.08);
}

html { scroll-behavior: smooth; }

/* Services grid — make every card the same height as the tallest in its
   row, and pin "Learn More" to the bottom of every card regardless of how
   many lines the heading/description/bullets take up. Grid items stretch
   to equal height by default, so .sw-service-card just needs to actually
   fill that height and lay its content out as a column; margin-top:auto
   on the CTA link then pushes it down to the same level on every card. */
.sw-service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sw-service-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.sw-service-card-cta {
  margin-top: auto;
  align-self: center;
}

body {
  font-family: 'Poppins', "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* About-section heading accent — matches surrounding heading size/spacing exactly,
   only the typeface/style/color changes for the closing phrase */
.sw-about-heading-accent {
  font-family: 'Playfair Display', 'Poppins', serif;
  font-style: italic;
  font-weight: 700;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: #92400e;
}

/* Stylish display font for the About page's main headings: the page-title
   hero ("Precision Embroidery. Reliable Textile Branding."), the intro
   heading ("Built Around Quality & Accountability"), the Vision/Mission
   card headings ("...clear expression of the brand.", "Reliable embroidery
   from artwork to final delivery."), and the Core Values heading. Kept
   scoped to just these — no other heading, size, or color changes. */
.sw-about-hero h1,
.sw-about-copy h2,
.sw-vision-copy h3,
.sw-core-values h2,
.sw-about-value h3 {
  font-family: 'Playfair Display', 'Poppins', serif;
  font-weight: 800;
}

/* Small italic accent line under section headings (e.g. "Over 30 Years of
   Excellence"). Was previously defined inline inside home.php only — moved
   here so it's a single global rule shared by every page/template that uses
   the class, and sized up so it reads clearly instead of disappearing next
   to the heading above it. */
.sw-about-subheading {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 600;
  color: #92400e;
  font-size: 1.4rem;
  margin: -0.75rem 0 1.25rem;
}

/* Small gray descriptive paragraphs under section headings — the
   "About Smartway...", service/feature descriptions, testimonial-style
   copy, etc. This targets Tailwind's `leading-relaxed` utility, the
   consistent hook already used across every page's body-copy paragraphs
   (About, Services, FAQ, testimonials, contact, footer). Sitewide and not
   limited to any breakpoint, since the goal here is simply "make this
   descriptive text easier to read everywhere", not a large-screen-only
   adjustment. Kept modest (1rem/16px → ~17px, plus a touch more line
   spacing) so paragraphs stay readable without wrapping further/overflowing
   their existing card and column widths. */
p.leading-relaxed {
  font-size: 1.15rem;
  line-height: 1.8;
}

/* Sitewide small descriptive-paragraph text that does NOT use Tailwind's
   `leading-relaxed` utility (so the rule above doesn't reach it) — this is
   the same "small gray body copy under a heading" pattern, just styled via
   site-update.css's own component classes instead. Covers the About page's
   main body copy (.sw-about-copy, used by both the "about-style" and
   "about-pdf" About-page variants), its sidebar/value/FAQ text, the
   feature-service cards, slim section intros, and the home FAQ copy — i.e.
   this same readability fix applied across every page, not just Home.
   Previously .74–.86rem (≈12–14px); brought up to ~1rem to match the
   ~1.0625rem body-copy size used elsewhere. `!important` is needed here
   because site-update.css (which defines the originals) is enqueued AFTER
   this stylesheet, so at equal selector specificity its later rule would
   otherwise win; only font-size is touched, color/line-height/margin/
   max-width are left exactly as defined in site-update.css. */
.sw-slim-heading p,
.sw-feature-service-copy p,
.sw-about-style .sw-about-copy p,
.sw-about-style .sw-about-side-card p,
.sw-about-style .sw-about-value p,
.sw-about-style .sw-about-faq p,
.sw-about-pdf .sw-about-highlight p,
.sw-home-faq-copy > p {
  font-size: 1.125rem !important;
}

/* ======== SITE-WIDE READABILITY UPGRADE — responsive type scale ======== */
/* Tailwind's CDN utility classes (text-xs … text-6xl) are the dominant way
   font sizes are set across every template/page (nav, buttons, cards, forms,
   footer, service/inquiry pages, etc.). Overriding them once here — inside
   `sw-overrides` with `!important` (see the note above on why that's needed
   to reliably beat the Tailwind CDN script's own later-injected utilities,
   regardless of script load timing) — raises body copy, card/feature text,
   navigation, buttons, forms and footer text consistently on every single
   page without touching any markup, wording, colors or layout.
   clamp() gives each size a fluid range so it scales continuously between
   mobile and desktop instead of jumping at fixed breakpoints; the low end
   of each clamp is the mobile/tablet size, the high end is desktop/laptop. */
@layer sw-overrides {
  .text-xs   { font-size: clamp(.8125rem, .79rem + .15vw, .875rem)   !important; line-height: 1.55 !important; }
  .text-sm   { font-size: clamp(.9375rem, .9rem  + .2vw,  1rem)      !important; line-height: 1.6  !important; }
  .text-base { font-size: clamp(1rem,     .97rem + .2vw,  1.0625rem) !important; line-height: 1.7  !important; }
  .text-lg   { font-size: clamp(1.0625rem,1.02rem + .25vw,1.1875rem) !important; line-height: 1.7  !important; }
  .text-xl   { font-size: clamp(1.15rem,  1.1rem  + .3vw, 1.3rem)    !important; line-height: 1.55 !important; }
  .text-2xl  { font-size: clamp(1.375rem, 1.3rem  + .5vw, 1.625rem)  !important; line-height: 1.35 !important; }
  .text-3xl  { font-size: clamp(1.75rem,  1.6rem  + .9vw, 2.25rem)   !important; line-height: 1.25 !important; }
  .text-4xl  { font-size: clamp(2rem,     1.8rem  + 1.1vw,2.625rem)  !important; line-height: 1.18 !important; }
  .text-5xl  { font-size: clamp(2.5rem,   2.1rem  + 1.8vw,3.375rem)  !important; line-height: 1.12 !important; }
  .text-6xl  { font-size: clamp(2.75rem,  2.2rem  + 2.5vw,4rem)      !important; line-height: 1.08 !important; }

  /* Header nav links carry no explicit Tailwind text-size class (they
     inherit the body default, ~text-base) — sized to match text-base above
     so navigation text scales with the rest of the UI on every breakpoint,
     on every page (the header is shared sitewide). Kept modest per the
     "compact and clean" nav requirement. */
  header.sw-global-header nav a { font-size: clamp(1rem, .97rem + .2vw, 1.0625rem) !important; }
}

/* ======== 2000px-ish desktop tier: supporting-text size fix ========
   Scoped ONLY to the ~1792px+ desktop tier (covers a 2000px viewport and up
   to the next tier at 2304px). Every selector below was hand-verified
   against the actual markup, not assumed:
     - Headings/subheadings are always h1–h6 with their own text-xl/2xl/3xl+
       classes; no selector here matches an h1–h6, and no <p>/<div>/<span>
       in any template uses a heading-scale class, so this cannot reach
       heading/subheading text.
     - Primary navigation is `header.sw-global-header nav a` (styled by its
       own dedicated rule above) — untouched here.
     - Buttons/CTAs are always <button> elements or <a> elements styled as
       links/CTAs — this section deliberately targets no <a> or <button>
       anywhere, so clickable CTA text (incl. "Read more" style links,
       breadcrumb links, contact-info links, footer legal links, the
       newsletter submit button) is left exactly as-is.
   Fixed px values (not rem) are used deliberately so this is unaffected by
   the html root font-size bumps elsewhere in this tier — it lands at the
   same px size regardless, giving a precise, predictable result exactly at
   this viewport range instead of compounding with those bumps.
   `@layer sw-overrides` + `!important` reliably wins over a) Tailwind's own
   .text-xs/.text-sm/.text-base utility classes, and b) the always-on
   (all-viewport) 1.125rem card/about-description rule above — which is
   unlayered, so per cascade-layer rules a layered !important rule (this
   one) always wins over it, but ONLY inside this media query; every other
   viewport keeps its original sizing untouched. */
@media (min-width: 1792px) {
  @layer sw-overrides {
    /* TIER A — main body paragraphs, about/introduction paragraphs, and
       general leading-relaxed copy sitewide (contact-section copy included,
       since it shares these same utility classes) → 26px, well clear of the
       "26px minimum" target. */
    p.text-base,
    p.leading-relaxed,
    p:not([class*="text-"]),
    .sw-about-style .sw-about-copy p,
    .sw-about-pdf .sw-about-highlight p,
    .sw-slim-heading p,
    .sw-legal-body {
      font-size: 26px !important;
      line-height: 1.7 !important;
    }

    /* Generic small paragraphs (the catch-all p.text-sm class, used for
       everything from short contact-detail lines to longer intro copy)
       also get bumped well past their old tiny size. Anything more
       specific below (cards, footer) overrides this via higher
       selector specificity. */
    p.text-sm {
      font-size: 24px !important;
      line-height: 1.7 !important;
    }

    /* TIER — hero supporting paragraph (the lede under the H1 on the
       homepage hero) → 25px. */
    p.text-lg {
      font-size: 25px !important;
      line-height: 1.7 !important;
    }

    /* TIER — service descriptions on individual service/inquiry pages
       → 24px. */
    .sw-service-inquiry-copy p,
    .sw-feature-service-copy p {
      font-size: 24px !important;
      line-height: 1.7 !important;
    }

    /* TIER — service/testimonial CARD descriptions inside the services
       grid and similar card layouts (identified by the shared
       text-sm + mb-4 combination used on every card body copy line)
       → 23px. Higher specificity than the plain p.text-sm rule above,
       so it correctly wins for cards while leaving other small
       paragraphs at their own size. */
    p.text-sm.mb-4 {
      font-size: 23px !important;
      line-height: 1.6 !important;
    }

    /* TIER — FAQ answers and the contact-page description copy → 24px. */
    .sw-home-faq-copy > p,
    .sw-faq-answer,
    .sw-about-style .sw-about-faq p {
      font-size: 24px !important;
      line-height: 1.7 !important;
    }

    /* TIER — feature descriptions (Precision / Consistency / Reliability /
       Professional Service blurbs) and the matching about-page side card
       copy → 22px. Wins over the older, smaller 1536px .sw-about-value p
       rule further down because this is layered + !important. */
    .sw-about-style .sw-about-value p,
    .sw-about-style .sw-about-side-card p {
      font-size: 22px !important;
      line-height: 1.6 !important;
    }

    /* TIER — footer descriptive paragraphs (newsletter blurb, "about"
       blurb) → 21px. */
    footer p.text-sm,
    footer p.text-cyan-100 {
      font-size: 21px !important;
      line-height: 1.65 !important;
    }

    /* TIER — small informational/card text that is NOT inside a <p> at
       all: the checklist bullets inside service cards (a <ul>/<li>
       structure, not paragraph text) → 20px. */
    ul.text-xs,
    ul.text-xs li {
      font-size: 20px !important;
      line-height: 1.6 !important;
    }

    /* TIER — small section labels and role/category metadata that live in
       <div>/<span> wrappers rather than <p> tags, e.g. the "Brands We Have
       Worked With" / "Our Gallery" eyebrow labels above section headings,
       inline info badges like "Custom Requirement", and testimonial role
       lines like "General Manager · Hospitality Group". Matched by the
       uppercase tracking-wide/-r/-st styling shared by all of these
       (never used for the primary nav or the newsletter submit button,
       both of which are excluded by tag: this only matches <div>/<span>,
       never <button> or <a>) → 20px, plus the page-banner breadcrumb
       trails and the footer's bottom copyright/legal bar → 20px. */
    div[class*="tracking-wide"],
    span[class*="tracking-wide"],
    .sw-about-style .sw-breadcrumb,
    div.text-sm.font-medium.text-gray-600,
    footer .text-xs.text-cyan-200 {
      font-size: 20px !important;
      line-height: 1.5 !important;
    }
  }
}

/* Comfortable default line-height for plain paragraphs that aren't already
   covered by a more specific rule above (leading-relaxed, the component
   classes below, etc. all have higher specificity and win as before). Bare
   <p> tags simply relying on a Tailwind text-size class for their font-size
   pick this up as a sensible baseline, sitewide. */
p { line-height: 1.7; }

/* Utility: prevent horizontal overflow across all pages */
* { box-sizing: border-box; }

/* Fluid .container override — Tailwind's default container snaps to fixed
   step widths (640/768/1024/1280/1536px) at each breakpoint, which leaves a
   large empty gutter on any viewport that falls between two steps (e.g. a
   912px-wide Surface Pro/iPad gets stuck at the 768px step, ~144px narrower
   than the viewport). Keeping the container fluid up to a sensible cap
   avoids that dead space on every page while leaving the >=1792px overrides
   below untouched.

   IMPORTANT: the Tailwind CDN script (functions.php) compiles and injects
   its own <style> tag into <head> at runtime, AFTER this stylesheet. Its
   built-in .container utility carries the exact same specificity (one
   class), so on equal specificity the later rule in the cascade wins —
   meaning Tailwind's fixed-step defaults can silently clobber this fix
   depending on script load timing, even with `container.screens = {}` set
   in the tailwind.config below. `!important` here is a deliberate, narrowly
   scoped exception (width/max-width only) to guarantee this is always the
   winning source of truth for .container regardless of load order. */
@layer sw-overrides {
  .container {
    width: 100% !important;
    /* Fluid, not stepped: scales continuously with the viewport instead of
       jumping at fixed breakpoints (which left the container visually flat
       / "stuck" until each cliff, e.g. no growth at all between 1536px and
       1792px). 94vw keeps side gutters small and balanced at any width;
       the 1536px floor preserves current behavior below that (irrelevant
       in practice since width:100% already governs there); the 2200px
       ceiling keeps text/content from stretching endlessly on very large
       displays. */
    max-width: clamp(1536px, 94vw, 2200px) !important;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Standard section vertical padding for gallery/services/about content blocks */
.section-padding {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* Shared spacing helpers for page banners (About / Services / Gallery / Contact) */
.sw-page-banner {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px){
  .sw-page-banner { padding-top: 5rem; padding-bottom: 5rem; }
}

/* Clients marquee — double-wrapped infinite horizontal scroll */
@keyframes marquee {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}
.animate-marquee { animation: marquee 25s linear infinite; }

/* Subtle card hover polish */
.group:hover .group-hover\:shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04); }

/* Newsletter input focus ring standardization */
.sw-newsletter-form input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14,116,144,.18);
}

@media (max-width: 767px) {
  .section-padding { padding-top: 2.5rem; padding-bottom: 2.5rem; }
}

/* ======== ULTRA-LARGE / TV-SPECIFIC RULES (2xl → 3xl → 4xl) ======== */

/* 2xl breakpoint (1536px — typical 4K TVs @ 150% zoom) */
@media (min-width: 1536px) {
  html { font-size: 18px; }
  .section-padding { padding-top: 5.5rem; padding-bottom: 5.5rem; }
}

/* 3xl breakpoint (1792px — 4K TVs @ native res, large conference displays;
   this range also covers common "large desktop" widths like 1920px/2000px) */
@media (min-width: 1792px) {
  html { font-size: 20px; }
  .section-padding { padding-top: 6.5rem; padding-bottom: 6.5rem; }
  .sw-page-banner { padding-top: 6.5rem; padding-bottom: 6.5rem; }
  /* Soft image scaling — prevents low-res JPEGs from looking blocky on 4K */
  .sw-gallery-item img { image-rendering: -webkit-optimize-contrast; }

  /* Note: the sitewide responsive type scale (text-xs…text-6xl + nav) lives
     in the single @layer sw-overrides block above and already covers every
     breakpoint including this one via clamp() + the root font-size bump
     below, so no separate large-screen override list is needed here. */
}

/* 4xl breakpoint (2304px — 5K/8K displays, 2000" video walls) */
@media (min-width: 2304px) {
  html { font-size: 22px; }
  .section-padding { padding-top: 8rem; padding-bottom: 8rem; }
  .sw-page-banner { padding-top: 8rem; padding-bottom: 8rem; }
}

/* Extra large screen text balancing — avoids comically long paragraphs */
@media (min-width: 1536px) {
  p { max-width: 80ch; }
  p.leading-relaxed { line-height: 1.85; }
}

/* ======== Card scaling for service/about/inquiry pages on wide screens ========
   Containers no longer clip to max-w-6xl, so grow card padding/imagery/type
   at larger breakpoints instead of leaving extra empty gutters. */
@media (min-width: 1536px) {
  .sw-about-style .sw-about-layout { grid-template-columns: minmax(0,1fr) 320px; gap: 2.5rem; }
  .sw-about-style .sw-about-value { padding: 2rem; }
  .sw-about-style .sw-about-value i { font-size: 1.6rem; }
  .sw-about-style .sw-about-value h3 { font-size: 1rem; }
  .sw-about-style .sw-about-value p { font-size: .8rem; }
  .sw-about-style .sw-about-side-card { padding: 1.85rem; }
  .sw-about-style .sw-recent-services { padding: 1.6rem; }
  .sw-about-style .sw-about-copy img { height: 340px; }
  .sw-about-style .sw-about-faq img { height: 400px; }
  .sw-service-inquiry-card { padding: 3.5rem; gap: 3.5rem; }
  .sw-feature-service-copy { padding: 2.1rem 2.4rem; }
}
@media (min-width: 1792px) {
  .sw-about-style .sw-about-values { gap: 1.75rem; }
  .sw-about-style .sw-about-value { padding: 2.4rem; }
  .sw-about-style .sw-about-layout { grid-template-columns: minmax(0,1fr) 340px; gap: 3rem; }
  .sw-about-style .sw-about-faq-inner { gap: 4rem; }
  .sw-about-style .sw-about-faq img { height: 440px; }
  .sw-service-inquiry-card { padding: 4rem; }
}
