/* Beyond Wealth — site upgrades: work cards, AI agents, 3D motion, compact bars */

/* ---------- Page transitions (Chrome, Edge, Safari 18+) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: bwvt-out .28s cubic-bezier(.2,.7,.2,1) both; }
::view-transition-new(root) { animation: bwvt-in .38s cubic-bezier(.2,.7,.2,1) both; }
@keyframes bwvt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes bwvt-in { from { opacity: 0; transform: translateY(10px) scale(1.01); } }

/* ---------- 3D buttons ---------- */
.btn { transform-style: preserve-3d; will-change: transform; }
@media (hover:hover) and (pointer:fine) {
  .btn:hover { transform: perspective(700px) translateY(-3px) rotateX(10deg); box-shadow: 0 14px 0 -6px rgba(0,0,0,.35), 0 22px 40px rgba(212,180,117,.22); }
}
.btn:active { transform: perspective(700px) translateY(1px) scale(.97) rotateX(0); transition-duration: .08s; }
.btn.solid::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 66%);
  transform: translateX(-120%); transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
@media (hover:hover) { .btn.solid:hover::after { transform: translateX(120%); } }

/* 3D tilt cards (driven by bw-plus.js) */
.tilt { transform-style: preserve-3d; transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s; }
.tilt.tilting { transition: transform .08s linear; }
.tilt .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--gx,50%) var(--gy,50%), rgba(255,240,210,.18), transparent 55%); }
.tilt.tilting .glare { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active, .tilt { transform: none !important; transition: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- Our work: real client cards ---------- */
.workgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; perspective: 1400px; }
.wcard { position: relative; display: block; border-radius: 24px; overflow: hidden; text-decoration: none; color: inherit;
  border: 1px solid var(--line-2, rgba(212,180,117,.38)); background: #0c0b08; box-shadow: 0 30px 70px rgba(0,0,0,.45); }
.wcard img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.wcard .wfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 16px;
  border-top: 1px solid var(--line, rgba(212,180,117,.16)); background: linear-gradient(180deg, #15120d, #0c0b08); }
.wcard .wfoot b { font: 600 16px var(--body, system-ui); color: var(--txt, #f7f2e8); }
.wcard .wfoot span { font-size: 14px; font-weight: 700; color: var(--gold, #d4b475); white-space: nowrap; }
.wcta { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px; border-radius: 22px; border: 1px solid var(--line-2, rgba(212,180,117,.38));
  background: radial-gradient(60% 140% at 100% 0%, rgba(212,180,117,.16), transparent 60%), #100e0a; }
.wcta p { margin: 0; color: var(--sub, #d2cabb); max-width: 560px; }
.wcta b { color: var(--txt, #f7f2e8); }
@media (max-width: 900px) {
  .workgrid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78vw, 340px);
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; margin-inline: -22px; padding-inline: 22px;
    scrollbar-width: none; }
  .workgrid::-webkit-scrollbar { display: none; }
  .wcard { scroll-snap-align: center; }
  .swipehint { display: block !important; }
}
.swipehint { display: none; margin-top: 10px; font-size: 13px; color: var(--mute, #9d9586); text-align: center; }

/* ---------- AI agents ---------- */
.agents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; perspective: 1400px; }
.agent { position: relative; border-radius: 24px; padding: 1px;
  background: linear-gradient(150deg, rgba(241,226,189,.32), rgba(212,180,117,.05) 35%, rgba(241,226,189,.18)); }
.agent > .in { position: relative; height: 100%; border-radius: 23px; padding: 24px 22px 20px; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, #15120d, #0c0b08); overflow: hidden; }
.agent .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: radial-gradient(circle at 30% 25%, #fff3d1, #d4b475 45%, #6b521c); box-shadow: 0 8px 22px rgba(212,180,117,.28), inset 0 1px 0 rgba(255,255,255,.6);
  transform: translateZ(30px); }
.agent h3 { font-size: 22px; margin: 2px 0 0; }
.agent .what { margin: 0; color: var(--sub, #d2cabb); font-size: 15px; }
.agent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 14.5px; color: var(--sub, #d2cabb); }
.agent li::before { content: "✓ "; color: var(--gold, #d4b475); }
.agent .row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.agent .pr { font-family: var(--display, Georgia, serif); font-size: 30px; line-height: 1; color: var(--gold-hi, #f1e2bd); }
.agent .pr small { font: 600 13px var(--body, system-ui); color: var(--mute, #9d9586); }
.agent .newtag { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #130f08; background: var(--gold, #d4b475); border-radius: 999px; padding: 5px 10px; }
.teamband { margin-top: 22px; }
.teamband .vs { font-size: 14px; color: var(--mute, #9d9586); }
.agentsfoot { margin-top: 16px; text-align: center; font-size: 14px; color: var(--mute, #9d9586); }
.agentsfoot a { color: var(--gold-hi, #f1e2bd); }
#ai-agents .agents, #free-tools .agents { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#ai-agents .agent h3 { font-size: 20px; }
@media (max-width: 1100px) { .agents, #ai-agents .agents, #free-tools .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .agents, #ai-agents .agents, #free-tools .agents { grid-template-columns: 1fr; } }

/* ---------- Compact mobile bottom bar + Boardroom button that never covers it ---------- */
@media (max-width: 1080px) {
  .mbar { gap: 8px; padding-top: 8px !important; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important; }
  .mbar .btn { min-height: 46px !important; font-size: 14.5px; padding: 10px 16px; }
  .mbar .btn.call { padding: 0 16px; }
  .bw-orb { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; right: 14px !important; }
}
.bw-orb { width: 50px !important; height: 50px !important; animation: none !important; }
.bw-orb span { font-size: 13px !important; font-weight: 700 !important; letter-spacing: .02em; }
@media (hover:hover) { .bw-orb:hover { transform: perspective(500px) translateY(-3px) rotateX(12deg); } }

/* ---------- Simple pages: top navigation ---------- */
.snav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.snav a { color: var(--muted, #b3aa96); text-decoration: none; font-weight: 600; }
.snav a:hover, .snav a[aria-current] { color: var(--gold, #d4af5f); }
@media (max-width: 760px) { .snav { display: none; } }

/* ---------- Homepage clean-up (Oct 2026) ---------- */
/* Services: show the 6 core services, reveal the rest on tap */
.svcs.short > :nth-child(n+7) { display: none !important; }
.svcmore-wrap { display: flex; justify-content: center; margin-top: 26px; }
/* Boardroom widget: keep the button, drop the speech bubble */
.bw-tip { display: none !important; }
/* AI band (replaces the full agent grid on the homepage) */
.aiband .in { align-items: center; }
.aiband ul { display: flex !important; flex-wrap: wrap; gap: 8px 10px; list-style: none; padding: 0; margin: 16px 0 0; }
.aiband ul li { border: 1px solid var(--line-2, rgba(212,180,117,.28)); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; color: var(--sub, #cfc6b1); }
.aiband ul li::before { content: none !important; }
.aiband .pr { white-space: nowrap; }
@media (max-width: 640px) { .aiband .pr { font-size: 46px !important; } }
/* Footer link columns */
.fmore { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin: 26px auto 8px; padding-top: 22px; border-top: 1px solid var(--line, rgba(255,255,255,.08)); font-size: 14px; }
.fmore b { display: block; color: var(--gold, #d4af5f); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.fmore a { display: block; color: var(--sub, #b3aa96); text-decoration: none; padding: 4px 0; line-height: 1.4; }
.fmore a:hover { color: var(--fg, #f4efe4); }
@media (max-width: 760px) { .fmore { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
