/* ==========================================================================
   THE SHARP BRIEF — page + interactive brief builder
   Loaded only on /the-sharp-brief/. Rides on the editorial `.ed` tokens from
   minimal.css and the shared `.briefing-form` field styles from styles.css;
   this file adds the hero variant and the guided multi-step builder.
   ========================================================================== */

/* ---- Hero -------------------------------------------------------------- */
.ed.sharp-hero {
  padding: 0;
  background: var(--forest);
  color: var(--ed-white);
  overflow: hidden;
}

.ed .sharp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: stretch;
  min-height: clamp(440px, 62vh, 640px);
}

.ed .sharp-hero__copy {
  align-self: center;
  padding: clamp(72px, 9vw, 132px) clamp(24px, 5vw, 96px) clamp(72px, 9vw, 132px);
  max-width: 760px;
  margin-left: auto;
  width: 100%;
}

.ed .sharp-hero__copy .section-label {
  color: color-mix(in srgb, var(--ed-white) 62%, transparent);
  margin-bottom: 22px;
}

.ed .sharp-hero__copy h1 {
  color: var(--ed-white);
  font-size: clamp(46px, 6.2vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

.ed .sharp-hero__line {
  margin: clamp(20px, 2.4vw, 30px) 0 0;
  font-family: var(--ed-serif);
  font-style: italic;
  font-size: clamp(22px, 2.3vw, 32px);
  line-height: 1.2;
  color: color-mix(in srgb, var(--ed-white) 90%, transparent);
}

.ed .sharp-hero__intro {
  margin: clamp(20px, 2.4vw, 28px) 0 0;
  max-width: 54ch;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: color-mix(in srgb, var(--ed-white) 78%, transparent);
}

.ed .sharp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
  margin-top: clamp(34px, 4vw, 52px);
}

.ed .sharp-hero__actions .button-link {
  color: var(--ed-white);
  border-bottom-color: color-mix(in srgb, var(--ed-white) 55%, transparent);
}

.ed .sharp-hero__actions .button-link:hover,
.ed .sharp-hero__actions .button-link:focus-visible {
  background: color-mix(in srgb, var(--ed-white) 12%, transparent);
}

.ed .sharp-hero__actions .sharp-hero__meta {
  font-size: 13px;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--ed-white) 60%, transparent);
}

.ed .sharp-hero__graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(36px, 4vw, 72px);
  background: color-mix(in srgb, #000 16%, var(--forest));
  border-left: 1px solid color-mix(in srgb, var(--ed-white) 12%, transparent);
}

.ed .sharp-hero__graphic img {
  width: 100%;
  max-width: 420px;
  height: auto;
}

@media (max-width: 880px) {
  .ed .sharp-hero__grid { grid-template-columns: 1fr; min-height: 0; }
  .ed .sharp-hero__copy { margin-left: 0; padding-bottom: clamp(44px, 8vw, 64px); }
  .ed .sharp-hero__graphic {
    order: -1;
    border-left: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ed-white) 12%, transparent);
    min-height: 220px;
    padding: clamp(36px, 9vw, 60px);
  }
  .ed .sharp-hero__graphic img { max-width: 300px; }
}

/* ---- "How it works" three-up ------------------------------------------ */
.ed .sharp-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(48px, 6vw, 78px);
  border-top: 1px solid var(--ed-rule);
  padding-top: clamp(36px, 4vw, 52px);
}

.ed .sharp-steps__item .sharp-steps__n {
  font-family: var(--ed-serif);
  font-style: italic;
  font-size: clamp(30px, 3vw, 44px);
  color: var(--forest);
  line-height: 1;
}

.ed .sharp-steps__item h3 {
  margin: 14px 0 10px;
  font-size: clamp(20px, 1.7vw, 24px);
}

.ed .sharp-steps__item p {
  margin: 0;
  max-width: 34ch;
  color: var(--ed-graphite);
  font-size: 16px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .ed .sharp-steps { grid-template-columns: 1fr; gap: clamp(24px, 6vw, 34px); }
  .ed .sharp-steps__item p { max-width: none; }
}

/* ==========================================================================
   THE BUILDER
   ========================================================================== */
.brief-builder-section .container { position: relative; }

.brief-builder {
  width: min(100%, 940px);
  margin: clamp(40px, 5vw, 68px) auto 0;
  background: var(--ed-white);
  border: 1px solid var(--ed-rule);
  border-radius: 18px;
  box-shadow: 0 30px 80px -48px rgba(19, 19, 22, 0.5);
  overflow: hidden;
}

.brief-builder[hidden] { display: none; }

.brief-form {
  display: block;
  margin: 0;
  padding: clamp(28px, 4vw, 56px) clamp(24px, 4vw, 60px) clamp(28px, 3.5vw, 48px);
}

.brief-form[hidden] { display: none; }

