/* ============ SERVICES — v6 (confirmed build, 2026-11-30) ============
   Transplanted from rebuild-samples/services-2026-11-30/index.html.
   Every class and custom property carries the svcx- prefix so nothing
   collides with the rest of the page (the scrapbook also uses .cards /
   .num / .wrap, and the page :root owns --bg / --ink). Correction
   (2026-12-01): the section has no canvas of its own — it sits ON
   the ONE shared silk canvas behind Featured Work + Services (the
   #silkWrap wrapper in index.html / smooth.css), and its background
   is a deep translucent dark so the silk glows faintly through the
   box. The row carries FOUR cards (Website Redesign was retired).
   The glow button's cursor tracking is scoped to this section's
   button only (see the script in index.html). */

@property --mx { syntax:'<percentage>'; inherits:true; initial-value:50%; }
@property --my { syntax:'<percentage>'; inherits:true; initial-value:-30%; }

.svcx-section{
  /* Translucent dim panel fill (Sami, 2026-12-01, restored): the
     deep rgba(10,10,11,.78) over the shared silk — the silk glows
     faintly through the panel across the whole Services stretch,
     which Sami confirmed was perfect as it was. Fix round 2's solid
     opaque #0A0A0B was an over-interpretation and is reverted; kept
     from that round ONLY the square corners, the panel running
     fully to its bottom end, and Studio's overlap on top of it
     (smooth.css), so no bright silk strip shows at the boundary.
     Final settlement (2026-12-01): the dim softened .78 -> .66 at
     Sami's order — the hardness eases and more of the silk
     breathes through. Nothing else about the fill changes. */
  --svcx-bg:rgba(10,10,11,.66);
  --svcx-ink:#F9F9F9;
  --svcx-accent:#E85002;
  /* Tiles (Sami, 2026-12-01, supersedes the glass pass): SOLID
     AMOLED dark fill, fully opaque, NO backdrop-filter at all — the
     glass blur over the moving silk was the Services lag source.
     The silk no longer shows through the tiles (accepted); it still
     streams around them and through the section box fill above. */
  --svcx-card-fill:#060607;
  /* Border brightened (Sami, 2026-12-01): the solid fill stays fully
     opaque, but the edge goes to .35 so the tiles still catch light
     and keep a hint of the old glass vibe. */
  --svcx-card-border:rgba(249,249,249,.35);
  --svcx-ease:cubic-bezier(.22,1,.36,1);
  --svcx-dur:.65s;
  --svcx-row-h:470px;
  --svcx-card-h:390px;
  position:relative;
  overflow:hidden;
  background:var(--svcx-bg);
  color:var(--svcx-ink);
  font-family:"Archivo",system-ui,sans-serif;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  /* Bottom padding +45px (final settlement, 2026-12-01): the area
     below the card row read too tight; the section now breathes
     before it ends. */
  padding:46px 24px calc(5vh + 45px);
}

/* ---------- Section shell: balanced, no giant voids ---------- */
.svcx-wrap{
  position:relative;
  z-index:1;
  max-width:1200px;
  width:100%;
  margin:0 auto;
  flex:1;
  display:flex;
  flex-direction:column;
}

/* ---------- Header ---------- */
.svcx-head{
  display:grid;
  grid-template-columns:1.5fr 1fr;
  gap:44px;
  align-items:start;
  /* Guarantees >=24px clearance between the headline block and the
     top of a fully expanded tile, even when the cards row's auto
     margin collapses to 0 on short viewports (Sami, 2026-12-01). */
  margin-bottom:24px;
}
.svcx-eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  font-size:11px;font-weight:600;
  letter-spacing:.22em;text-transform:uppercase;
  color:#BDBDBD;
}
.svcx-eyebrow::before{
  content:"";width:6px;height:6px;border-radius:50%;
  background:var(--svcx-accent);
}
/* Headline mirrors the approved hero's treatment exactly: Playfair
   Display 500, letter-spacing -.01em, optical sizing, .12px text-stroke,
   italic accent word. Sized up so the block fills the section's middle
   band instead of leaving a void above the tiles. */
.svcx-title{
  font-family:"Playfair Display",Georgia,serif;
  font-weight:500;
  font-optical-sizing:auto;
  font-size:clamp(44px,6.1vw,88px);
  line-height:1.05;
  letter-spacing:-.01em;
  -webkit-text-stroke:.12px currentColor;
  margin-top:20px;
}
.svcx-title .svcx-l2{display:block;color:var(--svcx-accent)}
.svcx-head-side{padding-top:10px;justify-self:end;max-width:340px}
.svcx-head-side p{
  color:#D9D9D9;
  font-size:16px;line-height:1.6;font-weight:500;
}
.svcx-head-side .svcx-glow-btn{margin-top:20px}

