/* ============================================================
   Nusbaum Virtual Consult — front-end styles.
   Inherits the site design system: EB Garamond (display), Urbanist (sans),
   brand blue #0B79BF, deep navy #0e2a44. Scoped under .nus-consult so it can
   drop into any page without leaking into the surrounding template.
   ============================================================ */

.nus-consult {
  --nc-accent: #0B79BF;
  --nc-accent-dk: #0a5f96;
  --nc-ink: #0e2a44;
  --nc-body: #4a5b6b;
  --nc-line: #e3e8ee;
  --nc-bg: #ffffff;
  --nc-soft: #f6f8fa;
  --nc-radius: 14px;
  --nc-shadow: 0 1px 2px rgba(14,42,68,.05), 0 12px 32px -12px rgba(14,42,68,.16);
  --nc-serif: 'EB Garamond', Georgia, serif;
  --nc-sans: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  display: block;
  font-family: var(--nc-sans);
  color: var(--nc-body);
  -webkit-font-smoothing: antialiased;
}

.nus-consult *, .nc-drawer * { box-sizing: border-box; }

/* ---- boot placeholder ---- */
.nus-consult__boot {
  display: grid; place-items: center; gap: .9rem;
  min-height: 60vh; color: var(--nc-body);
}
.nus-consult__boot p { margin: 0; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; }
.nus-consult__spinner, .nc-spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--nc-line); border-top-color: var(--nc-accent);
  animation: nc-spin .8s linear infinite;
}
@keyframes nc-spin { to { transform: rotate(360deg); } }

.nus-consult__noscript { max-width: 46rem; margin: 0 auto; padding: 2rem 1.25rem; }
.nus-consult__noscript ul { columns: 2; gap: 2rem; }

/* ---- shell ---- */
.nc {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) 1.25rem;
}
@media (max-width: 900px) { .nc { grid-template-columns: 1fr; } }