/* Mode toggle: guided brief vs. fast-track call request */
.brief-modes {
  display: flex;
  gap: 8px;
  padding: clamp(16px, 2vw, 22px) clamp(24px, 4vw, 60px);
  border-bottom: 1px solid var(--ed-rule);
  background: var(--ed-white);
}

.brief-mode {
  appearance: none;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  font-family: var(--ed-font);
  font-size: 14px;
  font-weight: 560;
  letter-spacing: -0.01em;
  color: var(--ed-graphite);
  cursor: pointer;
  transition: background var(--ed-transition), color var(--ed-transition);
}

.brief-mode:not(.is-active):hover { color: var(--ed-ink); background: var(--ed-wash); }
.brief-mode.is-active { background: var(--forest); color: var(--ed-white); }
.brief-mode:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

/* Fast-track call form */
.brief-call__head { margin-bottom: clamp(24px, 3vw, 34px); }
.brief-call__head .brief-step__q { margin: 0; }

.brief-call__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.brief-call__grid .brief-wide { grid-column: 1 / -1; }

@media (max-width: 620px) {
  .brief-call__grid { grid-template-columns: 1fr; }
}

/* Progress */
.brief-progress {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: clamp(30px, 4vw, 48px);
}

.brief-progress__count {
  flex: 0 0 auto;
  font-family: var(--ed-font);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ed-graphite);
  font-variant-numeric: tabular-nums;
}

.brief-progress__count b { color: var(--ed-ink); font-weight: 650; }

.brief-progress__track {
  flex: 1 1 auto;
  height: 3px;
  border-radius: 3px;
  background: var(--ed-rule);
  overflow: hidden;
}

.brief-progress__fill {
  display: block;
  height: 100%;
  width: 12.5%;
  border-radius: 3px;
  background: var(--forest);
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Steps */
.brief-steps { position: relative; }

.brief-step {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.brief-step:not(.is-active) { display: none; }

.brief-step.is-active {
  animation: briefStepIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes briefStepIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .brief-step.is-active { animation: none; }
  .brief-progress__fill { transition: none; }
}

.brief-step__label {
  margin: 0 0 16px;
  font-family: var(--ed-font);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--forest);
}

.brief-step__q {
  margin: 0;
  font-family: var(--ed-font);
  font-weight: 520;
  font-size: clamp(24px, 2.7vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--ed-ink);
  max-width: 20ch;
}

.brief-step__help {
  margin: 14px 0 0;
  max-width: 56ch;
  color: var(--ed-graphite);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.5;
}

.brief-step__body { margin-top: clamp(24px, 3vw, 34px); }

/* Single-select cards. These are <label>s inside .briefing-form, which carries
   a generic uppercase / letter-spaced / display:grid form-label style — more
   specific than plain .brief-choice — so every rule here is scoped under
   .brief-form to reassert the editorial look: sentence case, grotesk, and the
   indicator BESIDE the copy rather than stacked above it. */
.brief-form .brief-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.brief-form .brief-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
  border: 1px solid var(--ed-rule);
  border-radius: 12px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}

.brief-form .brief-choice:hover {
  border-color: color-mix(in srgb, var(--forest) 45%, var(--ed-rule));
}

.brief-form .brief-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.brief-form .brief-choice__tick {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ed-rule);
  border-radius: 50%;
  position: relative;
  transition: border-color 200ms ease, background 200ms ease;
}

.brief-form .brief-choice__tick::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--ed-white);
  transform: scale(0);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brief-form .brief-choice__text { display: block; }

.brief-form .brief-choice__text b {
  display: block;
  font-family: var(--ed-font);
  font-weight: 550;
  font-size: 16px;
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--ed-ink);
  line-height: 1.2;
}

.brief-form .brief-choice__text span {
  display: block;
  margin-top: 4px;
  font-family: var(--ed-font);
  font-weight: 400;
  font-size: 13.5px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
  color: var(--ed-graphite);
}

.brief-form .brief-choice:has(input:checked) {
  border-color: var(--forest);
  background: color-mix(in srgb, var(--forest) 5%, var(--ed-white));
}

.brief-form .brief-choice:has(input:checked) .brief-choice__tick {
  border-color: var(--forest);
  background: var(--forest);
}

.brief-form .brief-choice:has(input:checked) .brief-choice__tick::after { transform: scale(1); }

.brief-form .brief-choice:has(input:focus-visible) {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

/* Multi-select chips (same <label> caveat as the choice cards above). */
.brief-form .brief-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brief-form .brief-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--ed-rule);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--ed-font);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1;
  color: var(--ed-ink);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.brief-form .brief-chip:hover {
  border-color: color-mix(in srgb, var(--forest) 45%, var(--ed-rule));
}

.brief-form .brief-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.brief-form .brief-chip::before {
  content: "+";
  font-size: 15px;
  line-height: 1;
  color: var(--ed-graphite);
  transition: transform 160ms ease, color 160ms ease;
}

.brief-form .brief-chip:has(input:checked) {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--ed-white);
}

.brief-form .brief-chip:has(input:checked)::before { content: "\2713"; color: var(--ed-white); }

