/* Positioning Tool — page styles, built on golden.css tokens.
   Reuses .wrap, .sec-head, and .btn-teal from golden.css; everything else is
   scoped to .pos-* so it can't leak onto the rest of the Golden Hour site. */

.pos-wrap { max-width: 720px; }

/* mono eyebrow — clay (text-safe accent), like .see-all / section meta */
.pos-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
}

/* ---------- intro ---------- */
.pos-intro { padding: 64px 0 8px; }
.pos-intro .pos-eyebrow { margin-bottom: 18px; }
.pos-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.pos-lead {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.6;
  color: var(--muted);
  margin-top: 22px;
  max-width: 68ch;
}

/* ---------- sections ---------- */
.pos-section {
  padding: 52px 0;
  border-top: 1px solid var(--hair);
}
.pos-section .pos-eyebrow { margin-bottom: 10px; }
.pos-section .sec-head { margin-bottom: 0; }
.pos-sub {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--muted);
  margin-top: 12px;
}

/* "?" info affordance — the section/field guidance now lives in a tooltip that
   shows on hover, keyboard focus, or tap (.is-open toggled in JS for touch). */
.pos-heading-row { display: flex; align-items: center; gap: 10px; position: relative; }
.pos-label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; position: relative; }
.pos-label-row label { margin-bottom: 0; }
.pos-info-wrap { display: inline-flex; flex: 0 0 auto; }
.pos-info {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  padding: 0;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.16s, color 0.16s;
}
.pos-info:hover,
.pos-info-wrap:focus-within .pos-info,
.pos-info-wrap.is-open .pos-info { border-color: var(--ink); color: var(--ink); }
/* tooltip anchors to the row's left edge so it never overflows the column */
.pos-info-tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 6;
  width: max-content;
  max-width: 320px;
  padding: 10px 13px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(22, 20, 18, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
  pointer-events: none;
}
.pos-info-wrap:hover .pos-info-tip,
.pos-info-wrap:focus-within .pos-info-tip,
.pos-info-wrap.is-open .pos-info-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

/* ---------- 01 · sliders ---------- */
.pos-sliders {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 36px;
}
.pos-slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.pos-slider-labels span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink);
}
.pos-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  /* faint baseline; an ink fill grows from the centre out to the thumb
     (--fill-lo/--fill-hi are set per-slider in JS) to show the lean visually */
  background: linear-gradient(to right,
    var(--border) 0,
    var(--border) var(--fill-lo, 50%),
    var(--ink) var(--fill-lo, 50%),
    var(--ink) var(--fill-hi, 50%),
    var(--border) var(--fill-hi, 50%),
    var(--border) 100%);
  outline: none;
  border-radius: 0;
  cursor: pointer;
}
.pos-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  cursor: grab;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--ink), 0 2px 5px rgba(22, 20, 18, 0.2);
  transition: transform 0.1s ease;
}
.pos-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.1); }
.pos-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  cursor: grab;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--ink), 0 2px 5px rgba(22, 20, 18, 0.2);
}
.pos-slider-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 12px;
}
.pos-desc { font-family: var(--font-serif); font-size: 13.5px; color: var(--muted); }
.pos-position {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--clay);
  white-space: nowrap;
}

/* slider trade-offs — a small labelled disclosure in the foot row opens the panel.
   The caret (::after) points down when collapsed, flips up when open. */
.pos-help-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--clay);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.16s;
}
.pos-help-toggle:hover { color: var(--ink); }
.pos-help-toggle::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.18s ease;
}
.pos-help-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
/* inline reference to the control, used in the section 01 explainer */
.pos-sub-ref { font-family: var(--font-mono); font-size: 0.92em; color: var(--clay); }

