/* =============================================================
   Housewives & Co. — Redesign layer
   Modern editorial vibe over the existing token system
   ============================================================= */

/* Fonts loaded via <link> in index.html — trimmed to just Fraunces (the
   serif display) since the Playfair alternate was only exposed via the
   dev Tweaks panel and never rendered in production. */

:root {
  --serif: 'Fraunces', 'Playfair Display', Georgia, serif;
  --serif-alt: 'Playfair Display', 'Fraunces', Georgia, serif;

  /* Page rhythm */
  --page-pad-x: clamp(24px, 5vw, 80px);
  --max-w: 1280px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--hc-cream);
  color: var(--hc-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ---- Lenis smooth-scroll ----
   Wheel/inertia easing only. Snap removed by request. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

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

/* ---- Editorial display headline ---- */
.ed-display {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.025em;
  line-height: 0.95;
  color: var(--hc-blue);
  margin: 0;
  text-wrap: pretty;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.ed-display--upright { font-style: normal; font-weight: 600; }
.ed-display--xl { font-size: clamp(56px, 9vw, 152px); }
.ed-display--lg { font-size: clamp(48px, 6.5vw, 104px); }
.ed-display--md { font-size: clamp(36px, 4.5vw, 72px); }
.ed-display--sm { font-size: clamp(28px, 3vw, 48px); }

.ed-display em, .ed-italic {
  font-style: italic;
  font-weight: 400;
}
.ed-display .upright {
  font-style: normal;
}

/* ---- Eyebrow / overline ---- */
.eyebrow-mod {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hc-blue);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow-mod::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--hc-blue);
  display: inline-block;
}
.eyebrow-mod.no-rule::before { display: none; }

/* ---- Section number marker (01., 02., …) ---- */
.section-num {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(64px, 8vw, 128px);
  line-height: 1;
  color: var(--hc-blue);
  letter-spacing: -0.04em;
  opacity: 0.95;
}

/* ---- Lead paragraph ---- */
.lead-mod {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--hc-ink-700);
  max-width: 60ch;
}

/* ---- Marquee ---- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(0,78,173,0.18);
  border-bottom: 1px solid rgba(0,78,173,0.18);
  background: var(--hc-cream);
  padding: 18px 0;
}
.marquee--blue {
  background: var(--hc-blue);
  color: #fff;
  border-color: var(--hc-blue);
}
.marquee__track {
  display: inline-block;
  animation: marquee 38s linear infinite;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 56px);
  letter-spacing: -0.02em;
  color: #e6ded2;
}
.marquee--blue .marquee__track { color: #fff; }
.marquee__track > span {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
}
.marquee__track .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #e6ded2;
  display: inline-block;
}
.marquee--blue .marquee__track .dot { background: #b1e5ff; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 14px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn--primary {
  background: var(--hc-blue);
  color: #fff;
}
.btn--primary:hover { background: var(--hc-blue-700); }
.btn--secondary {
  background: transparent;
  color: var(--hc-blue);
  border-color: var(--hc-blue);
}
.btn--secondary:hover { background: var(--hc-blue); color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--hc-blue);
  padding: 10px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--hc-blue);
}
.btn--lg { padding: 18px 28px; font-size: 15px; }
.btn .arrow {
  transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translateX(4px); }

/* ---- Card primitives ---- */
.card-outline {
  background: #fff;
  border: 2px solid var(--hc-blue);
  border-radius: 14px;
}

