:root {
  color-scheme: light;
  --paper: #f4f6ef;
  --mist: #edf2ea;
  --sage: #a7ba9e;
  --sage-deep: #61745d;
  --sky: #c7d9d8;
  --water: #dce8e1;
  --ink: #1f2926;
  --muted: #63716a;
  --line: rgba(39, 49, 46, 0.14);
  --glass: rgba(250, 251, 245, 0.8);
  --shadow: 0 22px 68px rgba(68, 82, 77, 0.13);
  --button: #557269;
  --button-shadow: rgba(67, 94, 87, 0.22);
  --hero-wash: rgba(244, 245, 239, 0.84);
  --mood-a: rgba(213, 229, 218, 0.34);
  --mood-b: rgba(240, 220, 188, 0.18);
  --melt-one: #dce9e2;
  --melt-two: #c6d8d4;
  --melt-three: #f1e7d0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-mood="drift"] {
  --paper: #f1f6f5;
  --mist: #e7f0ef;
  --sage: #9ebfba;
  --sage-deep: #557776;
  --sky: #bad7dc;
  --water: #d9eceb;
  --button: #527a78;
  --button-shadow: rgba(85, 123, 122, 0.2);
  --hero-wash: rgba(241, 246, 245, 0.86);
  --mood-a: rgba(186, 215, 220, 0.4);
  --mood-b: rgba(217, 236, 235, 0.28);
  --melt-one: #d5e8e7;
  --melt-two: #bdd7dc;
  --melt-three: #e3eee9;
}

body[data-mood="hush"] {
  --paper: #f4f8f0;
  --mist: #e8f1e3;
  --sage: #b8d0ad;
  --sage-deep: #647f54;
  --sky: #cfe1d5;
  --water: #e4eddd;
  --button: #657c59;
  --button-shadow: rgba(100, 127, 84, 0.2);
  --hero-wash: rgba(244, 248, 240, 0.78);
  --mood-a: rgba(184, 208, 173, 0.36);
  --mood-b: rgba(207, 225, 213, 0.3);
  --melt-one: #e5eedf;
  --melt-two: #d0dfc7;
  --melt-three: #dce7d2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  transition: background-color 500ms ease, color 500ms ease;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(111, 132, 111, 0.38);
  outline-offset: 4px;
}

.page-shell {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: 18px clamp(16px, 4vw, 48px) 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), var(--hero-wash)),
    url("assets/still-daylight.png") center / cover,
    linear-gradient(135deg, var(--mist), var(--sky));
  transition: background 500ms ease;
}

body.is-still .hero {
  background:
    linear-gradient(180deg, rgba(244, 247, 241, 0.18), rgba(244, 247, 241, 0.62)),
    url("assets/still-theme.png") center / cover,
    linear-gradient(135deg, var(--mist), var(--sky));
}

.ambient-layer {
  position: absolute;
  inset: -18px;
  pointer-events: none;
  background:
    linear-gradient(120deg, var(--mood-a), transparent 48%),
    linear-gradient(220deg, transparent 42%, var(--mood-b));
  opacity: 0.92;
  transform: translate3d(calc(var(--pointer-x, 0) * -14px), calc(var(--pointer-y, 0) * -10px), 0);
  transition: background 500ms ease, transform 260ms ease-out;
}

.topbar,
.hero-grid,
.content-band,
.about {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin-inline: auto;
}

.topbar {
  display: grid;
  place-items: center;
  min-height: 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.28rem, 4vw, 1.65rem);
  font-weight: 400;
  text-decoration: none;
}

.quiet-button,
.chip,
.icon-button,
.sound-toggle,
.mood-dot {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(248, 251, 246, 0.7);
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, background-color 220ms ease, border-color 220ms ease;
}

.quiet-button:hover,
.chip:hover,
.icon-button:hover,
.sound-toggle:hover,
.mood-dot:hover {
  transform: translateY(-1px);
}

.quiet-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
  min-height: calc(100svh - 96px);
  padding-top: 18px;
}

body.is-still .hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100%;
  padding: 0 clamp(16px, 4vw, 48px);
  transform: none;
}

body.is-still .topbar {
  position: absolute;
  inset: 18px 0 auto;
  width: 100%;
}

.intro {
  max-width: 560px;
  transition: opacity 420ms ease, transform 420ms ease, visibility 420ms ease;
}

body.is-still .intro {
  display: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sage-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p,
blockquote {
  overflow-wrap: break-word;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.04;
}

h1 {
  max-width: 590px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.9rem, 6.8vw, 5.25rem);
  font-weight: 400;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 4.3rem);
  font-weight: 400;
}

.lead {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  line-height: 1.58;
}

