/* AvivaMente — Espaço de Calma. Ritmo lento, contraste confortável, alvos grandes para dedos trêmulos. */
:root {
  --plum-950: #1E0A2C; --plum-900: #2A0F3D; --plum-800: #3D1657; --plum-700: #624587;
  --lilac-500: #7B5EA7; --lilac-300: #B9A5D8; --lilac-100: #EEE7F7;
  --mint-300: #AEDDBF; --mint-400: #83C89C; --mint-600: #2E8A5E;
  --cream: #F8F3EC; --paper: #FFFDF9;
  --text: #F6F0FA; --text-soft: rgba(246, 240, 250, .72);
  --glass: rgba(255, 255, 255, .07); --glass-line: rgba(255, 255, 255, .13);
  --f-display: "Fraunces", Georgia, serif; --f-body: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body.calma {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: linear-gradient(170deg, #2A1838 0%, #3B2450 45%, #4B3463 100%);
  color: var(--text); font: 400 18px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--mint-300); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--mint-400); outline-offset: 3px; border-radius: 8px; }

/* Céu: manchas de luz que se movem muito devagar */
.calma-sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.calma-sky span { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(80px); opacity: .45; animation: drift 46s ease-in-out infinite alternate; }
.calma-sky span:nth-child(1) { background: #7B5EA7; left: -25vmax; top: -30vmax; }
.calma-sky span:nth-child(2) { background: #2E8A5E; right: -30vmax; bottom: -35vmax; opacity: .3; animation-duration: 58s; }
.calma-sky span:nth-child(3) { background: #B9A5D8; left: 30%; top: 40%; width: 40vmax; height: 40vmax; opacity: .18; animation-duration: 70s; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.12); } }

.calma-top, .calma-main, .calma-foot { position: relative; z-index: 1; }
.calma-top { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 4vw, 40px); gap: 12px; }
.calma-logo img { height: 46px; width: auto; display: block; opacity: .92; }
.calma-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.calma-tool { display: inline-flex; align-items: center; gap: .45em; padding: .55em .95em; border-radius: 999px; border: 0; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--text); font-size: .85rem; font-weight: 600; text-decoration: none; transition: background .3s; }
.calma-tool:hover { background: rgba(255, 255, 255, .13); }
.calma-tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.calma-tool[aria-pressed="false"] .w { opacity: .25; }
.calma-tool[aria-pressed="true"] { background: rgba(131, 200, 156, .22); box-shadow: inset 0 0 0 1px var(--mint-400); }
.calma-tool--urgent { background: rgba(174, 221, 191, .16); color: var(--mint-300); }

.calma-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 12px clamp(16px, 4vw, 40px) 24px; }
.calma-stage { width: min(680px, 100%); margin-block: auto; }
.calma-progress { margin-bottom: auto; }
.calma-progress { display: flex; gap: 6px; margin-top: 22px; }
.calma-progress i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .2); transition: background .5s, transform .5s; }
.calma-progress i.on { background: var(--mint-400); transform: scale(1.25); }
.calma-progress i.done { background: rgba(131, 200, 156, .5); }

/* Cartões e tipografia */
.calma-card { text-align: center; animation: rise .9s var(--ease) both; }
.calma-card.out { animation: fade .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { to { opacity: 0; transform: translateY(-8px); } }
.calma-eyebrow { font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mint-300); margin: 0 0 12px; }
.calma-h { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.12; letter-spacing: -.015em; margin: 0 0 14px; text-wrap: balance; }
.calma-h em { font-style: italic; color: var(--mint-300); }
.calma-p { color: var(--text-soft); margin: 0 auto 10px; max-width: 46ch; text-wrap: pretty; }
.calma-lines { display: grid; gap: 12px; margin: 8px auto 6px; max-width: 52ch; }
.calma-lines p { margin: 0; padding: 14px 18px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); text-align: left; animation: rise .9s var(--ease) both; }
.calma-lines p:nth-child(2) { animation-delay: .45s; } .calma-lines p:nth-child(3) { animation-delay: .9s; } .calma-lines p:nth-child(4) { animation-delay: 1.35s; }
.calma-lines--now p { animation-delay: 0s !important; animation-duration: .5s; }

.calma-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.c-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 54px; padding: .9em 1.6em; border-radius: 999px; border: 0; background: var(--mint-400); color: var(--plum-950); font-weight: 700; font-size: 1rem; text-decoration: none; transition: transform .3s var(--ease), background .3s; }
.c-btn:hover { background: var(--mint-300); transform: translateY(-1px); }
.c-btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--glass-line); }
.c-btn--ghost:hover { background: var(--glass); }
.c-btn--soft { background: rgba(255, 255, 255, .1); color: var(--text); }
.c-link { background: none; border: 0; color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; padding: 8px; }