/* ---- Sticker / stamp ---- */
.sticker {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--hc-orange);
  color: #fff;
  padding: 14px 16px;
  border-radius: 999px;
  transform: rotate(-8deg);
  box-shadow: 3px 3px 0 var(--hc-blue);
  line-height: 1;
  text-align: center;
}
.sticker--blue { background: var(--hc-blue); color: #fff; box-shadow: 3px 3px 0 var(--hc-orange); }
.sticker--cream { background: var(--hc-cream); color: var(--hc-blue); box-shadow: 3px 3px 0 var(--hc-blue); }

/* ---- Page sections ---- */
.section {
  padding: clamp(64px, 8vw, 128px) var(--page-pad-x);
}
.section--cream { background: var(--hc-cream); }
.section--white { background: #fff; }
.section--blue  { background: var(--hc-blue); color: #fff; }
.section--blue h1, .section--blue h2, .section--blue h3 { color: #fff; }
.section--lightblue { background: var(--hc-blue-200); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ---- Asymmetric grid helpers ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 32px); }

/* ---- Tag ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--hc-blue);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hc-blue);
  background: transparent;
}
.tag--filled { background: var(--hc-blue); color: #fff; }
.tag--cream { background: var(--hc-cream); border-color: var(--hc-blue); color: var(--hc-blue); }

/* ---- Duotone treatment for placeholder photos ---- */
.duotone {
  filter: grayscale(1) contrast(1.15);
  mix-blend-mode: multiply;
}
.duotone-frame {
  position: relative;
  background: var(--hc-blue);
  overflow: hidden;
}
.duotone-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,78,173,0.35), rgba(0,78,173,0.35));
  mix-blend-mode: screen;
  pointer-events: none;
}

/* ---- Underline link ---- */
.u-link {
  color: var(--hc-blue);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  font-weight: 500;
}
.u-link:hover { color: var(--hc-blue-700); }

/* ---- Checker variants ---- */
.hc-checker--thin { --sq: 8px; }

/* ---- Page-content reveal helpers ---- */
.divider-rule {
  height: 1px;
  background: var(--hc-blue);
  opacity: 0.2;
}

/* ---- Scoped serif toggle (driven by Tweaks) ---- */
[data-serif="fraunces"]  { --serif: 'Fraunces', Georgia, serif; }
[data-serif="playfair"]  { --serif: 'Playfair Display', Georgia, serif; }

/* ---- Modernity dial: when low, nudge things back toward the existing kit ---- */
[data-modernity="low"] .ed-display { font-style: normal; font-weight: 800; font-family: var(--font-display); letter-spacing: -0.03em; }
[data-modernity="low"] .marquee { display: none; }
[data-modernity="low"] .section-num { font-family: var(--font-display); font-style: normal; font-weight: 800; }

