/*
Theme Name: Pulseroom
Theme URI: https://pulseroom.nl
Author: Pulseroom
Author URI: https://pulseroom.nl
Description: Pulseroom — Een dagelijkse dankbaarheidspraktijk. Minimalistisch single-page thema met ingebouwde ademhalings- en dankbaarheidsoefening.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pulseroom
Tags: one-page, minimalist, wellness, meditation
*/

/* ─────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────── */
:root {
  --bg:    #f0e9d8;
  --ink:   #1a1710;
  --moss:  #384f3e;
  --stone: #8a7260;
  --sand:  #c4ae8c;
  --green: #5b7a60;
  --red:   #7a3e30;
  --trans: 0.75s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html, body { width:100%; height:100%; height:100svh; overflow:hidden; }
body { background-color:var(--bg); color:var(--ink); font-family:'Noto Sans',sans-serif; font-weight:300; }

/* BG */
.bg-glow {
  position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(ellipse 80% 60% at 8% 90%,  rgba(56,79,62,0.13)  0%, transparent 65%),
    radial-gradient(ellipse 65% 55% at 92% 8%,  rgba(77,110,124,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255,255,255,0.18) 0%, transparent 70%);
}
.bamboo-bg { position:fixed; right:-8px; top:0; height:100%; width:auto; opacity:0.055; z-index:0; pointer-events:none; }

/* APP */
.app { position:relative; z-index:1; width:100%; height:100vh; height:100svh; display:flex; align-items:center; justify-content:center; }

/* ─────────────────────────────────────────────
   SCREENS — met flex-spacer voor mobiele scroll
   ─────────────────────────────────────────────
   Techniek: ::before en ::after zijn flex-items met flex:1 0 24px.
   Ze groeien gelijk → content wordt gecentreerd.
   Ze krimpen NIET onder 24px → overflow-y:auto pakt op voor scrollen.
   ───────────────────────────────────────────── */
.screen {
  position:absolute; inset:0;
  display:flex; flex-direction:column; align-items:center;
  justify-content:flex-start;
  padding:0 24px;
  opacity:0; pointer-events:none;
  transition:opacity var(--trans);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.screen::before,
.screen::after {
  content:'';
  flex:1 1 24px;   /* kán krimpen als scherm te klein is */
  min-height:16px;
}
.screen.active { opacity:1; pointer-events:all; }

/* TIMER */
#timer-wrap { position:fixed; top:26px; right:26px; z-index:20; display:none; flex-direction:column; align-items:center; gap:5px; }
.t-ring { position:relative; width:58px; height:58px; }
.timer-svg { width:58px; height:58px; transform:rotate(-90deg); }
.t-bg  { fill:none; stroke:rgba(196,174,140,0.28); stroke-width:1.5; }
.t-prog { fill:none; stroke:var(--green); stroke-width:1.5; stroke-linecap:round; stroke-dasharray:150.8; stroke-dashoffset:0; transition:stroke-dashoffset 1s linear; }
.t-inner { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.t-mins { font-size:0.63rem; letter-spacing:0.04em; color:var(--stone); transform:rotate(90deg); }
.t-label { font-size:0.6rem; letter-spacing:0.2em; text-transform:uppercase; color:var(--sand); opacity:0.7; }

/* SOUND */
#snd-btn {
  position:fixed; bottom:26px; right:26px; z-index:20;
  width:34px; height:34px; background:none;
  border:1px solid rgba(196,174,140,0.38);
  color:var(--stone); cursor:pointer; font-size:0.82rem;
  display:flex; align-items:center; justify-content:center;
  transition:border-color 0.3s,color 0.3s;
}
#snd-btn:hover { border-color:var(--stone); color:var(--ink); }

/* WELCOME */
.w-dots { letter-spacing:0.45em; color:var(--sand); margin-bottom:28px; font-size:1rem; }
.w-title { font-family:'Cormorant Garamond',serif; font-size:clamp(3.2rem,8vw,6rem); font-weight:300; color:var(--ink); line-height:0.95; margin-bottom:10px; text-align:center; }
.w-title em { font-style:italic; color:var(--moss); }
.w-sub { font-size:0.72rem; letter-spacing:0.45em; color:var(--stone); margin-bottom:44px; opacity:0.65; }
.w-vline { width:1px; height:48px; background:var(--sand); opacity:0.55; margin-bottom:44px; }
.w-desc { max-width:430px; text-align:center; line-height:2.1; color:var(--stone); font-size:0.9rem; margin-bottom:52px; }
.btn-start {
  font-family:'Cormorant Garamond',serif; font-size:1.1rem; font-weight:400; letter-spacing:0.12em;
  color:var(--bg); background:var(--moss); border:none; padding:16px 54px;
  cursor:pointer; position:relative; transition:background 0.35s,transform 0.2s;
}
.btn-start::after { content:''; position:absolute; inset:4px; border:1px solid rgba(255,255,255,0.18); pointer-events:none; }
.btn-start:hover { background:var(--ink); transform:translateY(-1px); }
.btn-start:active { transform:translateY(0); }

/* LIST SCREEN */
.li-vraag {
  font-family:'Cormorant Garamond',serif;
  font-size:clamp(1.6rem,4vw,2.55rem);
  font-weight:300; text-align:center; line-height:1.3;
  color:var(--ink); max-width:560px; margin-bottom:38px;
}
.li-vraag em { font-style:italic; color:var(--moss); }

.li-invoer-wrap {
  display:flex; align-items:stretch;
  width:min(520px,92vw); margin-bottom:18px;
  border-bottom:1px solid rgba(196,174,140,0.5);
  transition:border-color 0.3s;
}
.li-invoer-wrap:focus-within { border-color:var(--green); }
.li-input {
  flex:1; background:none; border:none;
  font-family:'Cormorant Garamond',serif;
  font-size:1.3rem; font-weight:300; font-style:italic;
  color:var(--ink); padding:10px 0; outline:none;
}
.li-input::placeholder { color:var(--sand); opacity:0.7; }
.li-add-btn { background:none; border:none; cursor:pointer; color:var(--stone); font-size:1.4rem; padding:0 4px 0 14px; line-height:1; transition:color 0.2s; }
.li-add-btn:hover { color:var(--green); }

.li-lijst { width:min(520px,92vw); list-style:none; margin-bottom:10px; max-height:34vh; overflow-y:auto; }
.li-item {
  display:flex; align-items:center; gap:12px;
  padding:9px 0; border-bottom:1px solid rgba(196,174,140,0.18);
  animation:fadeUp 0.28s ease;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:translateY(0)} }
.li-bullet { width:5px; height:5px; border-radius:50%; background:var(--sand); flex-shrink:0; }
.li-tekst { flex:1; font-family:'Cormorant Garamond',serif; font-size:1.1rem; font-weight:300; font-style:italic; color:var(--ink); line-height:1.4; }
.li-del { background:none; border:none; cursor:pointer; color:var(--sand); font-size:0.72rem; opacity:0.55; transition:opacity 0.2s,color 0.2s; padding:4px 2px; flex-shrink:0; }
.li-del:hover { opacity:1; color:var(--red); }

.li-warning { width:min(520px,92vw); font-size:0.77rem; letter-spacing:0.03em; color:var(--red); text-align:center; margin-bottom:10px; min-height:16px; line-height:1.65; }
.li-count   { font-size:0.67rem; letter-spacing:0.16em; text-transform:uppercase; color:var(--sand); margin-bottom:26px; text-align:center; min-height:15px; }

.btn-mediteren {
  font-family:'Cormorant Garamond',serif; font-size:1.05rem; letter-spacing:0.18em;
  text-transform:uppercase; color:var(--stone); background:none; border:none; cursor:pointer;
  display:inline-flex; align-items:center; gap:12px; transition:color 0.3s; padding:8px 0;
}
.btn-mediteren .arr { transition:transform 0.3s; }
.btn-mediteren:hover { color:var(--ink); }
.btn-mediteren:hover .arr { transform:translateX(8px); }
.btn-mediteren:disabled { opacity:0.28; cursor:default; pointer-events:none; }

/* BREATH */
.orb-outer {
  position:relative; width:min(340px,62vw); height:min(340px,62vw);
  margin:0 auto 22px; display:flex; align-items:center; justify-content:center;
  pointer-events:none;
}
.ring { position:absolute; border-radius:50%; border:1px solid rgba(138,114,96,0.18); animation:ringFlow 9s ease-in-out infinite; pointer-events:none; }
.ring:nth-child(1) { inset:-14%; }
.ring:nth-child(2) { inset:-28%; animation-delay:1.5s; border-color:rgba(138,114,96,0.1); }
.ring:nth-child(3) { inset:-43%; animation-delay:3s;   border-color:rgba(138,114,96,0.05); }
@keyframes ringFlow { 0%,100%{transform:scale(0.95);opacity:0.8} 50%{transform:scale(1.02);opacity:0.35} }

.orb {
  position:absolute; inset:0; border-radius:50%;
  background:radial-gradient(circle at 38% 30%,rgba(255,255,255,0.97) 0%,rgba(244,238,224,0.9) 30%,rgba(208,190,158,0.55) 62%,rgba(160,140,110,0.18) 88%,transparent 100%);
  box-shadow:0 0 70px rgba(91,122,96,0.18),0 0 180px rgba(91,122,96,0.08),inset 0 0 55px rgba(255,255,255,0.55);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; padding:44px;
  transition:transform 4s cubic-bezier(0.35,0,0.2,1),box-shadow 4s cubic-bezier(0.35,0,0.2,1);
  transform:scale(0.72);
}
.orb.inhale { transform:scale(1.06); box-shadow:0 0 110px rgba(91,122,96,0.26),0 0 280px rgba(91,122,96,0.12),inset 0 0 70px rgba(255,255,255,0.65); }
.orb.exhale { transform:scale(0.72); box-shadow:0 0 50px rgba(91,122,96,0.1),0 0 110px rgba(91,122,96,0.04),inset 0 0 35px rgba(255,255,255,0.38); }

.orb-pre { font-size:0.59rem; letter-spacing:0.26em; text-transform:uppercase; color:var(--stone); opacity:0.65; text-align:center; }
.orb-thought { font-family:'Cormorant Garamond',serif; font-size:clamp(0.88rem,2.4vw,1.22rem); font-weight:300; font-style:italic; color:var(--ink); text-align:center; line-height:1.45; max-width:185px; }

.b-dots { display:flex; gap:8px; margin-bottom:16px; align-items:center; min-height:14px; }
.b-dot { width:6px; height:6px; border-radius:50%; background:var(--sand); transition:background 0.4s,transform 0.4s; flex-shrink:0; }
.b-dot.done    { background:var(--green); }
.b-dot.current { background:var(--green); transform:scale(1.55); }

.breath-guide { font-size:0.7rem; letter-spacing:0.38em; text-transform:uppercase; color:var(--stone); text-align:center; min-height:18px; margin-bottom:32px; }

.btn-skip {
  font-size:0.67rem; letter-spacing:0.22em; text-transform:uppercase;
  color:var(--sand); background:none; border:none; cursor:pointer;
  padding:12px 20px; opacity:0; pointer-events:none;
  transition:opacity 1.2s ease,color 0.3s;
}
.btn-skip.show { opacity:1; pointer-events:all; }
.btn-skip:hover { color:var(--stone); }

/* POSITIEF */
#s-positief { gap: 32px; }
.pos-boodschap {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 4.5vw, 2.8rem);
  font-weight: 300; font-style: italic;
  color: var(--moss); text-align: center;
  line-height: 1.55; max-width: 520px;
  opacity: 0;
  transition: opacity 1s ease;
}
.pos-boodschap.zichtbaar { opacity: 1; }

