/* V7 homepage: "Our work speaks for itself." Ported from the prototype (src/css/11-home-c.css), default display only;
   review options A/C and the draft-case styles removed. */

#p-home-c{overflow-x:clip}
#p-home-c .c-head{padding-top:clamp(44px,4.4cqi,64px)}
#p-home-c .c-head__row{display:grid;grid-template-columns:auto minmax(0,1fr);gap:20px clamp(32px,4cqi,64px);align-items:center}
#p-home-c .c-head .sg-h2{margin:0;font-size:var(--h2);white-space:nowrap}
#p-home-c .c-use{position:relative;overflow:hidden;min-height:143px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);align-items:center;gap:8px clamp(16px,2cqi,28px);padding:16px clamp(96px,8cqi,124px) 16px clamp(18px,1.8cqi,26px);background:var(--surface-2);border:1px solid var(--line);border-radius:18px;min-width:0;text-decoration:none;color:var(--ink);cursor:pointer;transition:transform .3s var(--ease),border-color .3s ease,box-shadow .3s ease}
#p-home-c .c-use:hover,#p-home-c .c-use:focus-visible{transform:translateY(-3px);border-color:var(--ink);box-shadow:0 14px 28px -20px rgba(17,16,14,.4)}
#p-home-c .c-use p{margin:0;font:400 14.5px/1.4 var(--f);color:var(--ink-2);text-wrap:pretty}
#p-home-c .c-rot{display:grid;grid-column:2;grid-row:1/3;align-self:center}
#p-home-c .c-use p{grid-column:1;grid-row:1;align-self:start}
#p-home-c .c-rot__i{grid-area:1/1;display:flex;align-items:baseline;gap:4px 12px;flex-wrap:wrap;opacity:0;visibility:hidden;transition:opacity .6s var(--ease),visibility 0s linear .6s}
#p-home-c .c-rot__i.is-on{opacity:1;visibility:visible;transition:opacity .6s var(--ease)}
#p-home-c .c-rot b{font:500 clamp(28px,2.6cqi,38px)/1 var(--f);letter-spacing:-.045em;color:var(--heat);font-variant-numeric:tabular-nums}
#p-home-c .c-rot span span,#p-home-c .c-rot__i>span{font:500 13.5px/1.3 var(--f);color:var(--ink-2)}
#p-home-c .c-all{grid-column:1;grid-row:2;align-self:end;justify-self:start;font:500 19px/1.3 var(--f);letter-spacing:-.01em;color:var(--ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:6px;text-decoration-color:#B9B9BE;transition:text-decoration-color .2s ease}
#p-home-c .c-use:hover .c-all,#p-home-c .c-use:focus-visible .c-all{text-decoration-color:var(--orange)}
/* corner tile: a crop of the result on screen, grows to fill more of the card on hover */
#p-home-c .c-tile{position:absolute;z-index:1;top:0;right:0;bottom:0;width:clamp(84px,7cqi,108px);background:var(--surface);border-left:1px solid var(--line);overflow:hidden;transition:width .45s var(--ease)}
#p-home-c .c-use:hover .c-tile,#p-home-c .c-use:focus-visible .c-tile{width:100%;border-left-color:transparent}
#p-home-c .c-tile::after{content:"";position:absolute;inset:0;background:rgba(11,11,12,.55);opacity:0;transition:opacity .45s var(--ease)}
#p-home-c .c-use:hover .c-tile::after,#p-home-c .c-use:focus-visible .c-tile::after{opacity:1}
#p-home-c .c-use p,#p-home-c .c-rot,#p-home-c .c-all{position:relative;z-index:2;transition:opacity .25s var(--ease)}
#p-home-c .c-use:hover p,#p-home-c .c-use:hover .c-rot,#p-home-c .c-use:hover .c-all,#p-home-c .c-use:focus-visible p,#p-home-c .c-use:focus-visible .c-rot,#p-home-c .c-use:focus-visible .c-all{opacity:0}
#p-home-c .c-all2{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;font:500 22px/1.3 var(--f);letter-spacing:-.01em;color:#fff;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:7px;text-decoration-color:rgba(255,255,255,.7);opacity:0;pointer-events:none;transition:opacity .3s var(--ease) 0s}
#p-home-c .c-use:hover .c-all2,#p-home-c .c-use:focus-visible .c-all2{opacity:1;transition-delay:.18s}
#p-home-c .c-tile__i{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .6s var(--ease),transform 1.2s var(--ease)}
#p-home-c .c-tile__i.is-on{opacity:1}
#p-home-c .c-use:hover .c-tile__i{transform:scale(1.05)}