/* ---- Util ---- */
.text-blue   { color: var(--hc-blue); }
.text-orange { color: var(--hc-orange); }
.text-ink    { color: var(--hc-ink); }
.text-muted  { color: var(--hc-ink-500); }
.text-cream-on-blue { color: #dcf2ff; }

.flex { display: flex; }
.center { display: flex; align-items: center; justify-content: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 24px; } .gap-6 { gap: 32px; } .gap-7 { gap: 48px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; } .mt-6 { margin-top: 32px; } .mt-7 { margin-top: 48px; } .mt-8 { margin-top: 64px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 24px; } .mb-6 { margin-bottom: 32px; } .mb-7 { margin-bottom: 48px; } .mb-8 { margin-bottom: 64px; }

/* ---- Visited / focus ---- */
a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,78,173,0.35);
  border-radius: 4px;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--hc-blue);
  color: #fff;
  padding: 80px var(--page-pad-x) 28px;
}
.site-footer a { color: #dcf2ff; text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ---- Trade Secrets prose (rendered from Markdown) ---- */
.ts-prose {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.7;
  color: var(--hc-ink-700);
}
.ts-prose > p { margin: 0 0 1.2em 0; }
.ts-prose > p:first-of-type { margin-top: 0; }
.ts-prose > p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 88px;
  line-height: 0.85;
  color: var(--hc-blue);
  margin: 6px 12px 0 0;
}
.ts-prose h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 40px;
  line-height: 1.1;
  color: var(--hc-blue);
  margin: 48px 0 16px 0;
  letter-spacing: -0.01em;
}
.ts-prose h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  color: var(--hc-blue);
  margin: 36px 0 12px 0;
}
.ts-prose strong { color: var(--hc-blue); font-weight: 700; }
.ts-prose em { font-style: italic; }
.ts-prose a { color: var(--hc-blue); text-decoration: underline; text-decoration-color: rgba(0, 78, 173, 0.3); }
.ts-prose a:hover { text-decoration-color: var(--hc-blue); }
.ts-prose blockquote {
  margin: 48px 0;
  padding: 32px 40px;
  border-left: 3px solid var(--hc-orange);
  background: var(--hc-cream);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.35;
  color: var(--hc-blue);
  border-radius: 0 10px 10px 0;
}
.ts-prose ol, .ts-prose ul { padding-left: 28px; margin: 0 0 1.6em 0; }
.ts-prose li { margin-bottom: 12px; }
/* MLA/MP package deal card embedded in the templates post */
.ts-prose .ts-package-card {
  display: grid;
  grid-template-columns: minmax(160px, 200px) 1fr;
  gap: 28px;
  align-items: start;
  margin: 36px 0;
  padding: 28px 32px;
  background: var(--hc-cream);
  border: 2px solid var(--hc-blue);
  border-radius: 14px;
  position: relative;
  box-shadow: 5px 5px 0 var(--hc-orange);
}
.ts-prose .ts-package-card__badge {
  position: absolute;
  top: -22px; left: -16px;
  background: var(--hc-orange);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.2;
  padding: 14px 16px;
  border-radius: 50%;
  width: 78px; height: 78px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-12deg);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
  font-style: normal;
}
.ts-prose .ts-package-card__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding-top: 8px;
}
.ts-prose .ts-package-card__amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: 64px;
  line-height: 1;
  color: var(--hc-blue);
}
.ts-prose .ts-package-card__period {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--hc-ink-500);
}
.ts-prose .ts-package-card__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  color: var(--hc-blue);
  margin-bottom: 8px;
  line-height: 1.15;
}
.ts-prose .ts-package-card__lede {
  font-size: 16px;
  line-height: 1.5;
  color: var(--hc-ink-700);
  margin: 0 0 14px 0;
  font-style: normal;
}
.ts-prose .ts-package-card__list {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--hc-ink);
}
.ts-prose .ts-package-card__list li { margin-bottom: 6px; }
.ts-prose .ts-package-card__list ul { margin-top: 4px; padding-left: 22px; }
.ts-prose .ts-package-card__list em {
  font-style: normal;
  color: var(--hc-orange);
  font-weight: 700;
  text-decoration: underline;
}
@media (max-width: 720px) {
  .ts-prose .ts-package-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 20px 20px;
  }
  .ts-prose .ts-package-card__badge { width: 64px; height: 64px; font-size: 11px; top: -18px; left: -8px; }
  .ts-prose .ts-package-card__amount { font-size: 48px; }
  .ts-prose .ts-package-card__title { font-size: 22px; }
}

.ts-prose code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--hc-cream);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--hc-blue);
}
@media (max-width: 720px) {
  .ts-prose { font-size: 17px; }
  .ts-prose > p:first-of-type::first-letter { font-size: 64px; }
  .ts-prose h2 { font-size: 30px; }
  .ts-prose blockquote { padding: 20px 24px; font-size: 22px; margin: 32px 0; }
}


/* =============================================================
   RESPONSIVE / MOBILE LAYER
   -------------------------------------------------------------
   Targets inline-style grid layouts via attribute selectors so
   we don't have to refactor every component. React serializes
   camelCase style props to kebab-case in the rendered HTML, so
   `[style*="grid-template-columns: repeat(3"]` matches a JSX
   `style={{ gridTemplateColumns: 'repeat(3, 1fr)' }}`.
   ============================================================= */