.pause-panel {
  width: min(100%, 430px);
  padding: clamp(16px, 3.2vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  transition: background-color 500ms ease, box-shadow 500ms ease;
}

body.is-still .pause-panel {
  width: min(100%, 500px);
  background: rgba(250, 252, 246, 0.72);
  box-shadow: 0 28px 90px rgba(41, 61, 56, 0.14);
}

body.is-still .duration-group,
body.is-still .sound-row,
body.is-still .stillness-modes,
body.is-still .panel-head {
  display: none;
}

body.is-still .reflection {
  min-height: 0;
  margin: 4px 0 20px;
  text-align: center;
}

body.is-still .timer-wrap {
  justify-content: center;
  max-width: 320px;
  margin: 0 auto 16px;
  border-color: transparent;
  background: transparent;
  padding: 0;
}

body.is-still .timer-dial {
  flex-basis: 42px;
  width: 42px;
}

body.is-still .timer-dial span {
  width: 32px;
}

body.is-still .timer {
  font-size: clamp(2.15rem, 6vw, 3.2rem);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.timer {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.timer-label {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.reflection {
  min-height: 92px;
  margin: 10px 0 18px;
  color: #33403b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 5vw, 1.95rem);
  line-height: 1.25;
  transition: opacity 220ms ease, transform 220ms ease;
}

.timer-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(39, 49, 46, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.timer-dial {
  display: grid;
  flex: 0 0 54px;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: conic-gradient(var(--button) calc(var(--progress, 0) * 1%), rgba(39, 49, 46, 0.1) 0);
}

.timer-dial span {
  width: 42px;
  aspect-ratio: 1;
  border-radius: inherit;
  background: var(--paper);
}

.reflection.is-changing {
  opacity: 0;
  transform: translateY(6px);
}

.duration-group,
.control-row,
.sound-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.duration-group {
  margin-bottom: 14px;
}

.chip {
  flex: 1;
  min-height: 42px;
  border-radius: 999px;
}

.chip.is-active {
  border-color: rgba(111, 132, 111, 0.62);
  background: rgba(183, 200, 182, 0.34);
}

.primary-button {
  flex: 0 1 240px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: #f8faf5;
  background: var(--button);
  box-shadow: 0 12px 28px var(--button-shadow);
  transition: transform 180ms ease, background-color 500ms ease, box-shadow 500ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  font-size: 1.35rem;
}

.control-row {
  justify-content: center;
}

.sound-row {
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
}

.sound-icon {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 5px rgba(101, 115, 111, 0.12);
}

.sound-toggle[aria-pressed="true"] .sound-icon {
  background: var(--button);
  box-shadow: 0 0 0 5px var(--button-shadow);
}

.stillness-modes {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.stillness-modes p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.mood-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mood-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(250, 251, 245, 0.62);
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, background-color 220ms ease, border-color 220ms ease;
}

.mood-choice:hover {
  transform: translateY(-1px);
}

.mood-choice.is-active {
  border-color: rgba(39, 49, 46, 0.35);
  background: rgba(255, 255, 255, 0.7);
}

.mood-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e7eee5, #eadfc9);
}

.mood-swatch--drift {
  background: linear-gradient(135deg, #dff0ef, #bad7dc);
}

.mood-swatch--hush {
  background: linear-gradient(135deg, #eef5e8, #b8d0ad);
}

.content-band,
.about {
  padding: clamp(56px, 10vw, 106px) clamp(16px, 4vw, 48px);
}

.section-heading {
  max-width: 650px;
  margin-bottom: 28px;
}

.thought-grid {
  display: grid;
  gap: 14px;
}

.thought-grid article {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.thought-grid p,
.prompt-list p,
.about p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.8vw, 1.24rem);
  line-height: 1.65;
}

.prompts {
  border-block: 1px solid rgba(39, 49, 46, 0.09);
  background: var(--mist);
  transition: background-color 500ms ease;
}

.prompt-list {
  display: grid;
  gap: 12px;
  max-width: 860px;
}

.prompt-list p {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.about {
  max-width: 870px;
}

.about p:last-child {
  margin-top: 22px;
}

@keyframes meltShift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

@keyframes slowSheen {
  0%,
  100% {
    transform: translateX(-55%);
    opacity: 0.26;
  }
  50% {
    transform: translateX(55%);
    opacity: 0.46;
  }
}

@media (min-width: 760px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 430px);
    gap: clamp(34px, 7vw, 84px);
  }

  .thought-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 760px) and (max-height: 760px) {
  .hero {
    padding-bottom: 28px;
  }

  .topbar {
    min-height: 38px;
  }

  .hero-grid {
    min-height: calc(100svh - 74px);
    padding-top: 4px;
  }

  body.is-still .hero-grid {
    min-height: 100%;
    padding-top: 0;
    transform: none;
  }

  h1 {
    font-size: clamp(3.2rem, 6vw, 4.65rem);
    max-width: 540px;
  }

  .lead {
    max-width: 520px;
    margin-top: 12px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .pause-panel {
    padding: 18px;
  }

  body.is-still .pause-panel {
    padding: 28px;
  }

  .panel-head {
    margin-bottom: 2px;
  }

  .timer-wrap {
    min-height: 68px;
    margin-bottom: 10px;
    padding: 10px;
  }

  .timer {
    font-size: 2.55rem;
  }

  .timer-label {
    margin-top: 6px;
  }

  .reflection {
    min-height: 58px;
    margin: 4px 0 12px;
    font-size: 1.46rem;
  }

  body.is-still .reflection {
    min-height: 0;
    margin: 0 0 18px;
    font-size: 1.58rem;
  }

  .chip {
    min-height: 38px;
  }

  .primary-button,
  .icon-button {
    min-height: 44px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .sound-row,
  .stillness-modes {
    margin-top: 12px;
    padding-top: 10px;
  }

  .sound-toggle {
    min-height: 38px;
  }

  .mood-choice {
    min-height: 34px;
  }
}

@media (max-width: 520px) {
  .quiet-button {
    padding-inline: 12px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .hero-grid {
    min-height: auto;
    padding-top: 16px;
  }

  .duration-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sound-row {
    align-items: stretch;
    width: 100%;
  }

  .sound-toggle {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
