:root {
  --night: #0a2022;
  --deep: #113437;
  --mist: #d9e2d7;
  --paper: #f4f0e6;
  --sage: #a9c2a8;
  --lime: #d5dc9a;
  --coral: #e7a681;
  --ink: #173235;
  --glass: rgba(240, 240, 222, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background: var(--night);
  font-family: "DM Sans", sans-serif;
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 62%, rgba(222, 190, 135, 0.23), transparent 24%),
    linear-gradient(180deg, #081b1f 0%, #153f41 52%, #af8f6e 72%, #183b3b 100%);
}

.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.11;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: drift 16s ease-in-out infinite alternate;
}

.glow-one {
  width: 42vw;
  height: 42vw;
  left: -15vw;
  top: 18vh;
  background: rgba(87, 149, 140, 0.28);
}

.glow-two {
  width: 28vw;
  height: 28vw;
  right: -7vw;
  top: 10vh;
  background: rgba(205, 175, 111, 0.16);
  animation-delay: -7s;
}

.stars {
  position: absolute;
  inset: 0 0 38%;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #f1edcf;
  opacity: 0.22;
  animation: twinkle var(--twinkle) ease-in-out infinite alternate;
}

.horizon {
  position: absolute;
  left: -5%;
  width: 110%;
  border-radius: 50% 50% 0 0;
  transform-origin: center bottom;
}

.horizon-back {
  bottom: 18%;
  height: 27%;
  opacity: 0.7;
  background: #234b49;
  clip-path: polygon(0 55%, 10% 38%, 21% 53%, 34% 20%, 44% 47%, 58% 28%, 67% 43%, 82% 18%, 100% 49%, 100% 100%, 0 100%);
}

.horizon-front {
  bottom: 6%;
  height: 25%;
  background: #102d2e;
  clip-path: polygon(0 45%, 15% 25%, 30% 58%, 48% 32%, 66% 57%, 79% 31%, 100% 52%, 100% 100%, 0 100%);
}

.water {
  position: absolute;
  inset: 66% 0 0;
  opacity: 0.4;
  background: repeating-linear-gradient(178deg, transparent 0 13px, rgba(231, 220, 183, 0.12) 14px, transparent 15px 25px);
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.topbar {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 23px;
  height: 23px;
  border: 1px solid rgba(234, 239, 210, 0.65);
  border-radius: 50% 50% 44% 56%;
  transform: rotate(35deg);
  box-shadow: inset 7px -4px 0 rgba(213, 220, 154, 0.16);
}

.sound-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: rgba(244, 240, 230, 0.82);
  border: 1px solid rgba(244, 240, 230, 0.18);
  border-radius: 999px;
  background: rgba(5, 28, 30, 0.26);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: 0.3s ease;
}

.sound-button:hover,
.sound-button[aria-pressed="true"] {
  border-color: rgba(213, 220, 154, 0.6);
  background: rgba(213, 220, 154, 0.12);
}

.sound-icon {
  height: 14px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.sound-icon i {
  display: block;
  width: 2px;
  height: 3px;
  border-radius: 3px;
  background: var(--lime);
}

.sound-button[aria-pressed="true"] .sound-icon i {
  animation: soundbar 0.8s ease-in-out infinite alternate;
}

.sound-icon i:nth-child(2) { animation-delay: -0.25s !important; }
.sound-icon i:nth-child(3) { animation-delay: -0.5s !important; }
.sound-icon i:nth-child(4) { animation-delay: -0.15s !important; }

main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 83px);
  padding: 8vh 0 12vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
blockquote {
  font-family: "Gloock", serif;
  font-weight: 400;
}

h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(3.25rem, 7.6vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

h1 em {
  color: var(--lime);
  font-weight: 400;
}

.intro {
  max-width: 540px;
  margin: 26px auto 0;
  color: rgba(244, 240, 230, 0.68);
  font-size: 16px;
  line-height: 1.7;
}

.breathing-space {
  position: relative;
  margin-top: 54px;
}

.breath-orb {
  position: relative;
  width: 190px;
  height: 190px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  isolation: isolate;
}

.orb-core {
  position: absolute;
  inset: 22px;
  z-index: 2;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 235, 0.85), transparent 30%),
    linear-gradient(145deg, #dfe7ad, #9bc0a4);
  box-shadow: 0 20px 60px rgba(7, 24, 25, 0.35), inset 0 -8px 22px rgba(53, 99, 87, 0.25);
  transition: transform 0.5s ease;
}