/* ---- type ---- */
.nc-eyebrow {
  margin: 0 0 .5rem; font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--nc-accent);
}
.nc-h2 {
  font-family: var(--nc-serif); font-weight: 500; color: var(--nc-ink);
  font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.12; margin: 0 0 .75rem;
  letter-spacing: -.01em;
}
.nc-h3 {
  font-family: var(--nc-serif); font-weight: 500; color: var(--nc-ink);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem); line-height: 1.2; margin: 0 0 .5rem;
}
.nc-lede { font-size: 1.05rem; line-height: 1.6; margin: 0 auto 2rem; max-width: 34rem; }
.nc-sub { font-size: .94rem; line-height: 1.6; margin: 0 0 1.25rem; }
.nc-fine { font-size: .76rem; line-height: 1.5; color: #8794a2; margin: 1.25rem 0 0; }

/* ---- step 1: gender ---- */
.nc-intro { text-align: center; padding: clamp(1.5rem, 5vw, 4rem) 0; grid-column: 1 / -1; }
.nc-genders { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.nc-gender {
  appearance: none; cursor: pointer; background: var(--nc-bg);
  border: 1px solid var(--nc-line); border-radius: var(--nc-radius);
  padding: 1.5rem 2.25rem; min-width: 11rem;
  display: grid; gap: .85rem; justify-items: center;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.nc-gender:hover, .nc-gender:focus-visible {
  border-color: var(--nc-accent); transform: translateY(-2px); box-shadow: var(--nc-shadow);
  outline: none;
}
.nc-gender__label { font-weight: 600; color: var(--nc-ink); font-size: 1rem; }
/* Simple silhouettes; the real figures are the 3D models on the next step. */
.nc-gender__fig {
  width: 46px; height: 78px; background: var(--nc-ink); opacity: .82;
  clip-path: polygon(43% 0,57% 0,64% 7%,64% 15%,80% 24%,86% 46%,79% 48%,72% 33%,72% 60%,66% 100%,55% 100%,50% 66%,45% 100%,34% 100%,28% 60%,28% 33%,21% 48%,14% 46%,20% 24%,36% 15%,36% 7%);
}
.nc-gender__fig--m {
  clip-path: polygon(42% 0,58% 0,65% 8%,65% 16%,84% 26%,90% 50%,82% 52%,74% 34%,74% 58%,70% 100%,56% 100%,50% 62%,44% 100%,30% 100%,26% 58%,26% 34%,18% 52%,10% 50%,16% 26%,35% 16%,35% 8%);
}

/* ---- step 2: stage ---- */
.nc-stage__head { margin-bottom: 1rem; }
.nc-views {
  display: inline-flex; gap: .25rem; padding: .25rem;
  background: var(--nc-soft); border-radius: 999px; margin-bottom: .9rem;
}
.nc-view {
  appearance: none; border: 0; cursor: pointer; background: transparent;
  font: 500 .85rem/1 var(--nc-sans); color: var(--nc-body);
  padding: .55rem 1.1rem; border-radius: 999px; transition: background .16s, color .16s;
}
.nc-view:hover { color: var(--nc-ink); }
.nc-view.is-on { background: var(--nc-bg); color: var(--nc-ink); box-shadow: 0 1px 3px rgba(14,42,68,.12); }

.nc-canvas {
  position: relative; width: 100%;
  aspect-ratio: 3 / 4; max-height: 76vh;
  background:
    radial-gradient(120% 90% at 50% 12%, #ffffff 0%, #f2f5f8 55%, #e8edf2 100%);
  border: 1px solid var(--nc-line); border-radius: var(--nc-radius);
  overflow: hidden;
  touch-action: none;                 /* let OrbitControls own the gesture */
}
.nus-consult__canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.nus-consult__canvas:active { cursor: grabbing; }
.nc-canvas__load {
  position: absolute; inset: 0; display: grid; place-items: center; gap: .8rem;
  align-content: center; color: var(--nc-body); font-size: .85rem;
}
.nc-canvas__foot {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: .7rem;
}
.nc-tip { min-height: 1.25rem; margin: .35rem 0 0; font-size: .85rem; color: var(--nc-accent); font-weight: 500; }

.nc-link {
  appearance: none; background: none; border: 0; cursor: pointer; padding: 0;
  font: 500 .85rem/1.4 var(--nc-sans); color: var(--nc-body);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--nc-line);
}
.nc-link:hover { color: var(--nc-accent); text-decoration-color: currentColor; }

/* ---- 2D fallback (no WebGL / model missing) ---- */
.nc-canvas.is-fallback { aspect-ratio: auto; padding: 1.5rem; display: grid; align-content: start; }
.nc-fallback__note { font-size: .9rem; margin: 0 0 1rem; }
.nc-fallback__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem; }
.nc-fallback__i {
  appearance: none; cursor: pointer; text-align: left;
  background: var(--nc-bg); border: 1px solid var(--nc-line); border-radius: 10px;
  padding: .7rem .9rem; font: 500 .9rem/1.3 var(--nc-sans); color: var(--nc-ink);
  transition: border-color .16s, background .16s;
}
.nc-fallback__i:hover { border-color: var(--nc-accent); background: #f7fbfe; }

/* ---- plan panel ---- */
.nc-plan {
  position: sticky; top: 1.5rem;
  background: var(--nc-bg); border: 1px solid var(--nc-line);
  border-radius: var(--nc-radius); padding: 1.5rem; box-shadow: var(--nc-shadow);
}
@media (max-width: 900px) { .nc-plan { position: static; } }
.nc-plan--empty { text-align: center; color: #8794a2; font-size: .9rem; padding: 2.5rem 1.5rem; }

.nc-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.nc-chip {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
  background: #eef7fd; border: 1px solid #cfe6f6; color: var(--nc-ink);
  border-radius: 999px; padding: .35rem .5rem .35rem .75rem;
  font: 500 .8rem/1 var(--nc-sans);
}
.nc-chip span {
  background: var(--nc-accent); color: #fff; border-radius: 999px;
  min-width: 1.15rem; height: 1.15rem; display: grid; place-items: center; font-size: .68rem;
}
.nc-chip em {
  font-style: normal; cursor: pointer; color: #7d8b99; padding: 0 .2rem; font-size: 1rem; line-height: 1;
}
.nc-chip em:hover { color: #c0392b; }

.nc-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.nc-card {
  border: 1px solid var(--nc-line); border-radius: 11px; padding: .9rem 1rem;
  transition: border-color .16s, background .16s;
}
.nc-card:hover { border-color: #cfe6f6; background: #fbfdff; }
.nc-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.nc-card__top h4 {
  margin: 0; font-family: var(--nc-serif); font-weight: 500;
  font-size: 1.08rem; color: var(--nc-ink); line-height: 1.25;
}
.nc-card__link { font-size: .78rem; font-weight: 600; color: var(--nc-accent); text-decoration: none; white-space: nowrap; }
.nc-card__link:hover { text-decoration: underline; }
.nc-card__blurb { margin: .35rem 0 0; font-size: .86rem; line-height: 1.5; }
.nc-card__why { display: flex; flex-wrap: wrap; gap: .3rem; margin: .55rem 0 0; }
.nc-card__why span {
  font-size: .68rem; color: #6b7a89; background: var(--nc-soft);
  border-radius: 5px; padding: .18rem .42rem;
}
.nc-plan__foot { display: grid; gap: .7rem; justify-items: center; margin-top: 1.25rem; }

/* ---- buttons ---- */
.nc-btn {
  appearance: none; cursor: pointer; border: 1px solid transparent;
  border-radius: 9px; padding: .8rem 1.5rem;
  font: 600 .9rem/1 var(--nc-sans); letter-spacing: .01em;
  transition: background .16s, border-color .16s, color .16s, transform .12s;
}
.nc-btn:active { transform: translateY(1px); }
.nc-btn--primary { background: var(--nc-accent); color: #fff; }
.nc-btn--primary:hover { background: var(--nc-accent-dk); }
.nc-btn--primary:disabled { background: #9fc3dc; cursor: default; }
.nc-btn--ghost { background: transparent; border-color: var(--nc-line); color: var(--nc-ink); }
.nc-btn--ghost:hover { border-color: var(--nc-accent); color: var(--nc-accent); }
.nc-btn--wide { width: 100%; }

/* ---- drawer / modal ---- */
body.nc-locked { overflow: hidden; }
.nc-drawer {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(14,42,68,.42); backdrop-filter: blur(3px);
  display: flex; justify-content: flex-end;
  font-family: var(--nc-sans); color: #4a5b6b;
  animation: nc-fade .2s ease;
}
@keyframes nc-fade { from { opacity: 0; } }
.nc-drawer__panel {
  position: relative; background: #fff; width: min(28rem, 100%);
  height: 100%; overflow-y: auto; padding: 2rem 1.75rem;
  box-shadow: -12px 0 40px -18px rgba(14,42,68,.4);
  animation: nc-slide .26s cubic-bezier(.2,.8,.3,1);
}
@keyframes nc-slide { from { transform: translateX(24px); opacity: .6; } }
@media (max-width: 560px) {
  .nc-drawer { align-items: flex-end; }
  .nc-drawer__panel { width: 100%; height: auto; max-height: 88vh; border-radius: 16px 16px 0 0; }
  @keyframes nc-slide { from { transform: translateY(24px); opacity: .6; } }
}
.nc-drawer--form { justify-content: center; align-items: center; }
.nc-drawer--form .nc-drawer__panel { height: auto; max-height: 90vh; border-radius: 16px; }

.nc-drawer__x {
  position: absolute; top: .85rem; right: 1rem;
  appearance: none; background: none; border: 0; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: #93a1af; padding: .25rem;
}
.nc-drawer__x:hover { color: var(--nc-ink); }
.nc-drawer__foot { display: flex; gap: .6rem; margin-top: 1.5rem; }
.nc-drawer__foot .nc-btn { flex: 1; }

/* ---- goals ---- */
.nc-goals { display: grid; gap: .45rem; }
.nc-goal {
  display: flex; gap: .7rem; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--nc-line); border-radius: 10px; padding: .8rem .9rem;
  transition: border-color .16s, background .16s;
}
.nc-goal:hover { border-color: #cfe6f6; background: #fbfdff; }
.nc-goal input { position: absolute; opacity: 0; width: 0; height: 0; }
.nc-goal__box {
  flex: 0 0 auto; width: 19px; height: 19px; margin-top: .1rem;
  border: 1.5px solid #c3cdd7; border-radius: 5px; background: #fff;
  display: grid; place-items: center; transition: background .14s, border-color .14s;
}
.nc-goal__box::after {
  content: ''; width: 9px; height: 5px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .14s;
}
.nc-goal input:checked ~ .nc-goal__box { background: var(--nc-accent); border-color: var(--nc-accent); }
.nc-goal input:checked ~ .nc-goal__box::after { transform: rotate(-45deg) scale(1); }
.nc-goal input:focus-visible ~ .nc-goal__box { outline: 2px solid var(--nc-accent); outline-offset: 2px; }
.nc-goal__label { display: block; font-weight: 500; color: var(--nc-ink); font-size: .93rem; line-height: 1.35; }
.nc-goal__desc { display: block; font-size: .8rem; margin-top: .15rem; }

/* ---- form ---- */
.nc-form { display: grid; gap: .85rem; margin-top: .5rem; }
.nc-field { display: grid; gap: .3rem; }
.nc-field > span { font-size: .8rem; font-weight: 600; color: var(--nc-ink); }
.nc-field input, .nc-field textarea {
  font: 400 .95rem/1.4 var(--nc-sans); color: var(--nc-ink);
  border: 1px solid var(--nc-line); border-radius: 9px; padding: .7rem .85rem;
  background: #fff; width: 100%; transition: border-color .16s, box-shadow .16s;
}
.nc-field input:focus, .nc-field textarea:focus {
  outline: none; border-color: var(--nc-accent); box-shadow: 0 0 0 3px rgba(11,121,191,.12);
}
.nc-field--hp { position: absolute !important; left: -9999px; }
.nc-consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .82rem; line-height: 1.45; }
.nc-consent input { margin-top: .2rem; accent-color: var(--nc-accent); }
.nc-form__err {
  margin: 0; font-size: .85rem; color: #b3261e; background: #fdecea;
  border-radius: 8px; padding: .6rem .75rem;
}

/* ---- success ---- */
.nc-done { text-align: center; padding: 1rem 0; }
.nc-done__tick {
  width: 52px; height: 52px; margin: 0 auto 1rem; border-radius: 50%;
  background: #e8f6ed; display: grid; place-items: center; position: relative;
}
.nc-done__tick::after {
  content: ''; width: 17px; height: 9px; margin-top: -4px;
  border-left: 2.5px solid #2e7d4f; border-bottom: 2.5px solid #2e7d4f;
  transform: rotate(-45deg);
}
.nc-done__list { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: .35rem; }
.nc-done__list a { color: var(--nc-accent); font-weight: 500; font-size: .9rem; text-decoration: none; }
.nc-done__list a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .nus-consult *, .nc-drawer * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
