/* ================================================
   BRAVE FEELINGS LAB
   Calm the Storm — An Anger Reset Lab for Kids
   style.css  |  Created by Benne Hart
   ================================================ */

:root {
  --teal:       #0D9488;
  --teal-lt:    #CCFBF1;
  --teal-dk:    #0F766E;
  --gold:       #F6B93B;
  --gold-lt:    #FDE68A;
  --coral:      #F87171;
  --coral-lt:   #FEE2E2;
  --sky:        #BAE6FD;
  --sky-lt:     #E0F2FE;
  --navy:       #1E3A5F;
  --white:      #FFFFFF;
  --surface:    #F8FAFC;
  --border:     #E2E8F0;
  --text:       #1E293B;
  --text-mid:   #475569;
  --text-lt:    #94A3B8;
  --shadow:     0 4px 24px rgba(30,58,95,0.10);
  --r:          1.25rem;
  --r-sm:       0.75rem;
}

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

html, body {
  min-height: 100%;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(155deg, #E0F2FE 0%, #F0FDF4 55%, #FEF9EE 100%);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── PASSWORD ─────────────────────── */
.pw-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.pw-card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.pw-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--sky-lt);
  border: 3px solid var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-icon    { font-size: 2.4rem; }
.pw-title   { font-family: 'Fredoka One', cursive; font-size: 2rem; color: var(--navy); line-height: 1.1; }
.pw-sub     { font-size: 0.9rem; color: var(--text-mid); margin-top: -0.4rem; }
.pw-brand   { font-size: 0.78rem; color: var(--text-lt); }
.pw-prompt  { font-size: 0.95rem; color: var(--text-mid); }

.pw-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
.pw-input:focus { border-color: var(--teal); }

.pw-error { color: var(--coral); font-size: 0.9rem; font-weight: 700; }

/* ── PROGRESS BAR ─────────────────── */
.prog-wrap {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.prog-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 0.3rem;
}

.prog-track {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  border-radius: 99px;
  width: 0%;
  transition: width .45s ease;
}

/* ── SCREEN ───────────────────────── */
.screen {
  min-height: calc(100vh - 54px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem 3.5rem;
}

.screen-inner {
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.screen-img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  background: var(--sky-lt);
  display: block;
}

/* ── CARD ─────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.card h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  color: var(--navy);
  line-height: 1.2;
}

.card p { font-size: 1rem; color: var(--text); }

/* ── BUTTONS ──────────────────────── */
.btn-primary,
.btn-next,
.btn-back,
.btn-secondary {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.97rem;
  border: none;
  border-radius: 99px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  display: inline-block;
}

.btn-primary,
.btn-next {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dk) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(13,148,136,.32);
}
.btn-primary:hover, .btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13,148,136,.42);
}

.btn-back {
  background: var(--surface);
  color: var(--text-mid);
  border: 2px solid var(--border);
}
.btn-back:hover { background: var(--border); }

.btn-secondary {
  background: var(--gold-lt);
  color: var(--navy);
  box-shadow: 0 3px 10px rgba(246,185,59,.28);
}
.btn-secondary:hover { background: var(--gold); transform: translateY(-2px); }

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.nav-row .btn-next { margin-left: auto; }

.btn-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

/* ── CHOICE GRID ──────────────────── */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.choice-grid.col-1 { grid-template-columns: 1fr; }

.choice-btn {
  padding: 0.7rem 0.6rem;
  border-radius: var(--r-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  line-height: 1.4;
  transition: all .15s;
}
.choice-btn:hover   { border-color: var(--teal); background: var(--teal-lt); }
.choice-btn.selected { border-color: var(--teal); background: var(--teal-lt); color: var(--teal); }

/* ── FEEDBACK BOX ─────────────────── */
.feedback-box {
  padding: 0.85rem 1rem;
  border-radius: var(--r-sm);
  background: var(--sky-lt);
  border-left: 4px solid var(--teal);
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--navy);
}

/* ── CHECKBOXES ───────────────────── */
.check-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.chk {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: var(--r-sm);
  transition: background .15s;
}
.chk:hover { background: var(--teal-lt); }
.chk input[type="checkbox"] {
  accent-color: var(--teal);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* ── JOURNAL ──────────────────────── */
.journal, .journal-line {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 0.96rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .2s;
  display: block;
}
.journal        { resize: vertical; }
.journal:focus,
.journal-line:focus { border-color: var(--teal); background: var(--white); }

.field-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-mid);
  display: block;
}

/* ── ICON LIST ────────────────────── */
.icon-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0;
}
.icon-list li,
.icon-list.tight li {
  padding: 0.45rem 0.7rem;
  background: var(--surface);
  border-left: 3px solid var(--teal);
  border-radius: var(--r-sm);
  font-size: 0.93rem;
  font-weight: 600;
}
.icon-list.tight li { padding: 0.35rem 0.7rem; }

/* ── BUBBLE LIST ──────────────────── */
.bubble-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0;
}
.bubble-list li {
  padding: 0.55rem 1rem;
  background: var(--teal-lt);
  border-radius: var(--r-sm);
  font-size: 0.93rem;
  font-weight: 700;
  font-style: italic;
  color: #0F5B55;
}

/* ── STEPS LIST ───────────────────── */
.steps-list { display: flex; flex-direction: column; gap: 0.55rem; }

