/* TrinEst Advisory v0.4 - shared presentation and interaction rules.
   Layout-specific styles remain in their templates. Typography is in typography.css. */
:root {
  --dark: #292a2d; --ink: #292a2d; --ink-2: #54565c;
  --blue: #0b6bcb; --blue-l: #66aff9; --blue-m: #2874c7;
  --ice: #d7e2ed; --line: #d7e2ed; --amber: #eaae31; --magenta: #ff008b;
  --on-dark-2: #c3c6cc; --link-hover: #174d85; --muted-on-white: #5f6a78;
  --motion-sweep: .35s; --motion-arrow: .3s; --motion-image: .5s;
  --arrow-travel: 6px; --card-scale: 1.04;
}
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--dark); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
/* Shared header, with the original larger light logo on the home hero. */
.trinest-header { font-size: medium; --base: var(--ink); --sw: var(--blue); }
.trinest-header .wrap { width: min(1240px,100% - 3em); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; padding: 1.4em 0; }
.trinest-header.is-home { position: absolute; inset: 0 0 auto; z-index: 10; --base: #fff; --sw: var(--blue-l); }
.trinest-header.is-home .wrap { height: 96px; gap: 2em; padding: 0; }
.trinest-header .logo { display: inline-flex; align-items: center; }
.trinest-header .logo svg { display: block; height: 40px; width: auto; }
.trinest-header.is-home .logo svg { height: 64px; }
.trinest-header nav ul { list-style: none; display: flex; gap: 2em; margin: 0; padding: 0; }
.trinest-header.is-home nav ul { gap: 1.75em; }
.trinest-header nav a { position: relative; font: var(--w-nav) 1em/1.6 var(--body); text-decoration: none; padding: .5em 0; }
.trinest-header nav a[aria-current="page"]::before { content: ""; position: absolute; left: -.9em; top: 50%; width: 7px; height: 11.6px; margin-top: -5.8px; background: var(--magenta); clip-path: polygon(0 0,50% 0,100% 50%,50% 100%,0 100%,50% 50%); }
.menubtn { display: none; align-items: center; gap: .5em; font: var(--w-ui) 1em var(--head); color: var(--base); background: none; border: 0; padding: .5em 0; cursor: pointer; }
.menubtn i { width: 8.4px; height: 14px; background: var(--magenta); clip-path: polygon(0 0,50% 0,100% 50%,50% 100%,0 100%,50% 50%); transform: rotate(90deg); }
@media (max-width: 720px) {
  .trinest-header nav ul { display: none; }
  .trinest-header .menubtn { display: inline-flex; }
  .trinest-header .logo svg, .trinest-header.is-home .logo svg { height: 44px; }
}
/* Shared mobile navigation: current-page chevron plus colour feedback. */
.mnav { font-size: medium; position: fixed; inset: 0; z-index: 80; background: #101113; color: #fff; display: none; flex-direction: column; padding: 1.4em 1.5em 2em; opacity: 0; overflow-y: auto; transition: opacity .3s; }
.mnav.open { display: flex; }
.mnav.in { opacity: 1; }
.mnav .top { display: flex; align-items: center; justify-content: space-between; }
.mnav .x { font: var(--w-ui) 1em var(--head); color: #fff; background: none; border: 0; padding: .5rem 0; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; }
.mnav .x i { width: 8.4px; height: 14px; background: var(--magenta); clip-path: polygon(0 0,50% 0,100% 50%,50% 100%,0 100%,50% 50%); transform: rotate(-90deg); }
.mnav ul { list-style: none; margin: auto 0; padding: 0; display: grid; gap: 1.2em; }
.mnav li a { font: var(--w-xl) clamp(2em,9vw,2.8em)/1.05 var(--head); letter-spacing: var(--ls-mn); color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .8rem; transition: color .2s; }
.mnav li a::before { content: ""; width: 9px; height: 15px; flex: 0 0 auto; background: var(--magenta); clip-path: polygon(0 0,50% 0,100% 50%,50% 100%,0 100%,50% 50%); opacity: 0; transition: opacity .2s; }
.mnav li a:is(:hover,:focus-visible,[aria-current="page"])::before { opacity: 1; }
.mnav li a:is(:hover,:focus-visible) { color: var(--blue-l); }
.mnav .bot { color: var(--on-dark-2); font-size: .95em; overflow-wrap: anywhere; }
.mnav .bot a { color: #fff; text-decoration: none; }
.mnav .bot a:is(:hover,:focus-visible), .mnav .x:is(:hover,:focus-visible) { color: var(--blue-l); }
body.locked { overflow: hidden; }
/* Shared footer. Identical structure and responsive spacing on every content page. */
footer.contact.v38 { padding: 6.5rem 0 2.5rem; background: radial-gradient(42% 38% at 88% 6%,rgba(102,175,249,.14) 0%,transparent 70%),radial-gradient(30% 34% at 6% 96%,rgba(255,0,139,.08) 0%,transparent 70%),linear-gradient(180deg,#232e3c 0%,var(--dark) 32%); color: #fff; }
footer.contact.v38 .wrap { display: block; }
.fcta { margin-bottom: 5.5rem; }
footer .fcta h2 { font-family: var(--head); font-weight: var(--w-xl); font-size: clamp(2rem,4vw,3.15rem); line-height: 1.12; letter-spacing: var(--ls-h1); max-width: min(100%,1120px); margin: 0; color: #fff; text-wrap: balance; }
.fcta h2 .cta-phrase { white-space: nowrap; }
.fcta h2 a { --sw: #fff; --base: var(--blue-l); display: inline-flex; align-items: center; gap: .35em; text-decoration: none; color: var(--base); padding-bottom: .02em; white-space: nowrap; background: none; }
.fcta h2 a .t { padding-bottom: .16em; margin-bottom: -.16em; }
.fcta h2 a .ar { font-size: .8em; }
.fcols4 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2.5rem 3rem; align-items: start; padding-top: 3rem; border-top: 1px solid rgba(255,255,255,.12); }
.fcols4 h4 { font: var(--w-lab) .85rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: #aeb9c6; margin: 0 0 1.2rem; }
.fcols4 a { --sw: var(--blue-l); --base: #fff; display: table; font: 400 .98rem/1.35 var(--body); text-decoration: none; padding-bottom: .12em; margin: 0 0 calc(.65rem - .12em); }
.fbot { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-top: 4.5rem; padding-top: 1.5rem; }
.flogo { display: inline-block; }
.fbot .flogo svg { height: 44px; width: auto; display: block; }
@media (max-width: 600px) {
  footer.contact.v38 { padding: 4.5rem 0 2rem; }
  footer .fcta { margin-bottom: 3.5rem; }
  footer .fcta h2 { font-size: clamp(1.75rem,8.4vw,2.2rem); text-wrap: wrap; }
  .fcols4 { grid-template-columns: 1fr; gap: 2rem; }
  .fbot { margin-top: 3rem; }
}
@media (max-width: 359px) { .fcta h2 .cta-phrase { white-space: normal; } }
/* Navigation and directional action links: the same brand-colour sweep.
   Fallback to ordinary colour when text clipping is unavailable. */
.btn { --base: var(--ink); --sw: var(--blue); }
.hero .btn, footer .btn { --base: #fff; --sw: var(--blue-l); }
.offer.v36 .svc h3 a { --base: var(--ink); --sw: var(--blue); }
.wl, .back, .cvbtn, .cv .dl { --base: var(--blue-m); --sw: var(--link-hover); }
.kleft a.big { --base: var(--ink); --sw: var(--blue-m); }
:is(.trinest-header nav a,.fcols4 a,.fcta h2 a .t,.btn:not(.home-action),.offer.v36 .svc h3 a,.wl,.back,.cvbtn,.cv .dl,.kleft a.big) {
  color: var(--base); background: none; text-decoration: none; transition: color var(--motion-sweep);
}
:is(.trinest-header nav a,.fcols4 a,.btn:not(.home-action),.offer.v36 .svc h3 a,.wl,.back,.cvbtn,.cv .dl,.kleft a.big):is(:hover,:focus-visible),
.trinest-header.trinest-header nav a[aria-current="page"], .fcta h2 a:is(:hover,:focus-visible) .t { color: var(--sw); }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  :is(.trinest-header nav a,.fcols4 a,.fcta h2 a .t,.btn:not(.home-action),.offer.v36 .svc h3 a,.wl,.back,.cvbtn,.cv .dl,.kleft a.big) {
    background-image: linear-gradient(115deg,var(--sw) 50%,var(--base) 50.5%); background-size: 260% 100%; background-position: 100% 0;
    -webkit-background-clip: text; background-clip: text; color: transparent; transition: background-position var(--motion-sweep);
  }
  :is(.trinest-header nav a,.fcols4 a,.btn:not(.home-action),.offer.v36 .svc h3 a,.wl,.back,.cvbtn,.cv .dl,.kleft a.big):is(:hover,:focus-visible),
  .trinest-header.trinest-header nav a[aria-current="page"], .fcta h2 a:is(:hover,:focus-visible) .t { background-position: 0 0; color: transparent; }
}
/* Directional arrows are separate visual elements: never underlined. */
:is(.btn,.wl,.back,.cvbtn,.cv .dl,.fcta h2 a) .ar { display: inline-block; color: var(--base); -webkit-text-fill-color: currentColor; flex-shrink: 0; text-decoration: none; transition: color var(--motion-sweep),transform var(--motion-arrow); }
:is(.btn,.wl,.cvbtn,.cv .dl,.fcta h2 a):is(:hover,:focus-visible) .ar { color: var(--sw); transform: translateX(var(--arrow-travel)); }
.back:is(:hover,:focus-visible) .ar { color: var(--sw); transform: translateX(calc(-1 * var(--arrow-travel))); }
/* Text links: visible underline for running prose, no underline for standalone reference links. */
.prose a, .cmain .note a, .req-block .small a { color: var(--blue-m); text-decoration: underline; text-decoration-thickness: .075em; text-underline-offset: .15em; text-decoration-skip-ink: auto; overflow-wrap: anywhere; transition: color .2s; }
.prose a:is(:hover,:focus-visible), .cmain .note a:is(:hover,:focus-visible), .req-block .small a:is(:hover,:focus-visible) { color: var(--link-hover); }
.pmeta a { color: inherit; border-bottom: 1.5px solid var(--blue-l); text-decoration: none; }
.pmeta a:is(:hover,:focus-visible) { color: var(--link-hover); border-color: var(--link-hover); }
.prose .matlist a, .mats a { display: inline-flex; align-items: center; gap: .6rem; font-weight: var(--w-ui); color: var(--blue-m); text-decoration: none; transition: color .2s; }
.prose .matlist a:is(:hover,:focus-visible), .mats a:is(:hover,:focus-visible) { color: var(--link-hover); text-decoration: none; }
.prose .matlist a::after, .mats a .ar { flex: 0 0 auto; display: inline-block; text-decoration: none; transition: transform var(--motion-arrow); }
.prose .matlist a:is(:hover,:focus-visible)::after, .mats a:is(:hover,:focus-visible) .ar { transform: translateX(var(--arrow-travel)); }
/* Contact details: clear blue links with uniform feedback. */
.ml, .people a { color: var(--blue-m); text-decoration: none; transition: color .2s; }
.ml:is(:hover,:focus-visible), .people a:is(:hover,:focus-visible) { color: var(--link-hover); }
/* Only real links get card feedback. The original asymmetric layout stays intact. */
.work img { transition: transform var(--motion-image) cubic-bezier(.2,.7,.2,1); }
.work h3 { font-weight: var(--w-project); transition: color .2s; }
.work .go .ar { transition: transform var(--motion-arrow); }
a.work:is(:hover,:focus-visible) img { transform: scale(var(--card-scale)); }
a.work:is(:hover,:focus-visible) h3 { color: var(--blue); }
a.work:is(:hover,:focus-visible) .go .ar { transform: translateX(var(--arrow-travel)); }
article.work:hover img { transform: none; }
article.work:hover h3 { color: inherit; }
article.work:hover .go .ar { transform: none; }
article.work { cursor: auto; }
.cap .yr { color: var(--muted-on-white); }
.fb:focus-visible { color: var(--blue-m); }
.morebtn:focus-visible { border-color: var(--blue); background: var(--blue); color: #fff; }
/* Respect motion preferences, including focus-triggered interactions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  :is(.trinest-header nav a,.fcols4 a,.fcta h2 a .t,.btn,.offer.v36 .svc h3 a,.wl,.back,.cvbtn,.cv .dl,.kleft a.big,.mnav,.mnav li a,.work img,.work h3,.work .go .ar,.mats a,.prose .matlist a,.morebtn,.fb) { transition: none !important; }
  :is(.btn,.wl,.back,.cvbtn,.cv .dl,.fcta h2 a,.mats a,.work .go) .ar, .prose .matlist a::after { transform: none !important; transition: none !important; }
  .mnav li a::before { transition: none !important; }
  .work img { transform: none !important; }
  .morebtn .ch i { animation: none !important; }
}

/* v0.6 - photo credits: separate from headlines and link effects, no space if empty. */
.photo-credit { display:block; margin:.4rem 0 0; color:var(--muted-on-white); font:400 .78rem/1.45 var(--body); text-align:left; overflow-wrap:anywhere; letter-spacing:0; }
/* v0.6.1: compact accessible pause/play control on the current-work photo. */
.trinest-dynamic-stage .stage-pause {
  position:absolute; top:.75rem; right:.75rem; z-index:3;
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; box-sizing:border-box; padding:0;
  border:1px solid rgba(255,255,255,.55); border-radius:50%;
  background:rgba(41,42,45,.78); color:#fff; cursor:pointer;
  transition:background-color .2s ease;
}
.trinest-dynamic-stage .stage-pause:is(:hover,:focus-visible) { background:#292a2d; }
.trinest-dynamic-stage .stage-pause:focus-visible { outline:2px solid #fff; outline-offset:3px; box-shadow:0 0 0 6px #292a2d; border-radius:50%; }
.trinest-dynamic-stage .stage-pause[hidden],
.trinest-dynamic-stage .stage-pause[data-paused="false"] .stage-play-icon,
.trinest-dynamic-stage .stage-pause[data-paused="true"] .stage-pause-icon { display:none; }
@media (prefers-reduced-motion:reduce) { .trinest-dynamic-stage .stage-pause { transition:none; } }

/* Editable copy: keep long words and labels within the available width. */
.hero h1, .hero .sub, .offer.v36 .svc h3, .offer.v36 .svc p, footer .fcta h2 { overflow-wrap: anywhere; }
.hero .btn, .offer.v36 .foot .btn, .cases.stage .foot .btn, .fcta h2 a { max-width: 100%; }
@media (max-width: 600px) { .hero .btn, .offer.v36 .foot .btn, .cases.stage .foot .btn, .fcta h2 a { white-space: normal; overflow-wrap: anywhere; } }

/* v0.10: allow descenders and the @ glyph to extend fully within the text-clip box.
   Keep the established colour sweep. Wrap only when the contact text cannot fit. */
.kleft a.big { line-height:1.28; padding-block:.06em .12em; white-space:normal; overflow-wrap:anywhere; max-width:100%; }
.kright .req dd, .head h1, .head .sub { overflow-wrap:anywhere; }
@media (max-width:480px) { .req div { grid-template-columns:minmax(0,6.8rem) minmax(0,1fr); } }

/* v0.14.0: clip the colour sweep to the home CTA label, never to its moving arrow.
   As with the footer CTA, the arrow has its own colour and transform. */
.btn.home-action { background: none; color: var(--base); transition: none; }
.btn.home-action:is(:hover,:focus-visible) { color: var(--sw); background: none; }
.btn.home-action .t { min-width: 0; color: var(--base); transition: color var(--motion-sweep); }
.btn.home-action:is(:hover,:focus-visible) .t { color: var(--sw); }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .btn.home-action .t {
    background-image: linear-gradient(115deg,var(--sw) 50%,var(--base) 50.5%);
    background-size: 260% 100%; background-position: 100% 0;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    transition: background-position var(--motion-sweep);
  }
  .btn.home-action:is(:hover,:focus-visible) .t { background-position: 0 0; color: transparent; }
}
@media (prefers-reduced-motion: reduce) { .btn.home-action .t { transition: none !important; } }