/* Escolhas */
.calma-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 22px; text-align: left; }
.calma-choice { display: block; width: 100%; text-align: left; padding: 16px 18px; border-radius: 20px; border: 0; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); transition: background .3s, box-shadow .3s, transform .3s var(--ease); animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.calma-choice:hover, .calma-choice:focus-visible { background: rgba(131, 200, 156, .14); box-shadow: inset 0 0 0 1.5px var(--mint-400); transform: translateY(-2px); }
.calma-choice strong { display: block; font-size: 1.02rem; margin-bottom: 2px; }
.calma-choice span { font-size: .86rem; color: var(--text-soft); line-height: 1.4; display: block; }
.calma-choice--urgent { background: rgba(255, 210, 200, .1); box-shadow: inset 0 0 0 1.5px rgba(255, 190, 175, .45); }

/* Escala 0-10 */
.calma-scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; margin: 24px auto 8px; max-width: 560px; }
.calma-scale button { aspect-ratio: 1; border: 0; border-radius: 14px; font-weight: 700; font-size: 1rem; background: hsl(calc(150 - var(--v) * 13) 45% 70% / .22); box-shadow: inset 0 0 0 1px var(--glass-line); transition: transform .2s, background .2s; }
.calma-scale button:hover, .calma-scale button:focus-visible { transform: translateY(-3px); background: hsl(calc(150 - var(--v) * 13) 45% 70% / .45); }
.calma-scale-legend { display: flex; justify-content: space-between; max-width: 560px; margin: 0 auto; font-size: .8rem; color: var(--text-soft); }
@media (max-width: 520px) { .calma-scale { grid-template-columns: repeat(6, 1fr); } .calma-scale-legend { display: none; } }

/* Orbe de respiração */
.orb-wrap { position: relative; width: min(300px, 70vw); aspect-ratio: 1; margin: 18px auto 6px; display: grid; place-items: center; }
.orb-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(185, 165, 216, .35); }
.orb-ring--2 { inset: -9%; box-shadow: inset 0 0 0 1px rgba(185, 165, 216, .16); }
.orb { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #E7F6EC 0%, #AEDDBF 38%, #83C89C 62%, #4E9E78 100%); box-shadow: 0 0 60px rgba(131, 200, 156, .45), 0 0 140px rgba(131, 200, 156, .2); transform: scale(.55); transition-property: transform; transition-timing-function: cubic-bezier(.37, 0, .63, 1); }
.orb-label { position: relative; z-index: 1; text-align: center; color: var(--plum-950); font-weight: 700; font-size: 1.2rem; line-height: 1.2; pointer-events: none; }
.orb-label small { display: block; font-size: 2rem; font-family: var(--f-display); font-weight: 500; }
.orb-cycles { font-size: .88rem; color: var(--text-soft); margin-top: 4px; }

/* Timer circular (frio, mão no peito) */
.ring-timer { width: 180px; height: 180px; margin: 22px auto 6px; position: relative; }
.ring-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-timer circle { fill: none; stroke-width: 6; }
.ring-timer .bg { stroke: rgba(255, 255, 255, .12); }
.ring-timer .fg { stroke: var(--mint-400); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring-timer b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: 2.6rem; font-weight: 400; }
.pulse-heart { width: 140px; height: 140px; margin: 22px auto 6px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 196, .55), rgba(185, 165, 216, .25) 60%, transparent 70%); animation: heart 5s ease-in-out infinite; }
@keyframes heart { 50% { transform: scale(1.18); } }

/* Aterramento 5-4-3-2-1 */
.ground-n { font-family: var(--f-display); font-size: 4.5rem; line-height: 1; color: var(--mint-300); margin: 6px 0 4px; }
.ground-dots { display: flex; justify-content: center; gap: 10px; margin: 16px 0 6px; }
.ground-dots i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(174, 221, 191, .5); transition: background .4s, transform .4s var(--ease); }
.ground-dots i.on { background: var(--mint-400); transform: scale(1.15); box-shadow: none; }
.ground-form { display: flex; gap: 8px; max-width: 420px; margin: 12px auto 0; }
.c-input, .c-area { width: 100%; padding: .85em 1.1em; border-radius: 16px; border: 0; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--text); font: inherit; font-size: 1rem; }
.c-input::placeholder, .c-area::placeholder { color: rgba(246, 240, 250, .45); }
.c-input:focus, .c-area:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--mint-400); }
.ground-said { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; min-height: 30px; }
.ground-said span { padding: .25em .8em; border-radius: 999px; background: rgba(131, 200, 156, .16); font-size: .86rem; animation: rise .6s var(--ease) both; }

