/* Coaching (1-on-1) in 3D -- see coaching3d.js. Scoped to body.c3d (the script sets it).
   The site sets no global box-sizing, so every 3D part sets its own. Nothing here is scroll-driven:
   parts settle once when they come into view (IntersectionObserver), so CSS transitions are safe. */

body.c3d #subjects, body.c3d #results, body.c3d #how, body.c3d #reviews, body.c3d #faq, body.c3d #book { position: relative; }

/* the 3D nodes wait for the script; the page's own year rows and review train are their data */
.cm3-orbit, .cm3-deck, .cm3-ring { display: none; }
.cm3-src { display: none !important; }

/* phone traps: nav-menus.js gives every div max-width:100% and .gp-fit to anything poking past the screen */
.cm3-orbit, .cm3-orbit *, .cm3-deck, .cm3-deck *, .cm3-ring, .cm3-ring * { box-sizing: border-box; }
.cm3-orbit div, .cm3-ring div, .cm3-ring .gp-fit, .cm3-ring.gp-fit, .cm3-deck .gp-fit { max-width: none !important; }

/* ---------- shared: the atom orbit ---------- */
body.c3d .cm3-orbit { display: block; position: absolute; z-index: 0; pointer-events: none; perspective: 900px;
  left: -16%; right: -16%; top: 50%; height: 0; }
.cm3-otilt { position: absolute; left: 0; right: 0; top: 0; height: 0; transform-style: preserve-3d; transform: rotateX(74deg) rotateZ(-16deg); }
.cm3-oring { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%;
  border: 1px solid rgba(236,196,95,.32); animation: cm3spin 28s linear infinite; }
.cm3-oring.two { left: 9%; right: 9%; border-color: rgba(127,183,196,.22); animation-duration: 41s; animation-direction: reverse; }
.cm3-oring i { position: absolute; left: 50%; top: -4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
  background: #f5d67e; box-shadow: 0 0 12px 3px rgba(236,196,95,.75); }
.cm3-oring.two i { background: #9fd0dc; box-shadow: 0 0 10px 2px rgba(127,183,196,.7); }
@keyframes cm3spin { to { transform: translateY(-50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cm3-oring { animation: none; } }

/* ---------- 1 · hero: the credentials as a glass tablet ---------- */
body.c3d .cm3-tcol { position: relative; perspective: 1300px; }
body.c3d .cm3-tab { position: relative; z-index: 1; transform-style: preserve-3d;
  transform: rotateY(calc(-13deg + var(--ry, 0deg))) rotateX(calc(5deg + var(--rx, 0deg))) !important;
  transition: transform .7s cubic-bezier(.22,.61,.36,1);
  background: linear-gradient(150deg, rgba(36,42,60,.96), rgba(14,18,30,.97) 60%, rgba(22,20,24,.97)) !important;
  border-color: rgba(236,196,95,.3) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 40px 80px -30px rgba(0,0,0,.85), 0 0 60px -10px rgba(236,196,95,.12); }
body.c3d .cm3-tab::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  transform: translateZ(-14px); background: linear-gradient(150deg, rgba(236,196,95,.28), rgba(120,90,30,.2));
  box-shadow: 0 0 0 1px rgba(236,196,95,.2); }
body.c3d .cm3-tab::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.07) 45%, transparent 60%); transform: translateZ(1px); }
body.c3d .cm3-tab > * { transform: translateZ(10px); }
body.c3d .cm3-tab > .cm3-stats { transform-style: preserve-3d; transform: translateZ(4px); }
body.c3d .cm3-stats > div { transform: translateZ(26px); background: rgba(7,10,18,.55); border: 1px solid rgba(236,196,95,.18);
  border-radius: 10px; padding: 10px 12px; box-shadow: 0 14px 22px -12px rgba(0,0,0,.8); }
