/* ==========================================================================
   Views — Layout for each screen / step
   Ōntóφys · The Mirror
   Each view is a full-screen step in the experience.
   ========================================================================== */

/* ── Global Header & Footer ─────────────────────────────────────────────── */

.global-header {
  text-align: center;
  padding: var(--space-3xl) var(--padding-view-x) 0;
}

.global-title {
  font-family: var(--font-heading);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h1);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--color-text);
}

.global-header .divider {
  margin: var(--space-md) auto;
}

.global-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: var(--space-md) var(--padding-view-x);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  z-index: var(--z-base);
}

.global-footer .footer-copy {
  font-size: var(--fs-small);
  color: var(--color-muted);
}

.global-footer .footer-link {
  font-size: var(--fs-small);
  color: var(--color-accent);
  text-decoration: none;
}

.global-footer .footer-link:hover {
  color: var(--color-accent-hover);
}

/* ── View — Base ────────────────────────────────────────────────────────── */

.view {
  display: none;
  max-width: var(--max-width-content);
  margin-left: auto;
  margin-right: auto;
  padding: var(--padding-view-y) var(--padding-view-x);
  width: 100%;
}

.view.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Landing ────────────────────────────────────────────────────────────── */

#view-landing {
  justify-content: center;
  text-align: center;
  gap: 28px;
}

/* ── Steps Guide ─────────────────────────────────────────────────────── */

.landing-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 520px;
  width: 100%;
  text-align: left;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  position: relative;
  padding-bottom: 28px;
}

.step:last-child {
  padding-bottom: 0;
}

/* Connecting line between step circles */
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 36px;
  bottom: 0;
  width: 1px;
  background-color: var(--color-divider);
}

.step-number {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(var(--color-accent-rgb), 0.12);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.step-text {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--color-muted);
  padding-top: 7px;
}


/* ── Invitation Notice ──────────────────────────────────────────────────── */

.invitation-notice {
  max-width: 520px;
  width: 100%;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--color-muted);
  text-align: center;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  background-color: rgba(var(--color-accent-rgb), 0.05);
}

/* ── Question ───────────────────────────────────────────────────────────── */

#view-question {
  gap: 24px;
  text-align: left;
  justify-content: center;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.question-header,
.question-body,
.answer-container {
  width: 100%;
}

.question-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

#view-question .section-label {
  align-self: flex-start;
}

#view-question h2 {
  align-self: flex-start;
  max-width: 100%;
}

#view-question .textarea {
  align-self: stretch;
}

/* Question navigation row */
.question-nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

/* When there's no back button, push next to the right */
.question-nav .btn-next:only-child {
  margin-left: auto;
}

/* Progress wrapper above the question */
.question-progress {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

/* ── Confirmation ───────────────────────────────────────────────────────── */

#view-confirmation {
  min-height: 60vh;
  justify-content: center;
  text-align: center;
  gap: 20px;
}

.confirmation-header,
.confirmation-body,
.confirmation-cta {
  width: 100%;
}

#view-confirmation h2 {
  max-width: 460px;
}

#view-confirmation .lead {
  max-width: 420px;
}

/* Gentle check icon or symbol */
#view-confirmation .confirmation-icon {
  font-size: 36px;
  line-height: 1;
  opacity: 0.7;
  margin-bottom: var(--space-sm);
}

/* ── Full-width wrapper (progress bar outside .view) ────────────────────── */

.app-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-overlay);
}

/* ── View content alignment helpers ─────────────────────────────────────── */

.view__header {
  display: flex;
  flex-direction: column;
  align-items: inherit;
  gap: var(--space-sm);
  width: 100%;
}

.view__body {
  display: flex;
  flex-direction: column;
  align-items: inherit;
  gap: var(--space-md);
  width: 100%;
}

.view__footer {
  display: flex;
  flex-direction: column;
  align-items: inherit;
  gap: var(--space-md);
  width: 100%;
  margin-top: auto;
}