.brief-form .brief-chip:has(input:focus-visible) {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

/* Text + select fields inside the builder (extend .briefing-form styles) */
.brief-form .brief-field { display: block; }

.brief-form textarea.brief-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.brief-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.brief-duo label { display: block; }

.brief-field__cap,
.brief-duo label > span:first-child {
  display: block;
  margin-bottom: 9px;
  font-family: var(--ed-font);
  font-size: 14px;
  font-weight: 560;
  color: var(--ed-ink);
}

.brief-field__opt {
  color: var(--ed-graphite);
  font-weight: 450;
}

/* Details step: contact fields + live preview */
.brief-details__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.brief-details__grid label { display: block; }
.brief-details__grid .brief-wide { grid-column: 1 / -1; }

.brief-preview {
  margin-top: clamp(22px, 3vw, 32px);
  border: 1px solid var(--ed-rule);
  border-radius: 12px;
  background: var(--ed-wash);
  overflow: hidden;
}

.brief-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ed-rule);
  background: color-mix(in srgb, var(--forest) 4%, var(--ed-white));
}

.brief-preview__title {
  margin: 0;
  font-family: var(--ed-font);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--forest);
}

.brief-preview__copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--ed-rule);
  border-radius: 999px;
  background: var(--ed-white);
  font-family: var(--ed-font);
  font-size: 12.5px;
  font-weight: 560;
  color: var(--ed-ink);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.brief-preview__copy:hover { border-color: var(--forest); color: var(--forest); }
.brief-preview__copy.is-copied { border-color: var(--forest); color: var(--forest); }

.brief-preview__body {
  margin: 0;
  padding: 20px 20px 24px;
  max-height: 320px;
  overflow: auto;
  font-family: var(--ed-serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ed-ink);
  white-space: pre-wrap;
}

.brief-preview__body em {
  color: var(--ed-graphite);
  font-style: italic;
}

/* Navigation */
.brief-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(30px, 4vw, 44px);
  padding-top: clamp(22px, 2.6vw, 30px);
  border-top: 1px solid var(--ed-rule);
}

.brief-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 4px;
  border: 0;
  background: none;
  font-family: var(--ed-font);
  font-size: 15px;
  font-weight: 560;
  color: var(--ed-graphite);
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.brief-nav__back:hover { color: var(--ed-ink); transform: translateX(-3px); }
.brief-nav__back[hidden] { display: none; }

.brief-nav__spacer { flex: 1 1 auto; }

/* Primary form actions: solid forest pill (echoes the active mode tab, the
   progress fill and the selected cards). .button-link is built for <a>, so on a
   <button> we must reset the native chrome or the grey UA button shows through. */
.brief-nav .button-link {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  margin: 0;
  padding: 14px 28px;
  border: 1px solid var(--forest);
  border-radius: 999px;
  background: var(--forest);
  color: var(--ed-white);
  font-family: var(--ed-font);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: background var(--ed-transition), transform var(--ed-transition), box-shadow var(--ed-transition);
}

.brief-nav .button-link::after {
  content: "\2192";
  transition: transform var(--ed-transition);
}

.brief-nav .button-link:hover,
.brief-nav .button-link:focus-visible {
  color: var(--ed-white);
  background: color-mix(in srgb, #000 14%, var(--forest));
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -14px rgba(0, 49, 41, 0.6);
}

.brief-nav .button-link:hover::after,
.brief-nav .button-link:focus-visible::after {
  transform: translateX(4px);
}

.brief-nav .button-link:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.brief-nav__send[hidden],
.brief-nav__next[hidden] { display: none; }

/* Status + errors reuse briefing-form conventions but need local spacing */
.brief-form .brief-status {
  margin: 0 0 22px;
  padding: 14px 18px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--forest) 8%, var(--ed-white));
  border: 1px solid color-mix(in srgb, var(--forest) 24%, var(--ed-rule));
  font-family: var(--ed-font);
  font-size: 15px;
  color: var(--ed-ink);
}

.brief-form .brief-status.is-error {
  background: color-mix(in srgb, #b3261e 7%, var(--ed-white));
  border-color: color-mix(in srgb, #b3261e 34%, var(--ed-rule));
  color: #7a1610;
}

.brief-form.is-sending { opacity: 0.75; pointer-events: none; }

.brief-hint {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--ed-graphite);
}

/* No-JS / fallback */
.brief-fallback {
  width: min(100%, 720px);
  margin: clamp(36px, 5vw, 60px) auto 0;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--ed-rule);
  border-radius: 16px;
  background: var(--ed-white);
  text-align: center;
}

.brief-fallback p { margin: 0 0 14px; color: var(--ed-graphite); }

@media (max-width: 620px) {
  .brief-choices,
  .brief-duo,
  .brief-details__grid { grid-template-columns: 1fr; }
  .brief-form { padding-left: clamp(18px, 5vw, 24px); padding-right: clamp(18px, 5vw, 24px); }
}