body.c3d .cm3-stats > div > :first-child { text-shadow: 0 0 18px currentColor; }
@media (max-width: 760px) {
  body.c3d .cm3-tab { transform: rotateX(6deg) !important; }
  body.c3d .cm3-stats > div { padding: 8px 10px; }
}

/* ---------- 2 · three worlds as a triptych ---------- */
body.c3d .cm3-trip { position: relative; perspective: 1900px; perspective-origin: 50% 35%; transform-style: preserve-3d; }
body.c3d .cm3-trip::after { content: ''; position: absolute; left: 4%; right: 4%; bottom: -34px; height: 46px; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(120,90,30,.26), transparent 70%); }
body.c3d .cm3-trip > .gpsubj { position: relative; opacity: 1 !important;
  transition: transform 1.6s cubic-bezier(.2,.75,.2,1), box-shadow .5s ease, border-color .4s ease !important;
  box-shadow: 0 2px 0 rgba(138,108,31,.18), 0 30px 50px -30px rgba(36,29,18,.45); }
body.c3d .cm3-trip > .cm3-w0 { transform-origin: 100% 50%; transform: rotateY(64deg) !important; }
body.c3d .cm3-trip > .cm3-w1 { transform: translateZ(-60px) !important; }
body.c3d .cm3-trip > .cm3-w2 { transform-origin: 0 50%; transform: rotateY(-64deg) !important; }
body.c3d .cm3-trip.cm3-in > .cm3-w0 { transform: rotateY(21deg) !important; }
body.c3d .cm3-trip.cm3-in > .cm3-w1 { transform: translateZ(-14px) !important; }
body.c3d .cm3-trip.cm3-in > .cm3-w2 { transform: rotateY(-21deg) !important; }
body.c3d .cm3-trip.cm3-in > .gpsubj:hover { transition: transform .6s cubic-bezier(.22,.61,.36,1), box-shadow .5s ease !important;
  box-shadow: 0 2px 0 rgba(138,108,31,.25), 0 40px 60px -30px rgba(36,29,18,.5); }
body.c3d .cm3-trip.cm3-in > .cm3-w0:hover { transform: rotateY(7deg) translateZ(18px) !important; }
body.c3d .cm3-trip.cm3-in > .cm3-w1:hover { transform: translateZ(14px) !important; }
body.c3d .cm3-trip.cm3-in > .cm3-w2:hover { transform: rotateY(-7deg) translateZ(18px) !important; }
@media (max-width: 760px) {
  body.c3d .cm3-trip { perspective: 900px; }
  body.c3d .cm3-trip > .gpsubj, body.c3d .cm3-trip > .gpsubj:hover { transform-origin: 50% 100% !important; transform: rotateX(38deg) translateY(18px) !important; }
  body.c3d .cm3-trip > .gpsubj.cm3-in { transform: rotateX(0) !important; }
}

/* ---------- 3 · results: raised plaques ---------- */
body.c3d .cm3-medals { perspective: 1200px; perspective-origin: 50% 0; opacity: 1 !important; transform: none !important; }
body.c3d .cm3-medals > div { position: relative; overflow: hidden; transform-origin: 50% 100%;
  transform: rotateX(48deg) translateY(24px); opacity: .2;
  transition: transform 1.2s cubic-bezier(.2,.75,.2,1), opacity 1s ease, box-shadow .5s ease;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.015)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 0 rgba(236,196,95,.16), 0 26px 40px -24px rgba(0,0,0,.9); }
body.c3d .cm3-medals > div:nth-child(2) { transition-delay: .1s; } body.c3d .cm3-medals > div:nth-child(3) { transition-delay: .2s; }
body.c3d .cm3-medals.cm3-in > div { transform: rotateX(12deg); opacity: 1; }
body.c3d .cm3-medals.cm3-in > div:hover { transform: rotateX(0) translateY(-6px); transition-delay: 0s; }
body.c3d .cm3-medals > div > :first-child { text-shadow: 0 1px 0 rgba(0,0,0,.6), 0 2px 0 rgba(0,0,0,.4), 0 0 26px currentColor; }
body.c3d .cm3-medals > div::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,240,200,.1) 50%, transparent 65%); background-size: 260% 100%;
  background-position: 120% 0; animation: cm3sheen 7s ease-in-out infinite; }