.pos-help {
  margin-top: 16px;
  background: var(--paper-2);
  border: 1px solid var(--hair);
  padding: 16px 18px;
}
.pos-help[hidden] { display: none; }
/* the dimension description lives here now, above the pros/cons */
.pos-help-intro {
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair);
}
.pos-help-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pos-help-col h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 8px;
}
.pos-help-line {
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  margin-top: 8px;
}
.pos-help-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clay);
  margin-right: 6px;
}
.pos-help-tag--con { color: var(--brick); }
@media (max-width: 560px) {
  .pos-help-cols { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- 02 · chips ---------- */
.pos-group { margin-top: 32px; }
.pos-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 14px;
}
.pos-group-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.pos-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.pos-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.pos-other-input { margin-top: 12px; max-width: 440px; }

/* target-role section — first step in the form column */
.pos-role-section .pos-chips { margin-top: 24px; }
.pos-chip {
  font-family: var(--font-display);
  font-size: 14px;
  padding: 9px 15px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.pos-chip:hover { border-color: var(--ink); }
.pos-chip.selected {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.pos-chip:disabled { opacity: 0.38; cursor: not-allowed; }
.pos-chip:disabled:hover { border-color: var(--border); }

/* ---------- 03 · short-answer fields ---------- */
.pos-fields { display: flex; flex-direction: column; gap: 30px; margin-top: 36px; }
.pos-field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
}
.pos-optional { font-weight: 400; color: var(--muted); }
.pos-hint {
  font-family: var(--font-serif);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.pos-textarea,
.pos-input {
  font-family: var(--font-display);
  font-size: 15px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.pos-input { resize: none; }
.pos-textarea::placeholder,
.pos-input::placeholder { color: var(--muted); }
.pos-textarea:focus,
.pos-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(199, 122, 26, 0.14);
}

/* ---------- generate ---------- */
.pos-generate-section { text-align: center; }
/* extends .btn-teal (the dark-glass CTA recipe) into a full-width primary button */
.btn-teal.pos-generate {
  width: 100%;
  justify-content: center;
  font-size: 14px;
  padding: 17px 26px;
  border-radius: 13px;
}
.btn-teal.pos-generate[disabled] {
  opacity: 0.5;
  filter: saturate(0.55);
  cursor: not-allowed;
  transform: none;
}
.btn-teal.pos-generate.is-loading { cursor: progress; }
.pos-generate-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  line-height: 1.5;
}
.pos-error {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brick);
  margin-top: 14px;
}

/* ---------- output ---------- */
.pos-output {
  padding: 52px 0 8px;
  border-top: 1px solid var(--hair);
  animation: pos-fadein 0.5s ease-out;
}
@keyframes pos-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.pos-output .pos-eyebrow { margin-bottom: 10px; }
.pos-output .sec-head { margin-bottom: 28px; }
/* sharp-cornered card with hairline border — matches .join-card / .s-card */
.pos-output-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 38px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.pos-output-field + .pos-output-field {
  border-top: 1px solid var(--hair);
  padding-top: 28px;
}
.pos-output-field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}
.pos-output-field-head .pos-eyebrow { color: var(--muted); margin-bottom: 0; }
.pos-out-niche {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink);
}
.pos-out-valueprop {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pos-out-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.34;
  color: var(--ink);
}
.pos-out-bio {
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink);
}
/* copy / regenerate — mono pill, like .drawer-x */
.pos-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}
.pos-copy:hover { border-color: var(--ink); color: var(--ink); background: rgba(22, 20, 18, 0.04); }
.pos-copy:disabled { opacity: 0.5; cursor: not-allowed; }
.pos-copy:disabled:hover { border-color: var(--border); color: var(--muted); background: transparent; }
/* icon variant — a compact round button; copy swaps to a check while "copied" */
.pos-copy-icon {
  padding: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pos-copy-icon .pos-ic { display: inline-flex; }
.pos-copy-icon .pos-ic-check { display: none; }
.pos-copy-icon svg { width: 15px; height: 15px; display: block; }
.pos-copy-icon.is-copied { color: var(--clay); border-color: var(--clay); }
.pos-copy-icon.is-copied .pos-ic-copy { display: none; }
.pos-copy-icon.is-copied .pos-ic-check { display: inline-flex; }
.pos-regen { text-align: center; margin-top: 24px; }

@media (min-width: 681px) {
  .btn-teal.pos-generate { width: auto; min-width: 340px; }
}

/* ============================================================
   Two-column layout: form on the left, sticky rail on the right
   ============================================================ */
.pos-page { padding-bottom: 72px; }

/* title section spans the full content width; breathing room before the grid */
.pos-grid { margin-top: 80px; }

@media (min-width: 980px) {
  .pos-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 384px;
    gap: 56px;
    align-items: start;
  }
  /* offset the rail so its top lines up with the role chips in section 01
     (≈ the height of the 01 eyebrow + heading + subhead) */
  .pos-rail { position: sticky; top: 92px; margin-top: 141px; }
}

/* no top rule on the first form section (it butts against the intro) */
.pos-form-col > .pos-section:first-child { border-top: 0; padding-top: 12px; }

.pos-rail-card {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 24px;
}
@media (max-width: 979px) { .pos-rail { margin-top: 12px; } }

/* generate fills the rail (override the wide-screen auto-width rule above) */
.pos-rail .btn-teal.pos-generate { width: 100%; min-width: 0; }
.pos-rail .pos-error { text-align: left; }

/* ---------- kit-strength meter (progress + reward) ---------- */
.pos-strength { margin-bottom: 20px; }
.pos-strength-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.pos-strength-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.pos-strength-v { font-family: var(--font-mono); font-size: 12px; color: var(--clay); }
.pos-strength-track { height: 6px; background: var(--hair); border-radius: 999px; overflow: hidden; }
.pos-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--clay), var(--amber));
  transition: width 0.35s ease;
}
/* ---------- the kit inside the rail ---------- */
.pos-rail .pos-output { padding: 0; border-top: 0; animation: none; }
.pos-rail-divider { border: 0; border-top: 1px solid var(--hair); margin: 24px 0; }
.pos-kit-label { margin-bottom: 16px; }
.pos-rail .pos-output-card { border: 0; padding: 0; gap: 22px; }
.pos-rail .pos-out-niche { font-size: 16px; }
.pos-rail .pos-out-valueprop { font-size: 21px; line-height: 1.26; }
.pos-rail .pos-out-headline { font-size: 17px; }
.pos-rail .pos-out-bio { font-size: 14.5px; }
.pos-rail .pos-regen { text-align: left; margin-top: 22px; }

/* freshly-filled kit fades in */
.pos-output:not(.is-empty) .pos-output-card { animation: pos-fadein 0.45s ease-out; }

/* ---------- ghosted slots (empty state, before generating) ---------- */
.pos-output.is-empty .pos-copy,
.pos-output.is-empty .pos-regen { display: none; }
.pos-output.is-empty [data-field] { display: none; }
.pos-output:not(.is-empty) .pos-ghost { display: none; }
.pos-ghost { display: flex; flex-direction: column; gap: 8px; }
.pos-ghost span { height: 9px; border-radius: 999px; background: var(--hair); display: block; }
.pos-ghost span:nth-child(1) { width: 92%; }
.pos-ghost span:nth-child(2) { width: 78%; }
.pos-ghost span:nth-child(3) { width: 85%; }
