/* Checkup — magic journal meets modern minimalist editorial. */

:root {
  --paper: #f7f3ea;
  --paper-raised: #fdfbf5;
  --ink: #262119;
  --ink-soft: #57503f;
  --ink-faint: #8a8271;
  --accent: #8c5a2e;
  --accent-deep: #6e4522;
  --hairline: #e2dac8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) 1.375rem 5rem;
}

/* --- shared type --- */

.kicker {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

h1.title {
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0.75rem 0 1.5rem;
}

.intro {
  color: var(--ink-soft);
  font-size: 1.125rem;
  max-width: 34rem;
}

.rule {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2.5rem 0;
}

/* --- questions page --- */

.question { margin: 3rem 0; }

.q-number {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 0.625rem;
}

.q-prompt {
  font-size: 1.3125rem;
  line-height: 1.45;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.q-helper {
  color: var(--ink-faint);
  font-size: 0.9375rem;
  font-style: italic;
  margin-bottom: 1rem;
}

textarea {
  width: 100%;
  min-height: 7.5rem;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--paper-raised);
  padding: 0.875rem 1rem;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  resize: none;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

textarea:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(140, 90, 46, 0.12);
}

.name-row { margin: 2.75rem 0 0; }
.name-row label {
  display: block;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
input[type="text"] {
  width: 100%;
  max-width: 18rem;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--paper-raised);
  padding: 0.75rem 1rem;
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.submit-row { margin-top: 3rem; text-align: center; }

button.primary {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 0.95rem 2.6rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}
button.primary:hover { background: var(--accent-deep); }
button.primary:active { transform: scale(0.98); }
button.primary:disabled { opacity: 0.55; cursor: default; }

.submit-note {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* --- waiting state --- */

.waiting {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.breath {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  animation: breathe 3.2s ease-in-out infinite;
  margin-bottom: 2rem;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.9); opacity: 0.95; }
}

.waiting-line {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-soft);
  transition: opacity 0.6s ease;
  min-height: 2em;
}
.waiting-sub {
  margin-top: 0.75rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

/* --- report --- */

.report-head { text-align: center; margin-bottom: 1rem; }
.report-head .title { margin-bottom: 0.5rem; }
.report-date {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

.greeting {
  font-size: 1.3125rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  max-width: 32rem;
  margin: 2.25rem auto 0;
}

.section { margin: 3.25rem 0; }
.section-label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.375rem;
}
.section-label::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--hairline);
}

.section p { margin-bottom: 1.125rem; }
.section p:last-child { margin-bottom: 0; }

.steps { list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1.375rem 1.5rem 1.375rem 3.6rem;
  margin-bottom: 1rem;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.25rem;
  top: 1.45rem;
  width: 1.6rem; height: 1.6rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps .step-title {
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 0.375rem;
}
.steps .step-detail { font-size: 1.0325rem; color: var(--ink-soft); }

.henrys-word {
  background: linear-gradient(180deg, rgba(140, 90, 46, 0.07), rgba(140, 90, 46, 0.03));
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0;
  padding: 1.5rem 1.625rem;
}
.henrys-word .source {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 0.75rem;
}

.closing {
  font-size: 1.3125rem;
  font-style: italic;
  text-align: center;
  color: var(--ink-soft);
  max-width: 30rem;
  margin: 3.5rem auto 0;
}

.support {
  margin-top: 3.5rem;
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1.5rem 1.625rem;
  font-size: 1rem;
  color: var(--ink-soft);
}
.support strong { color: var(--ink); }

.report-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: 0.78125rem;
  line-height: 1.6;
  color: var(--ink-faint);
  text-align: center;
}

/* reveal animation */
.reveal { opacity: 0; transform: translateY(14px); }
.revealed .reveal {
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes rise {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .revealed .reveal { animation: none; }
  .breath { animation: none; }
}

/* --- crisis page --- */

.crisis-wrap { max-width: 34rem; margin: 0 auto; }
.crisis-lead {
  font-size: 1.375rem;
  line-height: 1.55;
  margin: 1.5rem 0 1rem;
}
.crisis-body { color: var(--ink-soft); margin-bottom: 2.25rem; }
.crisis-body p { margin-bottom: 1rem; }

.resources { list-style: none; }
.resources li { margin-bottom: 0.875rem; }
.resources a {
  display: block;
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1.125rem 1.375rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.resources a:hover { border-color: var(--accent); }
.resources .r-name { font-weight: 700; font-size: 1.0625rem; }
.resources .r-how {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin-top: 0.2rem;
}