/* Corpo */
.body-part { font-family: var(--f-display); font-size: 2rem; margin: 10px 0 4px; }
.body-phase { display: inline-block; padding: .3em 1em; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: rgba(255, 255, 255, .1); }
.body-phase.tense { background: rgba(255, 200, 150, .2); color: #FFD9B0; }
.body-phase.release { background: rgba(131, 200, 156, .2); color: var(--mint-300); }

/* Afirmações */
.affirm { min-height: 7.5em; display: grid; place-items: center; }
.affirm p { font-family: var(--f-display); font-style: italic; font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.3; max-width: 26ch; margin: 0; animation: rise 1.4s var(--ease) both; }

/* Ligações */
.calls { display: grid; gap: 10px; margin: 22px auto 0; max-width: 480px; text-align: left; }
.call { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: 20px; text-decoration: none; color: var(--text); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); transition: background .3s; }
.call:hover { background: rgba(255, 255, 255, .12); }
.call b { font-family: var(--f-display); font-size: 1.6rem; font-weight: 500; min-width: 2.6ch; color: var(--mint-300); }
.call span { font-size: .92rem; line-height: 1.35; } .call small { display: block; color: var(--text-soft); }
.call--urgent { background: var(--paper); color: var(--plum-900); }
.call--urgent b { color: var(--plum-800); } .call--urgent small { color: #5E5266; }
.call--urgent:hover { background: var(--cream); }

/* Formulários (plano e contato) */
.c-form { display: grid; gap: 14px; text-align: left; max-width: 520px; margin: 20px auto 0; }
.c-form label > span { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.c-form small { color: var(--text-soft); font-weight: 400; }
.c-check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--text-soft); }
.c-check input { width: 22px; height: 22px; accent-color: var(--mint-400); flex: none; margin-top: 2px; }
.c-err { color: #FFC9B8; font-size: .88rem; min-height: 1.2em; margin: 0; }
.calma-list { list-style: none; padding: 0; margin: 18px auto 0; max-width: 480px; display: grid; gap: 8px; text-align: left; }
.calma-list li { padding: 12px 16px 12px 44px; border-radius: 16px; background: var(--glass); position: relative; }
.calma-list li::before { content: ""; position: absolute; left: 16px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--mint-400); opacity: .7; }

.calma-foot { padding: 0 clamp(16px, 4vw, 40px) 22px; text-align: center; }
.calma-phrase { font-family: var(--f-display); font-style: italic; color: rgba(246, 240, 250, .62); min-height: 1.6em; margin: 0 0 10px; transition: opacity 1.2s; }
.calma-phrase.hide { opacity: 0; }
.calma-legal { font-size: .76rem; color: rgba(246, 240, 250, .5); margin: 0; }
.calma-legal a { color: rgba(174, 221, 191, .85); }

/* Botão de pânico flutuante: nesta página ele não precisa aparecer */
body.calma .sos-btn { display: none; }

@media print {
  body.calma { background: #fff; color: #000; }
  .calma-sky, .calma-top, .calma-foot, .calma-progress, .calma-actions, .c-check, .no-print { display: none !important; }
  .c-area, .c-input { box-shadow: none; border: 1px solid #999; color: #000; background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  .calma-sky span, .pulse-heart { animation: none; }
  .calma-card, .calma-lines p, .calma-choice, .affirm p { animation-duration: .01s; animation-delay: 0s !important; }
}

/* ---------- Ajustes da revisão de UX ---------- */
.calma-stage-wrap { width: min(680px, 100%); margin-block: auto; position: relative; }
.calma-stage-wrap .calma-stage { margin: 0; }
.calma-back { display: inline-flex; align-items: center; gap: .3em; margin: 0 0 10px -6px; padding: .45em .8em .45em .5em; border: 0; border-radius: 999px; background: none; color: var(--text-soft); font-size: .88rem; font-weight: 600; }
.calma-back:hover { background: var(--glass); color: var(--text); }
.calma-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.calma-back[hidden] { display: none; }
.calma-card { animation-duration: .6s; }
.calma-choice { animation-duration: .55s; animation-delay: calc(var(--i, 0) * 40ms); }
.calma-lines p { animation-duration: .6s; }
.calma-lines p:nth-child(2) { animation-delay: .25s; } .calma-lines p:nth-child(3) { animation-delay: .5s; } .calma-lines p:nth-child(4) { animation-delay: .75s; }
.calma-scale { display: flex; flex-wrap: wrap; justify-content: center; }
.calma-scale button { width: calc((100% - 60px) / 11); min-width: 44px; }
.calma-scale-legend { display: flex; justify-content: space-between; }
@media (max-width: 520px) {
  .calma-scale { gap: 8px; }
  .calma-scale button { width: calc((100% - 41px) / 6); min-width: 0; }
  .calma-scale-legend { display: flex; justify-content: center; gap: 16px; }
  .calma-tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .calma-tool { padding: .6em; }
  .calma-tool--urgent span { position: static; width: auto; height: auto; clip: auto; }
  .calma-tool--urgent { padding: .55em .9em; }
  .calma-logo img { height: 40px; }
  .calma-top { padding-top: 14px; padding-bottom: 6px; }
}
[data-wait][hidden] { display: none; }

/* Fundo: o degradê vive na camada fixa (.calma-sky), então não se repete em telas longas */
html, body { height: auto; }
html { background: #2A1838; }
body.calma { background: #2A1838; }
.calma-sky { background: linear-gradient(170deg, #2A1838 0%, #3B2450 45%, #4B3463 100%); }