.breath-orb:hover .orb-core {
  transform: scale(1.04);
}

.orb-ring {
  position: absolute;
  border: 1px solid rgba(217, 226, 215, 0.25);
  border-radius: 50%;
  transition: 0.6s ease;
}

.ring-one { inset: 8px; }
.ring-two { inset: -8px; opacity: 0.45; }

.breath-orb.active .orb-core,
.breath-orb.active .ring-one,
.breath-orb.active .ring-two {
  animation: breathe 8s ease-in-out infinite;
}

.breath-orb.active .ring-one { animation-delay: 0.15s; }
.breath-orb.active .ring-two { animation-delay: 0.3s; }

.breath-label {
  font-family: "Gloock", serif;
  font-size: 22px;
}

.breath-count {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
}

.breath-hint {
  margin: 14px 0 0;
  color: rgba(244, 240, 230, 0.5);
  font-size: 12px;
}

.pause-panel {
  margin: 4vh 0 18vh;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid rgba(235, 238, 213, 0.14);
  border-radius: 28px;
  background: rgba(8, 34, 36, 0.66);
  box-shadow: 0 30px 100px rgba(2, 18, 18, 0.28);
  backdrop-filter: blur(20px);
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  align-items: center;
  gap: 10%;
}

.pause-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 4vw, 4.3rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.pause-copy > p:last-child {
  max-width: 480px;
  color: rgba(244, 240, 230, 0.58);
  line-height: 1.7;
}

.timer-card {
  padding: 28px;
  border-radius: 22px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 18px 55px rgba(3, 20, 20, 0.3);
  text-align: center;
}

.time-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: 99px;
  background: #e8e7dc;
}

.time-option {
  padding: 9px;
  border: 0;
  border-radius: 99px;
  color: rgba(23, 50, 53, 0.6);
  background: transparent;
  cursor: pointer;
  transition: 0.25s ease;
}

.time-option.active {
  color: var(--ink);
  background: #fffdf6;
  box-shadow: 0 2px 10px rgba(23, 50, 53, 0.09);
}

.timer-display {
  margin: 28px 0 20px;
  font-family: "Gloock", serif;
  font-size: clamp(3.5rem, 6vw, 5.2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.timer-display i {
  margin: 0 4px;
  color: var(--coral);
  font-style: normal;
}

.timer-start {
  width: 100%;
  padding: 15px 20px;
  border: 0;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--paper);
  background: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.timer-start:hover {
  transform: translateY(-2px);
  background: #24494b;
}

.timer-note {
  margin: 14px 0 0;
  color: rgba(23, 50, 53, 0.48);
  font-size: 11px;
}

.thought {
  max-width: 780px;
  margin: 0 auto 20vh;
  text-align: center;
}

.quote-mark {
  display: block;
  height: 42px;
  color: var(--lime);
  font-family: "Gloock", serif;
  font-size: 64px;
  line-height: 1;
}

blockquote {
  min-height: 120px;
  margin: 20px 0 28px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

blockquote.changing {
  opacity: 0;
  transform: translateY(8px);
}

.thought button {
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid rgba(213, 220, 154, 0.45);
  color: var(--lime);
  background: transparent;
  cursor: pointer;
}

.thought button span {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.4s ease;
}

.thought button:hover span {
  transform: rotate(180deg);
}

footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0;
  border-top: 1px solid rgba(244, 240, 230, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(244, 240, 230, 0.43);
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  padding: 14px 20px;
  border: 1px solid rgba(213, 220, 154, 0.35);
  border-radius: 99px;
  color: var(--paper);
  background: rgba(8, 34, 36, 0.92);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: 0.4s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes breathe {
  0%, 100% { transform: scale(0.83); }
  50% { transform: scale(1.08); }
}

@keyframes drift {
  to { transform: translate(8vw, 5vh) scale(1.12); }
}

@keyframes twinkle {
  to { opacity: 0.8; transform: scale(1.8); }
}

@keyframes soundbar {
  to { height: 13px; }
}

@media (max-width: 760px) {
  .topbar,
  main,
  footer {
    width: min(100% - 32px, 1180px);
  }

  .topbar { padding-top: 20px; }
  .hero { padding-top: 11vh; }
  h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .breathing-space { margin-top: 44px; }

  .pause-panel {
    grid-template-columns: 1fr;
    gap: 34px;
    margin-bottom: 15vh;
    padding: 32px 20px 20px;
  }

  .timer-card { padding: 20px; }
  blockquote { min-height: 165px; }
}

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