/* Stay Room. Ring values come from the "Ring" element in the Creatomate Shorts templates. */
:root {
  --ring-size: min(62vmin, 340px);
  --ring-fill: rgba(127, 182, 201, 0.12);
  --ring-stroke: rgba(236, 232, 244, 0.85);
  --ring-stroke-width: max(2px, 0.6vmin);
  --ring-glow: rgba(232, 194, 122, 0.25);
  --breath-in: 4s;
  --breath-hold: 1.5s;
  --breath-out: 5s;
  --breath-cycle: 10.5s;

  --bg: #07081a;
  --bg-glow: #14183a;
  --ink: #efeaf6;
  --muted: #a9a8c2;
  --faint: rgba(239, 234, 246, 0.14);
  --gold: #e8c27a;
  --gold-ink: #14183a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(120% 80% at 50% 40%, var(--bg-glow) 0%, var(--bg) 70%);
  background-color: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; line-height: 1.2; margin: 0; }
button { font: inherit; color: inherit; }

.room {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  padding: 80px 16px 40px; /* room for the brand line, which wraps to two lines on phones */
  position: relative;
  text-align: center;
  gap: 28px;
}
.brand {
  position: absolute; top: 10px; left: 16px; right: 16px; text-align: center;
  display: flex; align-items: center; justify-content: center; min-height: 44px;
  font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: opacity 1.5s ease;
}
.room[data-state="playing"] .brand { opacity: .25; pointer-events: none; }

/* Panels: only the one matching data-state is shown */
.panel { display: none; width: 100%; max-width: 440px; }
.room[data-state="arrive"] .panel-arrive,
.room[data-state="choose"] .panel-choose,
.room[data-state="loading"] .panel-playing,
.room[data-state="playing"] .panel-playing,
.room[data-state="paused"] .panel-playing,
.room[data-state="error"] .panel-error,
.room[data-state="after"] .panel-after { display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* Breathing ring */
.ring-wrap { position: relative; width: var(--ring-size); height: var(--ring-size); display: grid; place-items: center; }
.ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--ring-fill);
  border: var(--ring-stroke-width) solid var(--ring-stroke);
  box-shadow: 0 0 40px var(--ring-glow), inset 0 0 30px var(--ring-glow);
  transform: scale(.5);
  animation: breathe var(--breath-cycle) ease-in-out infinite;
}
.room[data-state="paused"] .ring, .room[data-state="loading"] .ring { animation-play-state: paused; }
@keyframes breathe {
  0%      { transform: scale(.5); }
  38.1%   { transform: scale(1); }   /* 4s in */
  52.4%   { transform: scale(1); }   /* 1.5s hold */
  100%    { transform: scale(.5); }  /* 5s out */
}
.ring-cue {
  position: relative; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic;
  font-size: 22px; color: rgba(255, 255, 255, .88);
}
.ring-cue span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; opacity: 0; animation: var(--breath-cycle) linear infinite; }
.ring-cue .cue-in   { animation-name: cue-in; }
.ring-cue .cue-hold { animation-name: cue-hold; }
.ring-cue .cue-out  { animation-name: cue-out; }
.room[data-state="paused"] .ring-cue span, .room[data-state="loading"] .ring-cue span { animation-play-state: paused; }
@keyframes cue-in   { 0%, 35% { opacity: 1; } 38.1%, 100% { opacity: 0; } }
@keyframes cue-hold { 0%, 38%, 52.4%, 100% { opacity: 0; } 40%, 50% { opacity: 1; } }
@keyframes cue-out  { 0%, 52%, 100% { opacity: 0; } 55%, 96% { opacity: 1; } }

.ring-static-cue { display: none; }

/* Text */
.title { font-size: clamp(30px, 8vw, 42px); }
.sub { color: var(--muted); margin: 0; max-width: 26em; }
.small { font-size: 16px; color: var(--muted); margin: 0; }

/* Buttons */
.btn {
  min-height: 48px; padding: 0 28px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 600; letter-spacing: .01em; transition: transform .15s ease, opacity .15s ease;
}
.btn:focus-visible, .chip:focus-visible, .quiet:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-ghost { background: transparent; border: 1px solid var(--faint); }
.btn:disabled { opacity: .4; cursor: default; }
.quiet { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 10px 14px; min-height: 44px; }

.tap-target {
  background: none; border: 0; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}

/* Choice chips */
.group { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.group-label { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--faint);
}
.chip[aria-pressed="true"] { background: rgba(232, 194, 122, .16); border-color: var(--gold); color: #fff; }

.time-left { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 16px; min-height: 1.6em; }

/* After */
.card {
  width: 100%; text-align: left; background: rgba(255, 255, 255, .04); border: 1px solid var(--faint);
  border-radius: 20px; padding: 20px;
}
.card h2 { font-size: 24px; margin-bottom: 12px; }
.card fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.card label.opt { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.card input[type="radio"] { accent-color: var(--gold); width: 18px; height: 18px; }
.card textarea {
  width: 100%; min-height: 72px; margin-top: 8px; border-radius: 12px; padding: 10px 12px;
  background: rgba(0, 0, 0, .25); color: var(--ink); border: 1px solid var(--faint); font: inherit; font-size: 16px;
}
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.thanks { color: var(--gold); }

footer.privacy { position: relative; padding: 0 16px 24px; text-align: center; font-size: 15px; color: var(--muted); }
footer.privacy a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }

/* Links inside short notes: gold so they read on the dark room, with extra tap room above and below */
.small a, .sub a, .safety-note a { color: var(--gold); padding: 13px 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .ring { animation: none; transform: scale(.85); }
  .ring-cue span { display: none; }
  .ring-static-cue { display: block; }
  .btn { transition: none; }
}

/* "Rain sounds for sleep" (SEO section under Tap to begin) */
.kicker { display: block; font-family: Inter, system-ui, sans-serif; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.about { width: 100%; text-align: left; margin-top: 36px; display: grid; gap: 12px; }
.about h2 { font-size: 22px; text-align: center; }
.about ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.about li { border: 1px solid var(--faint); border-radius: 14px; padding: 12px 14px; background: rgba(255, 255, 255, .03); }
.about h3 { font-size: 17px; font-weight: 600; margin: 0 0 2px; }
.about h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.about li span { display: block; color: var(--muted); font-size: 16px; }
.about a { color: var(--gold); }

/* MailerLite form (7-Day Reset): readable text and taller fields for older eyes and fingers */
.ml-embedded p, .ml-embedded input, .ml-embedded button { font-size: 16px !important; }
.ml-embedded input, .ml-embedded button { min-height: 48px !important; }
body #mlb2-47597905.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button { font-size: 16px !important; min-height: 48px !important; }