/* ---- Tablet (≤1024px): collapse 4-col → 2-col, 3-col → 2-col */
@media (max-width: 1024px) {
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: 2fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
  .grid-12 { grid-template-columns: repeat(6, 1fr) !important; }
  .grid-12 > [style*="grid-column: span 7"],
  .grid-12 > [style*="grid-column: span 5"],
  .grid-12 > [style*="grid-column: span 6"] {
    grid-column: 1 / -1 !important;
  }
  /* When .grid-12 collapses, the home About section's absolute mail-carrier
     lady ends up sitting behind the now-full-width text. Hide her at this
     breakpoint — she comes back as a centered card on phone (≤720px). */
  [style*="pointer-events: none"][style*="position: absolute"]:has(img[src*="lady-mail-carrier"]) {
    display: none !important;
  }

  /* Pricing tier cards collapse to 1-col at tablet (3 cards side-by-side
     don't fit cleanly with the emphasized middle card lifted +12px). */
  .pricing-tiers,
  [style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Don't lift the emphasized tier card when stacked. */
  [style*="transform: translateY(-12px)"] { transform: none !important; }

  /* Section padding gets a bit tighter at tablet so content has room. */
  .section, section {
    padding-left: clamp(28px, 4vw, 64px) !important;
    padding-right: clamp(28px, 4vw, 64px) !important;
  }
}

/* ---- Tablet + below (≤1024px): switch the header to the mobile
   drawer so the desktop nav doesn't try to fit and wrap awkwardly. */
@media (max-width: 1024px) {
  .site-header-row { grid-template-columns: 1fr auto !important; }
  .site-header-nav, .site-header-cta { display: none !important; }
  .site-header-burger { display: inline-flex !important; justify-self: end !important; }
}

/* ---- Phone (≤720px): collapse everything to single column */
@media (max-width: 720px) {
  /* Tighter section padding on phones — applied to ALL sections,
     not just .section, so hero variants without that class also
     get sane vertical breathing room. */
  .section,
  section { padding: clamp(48px, 11vw, 80px) var(--page-pad-x) !important; }

  /* Single-column anything with multiple columns. Includes the
     asymmetric `Xfr 1fr` and `1fr Xfr` patterns used on home
     project cards, contact, etc. */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: '1fr 1fr"],
  [style*="grid-template-columns: 1.05fr"],
  [style*="grid-template-columns: 1.1fr"],
  [style*="grid-template-columns: 1.2fr"],
  [style*="grid-template-columns: 1.4fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns: 0.85fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns: 1fr 80px"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns: repeat(6"] {
    grid-template-columns: 1fr !important;
  }

  .grid-12 { grid-template-columns: 1fr !important; }
  .grid-12 > * { grid-column: 1 / -1 !important; }

  /* Hero illustrations: pull them out of absolute positioning and
     present them as a framed colored card that sits in the natural
     document flow. The :not(...) excludes full-bleed background
     decorations (dot patterns are absolute + pointer-events:none too,
     but always have inset:0 or background-image set). Empty <img>-less
     divs (decorative pigeons sometimes have neither) are also kept out
     by requiring the element to contain an <img>. */
  [style*="pointer-events: none"][style*="position: absolute"]:not([style*="inset: 0"]):not([style*="background-image"]):not([style*="background:"]):has(img),
  img[style*="pointer-events: none"][style*="position: absolute"] {
    position: relative !important;
    width: auto !important;
    max-width: min(420px, calc(100vw - 32px)) !important;
    height: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    top: auto !important;
    margin: 0 auto 28px !important;
    background: var(--hc-blue-200) !important;
    border: 2px solid var(--hc-blue) !important;
    border-radius: 14px !important;
    aspect-ratio: 16/10 !important;
    overflow: hidden !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    box-shadow: 4px 4px 0 var(--hc-orange) !important;
    transform: none !important;
  }
  /* Default treatment for hero illustration imgs inside the framed
     card. EXCLUDES lady-computer-right (handled separately below) so
     the cascade doesn't fight itself. */
  [style*="pointer-events: none"][style*="position: absolute"]:not([style*="inset: 0"]):not([style*="background-image"]):not(:has(img[src*="lady-computer-right"])):has(img) > img {
    width: auto !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center bottom !important;
    display: block !important;
  }
  /* When the illustration IS an <img> directly (no wrapper div, e.g.
     contact-pigeon), shrink it inside its own frame. */
  img[style*="pointer-events: none"][style*="position: absolute"] {
    object-fit: contain !important;
    object-position: center bottom !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }
  /* Home hero (HeroFullBleed) lady-computer-right.png — zoomed in via
     cover + top-right so her upper body fills the card. */
  [style*="pointer-events: none"][style*="position: absolute"]:has(img[src*="lady-computer-right"]) > img {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: right top !important;
    padding: 0 !important;
    display: block !important;
  }

  /* Center the figure inside the card for About (lady-pie),
     Services (servicestop / mechanic), and home-About (lady-mail-carrier).
     Default rule above right-aligns them with flex-end; this overrides
     for these only. Specificity must match the general rule's :not()
     chain to win the cascade. */
  [style*="pointer-events: none"][style*="position: absolute"]:not([style*="inset: 0"]):not([style*="background-image"]):not([style*="background:"]):has(img[src*="lady-pie-right"]),
  [style*="pointer-events: none"][style*="position: absolute"]:not([style*="inset: 0"]):not([style*="background-image"]):not([style*="background:"]):has(img[src*="lady-mail-carrier"]),
  [style*="pointer-events: none"][style*="position: absolute"]:not([style*="inset: 0"]):not([style*="background-image"]):not([style*="background:"]):has(img[src*="servicestop"]) {
    justify-content: center !important;
  }

  /* Club mobile hero — left-align so the tennis racket isn't cropped,
     and zoom in via cover so the figures fill the card (cropping the
     transparent top of the PNG). */
  [style*="pointer-events: none"][style*="position: absolute"]:not([style*="inset: 0"]):not([style*="background-image"]):not([style*="background:"]):has(img[src*="club-mobile-hero"]) {
    justify-content: flex-start !important;
  }
  [style*="pointer-events: none"][style*="position: absolute"]:not([style*="inset: 0"]):not([style*="background-image"]):not(:has(img[src*="lady-computer-right"])):has(img[src*="club-mobile-hero"]) > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: left bottom !important;
  }
  /* Sections that contained an absolute illustration also tend to set
     a tall minHeight (e.g. 760). Reset that on phone so the section
     hugs its actual content. */
  section[style*="min-height: 760"],
  section[style*="min-height: 880"],
  section[style*="min-height: 760px"] { min-height: 0 !important; }

  /* Allow text columns that previously had a maxWidth percentage
     (set so they wouldn't crash into a side image) to use the
     full width on phone. */
  section [style*="max-width: 60%"],
  section [style*="max-width: 62%"],
  section [style*="max-width: 68%"],
  section [style*="max-width: 70%"],
  section [style*="max-width: 72%"] {
    max-width: 100% !important;
  }

  /* (No extra padding needed now that illustrations sit inline as cards.) */

  /* Tighten the chunky 56px stacked margins on section headers — on
     phone they double-up (header's own marginBottom + parent wrapper's
     marginBottom) and create awkward dead space. */
  [style*="margin-bottom: 56"] { margin-bottom: 28px !important; }
  [style*="margin-bottom: 80"] { margin-bottom: 40px !important; }
  [style*="margin-bottom: 96"] { margin-bottom: 48px !important; }

  /* Headlines + leads sized down */
  .ed-display--xl { font-size: clamp(44px, 12vw, 80px) !important; }
  .ed-display--lg { font-size: clamp(36px, 10vw, 64px) !important; }
  .lead-mod { font-size: 17px !important; }

  /* Sticky-positioned sidebars stop being sticky on phone */
  [style*="position: sticky"] { position: static !important; }

  /* No accidental horizontal scroll */
  html, body { overflow-x: hidden; }

  /* Hero "tag" rows often have width caps; let them be full */
  [style*="display: flex"][style*="max-width: 62%"] { max-width: 100% !important; }

  /* Pricing tier cards override (the emphasized middle tier
     translateY collides with the others when single-col) */
  [style*="transform: translateY(-12px)"] { transform: none !important; }

  /* Pricing rates collapse */
  .pricing-rates { grid-template-columns: 1fr !important; }
  .pricing-tiers { grid-template-columns: 1fr !important; }

  /* Project gallery + case-study gallery already have their own
     1024px breakpoint that collapses to 2 cols — nudge to 1 on phone */
  .proj-grid { grid-template-columns: 1fr !important; grid-auto-rows: auto !important; }
  .proj-grid > * { grid-column: span 1 !important; grid-row: span 1 !important; }
  .cs-gallery { grid-template-columns: 1fr !important; grid-auto-rows: auto !important; }

  /* Forms: collapse the 2-col input grids */
  form [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* Apply-to-Join stamp is huge — shrink slightly + a touch of leading
     so the wrapped "Apply to / Join" label breathes. */
  .join-cta__stamp { width: 180px !important; height: 180px !important; }
  .join-cta__label { line-height: 1.15 !important; }

  /* Header: re-layout for mobile — logo on left, hamburger on right.
     Hide the desktop nav + CTAs. */
  .site-header-row { grid-template-columns: 1fr auto !important; }
  .site-header-nav, .site-header-cta { display: none !important; }
  .site-header-burger { display: inline-flex !important; justify-self: end !important; }

  /* Footer: 4-col → 1-col, with each column stacked */
  .site-footer [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .site-footer { padding-top: 56px !important; padding-bottom: 24px !important; }
}

/* ---- Phone-portrait (≤480px): even tighter */
@media (max-width: 480px) {
  .ed-display--xl { font-size: clamp(40px, 13vw, 64px) !important; }
  .ed-display--lg { font-size: clamp(32px, 11vw, 52px) !important; }
}

/* Join the Club hero — desktop shows two side illustrations; mobile
   shows a single combined image instead. CSS toggles which is visible. */
.club-hero-mobile-illu { display: none; }
@media (max-width: 720px) {
  /* Hide the two desktop side illustrations on mobile. Specificity
     must beat the global card-treatment rule, so we chain the same
     :not() selectors plus the class. */
  [style*="pointer-events: none"][style*="position: absolute"]:not([style*="inset: 0"]):not([style*="background-image"]):not([style*="background:"]).club-hero-desktop-illu {
    display: none !important;
  }
  /* The combined mobile illustration takes the global card treatment
     automatically (it shares the pointer-events:none + position:absolute
     pattern). No extra rule needed beyond unhiding it. */
  .club-hero-mobile-illu { display: flex; }
}

/* Hamburger / mobile nav drawer (hidden on desktop) */
.site-header-burger { display: none; }
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(360px, 88vw);
  background: var(--hc-cream);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 38, 90, 0.18);
  padding: 24px 28px;
  overflow-y: auto;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 38, 90, 0);
  z-index: 99; pointer-events: none;
  transition: background 0.28s ease;
}
.mobile-drawer-backdrop.is-open {
  background: rgba(0, 38, 90, 0.45);
  pointer-events: auto;
}
.mobile-drawer a {
  display: block;
  padding: 14px 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  color: var(--hc-blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 78, 173, 0.15);
  cursor: pointer;
}
.mobile-drawer a:last-of-type { border-bottom: none; }
.mobile-drawer-cta { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.mobile-drawer-group { border-bottom: 1px solid rgba(0, 78, 173, 0.15); }
.mobile-drawer-toggle {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  background: transparent; border: none;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 28px; color: var(--hc-blue);
  cursor: pointer;
  text-align: left;
}
.mobile-drawer-chev {
  font-family: var(--font-display); font-style: normal; font-weight: 400;
  font-size: 28px; line-height: 1;
  transition: transform 0.18s ease;
  display: inline-block;
}
.mobile-drawer-sub {
  padding: 4px 0 14px 16px;
  display: flex; flex-direction: column;
}
.mobile-drawer-sub a {
  display: block;
  padding: 10px 0;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 18px;
  color: var(--hc-ink-700);
  text-decoration: none;
  border-bottom: none;
  cursor: pointer;
}
.mobile-drawer-sub a:hover { color: var(--hc-blue); }
.mobile-drawer-close {
  align-self: flex-end;
  background: transparent; border: none;
  font-size: 28px; line-height: 1; color: var(--hc-blue);
  cursor: pointer; padding: 4px 8px; margin-bottom: 8px;
}