/* segmented switch */
#p-home-c .c-seg{position:relative;display:inline-flex;margin-top:20px;padding:4px;border:1px solid var(--line);border-radius:999px;background:var(--surface)}
#p-home-c .c-seg i{position:absolute;top:4px;bottom:4px;left:0;width:0;border-radius:999px;background:var(--ink);transition:transform .45s var(--ease),width .45s var(--ease)}
#p-home-c .c-chip{position:relative;z-index:1;border:0;background:none;border-radius:999px;padding:10px 18px;font:500 14.5px/1 var(--f);color:var(--mute);cursor:pointer;transition:color .3s ease;white-space:nowrap}
#p-home-c .c-chip:hover{color:var(--ink)}
#p-home-c .c-chip[aria-pressed="true"]{color:var(--bg)}
#p-home-c .c-hl{display:flex;flex-direction:column;align-items:flex-start}

/* the sticky stack: cards pin under the nav and the next slides over */
#p-home-c .c-stack{margin-top:clamp(24px,2.4cqi,34px)}
@container site (min-width: 601px){
  #p-home-c .c-stack{display:flex;flex-direction:column;gap:clamp(22px,2.2cqi,32px)}
}
#p-home-c .c-case{position:sticky;top:calc(var(--nav-top,0px) + 88px);display:grid;grid-template-columns:minmax(0,5fr) minmax(0,8fr);gap:clamp(28px,3.6cqi,52px);align-items:center;
  background:var(--bg);border:1px solid var(--line);border-radius:20px;padding:clamp(28px,2.7cqi,38px) clamp(28px,2.8cqi,40px);transform-origin:50% 0;will-change:transform;
  box-shadow:0 -12px 40px rgba(17,16,14,.07);--dim:0}
#p-home-c .c-case::after{content:"";position:absolute;inset:0;border-radius:inherit;background:#11100E;opacity:var(--dim);pointer-events:none}
#p-home-c .c-case[hidden]{display:none}
#p-home-c .c-mock{width:100%;padding-right:clamp(34px,5.4cqi,76px);padding-bottom:20px}
#p-home-c .c-mock--solo{padding-right:0}
#p-home-c .c-mock .sg-browser__bar{height:28px}
#p-home-c .c-mock .sg-browser__url{font-size:10.5px;padding:4px 8px}
#p-home-c .c-mock .sg-phone{width:clamp(78px,10.6cqi,150px);border-width:4px;border-radius:18px}
#p-home-c .c-mock .sg-phone__view{border-radius:14px}
#p-home-c .c-mock .sg-browser__view{aspect-ratio:16/12.4}

/* number cards: no site capture, the numbers are the visual */
#p-home-c .c-panel{display:grid;align-content:center;gap:18px;min-height:100%;padding:clamp(20px,2cqi,30px) 0}
#p-home-c .c-panel b{display:block;font:500 clamp(38px,3.8cqi,56px)/1 var(--f);letter-spacing:-.045em;font-variant-numeric:tabular-nums}
#p-home-c .c-panel span{display:block;margin-top:6px;font:400 14px/1.35 var(--f);color:var(--mute)}

