/* United Legal — round 3, module "philosophy" (DESIGN-SPEC §9).
 * Loads after refine.css / template.css (and after identity.css, whose .ul-philosophy rules it overrides).
 * Tokens come from r3-system.css; every var() carries a literal fallback so the module stands alone.
 * The SVG attributes in the markup ARE the final state of the animation: with no JS, no GSAP or
 * prefers-reduced-motion the section renders complete and static. philosophy.js only moves things
 * away from that state and back (transform / opacity / clip-rect attr / stroke-dashoffset).
 */

/* ---- 1. Plate (Tier A, light) ------------------------------------------------------------- */
.sec.sec-philosophy{
  position:relative;
  padding:0 var(--gutter-a,10px);
  margin:var(--stack,10px) 0 0;
  scroll-margin-top:var(--anchor-offset,calc(var(--header-height,117px) + 24px));
}
.sec-philosophy + .sec-how{ padding-top:var(--stack,10px); }   /* adjacent plates meet with the 10 px frame (§3.4) */

.sec-philosophy .sec__inner.phil{
  position:relative; isolation:isolate;
  width:auto; max-width:1420px; margin:0 auto;
  padding:var(--sec-open,96px) 110px;                       /* 1420 − 220 = 1200 content box (Tier C) */
  border-radius:var(--panel-r,33px);
  background:var(--g-wash,linear-gradient(180deg,rgba(12,29,85,.035) 0%,rgba(12,29,85,0) 100%));
  border:var(--hair-light,1px solid rgba(12,29,85,.10));
  box-shadow:var(--rim-light,inset 0 1px 0 rgba(255,255,255,.90));
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,560px); gap:60px; align-items:center;
}
/* layered light on the plate: key light upper-right, fill light lower-left (never animated) */
.sec-philosophy .phil::before{
  content:""; position:absolute; inset:0; z-index:-1; border-radius:inherit; pointer-events:none;
  background:
    radial-gradient(ellipse 48% 58% at 80% 38%,rgba(79,95,147,.11) 0%,rgba(79,95,147,0) 70%),
    radial-gradient(ellipse 42% 50% at 6% 100%,rgba(204,225,246,.26) 0%,rgba(204,225,246,0) 70%);
}