.pos-balk-wrap {
  width: min(240px, 55vw);
  height: 1px;
  background: rgba(196,174,140,0.25);
  position: relative;
  overflow: hidden;
}
.pos-balk {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--green);
  width: 100%;
  transform-origin: left;
}

/* CLOSING */
.enso-wrap { margin-bottom:40px; }
.close-title { font-family:'Cormorant Garamond',serif; font-size:clamp(2rem,5.5vw,4rem); font-weight:300; text-align:center; line-height:1.25; color:var(--ink); max-width:500px; margin-bottom:18px; }
.close-title em { font-style:italic; color:var(--moss); }
.close-sub { font-family:'Cormorant Garamond',serif; font-style:italic; font-size:1.15rem; font-weight:300; color:var(--stone); text-align:center; max-width:400px; line-height:1.95; margin-bottom:60px; }
.btn-restart { font-size:0.7rem; letter-spacing:0.26em; text-transform:uppercase; color:var(--stone); background:none; border:none; border-bottom:1px solid rgba(196,174,140,0.4); padding-bottom:3px; cursor:pointer; transition:color 0.3s,border-color 0.3s; }
.btn-restart:hover { color:var(--ink); border-color:var(--stone); }

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-height: 620px) {
  .w-vline { height:24px; margin-bottom:24px; }
  .w-desc  { margin-bottom:28px; font-size:0.84rem; }
  .orb-outer { width:min(220px,50vw); height:min(220px,50vw); }
  .screen::before, .screen::after { flex-basis:16px; }
}

@media (max-height: 500px) {
  .w-dots { margin-bottom:16px; }
  .w-sub  { margin-bottom:24px; }
  .w-vline { display:none; }
  .w-desc  { margin-bottom:20px; font-size:0.8rem; line-height:1.8; }
}

@media (prefers-reduced-motion:reduce) { .orb{transition:none} .ring{animation:none} }