#p-home-c .c-res{min-width:0}
#p-home-c .c-big{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 14px}
#p-home-c .c-big b{font:500 clamp(52px,5.2cqi,76px)/.9 var(--f);letter-spacing:-.06em;font-variant-numeric:tabular-nums;color:var(--heat)}
#p-home-c .c-big span{font:500 15.5px/1.3 var(--f);color:var(--ink-2)}
#p-home-c .c-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:20px}
#p-home-c .c-name{font:600 15px/1.2 var(--f);letter-spacing:-.005em}
#p-home-c .c-res .sg-h3{margin-top:12px;font-size:clamp(19px,1.7cqi,24px);line-height:1.15}
#p-home-c .c-stats{display:flex;flex-wrap:wrap;gap:8px clamp(18px,2.4cqi,36px);margin-top:22px}
#p-home-c .c-stats div{display:flex;align-items:baseline;gap:8px}
#p-home-c .c-stats b{font:500 22px/1 var(--f);letter-spacing:-.035em;font-variant-numeric:tabular-nums}
#p-home-c .c-stats span{font:400 13.5px/1.3 var(--f);color:var(--mute)}
#p-home-c .c-start{margin:14px 0 0;font:400 13.5px/1.4 var(--f);color:var(--ink-2)}
#p-home-c .c-facts{margin-block:24px 0}
#p-home-c .c-facts .sg-row{display:grid;grid-template-columns:5.6em minmax(0,1fr);gap:12px;padding-block:8px;font:400 14px/1.45 var(--f);color:var(--ink-2)}
#p-home-c .c-facts dt{font:500 11px/1.9 var(--m);letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
#p-home-c .c-facts dd{margin:0}
#p-home-c .c-ctas{margin-top:24px}
#p-home-c .c-tail{padding-bottom:clamp(20px,2cqi,28px)}
#p-home-c .c-full{display:none}  /* the phone's one clear action per open case (below) */

@container site (max-width: 960px){
  #p-home-c .c-head__row{grid-template-columns:minmax(0,1fr)}
  #p-home-c .c-head .sg-h2{white-space:normal}
  #p-home-c .c-case{grid-template-columns:minmax(0,1fr);gap:20px;align-items:start}
}
@container site (max-width: 600px){
  #p-home-c .c-use .c-rot,#p-home-c .c-use p,#p-home-c .c-use .c-all{grid-column:1;grid-row:auto}
  #p-home-c .c-use{min-height:0;grid-template-columns:minmax(0,1fr);gap:8px;padding:16px 84px 16px 16px;text-align:left;justify-items:start}
  #p-home-c .c-head{padding-top:var(--sec)}
  #p-home-c .c-head .sg-h2{text-align:center;text-wrap:balance}
  #p-home-c .c-stack{margin-top:28px}
  #p-home-c .c-tail{padding-bottom:var(--sec)}
  #p-home-c .c-case{position:static;padding:16px;border-radius:18px;box-shadow:none;will-change:auto;align-content:stretch}
  #p-home-c .c-case::after{display:none}
  #p-home-c .c-mock{padding-right:0;padding-bottom:0}
  #p-home-c .c-mock .sg-phone,#p-home-c .c-panel{display:none}
  #p-home-c .c-seg{display:flex;width:fit-content;max-width:100%;margin-inline:auto}
  #p-home-c .c-chip{flex:none;min-height:44px;padding:12px 14px;font-size:14px;line-height:1.15}
  #p-home-c .c-big b{font-size:64px}
  #p-home-c .c-facts .sg-row{grid-template-columns:5.6em minmax(0,1fr);font-size:14.5px}
  #p-home-c .c-ctas{margin-top:14px}
}
/* phone (Kriste 10-21/22): no hover on a finger, so the "more" link is plain and sits under the case list; the cases
   are a collapsed list: name + headline number per row, hairlines, a filled pixel square that turns orange when open. A tap opens
   a case in place, a tap anywhere on an open case closes it (never navigates); its "View full case study" button
   opens the case page. No boxes. The head's wrappers dissolve so the "more" link can move below the list. */