@keyframes cm3sheen { 0%, 55% { background-position: 120% 0; } 85%, 100% { background-position: -40% 0; } }
@media (prefers-reduced-motion: reduce) { body.c3d .cm3-medals > div::after { animation: none; } }

/* ---------- 3 · the years as a deck of plates ---------- */
body.c3d .cm3-deck { display: grid; grid-template-columns: 150px 1fr; grid-template-rows: auto auto; gap: 14px 34px;
  padding: 30px 0 20px; border-top: 1px solid rgba(255,255,255,.09); margin-top: 18px; }
.cm3-rail { grid-row: 1 / 3; display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.cm3-rail button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; border: 0; cursor: pointer;
  background: transparent; padding: 9px 12px 9px 16px; border-left: 2px solid rgba(255,255,255,.1); color: rgba(242,236,221,.45);
  transition: color .3s ease, border-color .3s ease, background .3s ease; }
.cm3-rail button b { font: 400 24px/1 'Marcellus', serif; }
.cm3-rail button small { font: 700 10px/1 'Manrope', sans-serif; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.cm3-rail button:hover { color: rgba(242,236,221,.8); }
.cm3-rail button[aria-pressed="true"] { color: #ecc45f; border-left-color: #ecc45f; background: linear-gradient(90deg, rgba(236,196,95,.1), transparent); }
.cm3-stage { position: relative; perspective: 1400px; perspective-origin: 50% -30%; transform-style: preserve-3d; outline: none; touch-action: pan-y; }
.cm3-stage:focus-visible { box-shadow: 0 0 0 2px rgba(236,196,95,.5); border-radius: 18px; }
.cm3-plate { position: absolute; left: 0; right: 0; top: 0; cursor: pointer; border-radius: 16px; padding: 14px 30px 24px;
  background: linear-gradient(165deg, #151b2e, #0c1020 70%); border: 1px solid rgba(236,196,95,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 -1px 0 rgba(236,196,95,.18), 0 30px 50px -28px rgba(0,0,0,.95);
  transition: transform .75s cubic-bezier(.22,.7,.2,1), opacity .55s ease; will-change: transform, opacity; }
.cm3-plate::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: rgba(7,10,18,var(--dim, 0)); transition: background .6s ease; }
.cm3-plate.front { cursor: default; border-color: rgba(236,196,95,.34); }
.cm3-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08); }
.cm3-py { font: 400 28px/1.15 'Marcellus', serif; color: #ecc45f; }
.cm3-pn { font: 700 10.5px/1 'Manrope', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: rgba(242,236,221,.4); }
.cm3-plate ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 34px; }
.cm3-plate li { display: flex; gap: 11px; align-items: baseline; break-inside: avoid; margin-bottom: 11px;
  font: 400 14.5px/1.55 'Manrope', sans-serif; color: rgba(242,236,221,.84); }