/* ---- 2. Copy column ----------------------------------------------------------------------- */
.sec-philosophy .phil__copy{ position:relative; max-width:580px; min-width:0; color:#0C1D55; }
.sec-philosophy .phil__copy > *{ margin:0; }

.sec-philosophy .phil__copy .eyebrow{
  position:relative; display:block;
  font:600 18px/1 var(--f-primary); letter-spacing:.08em; text-transform:uppercase; color:#254983;
  padding:0 0 10px; margin:0 0 12px;
}
.sec-philosophy .phil__copy .eyebrow::after{          /* 24 px hairline under the eyebrow (§3.5) */
  content:""; position:absolute; inset-inline-start:0; bottom:0; width:24px; height:1px; background:rgba(12,29,85,.18);
}

.sec-philosophy .phil__copy h2{
  font:600 clamp(40px,4.2vw,60px)/1.08 var(--f-primary); color:#0C1D55; letter-spacing:-.005em;
  margin:0; text-wrap:balance; overflow-wrap:anywhere;
}
.sec-philosophy .phil__copy h2 .phil__l1,
.sec-philosophy .phil__copy h2 .phil__l2{ display:block; color:inherit; }
.sec-philosophy .phil__copy h2 .phil__l2{
  color:var(--bp-600,#3A4C80);
  /* dimensional face: a lit top edge and a one-step base in the light token (--bp-400) */
  text-shadow:0 1px 0 rgba(255,255,255,.85),0 2px 0 rgba(79,95,147,.22);
}
.sec-philosophy .phil__copy h2::after{                 /* three yellow dots, as on the practice heading */
  content:"\2022\00a0\2022\00a0\2022"; display:block; color:#F9E900; font-size:22px; line-height:1;
  margin-top:8px; letter-spacing:.02em; text-shadow:none; opacity:var(--phil-dots,1);
}
/* SplitText line masks: pad the clip so descenders are never cut while a line rises */
.sec-philosophy .phil__copy h2 .phil__mask{ padding-bottom:.14em; margin-bottom:-.14em; }

.sec-philosophy .phil__copy .phil__lead{ font:500 20px/1.5 var(--f-text); color:#0C1D55; margin-top:40px; }
.sec-philosophy .phil__copy .phil__body{ font:400 16px/1.65 var(--f-text); color:var(--ink-2,#3B4660); margin-top:18px; }
.sec-philosophy .phil__copy .phil__close{ font:500 16px/1.65 var(--f-text); color:#0C1D55; margin-top:18px; }

.sec-philosophy .phil__copy .btn{                      /* = existing yellow pill, 52 tall */
  display:inline-flex; align-items:center; justify-content:center;
  margin-top:28px; min-height:52px; padding:14px 29px 16px;
  font:600 18px/18px var(--f-primary); text-transform:uppercase; letter-spacing:.01em; white-space:nowrap;
  border-radius:99px; border:2px solid #F9E900; background:#F9E900; color:#0C1D55; text-decoration:none;
}
.sec-philosophy .phil__copy .btn:focus-visible{ outline:3px solid #0072C7; outline-offset:3px; }

/* ---- 3. Stage (the mark as structure) ----------------------------------------------------- */
.sec-philosophy .phil__stage{
  position:relative; width:100%; max-width:560px; aspect-ratio:1 / 1; justify-self:end; direction:ltr;
  isolation:isolate;
}
.sec-philosophy .phil__stage::before{                  /* key light behind the mark (--bp-400, static) */
  content:""; position:absolute; inset:-6%; z-index:-1; pointer-events:none; border-radius:50%;
  /* The key light, rgba(79,95,147) .16 > .06 at 38% > 0 at 66%, laid over the plate's own tone (#edf1f7), which is
     solid behind the mark and gone by 52%: both in ONE gradient (two stacked ones showed faint rings).
     Why the plate tone: the page's pale logo watermark is fixed to the screen and passes behind the stage while the
     page scrolls; now that the mark is a solid object, a faded copy of the same logo straight behind it read as a
     duplicate (on phones) or merged with the slab's dark wall (Persian, wide screens). The watermark itself is not
     changed: it only fades out softly as it nears the mark. To put it back as it was, use the old single line:
     radial-gradient(circle at 56% 46%,rgba(79,95,147,.16) 0%,rgba(79,95,147,.06) 38%,rgba(79,95,147,0) 66%) */
  background:radial-gradient(circle at 56% 46%,#d4dae7 0%,#d9dfea 13%,#dfe4ee 26%,rgba(222,227,237,.787) 32%,
    rgba(220,226,236,.566) 38%,rgba(213,219,232,.302) 45%,rgba(79,95,147,.03) 52%,rgba(79,95,147,0) 66%);
}
.sec-philosophy .phil-art{ display:block; width:100%; height:100%; overflow:visible; }

/* static styles of the SVG layers (ids are prefixed "phil-" to stay unique on the page).
   2026-11-14, "enamel slab": the mark is a thick badge in the three materials of the site's icons. The face keeps
   the logo's own navy and takes an enamel light, a clear-coat reflection, a silver-blue metal rim and a dark
   keyline, all clipped to the logo's outline, so the silhouette is the logo's to the pixel. Behind it: the back
   plate (#phil-plate2), the side walls (#phil-wall-*, rebuilt by philosophy.js while the plate moves) and a
   half-way line on the walls (#phil-plate1). The paint of all of these is written in the markup itself
   (Work/philosophy_mark.py), so the finished mark does not depend on this file; only the plan lines are styled here. */
.phil-art .phil-grid line{ stroke:rgba(12,29,85,.18); stroke-width:.6; vector-effect:non-scaling-stroke; fill:none; }
.phil-art #phil-ground{ stroke:#CCE1F6; stroke-width:.9; stroke-linecap:round; }
/* the drawn outline is measured in the drawing's own units: with a non-scaling stroke the browser measures the
   dashes on screen and half the line was there before the drawing began (desktop only) */
.phil-art #phil-outlineA{ fill:none; stroke:#0C1D55; stroke-width:.7; stroke-linejoin:round; }

/* will-change only while the 2.5 s timeline runs (philosophy.js toggles .is-animating) */
.phil__stage.is-animating #phil-mark,.phil__stage.is-animating #phil-body,.phil__stage.is-animating #phil-slabB,
.phil__stage.is-animating #phil-glint,
.phil__stage.is-animating #phil-plate1,.phil__stage.is-animating #phil-plate2,
.phil__stage.is-animating .phil-grid line{ will-change:transform; }

/* optional 44 px replay control; hidden until philosophy.js confirms motion is available */
.sec-philosophy .phil__replay{
  position:absolute; inset-inline-end:0; bottom:0; width:44px; height:44px; padding:0;
  display:grid; place-items:center; border-radius:50%; cursor:pointer;
  border:1px solid rgba(12,29,85,.18); background:rgba(255,255,255,.72); color:#0C1D55;
  transition:background .18s ease,border-color .18s ease;
}
.sec-philosophy .phil__replay[hidden]{ display:none; }
.sec-philosophy .phil__replay svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.sec-philosophy .phil__replay:hover{ background:#fff; border-color:rgba(12,29,85,.4); }
.sec-philosophy .phil__replay:focus-visible{ outline:3px solid #0072C7; outline-offset:3px; }
/* the stage is left-to-right on purpose (the logo is never mirrored), so "inline end" is always the right-hand
   side: on right-to-left pages the stage stands on the left and its outer corner is the bottom LEFT */
[dir=rtl] .sec-philosophy .phil__replay{ inset-inline-end:auto; inset-inline-start:0; }
/* wide screens: the stage is 560 px square and the artwork ends well inside it, so the control in the very corner
   stood about 80 px away from the picture. It now sits at the end of the ground line, just under it. */
@media (min-width:1025px){
  .sec-philosophy .phil__replay{ inset-inline-end:8%; bottom:10%; }
  [dir=rtl] .sec-philosophy .phil__replay{ inset-inline-end:auto; inset-inline-start:8%; }
}

/* ---- 4. Responsive --------------------------------------------------------------------------- */
/* narrow desktops: the stage column took its full 560 px first and left the text about 165 to 360 px (seven-line
   lead, one or two words per line at 1100). Here the stage takes 44% and the text the rest; 1280 px and wider are
   untouched. */
@media (min-width:1025px) and (max-width:1279px){
  .sec-philosophy .sec__inner.phil{ grid-template-columns:minmax(0,1fr) minmax(0,44%); gap:48px; }
}
@media (max-width:1024px){
  .sec-philosophy .sec__inner.phil{ grid-template-columns:minmax(0,1fr); gap:40px; padding:var(--sec-open,64px) 48px; border-radius:var(--panel-r,24px); justify-items:center; }
  .sec-philosophy .phil__stage{ order:-1; max-width:360px; justify-self:center; }
  .sec-philosophy .phil__copy{ max-width:640px; width:100%; }
}
@media (max-width:767px){
  .sec-philosophy .sec__inner.phil{ padding:var(--sec-open,48px) 16px; gap:32px; border-radius:var(--panel-r,18px); }
  .sec-philosophy .phil__stage{ max-width:240px; }
  .sec-philosophy .phil__replay{ inset-inline-end:-8px; bottom:-8px; }
  [dir=rtl] .sec-philosophy .phil__replay{ inset-inline-end:auto; inset-inline-start:-8px; }
  .sec-philosophy .phil__copy h2{ font-size:40px; }
  .sec-philosophy .phil__copy .phil__lead{ font-size:18px; margin-top:32px; }
  .sec-philosophy .phil__copy .btn{ display:flex; width:100%; max-width:320px; }
}

/* ---- 5. RTL / Persian ------------------------------------------------------------------------- */
[dir=rtl] .sec-philosophy .phil__copy{ text-align:start; }
[dir=rtl] .sec-philosophy .phil__copy .eyebrow{ letter-spacing:0; }
[dir=rtl] .sec-philosophy .phil__copy .btn{ text-transform:none; letter-spacing:0; font-weight:600; font-size:17px; }
html[lang=fa] .sec-philosophy .phil__copy h2{ font-weight:700; font-size:clamp(32px,3.6vw,46px); line-height:1.45; letter-spacing:0; }
html[lang=fa] .sec-philosophy .phil__copy h2 .phil__mask{ padding-bottom:.2em; margin-bottom:-.2em; }
html[lang=fa] .sec-philosophy .phil__copy .phil__lead{ font-size:19px; line-height:1.9; }
html[lang=fa] .sec-philosophy .phil__copy .phil__body,
html[lang=fa] .sec-philosophy .phil__copy .phil__close{ line-height:1.9; }
@media (max-width:767px){ html[lang=fa] .sec-philosophy .phil__copy h2{ font-size:30px; line-height:1.55; } }

/* ---- 6. Reduced motion, forced colours, print ------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  .sec-philosophy .phil__replay{ display:none !important; }
  .phil-art #phil-outlineA,.phil-art #phil-glint{ opacity:0; }
  .phil-art #phil-grid{ opacity:.35; }
  .sec-philosophy .phil__copy > *,.sec-philosophy .phil__copy h2 span{ opacity:1 !important; transform:none !important; }
}
@media (forced-colors:active){
  .sec-philosophy .phil::before,.sec-philosophy .phil__stage::before{ display:none; }
  .sec-philosophy .sec__inner.phil{ border:1px solid CanvasText; }
}
@media print{ .sec-philosophy .phil__replay{ display:none; } }
