/* ==========================================================================
   Owner-Analyse — Fragebogen mit Owner Dependency Score
   Extends app.css (tokens, .btn, [data-shine], reduced-motion posture are
   already loaded — this file only adds what the flow needs on top).
   ========================================================================== */

/* --- Slim header ----------------------------------------------------------
   No nav, no CTA — a conversion flow shouldn't offer an exit route. Reuses
   .header / .header__inner / .logo from app.css as-is. */

.analyse-header__back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink-300);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--duration-fast) var(--ease-standard);
}

@media (hover: hover) {
  .analyse-header__back:hover { color: var(--paper-100); }
}

.analyse-header__back svg { width: 16px; height: 16px; }

/* --- Shell ---------------------------------------------------------------- */

.analyse-main {
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
}

.analyse-progress {
  height: 3px;
  background: rgba(247, 244, 236, .10);
  position: sticky;
  top: var(--header-h);
  z-index: 40;
}

.analyse-progress__bar {
  height: 100%;
  background: var(--signal-400);
  width: 0%;
  transition: width 320ms var(--ease-standard);
}

.analyse-body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(32px, 6vw, 64px) var(--gutter) clamp(120px, 16vw, 160px);
}

.analyse-step {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.analyse-step[hidden] { display: none; }

.analyse-step__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--signal-300);
  margin-bottom: 16px;
}

.analyse-step__title {
  font-size: clamp(24px, 5.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: var(--weight-semibold);
  margin: 0 0 12px;
  text-wrap: balance;
  outline: none; /* focus target on step change; visible ring not needed here */
}

.analyse-step__body {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.6;
  color: var(--ink-300);
  margin: 0 0 32px;
  max-width: 520px;
  text-wrap: pretty;
}

/* --- Scale question (screens 1–5) ------------------------------------------ */

.scale {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scale__option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 60px;
  padding: 16px 20px;
  /* Matches .btn--ghost's resting border exactly — the previous .16 alpha
     read as a thin, unevenly-antialiased ring next to the site's real
     buttons, especially on the small index circle below. */
  border: 1px solid rgba(247, 244, 236, .20);
  border-radius: 14px;
  background: rgba(247, 244, 236, .03);
  color: var(--paper-100);
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard);
}

.scale__option__index {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(247, 244, 236, .34);
  background: rgba(247, 244, 236, .05);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-400);
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard), color 160ms var(--ease-standard);
}

@media (hover: hover) {
  .scale__option:hover { border-color: rgba(247, 244, 236, .34); background: rgba(247, 244, 236, .06); }
}

.scale__option[aria-pressed="true"] {
  border-color: var(--signal-400);
  background: rgba(108, 132, 196, .12);
}

.scale__option[aria-pressed="true"] .scale__option__index {
  border-color: var(--signal-400);
  background: var(--signal-500);
  color: var(--white);
}

/* --- Choice question (revenue band, target state) -------------------------- */

.choice {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .choice--2col { grid-template-columns: repeat(2, 1fr); }
}

.choice__option {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 20px;
  border: 1px solid rgba(247, 244, 236, .20);
  border-radius: 14px;
  background: rgba(247, 244, 236, .03);
  color: var(--paper-100);
  font-size: 15px;
  font-weight: var(--weight-medium);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard);
}

@media (hover: hover) {
  .choice__option:hover { border-color: rgba(247, 244, 236, .34); background: rgba(247, 244, 236, .06); }
}

.choice__option[aria-pressed="true"] {
  border-color: var(--signal-400);
  background: rgba(108, 132, 196, .12);
}

/* --- Footer nav bar (fixed) -------------------------------------------------
   Reuses the .back-to-top blurred-pill idiom from app.css but as a full-width
   bar instead of a single circular button. */

.analyse-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(17, 19, 16, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-inverse-soft);
}

.analyse-nav__inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.analyse-nav__back {
  background: none;
  border: 0;
  color: var(--ink-300);
  font-size: 14px;
  min-height: 44px;
  padding: 0 8px;
  cursor: pointer;
  transition: color 160ms var(--ease-standard);
}

.analyse-nav__back[hidden] { visibility: hidden; }

@media (hover: hover) {
  .analyse-nav__back:hover { color: var(--paper-100); }
}

.analyse-nav__next {
  min-width: 140px;
}

.analyse-nav__next:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* --- Score screen ----------------------------------------------------------- */

.score-hero {
  text-align: center;
  margin-bottom: 32px;
}

.score-hero__value {
  font-size: clamp(56px, 16vw, 96px);
  line-height: 1;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.03em;
  color: var(--paper-100);
  margin: 0;
}

.score-hero__unit {
  font-size: 0.4em;
  font-weight: var(--weight-medium);
  color: var(--ink-400);
  margin-left: 4px;
}

.score-hero__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--signal-300);
  margin: 8px 0 0;
}

.score-hero__band {
  font-size: 17px;
  font-weight: var(--weight-medium);
  margin: 14px 0 0;
}

.score-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.score-bar__head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-300);
  margin-bottom: 6px;
}

.score-bar__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(247, 244, 236, .10);
  overflow: hidden;
}

.score-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--signal-400);
  width: 0%;
  transition: width 620ms var(--ease-out);
}

/* Module-card recipe reused: gradient + 1px border + inset top highlight,
   no drop shadow (see README — overlapping drop shadows band visibly). */
.score-module {
  border: 1px solid rgba(247, 244, 236, .16);
  border-radius: 20px;
  padding: clamp(22px, 4vw, 32px);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .07) inset;
  background: linear-gradient(180deg, #334A8F 0%, #191B17 82%);
  margin-bottom: 20px;
  /* Explicit, not inherited — .score-module__name has no color of its own
     and would otherwise pick up body's (theme-inverted) color. */
  color: var(--paper-100);
}