.cm3-plate li > span:first-child { color: #ecc45f; flex: none; font-size: 12px; }
.cm3-dnav { grid-column: 2; display: flex; align-items: center; gap: 14px; justify-content: flex-end; }
.cm3-dnav button, .cm3-rnav > button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(236,196,95,.35);
  background: rgba(255,255,255,.03); color: #ecc45f; font: 400 22px/1 'Marcellus', serif; cursor: pointer; padding: 0 0 3px; }
.cm3-dnav button:hover, .cm3-rnav > button:hover { background: rgba(236,196,95,.14); }
.cm3-dcount { font: 700 11px/1 'Manrope', sans-serif; letter-spacing: .16em; color: rgba(242,236,221,.45); }
@media (max-width: 760px) {
  body.c3d .cm3-deck { grid-template-columns: 1fr; gap: 14px; }
  .cm3-rail { grid-row: auto; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 0; }
  .cm3-rail button { border-left: 0; border-bottom: 2px solid rgba(255,255,255,.1); padding: 7px 9px; }
  .cm3-rail button[aria-pressed="true"] { border-bottom-color: #ecc45f; background: rgba(236,196,95,.08); }
  .cm3-rail button b { font-size: 19px; } .cm3-rail button small { display: none; }
  .cm3-plate { padding: 12px 18px 16px; } .cm3-plate ul { columns: 1; } .cm3-py { font-size: 24px; }
  .cm3-dnav { grid-column: 1; justify-content: center; }
}

/* ---------- 4 · steps that rise ---------- */
body.c3d .cm3-stair { perspective: 1300px; perspective-origin: 50% 0; align-items: stretch; padding-top: 54px; }
body.c3d .cm3-stair > div { position: relative; transform-style: preserve-3d; transform-origin: 50% 100%;
  background: #fffdf7; border: 1px solid rgba(36,29,18,.1); border-radius: 14px; padding: 22px 20px 20px; opacity: 1 !important;
  transform: translateY(calc(var(--k) * -18px)) rotateX(58deg) !important;
  transition: transform 1.2s cubic-bezier(.2,.75,.2,1) calc(var(--k) * .12s), box-shadow .4s ease !important;
  box-shadow: 0 2px 0 rgba(138,108,31,.22), 0 5px 0 -1px rgba(36,29,18,.06), 0 26px 40px -24px rgba(36,29,18,.4); }
body.c3d .cm3-stair.cm3-in > div { transform: translateY(calc(var(--k) * -18px)) rotateX(9deg) !important; }
body.c3d .cm3-stair.cm3-in > div:hover { transform: translateY(calc(var(--k) * -18px - 6px)) rotateX(0) !important; transition-delay: 0s !important; }
body.c3d .cm3-num { transform: translateZ(22px); text-shadow: 1px 1px 0 rgba(36,29,18,.18), 2px 2px 0 rgba(36,29,18,.15), 3px 3px 0 rgba(36,29,18,.12),
  4px 4px 0 rgba(36,29,18,.09), 6px 10px 14px rgba(36,29,18,.2); }
@media (max-width: 760px) {
  body.c3d .cm3-stair { padding-top: 0; }
  body.c3d .cm3-stair > div, body.c3d .cm3-stair.cm3-in > div, body.c3d .cm3-stair.cm3-in > div:hover {
    transform: rotateX(6deg) !important; margin-left: calc(var(--k) * 10px); }
}

/* ---------- 4 · the portrait as a framed plate ---------- */
body.c3d .cm3-pgrid { perspective: 1200px; }
body.c3d .cm3-portrait { transform: rotateY(calc(13deg + var(--ry, 0deg))) rotateX(var(--rx, 0deg));
  transition: transform .7s cubic-bezier(.22,.61,.36,1);
  box-shadow: 16px 16px 0 -1px #fdf9ef, 16px 16px 0 0 rgba(138,108,31,.45), 0 40px 60px -30px rgba(36,29,18,.55); }
@media (max-width: 760px) { body.c3d .cm3-portrait { transform: rotateY(6deg); box-shadow: 10px 10px 0 -1px #fdf9ef, 10px 10px 0 0 rgba(138,108,31,.45), 0 30px 40px -24px rgba(36,29,18,.5); } }

/* ---------- 5 · reviews on a turning ring ---------- */
body.c3d .cm3-ring { display: block; }
.cm3-rmask { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); }
.cm3-rstage { position: relative; height: calc(var(--rh, 340px) + 50px); perspective: 1500px; perspective-origin: 50% 30%;
  overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.cm3-rstage:active { cursor: grabbing; }
.cm3-rwheel { position: absolute; left: 50%; top: 20px; width: 0; height: 0; transform-style: preserve-3d; }
.cm3-rc { position: absolute; left: calc(var(--rw, 340px) / -2); top: 0; width: var(--rw, 340px); height: var(--rh, 340px);
  border: 1px solid rgba(236,196,95,.2); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 30px 60px -30px rgba(0,0,0,.95); }
.cm3-rc > div:nth-child(2) { -webkit-user-select: text; user-select: text; }
.cm3-rnav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.cm3-rdots { display: flex; gap: 8px; }
.cm3-rdots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; cursor: pointer; background: rgba(242,236,221,.22);
  transition: background .3s ease, transform .3s ease; }
.cm3-rdots button[aria-pressed="true"] { background: #ecc45f; transform: scale(1.35); }
@media (max-width: 760px) {
  .cm3-rmask { -webkit-mask-image: none; mask-image: none; }
  .cm3-rstage { perspective: 1000px; }
  .cm3-rc { padding: 22px; }
  .cm3-rc > div:nth-child(2) { font-size: 16.5px !important; }
}

/* ---------- 6 · questions that fold open ---------- */
body.c3d .cm3-faq { align-items: start !important; }
body.c3d .cm3-faq > div { gap: 0 !important; padding: 20px 26px !important; perspective: 900px;
  transition: border-color .35s ease, background .35s ease, opacity .6s ease, transform .6s ease !important; }
body.c3d .cm3-faq > div.cm3-open { border-color: rgba(236,196,95,.32) !important; background: linear-gradient(160deg, rgba(236,196,95,.07), rgba(255,255,255,.02)) !important; }
body.c3d .cm3-q { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; outline: none; }
body.c3d .cm3-q:focus-visible { text-decoration: underline; text-decoration-color: #ecc45f; text-underline-offset: 5px; }
body.c3d .cm3-q::after { content: '+'; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(236,196,95,.4);
  color: #ecc45f; font: 400 18px/26px 'Manrope', sans-serif; text-align: center; transition: transform .45s ease, background .3s ease; }
body.c3d .cm3-open > .cm3-q::after { transform: rotate(45deg); background: rgba(236,196,95,.14); }
body.c3d .cm3-a { transform-origin: 50% 0; transform: rotateX(-86deg); opacity: 0; max-height: 0; overflow: hidden; margin-top: 0;
  transition: transform .7s cubic-bezier(.2,.75,.2,1), opacity .45s ease, max-height .6s ease, margin-top .6s ease; }
body.c3d .cm3-open > .cm3-a { transform: none; opacity: 1; max-height: 260px; margin-top: 12px; }

/* ---------- 7 · the form on a writing desk ---------- */
body.c3d .cm3-deskrow { perspective: 1600px; perspective-origin: 70% 0; }
body.c3d .cm3-desk { position: relative; transform-origin: 50% 100%; opacity: 1 !important;
  transform: rotateX(34deg) translateY(20px) !important; transition: transform 1.4s cubic-bezier(.2,.75,.2,1) !important;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #ece2c9, 0 6px 0 -1px #e2d5b4, 0 9px 0 -2px #d7c79f, 0 40px 60px -32px rgba(36,29,18,.45); }
body.c3d .cm3-desk.cm3-in { transform: rotateX(4deg) !important; }
body.c3d .cm3-desk.cm3-in:focus-within { transform: none !important; transition-duration: .5s !important; }
@media (max-width: 760px) { body.c3d .cm3-desk.cm3-in { transform: none !important; } }

/* ---------- 7 · the atom at the close ---------- */
body.c3d .cm3-close { position: relative; }
body.c3d .cm3-close > img { position: relative; z-index: 1; }
#cm3-orbit-hero, #cm3-orbit-close { max-width: none !important; }
body.c3d .cm3-orbit.small { left: 50%; right: auto; width: 230px; margin-left: -115px; top: 36px; }