@container site (max-width: 600px){
  #p-home-c{display:flex;flex-direction:column}
  #p-home-c .c-head,#p-home-c .c-head__row{display:contents}
  #p-home-c .c-hl{order:1;padding:var(--sec) var(--gut) 0}
  #p-home-c .c-tail{order:2;padding-bottom:0}
  #p-home-c .c-use{order:3}
  #p-home-c .c-use,#p-home-c .c-use:hover,#p-home-c .c-use:focus-visible{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;gap:6px;min-height:0;
    padding:0;margin:28px var(--gut) var(--sec);background:none;border:0;border-radius:0;box-shadow:none;transform:none;text-align:center}
  #p-home-c .c-use p,#p-home-c .c-tile,#p-home-c .c-all2{display:none}
  #p-home-c .c-use .c-rot,#p-home-c .c-use .c-all,#p-home-c .c-use:hover .c-rot,#p-home-c .c-use:hover .c-all{grid-column:1;grid-row:auto;opacity:1}
  #p-home-c .c-rot__i{justify-content:center}
  #p-home-c .c-rot b{font-size:28px}
  #p-home-c .c-rot span span,#p-home-c .c-rot__i>span{font-size:14px}  /* phone meta floor */
  #p-home-c .c-all{font-size:16px;justify-self:center;text-decoration-color:var(--ink)}
  #p-home-c .c-stack{margin-top:24px;border-top:1px solid var(--line);display:flex;flex-direction:column}   /* flex so the set order (best result first) applies on phone too */
  #p-home-c .c-case{position:relative;top:auto;display:grid;grid-template-columns:minmax(0,1fr);gap:0;padding:18px 34px 18px 0;background:none;border:0;
    border-bottom:1px solid var(--line);border-radius:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
  #p-home-c .c-case::after{content:"";display:block;position:absolute;inset:auto;right:2px;top:23px;width:10px;height:10px;box-sizing:border-box;
    border:0;border-radius:0;background:#CDC5B8;opacity:1;transition:background-color .2s ease}  /* a filled pixel (Kriste 10-22), orange when open */
  #p-home-c .c-case.is-open::after{background:var(--orange)}
  #p-home-c .c-res{display:contents}
  #p-home-c .c-meta{order:1;margin:0}
  #p-home-c .c-meta .sg-tag{display:none}
  #p-home-c .c-big{order:2;margin-top:6px;gap:2px 10px}
  #p-home-c .c-big b{font-size:34px}
  #p-home-c .c-big span{font-size:14px}
  #p-home-c .c-res .sg-h3{order:3;margin-top:16px}
  #p-home-c .c-mock,#p-home-c .c-case .c-panel{order:4;margin-top:16px}
  #p-home-c .c-stats{order:5;margin-top:16px}
  #p-home-c .c-start{order:6}
  #p-home-c .c-facts{order:7;margin-top:14px}
  #p-home-c .c-ctas{order:8;margin-top:18px}
  #p-home-c .c-ctas .sg-link{display:none}
  #p-home-c .c-full{display:inline-flex;min-height:48px}
  #p-home-c .c-case.is-open .c-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-height:0;padding:0}
  #p-home-c .c-case.is-open .c-panel b{font-size:30px}
  #p-home-c .c-case:not(.is-open) .c-mock,#p-home-c .c-case:not(.is-open) .c-panel,#p-home-c .c-case:not(.is-open) .sg-h3,#p-home-c .c-case:not(.is-open) .c-stats,
  #p-home-c .c-case:not(.is-open) .c-start,#p-home-c .c-case:not(.is-open) .c-facts,#p-home-c .c-case:not(.is-open) .c-ctas{display:none}
  #p-home-c .c-case.is-open .c-meta .sg-tag{display:inline-flex}
  #p-home-c .c-case:focus-visible{outline:2px solid var(--orange);outline-offset:4px}
}
@media (prefers-reduced-motion: reduce){ #p-home-c .c-case{transition:none!important} }
/* V7 11-11 (Shaun: say agents deliver the results): one line on how the work runs today, under each heading variant */
#p-home-c .c-agents{margin:14px 0 0;font:400 clamp(16px,1.25cqi,18px)/1.45 var(--f);color:var(--ink-2);max-width:34em;text-wrap:pretty}
#p-home-c .c-hl .c-agents+.c-seg{margin-top:22px}
@container site (max-width: 600px){
  #p-home-c .c-hl{align-items:center;text-align:center}
  #p-home-c .c-agents{margin-inline:auto}
}

/* r40 G (Kriste 29107130): on phone each case is a full card (client, result, headline, screenshot, two stats, link),
   centred, one per view in a swipe row with pixel dots; nothing hides behind a tap */
@container site (max-width: 600px){
  #p-home-c #home-c-stack.sg-swipe{display:grid;grid-auto-flow:column;grid-auto-columns:100%;gap:calc(var(--gut) * 2);border-top:0;margin-top:28px;
    padding-inline:var(--gut);margin-inline:calc(var(--gut) * -1);overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-padding-inline:var(--gut)}
  #p-home-c #home-c-stack .c-case{padding:0;border:0;cursor:auto;text-align:center;scroll-snap-align:start;align-content:start;justify-items:center}
  #p-home-c #home-c-stack .c-case::after{display:none}
  #p-home-c #home-c-stack .c-meta{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px}
  #p-home-c #home-c-stack .c-meta .sg-tag{display:inline-flex}
  #p-home-c #home-c-stack .c-big{display:grid;justify-items:center;margin-top:10px}
  #p-home-c #home-c-stack .c-big b{font-size:44px}
  #p-home-c #home-c-stack .c-big span{font-size:15px}
  #p-home-c #home-c-stack .sg-h3{display:block;margin-top:14px;text-wrap:balance}
  #p-home-c #home-c-stack .c-mock{display:block;width:100%;margin-top:18px}
  #p-home-c #home-c-stack .c-mock .sg-browser__view{aspect-ratio:16/10}
  #p-home-c #home-c-stack.sg-swipe{align-items:start}
  #p-home-c #home-c-stack .c-panel{display:grid;width:100%;margin-top:18px}
  #p-home-c #home-c-stack .c-stats{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 28px;margin-top:18px}
  #p-home-c #home-c-stack .c-stats>div{display:grid;justify-items:center;text-align:center}
  #p-home-c #home-c-stack :is(.c-start,.c-facts){display:none}
  #p-home-c #home-c-stack .c-ctas{display:flex;justify-content:center;margin-top:16px}
  #p-home-c #home-c-stack .c-ctas .sg-link{display:inline-flex;align-items:center;min-height:44px}
  #p-home-c #home-c-stack .c-full{display:none}
}

/* WP theme leak guard (main-home-v3.css loads first: a:hover recolours links and drops their underline, svg is boxed at 1em,
   the reset strips bold/italic). Zero-ID specificity so every prototype rule still wins. */
:where(#p-home-c) a.sg-link:hover{color:var(--ink);text-decoration-line:underline}
:where(#p-home-c) a.sg-btn:hover{text-decoration:none}
:where(#p-home-c) a.sg-btn--line:hover{color:var(--ink)}
:where(#p-home-c) svg{width:auto;height:auto;display:inline;position:static}
:where(#p-home-c) b{font-weight:bolder}

/* Spanish: the longer heading took the row's width and squeezed the case-study card; cap it near the English width */
@container site (min-width: 961px){ html[lang^="es"] #p-home-c .c-head__row{grid-template-columns:minmax(0,640px) minmax(0,1fr)} html[lang^="es"] #p-home-c .c-hl h2{text-wrap:balance} }