/* ---------- Glow button — v4: cursor-tracked glow, no drift ---------- */
.svcx-glow-btn{
  --mx:50%;
  --my:-30%;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:inline-flex;align-items:center;justify-content:center;
  padding:16px 33px;
  border-radius:999px;
  background:
    radial-gradient(120% 170% at 12% 115%,rgba(193,8,1,.36),rgba(193,8,1,0) 55%),
    #0A0503;
  border:1px solid rgba(255,255,255,.2);
  color:var(--svcx-ink);
  font-family:"Archivo",sans-serif;
  font-size:14.5px;font-weight:700;letter-spacing:.01em;
  text-decoration:none;
  cursor:pointer;
  transition:border-color .35s ease,box-shadow .35s ease,--mx .35s ease-out,--my .35s ease-out;
}
.svcx-glow-btn .svcx-gb-label{position:relative;z-index:3;pointer-events:none;white-space:nowrap}
.svcx-glow-btn .svcx-gb-glow{
  position:absolute;inset:0;z-index:1;pointer-events:none;
  background:radial-gradient(circle 155px at var(--mx) var(--my),rgba(255,122,26,.95) 0%,rgba(232,80,2,.45) 34%,rgba(232,80,2,0) 68%);
  opacity:.3;
  transition:opacity .35s ease;
}
.svcx-glow-btn .svcx-gb-dots{
  position:absolute;inset:0;z-index:2;pointer-events:none;
  background-image:radial-gradient(rgba(255,176,102,.6) 1.1px,transparent 1.6px);
  background-size:7px 7px;
  -webkit-mask-image:radial-gradient(circle at var(--mx) var(--my),#000 0 26%,transparent 62%);
  mask-image:radial-gradient(circle at var(--mx) var(--my),#000 0 26%,transparent 62%);
  opacity:.5;
  transition:opacity .35s ease;
}
.svcx-glow-btn::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(to top,rgba(241,96,1,.5),rgba(241,96,1,0) 55%);
  -webkit-mask-image:radial-gradient(130% 120% at var(--mx) 120%,#000 0 30%,transparent 72%);
  mask-image:radial-gradient(130% 120% at var(--mx) 120%,#000 0 30%,transparent 72%);
  opacity:0;
  transition:opacity .35s ease;
}
.svcx-glow-btn:hover,.svcx-glow-btn:focus-visible{
  border-color:rgba(241,96,1,.8);
  background:
    radial-gradient(circle 170px at var(--mx) var(--my),rgba(193,8,1,.35),rgba(193,8,1,0) 62%),
    radial-gradient(120% 170% at 12% 115%,rgba(193,8,1,.36),rgba(193,8,1,0) 55%),
    #0A0503;
  box-shadow:0 10px 34px rgba(232,80,2,.22);
  outline:none;
}
.svcx-glow-btn:hover .svcx-gb-glow,.svcx-glow-btn:focus-visible .svcx-gb-glow{opacity:1}
.svcx-glow-btn:hover .svcx-gb-dots,.svcx-glow-btn:focus-visible .svcx-gb-dots{opacity:1}
.svcx-glow-btn:hover::after,.svcx-glow-btn:focus-visible::after{opacity:1}

/* ---------- Card row: flex pop/stretch ---------- */
.svcx-cards{
  /* Content width of a fully expanded card. Flex base per card = padding+border (46px),
     so the grow pool is row - gaps - 4*46: (row - 48 - 184) * 1.75/4.75, minus 2px safety.
     Four cards since the 2026-12-01 lag fix (Website Redesign retired);
     the section is a full-width BOX (no side insets), so the row lives
     only inside the section's own 48px of horizontal padding — the
     formula's viewport term is 100vw - 48px. */
  --svcx-exp-content:calc((min(1200px, 100vw - 48px) - 232px) * 1.75 / 4.75 - 2px);
  margin-top:auto;
  display:flex;
  align-items:flex-end;
  gap:16px;
  height:var(--svcx-row-h);
}
.svcx-card{
  flex:1 1 0;
  min-width:0;
  height:var(--svcx-card-h);
  position:relative;
  z-index:1;
  padding:20px;
  display:flex;flex-direction:column;
  /* Aurora gradient fill (Sami, 2026-12-01, fix round 2): the flat
     AMOLED black read lifeless — every tile now carries a whisper of
     the brand palette: a faint orange aurora pool top-right and a
     deep-red pool bottom-left melting over the #060607 base. Still
     fully opaque, still NO backdrop-filter. The active tile's
     stronger liquid gradient below overrides this. */
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(241,96,1,.10), rgba(241,96,1,0) 55%),
    radial-gradient(130% 100% at 8% 112%, rgba(193,8,1,.13), rgba(193,8,1,0) 58%),
    var(--svcx-card-fill);
  transform:translateZ(0);
  will-change:flex-grow,height;
  border:1px solid var(--svcx-card-border);
  border-radius:20px;
  box-shadow:inset 0 1px 0 rgba(249,249,249,.14),inset 0 -18px 30px rgba(0,0,0,.18),0 18px 40px rgba(0,0,0,.32);
  cursor:pointer;
  overflow:hidden;
  transition:flex-grow var(--svcx-dur) var(--svcx-ease),height var(--svcx-dur) var(--svcx-ease),border-color var(--svcx-dur) var(--svcx-ease),box-shadow var(--svcx-dur) var(--svcx-ease),background-color var(--svcx-dur) var(--svcx-ease);
}
.svcx-card:focus-visible{outline:2px solid var(--svcx-accent);outline-offset:3px}
.svcx-card.active{
  flex-grow:1.75;
  height:var(--svcx-row-h);
  z-index:6;
  /* Liquid colour (Sami, 2026-12-01): layered brand-tinted radial
     pools over an opaque warm-dark base — a liquid sheen, no blur,
     no translucency. */
  background:
    radial-gradient(130% 90% at 18% -10%, rgba(241,96,1,.34), rgba(241,96,1,0) 55%),
    radial-gradient(120% 100% at 88% 112%, rgba(193,8,1,.40), rgba(193,8,1,0) 58%),
    radial-gradient(90% 70% at 62% 38%, rgba(232,80,2,.16), rgba(232,80,2,0) 65%),
    #0A0705;
  border-color:rgba(249,249,249,.45);
  box-shadow:inset 0 1px 0 rgba(249,249,249,.18),inset 0 -18px 30px rgba(0,0,0,.15),0 34px 70px rgba(0,0,0,.55);
}

/* Art zone (expanded state only) — monochrome halftone dots + icon watermark */
.svcx-card-art{
  position:absolute;top:0;left:0;right:0;
  height:34%;
  opacity:0;
  pointer-events:none;
  background-image:radial-gradient(rgba(249,249,249,.17) 1.2px,transparent 1.7px);
  background-size:9px 9px;
  -webkit-mask-image:linear-gradient(to bottom,#000 30%,transparent 96%);
  mask-image:linear-gradient(to bottom,#000 30%,transparent 96%);
  transition:opacity var(--svcx-dur) var(--svcx-ease);
}
.svcx-card-art .svcx-art-icon{
  position:absolute;top:14px;right:16px;
  width:108px;height:108px;
  color:rgba(249,249,249,.055);
}
.svcx-card-art .svcx-art-icon svg{display:block;width:100%;height:100%}
.svcx-card.active .svcx-card-art{opacity:1}

.svcx-num{
  position:relative;z-index:1;
  /* Ghost numbers (Sami, 2026-12-01): EXTENDED cut of the Archivo
     variable font (wdth axis at its 125 max, loaded in the page's
     Google Fonts URL) and roughly double the old size — the numbers
     are a design element now, not a label. Faint ghost colour kept.
     Width check: "01." at 86px extended ≈ 162px, inside even a
     shrunken sibling tile's ~204px content box; the active tile
     fades its number out, so nothing collides there. */
  font-size:86px;font-weight:600;line-height:1;
  font-stretch:125%;
  font-variation-settings:"wdth" 125;
  letter-spacing:-.01em;
  color:rgba(249,249,249,.13);
  transition:opacity var(--svcx-dur) var(--svcx-ease);
}
.svcx-card.active .svcx-num{opacity:0}

.svcx-card-body{
  margin-top:auto;position:relative;z-index:1;
  transition:transform var(--svcx-dur) var(--svcx-ease);
}
/* Expanded: content block rides ~28px higher */
.svcx-card.active .svcx-card-body{transform:translateY(-28px)}
.svcx-chip{
  display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;border-radius:13px;
  /* Icon chips refined (Sami, 2026-12-01, fix round 2): the glyph
     itself now carries the brand orange (was near-white #EDEDED,
     which read dull against the tile), the border is a softer,
     brighter orange-tinted line, and a faint warm glow wraps the
     chip — consistent across all four tiles. */
  background:rgba(232,80,2,.12);
  border:1px solid rgba(241,96,1,.45);
  color:#F16001;
  box-shadow:0 0 14px rgba(232,80,2,.14), inset 0 0 10px rgba(232,80,2,.07);
  transition:box-shadow var(--svcx-dur) var(--svcx-ease);
}
.svcx-chip svg{width:24px;height:24px;display:block}
.svcx-card.active .svcx-chip{box-shadow:0 0 26px rgba(232,80,2,.30), inset 0 0 10px rgba(232,80,2,.10)}
.svcx-card-body h3{
  margin-top:12px;
  font-family:"Archivo",sans-serif;
  font-size:19px;font-weight:700;line-height:1.25;letter-spacing:-.01em;
  color:var(--svcx-ink);
}
/* Description: the .svcx-desc box always lives at the card's own content width
   (strictly inside the card at every animation frame) and clips its inner
   text block, which is laid out ONCE at the final expanded width — the text
   never re-wraps, and no glyph can ever appear outside the card. */
.svcx-desc{
  margin-top:0;
  height:0;
  overflow:hidden;
  transition:height .55s var(--svcx-ease),margin-top .55s var(--svcx-ease);
}
.svcx-card.active .svcx-desc{height:var(--svcx-desc-h,120px);margin-top:10px}
.svcx-desc-in{
  display:block;
  width:var(--svcx-exp-content);
  color:#C9C9C9;
  font-size:15px;font-weight:500;line-height:1.55;
  opacity:0;transform:translateY(6px);
  transition:opacity .39s var(--svcx-ease),transform .39s var(--svcx-ease);
}
/* The text rides WITH the pop on the card's own easing curve: fade/slide
   starts at ~15% of the 650ms pop (100ms delay) and completes by ~75%
   (490ms) — no visible lag, no chop, one motion with the card. The clip
   layout above still guarantees no re-wrap and no spill at any frame. */
.svcx-card.active .svcx-desc-in{opacity:1;transform:none;transition-delay:.1s}

/* ---------- Mid widths: tighten, keep 4 across ---------- */
@media (max-width:1100px){
  .svcx-cards{gap:12px;--svcx-exp-content:calc((min(1200px, 100vw - 48px) - 188px) * 1.75 / 4.75 - 2px)}
  .svcx-card{padding:18px}
  .svcx-num{font-size:70px}
  .svcx-card-body h3{font-size:18px}
  .svcx-desc-in{font-size:14px}
}

/* ---------- Mobile: vertical stack, tap toggles ---------- */
@media (max-width:820px){
  .svcx-section{padding:52px 16px 85px;min-height:0}
  .svcx-head{grid-template-columns:1fr;gap:24px}
  .svcx-title{font-size:44px}
  .svcx-head-side{justify-self:start;padding-top:0}
  .svcx-cards{
    margin-top:44px;
    flex-direction:column;
    align-items:stretch;
    gap:14px;height:auto;
  }
  .svcx-card{
    flex:none;
    width:100%;
    height:auto;
    padding:20px;
    transition:border-color var(--svcx-dur) var(--svcx-ease),box-shadow var(--svcx-dur) var(--svcx-ease);
  }
  .svcx-num{font-size:68px}
  .svcx-card-art{
    position:relative;top:auto;left:auto;right:auto;
    height:0;margin:0;
    transition:height var(--svcx-dur) var(--svcx-ease),opacity var(--svcx-dur) var(--svcx-ease),margin var(--svcx-dur) var(--svcx-ease);
  }
  .svcx-card.active .svcx-card-art{height:150px;margin-bottom:18px}
  .svcx-card-art .svcx-art-icon{width:88px;height:88px;top:6px;right:10px}
  .svcx-card-body{margin-top:18px}
  .svcx-desc-in{width:auto}
}

/* ---------- Large desktops: proportional scale-up (fix round 2026-11-30) ----------
   v6 geometry is fixed pixels inside a 1200px column, so on a big monitor
   the section occupied a shrinking share of the screen and read small.
   At >=1600px the column widens to 1400px and type/tiles grow ~1.2x; the
   expanded-content formula follows the wider column so the description
   text is still laid out exactly once at its final width. */
@media (min-width:1600px){
  .svcx-wrap{max-width:1400px}
  .svcx-section{--svcx-row-h:570px;--svcx-card-h:475px}
  .svcx-cards{--svcx-exp-content:calc((min(1400px, 100vw - 48px) - 232px) * 1.75 / 4.75 - 2px)}
  .svcx-title{font-size:clamp(44px,6.2vw,102px)}
  .svcx-eyebrow{font-size:13px}
  .svcx-head-side{max-width:400px}
  .svcx-head-side p{font-size:19px}
  .svcx-glow-btn{padding:17px 36px;font-size:16.5px}
  .svcx-num{font-size:100px}
  .svcx-chip{width:50px;height:50px;border-radius:15px}
  .svcx-chip svg{width:27px;height:27px}
  .svcx-card-body h3{font-size:22px}
  .svcx-desc-in{font-size:17px}
}

@media (prefers-reduced-motion: reduce){
  .svcx-card,.svcx-card-art,.svcx-card-body,.svcx-desc,.svcx-desc-in,.svcx-num,.svcx-glow-btn,.svcx-glow-btn .svcx-gb-glow,.svcx-glow-btn .svcx-gb-dots,.svcx-glow-btn::after{transition:none !important}
}
