/* ==========================================================================
   Second Order: mobile layer (phones and small tablets, <= 1000px)
   One rule set, loaded last on every page. Desktop is untouched.

   SYSTEM
   - Gutter 20px. Section rhythm 64px. Stack gap 20px. CTA gap 28px.
   - Type: h1 36-44, h2 30-34, tagline serif 20, body 16/1.55, card 15, label mono 11.
   - Buttons: one shape. Full width of the column, label wraps, glyph fixed.
   - Creatives: hero scenes keep a fixed 16:10 band; diagram scenes that cannot
     be read on a phone are replaced by a halftone strip in the same language.
   - Nothing may be wider than the screen. Nothing is smaller than 11px.
   ========================================================================== */

@media (max-width: 1000px) {
  :root {
    --m-pad: 20px;
    --m-sec: 64px;
    --m-stack: 20px;
    --m-cta: 28px;
    --m-label: 11px;
    --v9-pad: 20px;
  }

  html, body { max-width: 100%; overflow-x: hidden; }
  body { -webkit-text-size-adjust: 100%; }
  img, video, canvas, svg { max-width: 100%; }

  /* ---------- Buttons: one rule for every CTA ---------- */
  .so-button {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    margin-left: 0 !important;
    padding: 15px 16px 15px 20px;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    white-space: normal;
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: .07em;
  }
  .so-button > span:not(.wave-glyph) { display: block; min-width: 0; white-space: normal; text-align: left; }
  .so-button .wave-glyph { flex: none; width: 36px; }
  .so-button.quiet { padding-left: 0; padding-right: 0; border-color: transparent; }
  .so-button.quiet:after { left: 0; right: 0; }
  .so-button.quiet .wave-glyph { margin-right: 0; }

  /* groups of buttons stack with the same gap */
  .home-actions, .cp-actions, .cl-actions, .ed-ctas, .hero-actions, .action-row, .cl-id-actions {
    display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: var(--m-cta);
  }
  /* space above any lone CTA that follows copy */
  .home-capability .so-button, .home-approach-copy .so-button, .home-proof-copy .so-button,
  .cp-panel-cta, .cp-delivery-box .so-button, .cp-closing .so-button, .cl-proof .so-button,
  .cl-main + .so-button, .theatre-beat .so-button, .na-cta .so-button, .detail-copy-v9 .so-button,
  .home-night-foot .so-button, .method-v9 .so-button, .closing-v9 .so-button, .approach-engage .so-button {
    margin-top: var(--m-cta) !important; width: 100%;
  }
  .cp-panel-cta { align-self: stretch; }
  .cp-panel-cta .so-button { margin-top: 0 !important; }

  /* ---------- Shared type scale ---------- */
  .cp-kicker, .home-kicker, .ed-meta, .ed-ch-k, .cp-index, .nt-k, .ct-kicker, .section-tag, .cl-index, .cl-beyond-label {
    font-size: var(--m-label); letter-spacing: .1em; line-height: 1.4;
  }
  p { overflow-wrap: break-word; }

  /* ---------- HOME ---------- */
  .home-copy-hero { padding-top: 0; min-height: 0; }
  .home-hero-grid { padding-top: calc(var(--v9-head, 66px) + 28px); padding-bottom: 36px; gap: 0; }
  .home-hero-copy h1 { font-size: clamp(38px, 11.2vw, 50px); line-height: .96; letter-spacing: -.055em; }
  .home-hero-copy > p { margin-top: 20px; font-size: 16px; line-height: 1.5; }
  .home-actions { margin-top: 24px; }
  .home-copy-hero { min-height: 100svh; display: flex; }
  .home-copy-hero .home-shell { justify-content: center; }

  .home-opportunity { min-height: 0; height: auto; }
  .halftone-flow-panel { height: 420px; }
  .halftone-flow-copy { padding: 28px var(--m-pad) 32px; }
  .home-opportunity h2, .home-section-heading h2, .home-approach h2, .home-proof h2, .home-closing h2 {
    font-size: clamp(34px, 9.6vw, 44px); line-height: .98; letter-spacing: -.05em;
  }
  .halftone-flow-copy h2 { font-size: clamp(30px, 8.6vw, 40px); }
  .home-opportunity-copy { padding: 40px var(--m-pad) var(--m-sec); }
  .home-opportunity-copy p { font-size: 16px; line-height: 1.55; }
  .home-opportunity-copy p:first-child { font-size: 20px; line-height: 1.3; }

  .home-capabilities { padding: var(--m-sec) 0; }
  .home-section-heading { gap: 16px; margin-bottom: 8px; }
  .home-capability { padding: 0 0 36px; }
  .home-capability h3 { font-size: 34px; line-height: 1; }
  .home-capability h4 { font-size: 21px; line-height: 1.2; }
  .home-capability-copy p { font-size: 16px; line-height: 1.55; }
  .home-capability .home-capability-art, .home-capabilities-tail .home-capability-art { min-height: 0; height: 230px; }
  .home-capabilities-tail > div:last-child { padding: 28px 22px; }

  .home-approach-panel { min-height: 0; padding: var(--m-sec) var(--m-pad); }
  .home-approach-lower { padding-top: 24px; gap: 24px; }
  .home-principle { padding: 22px; font-size: 20px; line-height: 1.25; }
  .home-proof { padding: var(--m-sec) 0; }
  .home-proof-body { padding-top: 24px; gap: 20px; }
  .home-proof-copy p { font-size: 16px; line-height: 1.55; }
  .home-closing { min-height: 0; }
  .home-night-panel { padding: 36px var(--m-pad) 40px; min-height: 560px; }
  .home-night-copy p { font-size: 16px; line-height: 1.5; }
  .workspaces-strip { max-width: 100%; left: 0; right: 0; transform: none; width: 100%; }

  /* ---------- CAPABILITY DETAIL PAGES (cp-*) ---------- */
  .cp-hero { padding: calc(var(--v9-head) + 28px) 0 0; height: auto; min-height: 0; gap: 0; }
  .cp-hero-grid { gap: 28px; }
  .cp-hero h1 { font-size: clamp(32px, 9.2vw, 42px); line-height: 1.02; letter-spacing: -.045em; }
  .cp-hero h1 span, .cp-hero h1 em { font-size: inherit; line-height: inherit; }
  .cp-lede { margin-top: 18px; font-size: 16px; line-height: 1.55; }
  .cp-hero .cp-slot, .cp-hero figure.cp-slot { height: auto; max-height: none; aspect-ratio: 16 / 11; }
  .cp-jump { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; padding-bottom: 8px; }
  .cp-jump a { min-height: 46px; padding: 0 14px; font-size: 11px; }

  .cp-thesis { padding-block: var(--m-sec); }
  .cp-thesis h2 { font-size: clamp(26px, 7.4vw, 32px); line-height: 1.08; letter-spacing: -.04em; }
  .cp-thesis p { font-size: 16px; line-height: 1.55; }
  .cp-thesis-grid { gap: 20px; }

  .cp-panel, .cp-panel.is-flip { height: auto; min-height: 0; display: block; }
  .cp-panel-visual { display: none; }
  .cp-panel-body { padding: 0 var(--m-pad) var(--m-sec); }
  .cp-panel-body::before {
    content: ""; display: block; height: 52px; margin: 0 calc(var(--m-pad) * -1) 28px; padding: 0;
    background: radial-gradient(circle, currentColor 1.7px, transparent 2.2px) 0 0 / 14px 14px;
    opacity: .38; -webkit-mask-image: linear-gradient(90deg, #000 0, transparent 92%); mask-image: linear-gradient(90deg, #000 0, transparent 92%);
  }
  .cp-panel-body { padding-top: 0; }
  .cp-panel.no-visual .cp-panel-body::before { display: none; }
  .cp-panel.no-visual .cp-panel-body { padding-top: var(--m-sec); }
  .cp-panel-body h2 { font-size: clamp(32px, 9vw, 40px); line-height: 1; letter-spacing: -.05em; margin: 10px 0 12px; }
  .cp-panel-body h3 { font-size: 20px; line-height: 1.25; margin: 0 0 24px; letter-spacing: 0; }
  .cp-cards, .cp-cards.is-dense { grid-template-columns: 1fr; gap: 10px; }
  .cp-card { padding: 16px 16px 18px; min-height: 0; }
  .cp-card-n { padding-bottom: 8px; font-size: var(--m-label); }
  .cp-card h4 { font-size: 17px; line-height: 1.25; margin: 0 0 6px; }
  .cp-card p { font-size: 15px; line-height: 1.5; margin: 0; }

  .cp-context { padding: 0; display: block; height: auto; min-height: 0; }
  .cp-context-art { height: auto; }
  .cp-context .cp-slot, .cp-context-art .cp-slot { flex: none; height: auto; aspect-ratio: 16 / 11; }
  .cp-context-copy { padding-top: 36px; padding-bottom: var(--m-sec); }
  .cp-context h2 { font-size: clamp(30px, 8.4vw, 38px); line-height: 1.02; letter-spacing: -.045em; margin-bottom: 20px; padding: 0; }
  .cp-steps { margin: 0; grid-template-columns: 1fr; }
  .cp-steps li { padding: 14px 0; min-height: 0; }
  .cp-steps p { font-size: 16px; line-height: 1.45; }

  .cp-delivery { display: block; height: auto; min-height: 0; padding: 0; }
  .cp-delivery-art { height: auto; }
  .cp-delivery .cp-slot, .cp-delivery-art .cp-slot { max-height: none; height: auto; aspect-ratio: 16 / 11; }
  .cp-delivery .cp-delivery-box, .cp-delivery-box, .cp-delivery-box.is-long {
    position: relative; inset: auto !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; width: 100%; height: auto; max-width: none; margin: 0;
    padding: 36px var(--m-pad) var(--m-sec); transform: none;
  }
  .cp-delivery-box h2 { font-size: clamp(28px, 8vw, 34px); line-height: 1.04; letter-spacing: -.045em; margin: 12px 0 16px; }
  .cp-delivery-body, .cp-custom { font-size: 16px; line-height: 1.55; margin: 0 0 14px; }

  .cp-finale { display: block; height: auto; min-height: 0; }
  .cp-finale .cp-related { padding: var(--m-sec) 0; display: block; }
  .cp-related-grid { grid-template-columns: 1fr; gap: 10px; }
  .cp-finale .cp-related-card { padding: 18px; }
  .cp-finale .cp-related-card h3 { font-size: 20px; line-height: 1.2; }
  .cp-finale .cp-closing { padding: var(--m-sec) 0; display: block; }
  .cp-finale .cp-closing h2 { font-size: clamp(30px, 8.6vw, 38px); line-height: 1.02; letter-spacing: -.045em; margin: 0 0 var(--m-cta); }

  /* ---------- ABOUT / APPROACH (ed-*) ---------- */
  .ed-hero { padding: calc(var(--v9-head) + 28px) var(--m-pad) 40px; height: auto; min-height: 0; }
  .ed-hero h1, .ed-hero h1.is-compact { font-size: clamp(34px, 10vw, 44px); line-height: 1; letter-spacing: -.05em; margin: 18px 0 20px; }
  .ed-hero-bottom { display: block; }
  .ed-hero-lede p { font-size: 17px; line-height: 1.5; }
  .ed-index { margin-top: 24px; }
  .ed-index a { font-size: 12px; padding: 12px 0; }

  .ed-ch { padding: var(--m-sec) var(--m-pad); height: auto; min-height: 0; display: block; }
  .ed-ch-l, .ed-ch-r { width: 100%; }
  .ed-ch h2 { font-size: clamp(28px, 8vw, 34px); line-height: 1.04; letter-spacing: -.045em; margin: 16px 0 20px; }
  .ed-ch-r p { font-size: 16px; line-height: 1.55; }
  .ed-ch-r p.is-lead { font-size: 19px; line-height: 1.35; }
  .ed-emblem { max-height: 150px; height: 150px !important; width: auto; margin: 16px 0 4px; }
  .ed-emblem svg, .ed-emblem .em { max-height: 150px; height: 150px; width: auto; }

  .ed-steps { display: block; }
  .ed-step, .ed-step.is-active { height: auto; min-height: 0; position: relative; }
  .ed-step-open { padding: 36px var(--m-pad) 40px; width: 100%; height: auto; min-height: 0; }
  .ed-step-n.ed-emblem { position: relative; top: auto; left: auto; right: auto; transform: none; height: 110px !important; width: auto; margin: 0 0 16px; }
  .ed-step-open h2 { font-size: clamp(34px, 10vw, 44px); line-height: 1; letter-spacing: -.05em; margin: 0 0 10px; }
  .ed-step-open h3 { font-size: 20px; line-height: 1.25; margin: 0 0 14px; }
  .ed-step-open p { font-size: 16px; line-height: 1.55; }
  .ed-statement, .ed-statement * { max-width: 100%; }
  .ed-statement { padding-block: var(--m-sec); }
  .ed-st-line, .ed-st-band .ed-st-line { font-size: clamp(30px, 9vw, 40px); line-height: 1.02; }
  .ed-st-cols { grid-template-columns: 1fr; gap: 20px; }

  /* ---------- CAPABILITIES OVERVIEW (cl-*) ---------- */
  .cl-hero { height: auto; min-height: 0; padding: calc(var(--v9-head) + 24px) var(--m-pad) 0; display: flex; flex-direction: column; justify-content: flex-end; }
  .cl-hero-media { position: absolute; inset: 0; }
  .cl-hero { min-height: 640px; }
  .cl-hero-box { position: relative; inset: auto; width: 100%; max-width: none; margin: 0 -0px; padding: 24px 20px 28px; }
  .cl-hero-box h1 { font-size: clamp(30px, 8.6vw, 36px); line-height: 1.02; letter-spacing: -.045em; }
  .cl-hero-box p { font-size: 15px; line-height: 1.5; }
  .cl-weight-grid { padding: var(--m-sec) var(--m-pad); }
  .cl-weight h2, .cl-apply-head h2 { font-size: clamp(34px, 9.6vw, 44px); line-height: 1; letter-spacing: -.05em; }
  .cl-weight p, .cl-apply-head p { font-size: 16px; line-height: 1.55; }
  .cl-apply-head { padding: var(--m-sec) var(--m-pad) 24px; }
  .cl-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cl-bar::-webkit-scrollbar { display: none; }
  .cl-bar a { flex: none; font-size: 11px; }
  .cl-panel { display: block; height: auto; min-height: 0; }
  .cl-left, .cl-right { width: 100%; position: relative; inset: auto; }
  .cl-slot-panel { height: auto; aspect-ratio: 16 / 9; }
  .cl-id { padding: 22px var(--m-pad); }
  .cl-id h2, .cl-id h3 { font-size: clamp(30px, 8.4vw, 36px); line-height: 1; letter-spacing: -.045em; }
  .cl-main, .cl-foot { padding-left: var(--m-pad); padding-right: var(--m-pad); }
  .cl-main p, .cl-foot p, .cl-foot li { font-size: 15px; line-height: 1.5; }
  .cl-beyond-grid { display: block; padding: var(--m-sec) var(--m-pad); }
  .cl-beyond h2 { font-size: clamp(30px, 8.6vw, 38px); line-height: 1.02; letter-spacing: -.045em; }
  .cl-beyond-close { font-size: 16px; line-height: 1.5; }
  .cl-slot-beyond { height: 320px; margin-top: 28px; }

  /* ---------- CONTACT ---------- */
  .ct { padding: calc(var(--v9-head) + 28px) var(--m-pad) var(--m-sec); min-height: 0; }
  .ct h1 { font-size: clamp(34px, 10vw, 44px); line-height: 1; letter-spacing: -.05em; }
  .ct-intro { font-size: 16px; line-height: 1.55; }
  .ct-form { padding: 18px; }
  .ct-form input, .ct-form select, .ct-form textarea { font-size: 16px; }
  .ct-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .ct-head, .ct-form legend, .ct-form label b { font-size: var(--m-label); }

  /* ---------- NOTES ---------- */
  .nt { padding: calc(var(--v9-head) + 28px) var(--m-pad) var(--m-sec); }
  .nt h1 { font-size: clamp(38px, 11vw, 48px); line-height: 1; letter-spacing: -.05em; }
  .nt-intro { font-size: 16px; line-height: 1.55; }
  .nt-grid { grid-template-columns: 1fr; gap: 12px; }
  .nt-card h2 { font-size: 24px; line-height: 1.1; }
  .nt-card p { font-size: 15px; line-height: 1.5; }
  .nt-chip { font-size: 11px; }


  /* dense cards and other places that set their own vw-based sizes */
  .cp-cards .cp-card h4, .cp-cards.is-dense .cp-card h4 { font-size: 17px !important; line-height: 1.25 !important; margin: 0 0 6px !important; }
  .cp-cards .cp-card p, .cp-cards.is-dense .cp-card p { font-size: 15px !important; line-height: 1.5 !important; }
  .cp-cards .cp-card, .cp-cards.is-dense .cp-card { padding: 14px 16px 16px !important; }
  .cp-panel.no-visual .cp-panel-body h2 { font-size: clamp(30px, 8.6vw, 38px) !important; }
  .ed-step-open h3, .ed-step-open h4 { font-size: 20px !important; line-height: 1.25 !important; }
  .ed-step-open p { font-size: 16px !important; line-height: 1.55 !important; }
  .ed-ch h2, .ed-ch-l h2 { font-size: clamp(28px, 8vw, 34px) !important; }
  .ed-ch-r p, .ed-ch-r p.cp-reveal { font-size: 16px !important; line-height: 1.55 !important; }
  .ed-ch-r p.is-lead { font-size: 19px !important; line-height: 1.35 !important; }
  .ed-hero-lede p { font-size: 17px !important; line-height: 1.5 !important; }
  .ed-index a { font-size: 12px !important; }
  .ct-intro { font-size: 16px !important; }
  .nt-intro { font-size: 16px !important; }
  .nt-card p { font-size: 15px !important; }
  .nt-card h2 { font-size: 24px !important; }
  .ct h1 { font-size: clamp(34px, 10vw, 44px) !important; }
  .cl-hero { height: auto !important; }

  .cl-foot { grid-template-columns: 1fr !important; gap: 18px; padding-top: 8px; padding-bottom: 8px; }
  .cl-main { grid-template-columns: 1fr !important; }
  .cl-main h5, .cl-foot h5 { font-size: 11px !important; letter-spacing: .1em; margin-bottom: 6px; }
  .cl-id p { font-size: 11px !important; }
  .cl-right > .m-readmore { margin: 4px var(--m-pad) 24px; align-self: flex-start; }
  .cl-panel { border-bottom: 1px solid rgba(13,16,13,.12); }

  .cl-lede, .cl-id .cl-lede, .cl-id p.cl-lede { font-size: 15px !important; line-height: 1.5 !important; }

  /* ---------- Read more (script adds the toggle) ---------- */
  .m-clamp:not(.m-unclamp) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
  .m-more { display: none !important; }
  .m-open > .m-more { display: block !important; }
  .m-readmore {
    display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 0; padding: 12px 0; min-height: 44px;
    border: 0; background: none; color: inherit; font: 650 11px/1 var(--mono, ui-monospace, monospace);
    letter-spacing: .09em; text-transform: uppercase; cursor: pointer; border-bottom: 1px solid currentColor; opacity: .9;
  }
  .m-readmore::after { content: "+"; font-size: 14px; line-height: 1; }
  .m-open > .m-readmore::after { content: "\2212"; }

  /* ---------- FOOTER ---------- */
  .v9-footer { height: auto !important; min-height: 0 !important; padding-bottom: 150px !important; }
  .v9-footer .halftone-footer-top { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding: 40px var(--m-pad) 0; }
  .v9-footer .footer-studio { grid-column: 1 / -1; }
  .v9-footer .footer-studio p { font-size: 22px; line-height: 1.22; margin-top: 20px; }
  .v9-footer nav { gap: 4px; }
  .v9-footer nav a { width: auto; padding: 6px 0; font-size: 11px; line-height: 1.4; }
  .v9-footer .halftone-footer-bar {
    position: relative; left: auto; right: auto; top: auto; margin: 32px var(--m-pad) 0; gap: 12px; flex-wrap: wrap;
  }
  .v9-footer .halftone-canvas { top: auto; bottom: 0; height: 130px; }

  /* ---------- MOBILE MENU: Capabilities on top, opens to its pages. Fits one screen. ---------- */
  .mobile-menu:not([hidden]) {
    padding: 8px var(--m-pad) 20px !important; overflow-y: auto; overscroll-behavior: contain; justify-content: flex-start;
    inset: var(--v9-head, 66px) 0 0 0;
  }
  .mobile-nav-head { display: none; }
  .mobile-menu a, .mobile-group-toggle {
    display: flex; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 12px 0; border: 0;
    border-bottom: 1px solid rgba(255,255,255,.14); background: none; color: inherit;
    font: 400 clamp(20px, 6.2vw, 26px)/1.1 var(--sans, inherit) !important; letter-spacing: -.02em; text-align: left; cursor: pointer;
  }
  .mobile-menu a > span, .mobile-group-toggle > span { flex: none; width: 22px; font: 600 11px var(--mono, monospace); color: var(--v9-acid, #d5ff32); letter-spacing: .06em; }
  .mobile-group-toggle i { margin-left: auto; width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .25s; }
  .mobile-group-toggle[aria-expanded="true"] i { transform: translateY(2px) rotate(-135deg); }
  .mobile-sub { padding: 2px 0 6px 38px; border-bottom: 1px solid rgba(255,255,255,.14); }
  .mobile-sub[hidden] { display: none; }
  .mobile-sub a { min-height: 40px; padding: 8px 0; border-bottom: 0; font-size: clamp(16px, 4.8vw, 19px) !important; color: rgba(245,241,231,.85); }
  .mobile-sub a > span { width: 20px; font-size: 10px; }
  .mobile-primary { margin-top: 0; }
  .mobile-primary a { font-size: clamp(20px, 6.2vw, 26px) !important; }
  .mobile-menu .mobile-cta {
    margin-top: 18px; min-height: 52px; padding: 14px 16px; border: 1px solid rgba(245,241,231,.5);
    font: 650 11px/1.2 var(--mono, monospace) !important; letter-spacing: .08em; text-transform: uppercase; justify-content: space-between;
  }
  .mobile-menu .mobile-cta > span { order: 2; width: auto; color: inherit; }

  /* when Capabilities is open, tighten everything so the whole menu still fits one small screen */
  .mobile-menu:has(.mobile-group[data-open="true"]) a,
  .mobile-menu:has(.mobile-group[data-open="true"]) .mobile-group-toggle { min-height: 42px; padding: 6px 0; font-size: 20px !important; }
  .mobile-menu:has(.mobile-group[data-open="true"]) .mobile-group-toggle { min-height: 44px; }
  .mobile-menu:has(.mobile-group[data-open="true"]) .mobile-sub { padding: 0 0 4px 38px; }
  .mobile-menu:has(.mobile-group[data-open="true"]) .mobile-sub a { min-height: 32px; padding: 4px 0; font-size: 16px !important; }
  .mobile-menu:has(.mobile-group[data-open="true"]) .mobile-cta { min-height: 44px; margin-top: 10px; padding: 10px 16px; font-size: 11px !important; }
  .mobile-menu:has(.mobile-group[data-open="true"]) { padding-top: 4px !important; padding-bottom: 12px !important; }
}

@media (max-width: 380px) {
  .home-hero-copy h1 { font-size: 40px; }
  .cp-hero h1 { font-size: 30px; }
}