.score-module__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--signal-300);
  margin-bottom: 10px;
}

.score-module__name {
  font-size: 22px;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.score-module__lead {
  font-size: 16px;
  line-height: 1.4;
  font-weight: var(--weight-medium);
  color: var(--paper-100);
  margin: 0 0 10px;
}

.score-module__body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-300);
  margin: 0 0 18px;
}

#score-module-link {
  font-size: 14px;
  border-bottom-color: rgba(247, 244, 236, .3);
}

.score-disclaimer {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--ink-500);
  margin: 0 0 32px;
}

/* --- Contact form ------------------------------------------------------------ */

.field {
  margin-bottom: 16px;
}

.field__label {
  display: block;
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--ink-300);
  margin-bottom: 6px;
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(247, 244, 236, .18);
  border-radius: 10px;
  background: rgba(247, 244, 236, .04);
  color: var(--paper-100);
  font-size: 15px;
  font-family: var(--font-sans);
  transition: border-color 160ms var(--ease-standard);
}

.field__input::placeholder { color: var(--ink-500); }

.field__input:focus {
  outline: none;
  border-color: var(--signal-400);
}

.field__error {
  font-size: 13px;
  color: #E8A9A9;
  margin-top: 6px;
  display: none;
}

.field.has-error .field__input { border-color: #B85C5C; }
.field.has-error .field__error { display: block; }

/* Honeypot — off-screen, never reachable by keyboard, invisible to sighted
   users; a filled value means a bot filled every field programmatically. */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-300);
}

.consent input {
  margin-top: 3px;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--signal-500);
}

.consent a { color: var(--paper-100); }

/* --- Calendar mock ----------------------------------------------------------
   A real month-grid calendar with prev/next navigation, styled to Owner OS's
   dark-card language. It is still a mock — nothing here talks to a real
   booking backend — but it should read and behave like one, per request. */

.calendar-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--signal-300);
  border: 1px solid rgba(159, 176, 217, .28);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.calendar-card {
  border: 1px solid rgba(247, 244, 236, .16);
  border-radius: 20px;
  padding: clamp(18px, 3.4vw, 26px);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .07) inset;
  background: linear-gradient(180deg, #1E2A52 0%, #191B17 82%);
  margin-bottom: 20px;
  /* Explicit, not inherited — .calendar-month-label has no color of its
     own and would otherwise pick up body's (theme-inverted) color. */
  color: var(--paper-100);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.calendar-month-label {
  font-size: 17px;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
}

.calendar-nav {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(247, 244, 236, .20);
  border-radius: 50%;
  background: rgba(247, 244, 236, .04);
  color: var(--paper-100);
  cursor: pointer;
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard), opacity 160ms var(--ease-standard);
}

.calendar-nav svg { width: 16px; height: 16px; }

@media (hover: hover) {
  .calendar-nav:not(:disabled):hover { border-color: rgba(247, 244, 236, .34); background: rgba(247, 244, 236, .08); }
}

.calendar-nav:disabled {
  opacity: .25;
  cursor: not-allowed;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}

.calendar-weekdays span {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-400);
  padding: 4px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: none;
  color: var(--paper-100);
  font-size: 14px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard), color 160ms var(--ease-standard);
}

.calendar-cell--blank { visibility: hidden; cursor: default; }

@media (hover: hover) {
  .calendar-cell:not(.is-disabled):not(.calendar-cell--blank):hover {
    border-color: rgba(247, 244, 236, .34);
    background: rgba(247, 244, 236, .06);
  }
}

.calendar-cell.is-disabled {
  color: var(--ink-600);
  cursor: not-allowed;
}

.calendar-cell.is-today { border-color: rgba(247, 244, 236, .24); }

.calendar-cell[aria-pressed="true"] {
  border-color: var(--signal-400);
  background: var(--signal-500);
  color: var(--white);
}

.calendar-slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.calendar-slots[hidden] { display: none; }

.calendar-slot {
  border: 1px solid rgba(247, 244, 236, .20);
  border-radius: 10px;
  background: rgba(247, 244, 236, .03);
  color: var(--paper-100);
  padding: 12px;
  min-height: 44px;
  font-size: 14px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard);
}

@media (hover: hover) {
  .calendar-slot:hover { border-color: rgba(247, 244, 236, .34); }
}

.calendar-slot[aria-pressed="true"] {
  border-color: var(--signal-400);
  background: var(--signal-500);
  color: var(--white);
}

/* --- Confirmation ------------------------------------------------------------ */

.confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(108, 132, 196, .16);
  border: 1px solid var(--signal-400);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.confirm-icon svg { width: 24px; height: 24px; color: var(--signal-300); }

.confirm-summary {
  border: 1px solid rgba(247, 244, 236, .16);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-300);
}

.confirm-summary strong { color: var(--paper-100); font-weight: var(--weight-medium); }

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.confirm-restart {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  background: none;
  border: 0;
  color: var(--ink-300);
  font-size: 14px;
  cursor: pointer;
  transition: color 160ms var(--ease-standard);
}

@media (hover: hover) {
  .confirm-restart:hover { color: var(--paper-100); }
}

/* --- Submit state ------------------------------------------------------------ */

.analyse-error {
  border: 1px solid #B85C5C;
  background: rgba(184, 92, 92, .1);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  color: #E8A9A9;
  margin-bottom: 20px;
  display: none;
}

.analyse-error.is-visible { display: block; }

/* --- Reduced motion: short UI transitions stay, per app.css's posture ------- */
@media (prefers-reduced-motion: reduce) {
  .analyse-progress__bar,
  .score-bar__fill { transition: none; }
}