.step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.step-num {
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-dot {
  min-width: 36px;
  font-size: 1.3rem;
  text-align: center;
  flex-shrink: 0;
}

/* ── TIP BOX ──────────────────────── */
.tip-box {
  background: var(--gold-lt);
  border-left: 4px solid var(--gold);
  border-radius: var(--r-sm);
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #78350F;
}

/* ── STORM METER ──────────────────── */
.storm-wrap {
  background: var(--coral-lt);
  border-radius: var(--r-sm);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.storm-label { font-weight: 700; font-size: 0.88rem; color: #991B1B; }
.storm-track { height: 14px; background: #FCA5A5; border-radius: 99px; overflow: hidden; }
.storm-bar   {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  border-radius: 99px;
  width: 80%;
  animation: stormPulse 2s ease-in-out infinite alternate;
}
@keyframes stormPulse {
  from { opacity: 1; }
  to   { opacity: .7; }
}
.storm-hint { font-size: 0.82rem; font-weight: 600; color: #7F1D1D; }

/* ── BREATHING ────────────────────── */
.breath-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1.25rem 0;
}

.breath-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-lt), var(--sky));
  border: 4px solid var(--teal);
}

.breath-circle.expanding   { animation: bExpand   4s ease-in-out forwards; }
.breath-circle.holding     { animation: bHold     2s linear       forwards; }
.breath-circle.contracting { animation: bContract 4s ease-in-out forwards; }
.breath-circle.long-out    { animation: bLong     6s ease-in-out forwards; }

@keyframes bExpand   { from { transform:scale(1);   } to { transform:scale(1.6); } }
@keyframes bHold     { from { transform:scale(1.6); } to { transform:scale(1.6); } }
@keyframes bContract { from { transform:scale(1.6); } to { transform:scale(1);   } }
@keyframes bLong     { from { transform:scale(1.6); } to { transform:scale(1);   } }

.breath-lbl {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--teal);
}

/* ── COUNT TO FIVE ────────────────── */
.count-row {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

.count-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--teal);
  background: var(--teal-lt);
  font-family: 'Fredoka One', cursive;
  font-size: 1.45rem;
  color: var(--teal);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s;
}
.count-btn:hover { background: var(--teal); color: var(--white); transform: scale(1.1); }
.count-btn.tapped { background: var(--teal); color: var(--white); }

.count-msg {
  text-align: center;
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--teal);
  background: var(--teal-lt);
  padding: 0.55rem 1rem;
  border-radius: var(--r-sm);
}

/* ── HOT/COOL SWAP ────────────────── */
.swap-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.45rem 0.5rem;
  align-items: center;
}
.swap-from {
  padding: 0.55rem 0.7rem;
  background: var(--coral-lt);
  border: 1.5px solid var(--coral);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: #991B1B;
  text-align: center;
}
.swap-to {
  padding: 0.55rem 0.7rem;
  background: var(--teal-lt);
  border: 1.5px solid var(--teal);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: #115E59;
  text-align: center;
}
.swap-arrow { text-align: center; font-size: 1.3rem; color: var(--text-mid); }

/* ── PARENT CARD ──────────────────── */
.parent-card { border-top: 5px solid var(--gold); }

/* ── CERTIFICATE ──────────────────── */
.cert-card {
  text-align: center;
  background: linear-gradient(155deg, #FFFBEB 0%, #F0FDF4 100%);
  border: 3px solid var(--gold);
  padding: 2rem 1.5rem;
}
.cert-icon    { font-size: 3.2rem; margin-bottom: .5rem; }
.cert-heading {
  font-family: 'Fredoka One', cursive;
  font-size: 1.55rem;
  color: var(--navy);
  line-height: 1.2;
}
.cert-line-sm  { font-size: .88rem; color: var(--text-mid); font-weight: 600; margin: .1rem 0; }
.cert-name     { font-family: 'Fredoka One', cursive; font-size: 1.55rem; color: var(--teal); margin: .2rem 0; }
.cert-program  { font-family: 'Fredoka One', cursive; font-size: 1.3rem;  color: var(--navy); }
.cert-subtitle { font-size: .88rem; color: var(--text-mid); font-weight: 600; }
.cert-brand    { font-size: .75rem; color: var(--text-lt); margin-top: .15rem; }
.cert-divider  { border: none; border-top: 2px solid var(--gold); margin: 1rem 0; }
.cert-quote    { font-style: italic; font-weight: 700; color: var(--teal); font-size: 1.05rem; }
.cert-name-input-wrap { margin-top: .75rem; }
.cert-actions  {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* ── PRINT ────────────────────────── */
@media print {
  body { background: white; }
  .prog-wrap,
  .btn-next,
  .btn-back,
  .btn-primary,
  .btn-secondary,
  .cert-name-input-wrap,
  .screen-img { display: none !important; }
  .cert-card { border: 3px solid #F6B93B; page-break-inside: avoid; }
}

/* ── RESPONSIVE ───────────────────── */
@media (max-width: 480px) {
  .card            { padding: 1.25rem 1rem; }
  .card h2         { font-size: 1.35rem; }
  .choice-grid     { grid-template-columns: 1fr; }
  .swap-grid       { grid-template-columns: 1fr; }
  .swap-arrow      { display: none; }
  .cert-actions    { flex-direction: column; align-items: center; }
  .count-btn       { width: 44px; height: 44px; font-size: 1.25rem; }
}
