/* ==============================================================
   KIND WORDS BACK · page styles
   File: /kind-words-back/kind-words-back.css
   Colours, font and buttons come from site.css.
   The "How it helps" section uses shared styles (site.css, section 13).

   Sections:
     1  Warm colours (this page only)
     2  Layout, intro and steps
     3  Writing
     4  The card that hands your words back
     5  Kept cards
   ============================================================== */


/* --------------------------------------------------------------
   1 · WARM COLOURS
   -------------------------------------------------------------- */
:root {
  --warm-glow: #F6D9C4;
  --warm-card: #FFF8F0;
  --warm-ink: #3A2E2B;
  --warm-soft: #8A6E62;
  --warm-edge: #EAD3C2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --warm-glow: #4A3A36;
    --warm-card: #F6EDE2;          /* the card stays light, like paper */
    --warm-ink: #3A2E2B;
    --warm-soft: #8A6E62;
    --warm-edge: #D9C3B1;
  }
}


/* --------------------------------------------------------------
   2 · LAYOUT, INTRO AND STEPS
   -------------------------------------------------------------- */
.kindroom {
  padding-block: clamp(1.5rem, 5vw, 3rem) clamp(3rem, 8vw, 5rem);
  background:
    radial-gradient(70% 55% at 50% 30%, color-mix(in srgb, var(--warm-glow) 55%, transparent), transparent 70%),
    linear-gradient(var(--c-sky-top), var(--bg));
}
.kindroom__inner { max-width: 46rem; }
.kindroom__intro { margin-bottom: 1.5rem; }
.kindroom__title {
  margin-bottom: .35em;
  font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem);
  font-weight: var(--weight-light);
  letter-spacing: -.025em;
}
.kindroom__lede {
  font-size: var(--step-1);
  font-weight: var(--weight-light);
  line-height: 1.45;
}

.kind-steps {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  counter-reset: kstep;
  font-size: .9rem;
}
.kind-steps li {
  counter-increment: kstep;
  padding: .3rem .85rem .3rem .45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
.kind-steps li::before {
  content: counter(kstep);
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: .45rem;
  border-radius: 50%;
  background: var(--line);
  color: var(--text);
  font-size: .8rem;
}
.kind-steps li[aria-current="step"] { border-color: var(--accent); color: var(--text); font-weight: var(--weight-strong); }
.kind-steps li[aria-current="step"]::before { background: var(--accent); color: var(--on-accent); }
.kind-steps li.is-done::before { content: "✓"; }

.kind {
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--surface);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
}
.kind:focus { outline: none; }


/* --------------------------------------------------------------
   3 · WRITING
   -------------------------------------------------------------- */
.kind-step__ask {
  display: block;
  margin-bottom: .35rem;
  font-size: var(--step-1);
  font-weight: var(--weight-light);
}
.kind-step__hint {
  margin-bottom: .75rem;
  font-size: var(--step--1);
  color: var(--muted);
}
.kind-input {
  display: block;
  width: 100%;
  padding: .85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1.6;
  resize: vertical;
}
.kind-input--tall { min-height: 10rem; }
.kind-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.kind-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }

.friend {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-s);
  background: color-mix(in srgb, var(--warm-glow) 40%, var(--surface));
}
.friend__label { font-size: var(--step--1); color: var(--muted); margin-bottom: .35rem; }
.friend__quote {
  margin: 0;
  font-size: 1.15rem;
  font-weight: var(--weight-light);
  font-style: italic;
  line-height: 1.5;
}

.kind-starters__label { margin: 1rem 0 .5rem; font-size: var(--step--1); color: var(--muted); }
.kind-starters {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  appearance: none;
  min-height: 38px;
  padding: .35rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: var(--weight-regular) .92rem/1.2 var(--font-main);
  cursor: pointer;
}
.chip:hover { border-color: var(--text); }

.kind-status {
  min-height: 1.65em;
  margin-top: 1rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .kind-actions .btn { flex: 1 1 100%; }
}


/* --------------------------------------------------------------
   4 · THE CARD THAT HANDS YOUR WORDS BACK
   -------------------------------------------------------------- */
.giveback__intro {
  margin-bottom: 1.25rem;
  text-align: center;
  font-size: var(--step-1);
  font-weight: var(--weight-light);
}
.giveback__intro:focus { outline: none; }

.kindcard {
  position: relative;
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 6vw, 3rem) clamp(1.5rem, 6vw, 3rem);
  border-radius: 6px;
  background: var(--warm-card);
  color: var(--warm-ink);
  text-align: center;
  box-shadow: 0 0 0 1px var(--warm-edge), 0 20px 50px -20px rgba(120, 70, 40, .45), 0 0 80px -10px color-mix(in srgb, var(--warm-glow) 90%, transparent);
}
.kindcard__lines p {
  font-size: clamp(1.15rem, 1rem + .8vw, 1.45rem);
  font-weight: var(--weight-light);
  line-height: 1.55;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}
.kindcard__lines p + p { margin-top: .8rem; }
.kindcard__lines p.is-shown { opacity: 1; transform: none; }
.kindcard__sign {
  margin-top: 1.5rem;
  color: var(--warm-soft);
  font-size: .95rem;
  font-style: italic;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.kindcard__sign.is-shown { opacity: 1; }

.giveback__touch {
  max-width: 30rem;
  margin: 1.25rem auto 0;
  text-align: center;
  font-size: var(--step--1);
  color: var(--muted);
}
.giveback__after { margin-top: 1.5rem; text-align: center; }
.giveback__after .kind-actions { justify-content: center; }
.giveback__close {
  font-size: var(--step-1);
  font-weight: var(--weight-light);
  line-height: 1.45;
}
.kind-showall { display: block; margin: 1.25rem auto 0; }

@media (prefers-reduced-motion: reduce) {
  .kindcard__lines p, .kindcard__sign { transition: none; }
}


/* --------------------------------------------------------------
   5 · KEPT CARDS
   -------------------------------------------------------------- */
.kept { margin-top: clamp(2rem, 5vw, 3rem); }
.kept__title { font-size: var(--step-2); }
.kept__note { margin: .4rem 0 1rem; color: var(--muted); font-size: var(--step--1); }
.kept__list { margin: 0; padding: 0; list-style: none; }
.kept__list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.kept__open {
  flex: 1 1 auto;
  min-width: 0;
  padding: .2rem 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kept__open:hover { text-decoration: underline; }
.kept__date { color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
.kept__remove {
  flex: none;
  padding: .3rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
.kept__remove:hover,
.kept__remove.is-armed { border-color: var(--danger); color: var(--danger); }
