@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500;1,600&display=swap");

:root {
  --ink: #2d2922;
  --muted-ink: #735d48;
  --paper: #db914b;
  --paper-deep: #c97a36;
  --saffron: #f5c05b;
  --saffron-deep: #803d24;
  --coral: #ffe1a3;
  --indigo: #25463c;
  --indigo-soft: #416452;
  --cream: #fff8e9;
  --line: rgba(45, 41, 34, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 2%, rgba(224, 156, 105, 0.22), transparent 28rem),
    var(--paper);
  font-family: "Manrope", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.065;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.site-shell {
  width: min(1360px, calc(100% - 96px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 26px;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: inline-flex;
  color: var(--saffron-deep);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
}

.brand-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14px;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-name strong {
  font-family: "DM Mono", monospace;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.brand-name span {
  color: var(--muted-ink);
  font-size: 11px;
  letter-spacing: 0.26em;
}

.topbar-note,
.site-footer {
  color: var(--muted-ink);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.topbar-note {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 0 4px rgba(216, 106, 61, 0.12);
}

.main-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(420px, 1.38fr) minmax(210px, 0.63fr);
  align-items: center;
  gap: clamp(38px, 5.5vw, 92px);
  padding: 70px 0 78px;
}

.welcome-column {
  align-self: center;
  padding-bottom: 8px;
}

.eyebrow,
.card-kicker {
  margin: 0;
  color: var(--saffron-deep);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.17em;
  line-height: 1.5;
  text-transform: uppercase;
}

.welcome-column h1 {
  max-width: 430px;
  margin: 24px 0 24px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(42px, 4.3vw, 68px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.99;
}

.welcome-column h1 em {
  color: var(--saffron-deep);
  font-weight: 500;
}

.intro {
  max-width: 310px;
  margin: 0;
  color: var(--muted-ink);
  font-size: 14px;
  line-height: 1.85;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 21px;
  margin-top: 31px;
  padding: 0 0 9px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: color 180ms ease, border-color 180ms ease, gap 180ms ease;
}

.text-button:hover,
.text-button:focus-visible {
  gap: 27px;
  color: var(--saffron-deep);
  border-color: var(--saffron-deep);
  outline: none;
}

.button-arrow {
  font-size: 17px;
  font-weight: 400;
  line-height: 0.6;
}

.wisdom-note {
  position: relative;
  max-width: 260px;
  margin-top: 93px;
  padding-left: 18px;
}

.note-line {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: var(--coral);
}

.wisdom-note p {
  margin: 0 0 11px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.55;
}

.note-attribution {
  color: var(--muted-ink);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.practice-card {
  position: relative;
  min-height: 650px;
  padding: 29px clamp(28px, 4vw, 61px) 30px;
  overflow: hidden;
  color: var(--cream);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 55%),
    var(--indigo);
  box-shadow: 0 22px 55px rgba(32, 38, 69, 0.15);
}

.practice-card::before {
  position: absolute;
  top: -130px;
  right: -100px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(242, 170, 118, 0.18);
  border-radius: 50%;
  content: "";
}

.practice-card::after {
  position: absolute;
  top: -100px;
  right: -70px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(242, 170, 118, 0.1);
  border-radius: 50%;
  content: "";
}

.card-header,
.practice-controls,
.mantra-copy {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.card-header .card-kicker {
  color: var(--coral);
}

.card-date {
  margin: 8px 0 0;
  color: rgba(252, 248, 240, 0.48);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.card-symbol {
  color: var(--coral);
  font-size: 18px;
  line-height: 1;
}

.mandala-stage {
  position: relative;
  width: min(100%, 385px);
  aspect-ratio: 1;
  margin: 18px auto 0;
  display: grid;
  place-items: center;
}

.ambient-glow {
  position: absolute;
  width: 47%;
  height: 47%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 170, 118, 0.27), rgba(216, 106, 61, 0.08) 48%, transparent 72%);
  filter: blur(12px);
  animation: breathe 7s ease-in-out infinite;
}

.orbit-ring {
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(242, 170, 118, 0.2);
  border-radius: 50%;
}

.orbit-ring::before,
.orbit-ring::after {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(242, 170, 118, 0.11);
  border-radius: 50%;
  content: "";
}

.orbit-ring::after {
  inset: 21%;
  border-color: rgba(242, 170, 118, 0.13);
}

.bead {
  --bead-color: rgba(242, 170, 118, 0.4);
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  background: var(--bead-color);
  transform: rotate(var(--angle)) translateY(calc(-1 * var(--orbit))) rotate(calc(-1 * var(--angle)));
  transition: background 350ms ease, box-shadow 350ms ease, transform 350ms ease;
}

.bead.active {
  --bead-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(242, 170, 118, 0.08), 0 0 10px rgba(242, 170, 118, 0.4);
}

.bead.mala-guru {
  width: 11px;
  height: 11px;
  margin: -5.5px;
  background: var(--cream);
}

.count-orb {
  position: relative;
  z-index: 2;
  width: 46%;
  aspect-ratio: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242, 170, 118, 0.53);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(55, 59, 97, 0.56);
  box-shadow: 0 0 0 18px rgba(242, 170, 118, 0.025), inset 0 0 38px rgba(242, 170, 118, 0.09);
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

.count-orb:hover,
.count-orb:focus-visible {
  border-color: var(--coral);
  background: rgba(71, 75, 115, 0.75);
  outline: none;
  transform: scale(1.035);
}

.count-orb:active {
  transform: scale(0.965);
}

.orb-om {
  color: var(--coral);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(30px, 3.3vw, 46px);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
}

.orb-count {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 11px;
  color: rgba(252, 248, 240, 0.58);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.orb-count strong {
  color: var(--cream);
  font-size: 17px;
  font-weight: 400;
}

.mantra-copy {
  text-align: center;
}

.mantra-script {
  margin: -3px 0 7px;
  color: var(--cream);
  font-family: "DM Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.18em;
  line-height: 1.5;
}

.mantra-transliteration {
  margin: 0;
  color: var(--coral);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  font-style: italic;
}

.mantra-meaning {
  margin: 9px 0 0;
  color: rgba(252, 248, 240, 0.5);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.practice-controls {
  max-width: 420px;
  margin: 26px auto 0;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: rgba(252, 248, 240, 0.46);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-track {
  height: 3px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(252, 248, 240, 0.15);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width 300ms ease;
}

.count-hint {
  min-height: 15px;
  margin: 14px 0 0;
  color: rgba(252, 248, 240, 0.46);
  font-size: 10px;
  text-align: center;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}

.reset-button,
.count-button {
  border: 0;
  cursor: pointer;
  font-size: 11px;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.reset-button {
  padding: 10px 0;
  color: rgba(252, 248, 240, 0.5);
  background: transparent;
}

.reset-button:hover,
.reset-button:focus-visible {
  color: var(--cream);
  outline: none;
}

.count-button {
  padding: 11px 17px;
  border: 1px solid rgba(242, 170, 118, 0.5);
  border-radius: 2px;
  color: var(--cream);
  background: rgba(242, 170, 118, 0.1);
}

.count-button span {
  padding-left: 8px;
  color: var(--coral);
  font-size: 16px;
  vertical-align: -1px;
}

.count-button:hover,
.count-button:focus-visible {
  border-color: var(--coral);
  background: rgba(242, 170, 118, 0.2);
  outline: none;
}

.completion-message {
  min-height: 16px;
  margin-top: 19px;
  color: var(--coral);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 14px;
  font-style: italic;
  text-align: center;
  opacity: 0;
  transition: opacity 300ms ease;
}

.completion-message.visible {
  opacity: 1;
}

.practice-card.is-complete .ambient-glow {
  animation-duration: 3s;
  background: radial-gradient(circle, rgba(242, 170, 118, 0.4), rgba(216, 106, 61, 0.12) 48%, transparent 72%);
}

.aside-column {
  align-self: center;
}

.aside-card {
  padding: 24px 0 25px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.aside-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.aside-icon {
  color: var(--saffron);
  font-size: 26px;
  font-weight: 300;
  line-height: 0.6;
}

.details-list {
  margin: 30px 0 0;
}

.details-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(36, 35, 36, 0.09);
}

.details-list dt {
  color: var(--muted-ink);
  font-size: 11px;
}

.details-list dd {
  margin: 0;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 13px;
  font-style: italic;
  text-align: right;
}

.aside-divider {
  width: 26px;
  height: 1px;
  margin: 27px 0 18px;
  background: var(--saffron);
}

.aside-footnote {
  max-width: 190px;
  margin: 0;
  color: var(--muted-ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 13px;
  line-height: 1.65;
}

.mini-sun {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 56px auto 0;
  opacity: 0.9;
}

.sun-core {
  position: absolute;
  inset: 28px;
  border: 1px solid var(--saffron);
  border-radius: 50%;
}

.sun-ray {
  position: absolute;
  top: 45px;
  left: 17px;
  width: 58px;
  height: 1px;
  background: var(--coral);
  transform-origin: center;
}

.ray-one { transform: rotate(0deg); }
.ray-two { transform: rotate(45deg); }
.ray-three { transform: rotate(90deg); }
.ray-four { transform: rotate(135deg); }

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.footer-center {
  color: var(--saffron-deep);
  text-align: center;
}

.site-footer > :last-child {
  text-align: right;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.86); opacity: 0.68; }
  50% { transform: scale(1.06); opacity: 1; }
}

@media (max-width: 1080px) {
  .site-shell {
    width: min(100% - 56px, 900px);
  }

  .main-grid {
    grid-template-columns: minmax(190px, 0.7fr) minmax(390px, 1.3fr);
    gap: 44px;
  }

  .aside-column {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 36px, 520px);
    padding-top: 22px;
  }

  .topbar {
    padding-bottom: 20px;
  }

  .topbar-note {
    font-size: 8px;
  }

  .main-grid {
    display: block;
    padding: 54px 0 50px;
  }

  .welcome-column {
    padding-bottom: 49px;
  }

  .welcome-column h1 {
    margin-top: 19px;
    font-size: clamp(42px, 12vw, 60px);
  }

  .intro {
    max-width: 340px;
    font-size: 13px;
  }

  .wisdom-note {
    display: none;
  }

  .practice-card {
    min-height: 0;
    padding: 24px 22px 27px;
  }

  .mandala-stage {
    margin-top: 16px;
  }

  .orbit-ring {
    inset: 5%;
  }

  .mantra-script {
    font-size: 23px;
  }

  .site-footer {
    font-size: 8px;
  }

  .footer-center {
    display: none;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* The mantra is the whole room: the original light/dark palette is reversed here. */
body {
  background:
    var(--cream);
}

.site-shell {
  width: min(100% - 64px, 760px);
  padding: 32px 0;
}

.main-grid {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  place-items: center;
}

.practice-card {
  width: min(100%, 620px);
  min-height: 650px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 247, 224, 0.24), transparent 55%),
    var(--paper);
  box-shadow: 0 22px 55px rgba(101, 55, 28, 0.2);
}

.practice-card::before,
.practice-card::after {
  border-color: rgba(255, 225, 163, 0.34);
}

.card-header .card-kicker,
.card-symbol {
  color: var(--saffron-deep);
}

.timeline-button {
  padding: 8px 10px;
  border: 1px solid rgba(128, 61, 36, 0.5);
  border-radius: 2px;
  color: var(--saffron-deep);
  background: rgba(255, 225, 163, 0.16);
  cursor: pointer;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease;
}

.timeline-button span {
  padding-left: 5px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  vertical-align: -1px;
}

.timeline-button:hover,
.timeline-button:focus-visible {
  border-color: var(--saffron-deep);
  background: rgba(255, 225, 163, 0.34);
  outline: none;
}

.card-date {
  color: var(--muted-ink);
}

.ambient-glow {
  background: radial-gradient(circle, rgba(255, 225, 163, 0.4), rgba(245, 192, 91, 0.16) 48%, transparent 72%);
}

.orbit-ring {
  border-color: rgba(255, 248, 233, 0.28);
}

.orbit-ring::before,
.orbit-ring::after {
  border-color: rgba(255, 248, 233, 0.17);
}

.bead {
  --bead-color: rgba(255, 248, 233, 0.45);
}

.bead.active {
  --bead-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255, 225, 163, 0.14), 0 0 10px rgba(255, 225, 163, 0.42);
}

.bead.mala-guru {
  background: var(--cream);
}

.count-orb {
  border-color: rgba(255, 225, 163, 0.82);
  color: var(--ink);
  background: rgba(201, 122, 54, 0.45);
  box-shadow: 0 0 0 18px rgba(255, 225, 163, 0.06), inset 0 0 38px rgba(255, 225, 163, 0.16);
}

.count-orb:hover,
.count-orb:focus-visible {
  border-color: var(--saffron-deep);
  background: rgba(201, 122, 54, 0.66);
}

.orb-om {
  color: var(--saffron-deep);
}

.orb-count {
  color: var(--muted-ink);
}

.orb-count strong {
  color: var(--ink);
}

.mantra-script {
  color: var(--ink);
}

.mantra-transliteration {
  color: var(--saffron-deep);
}

.mantra-meaning,
.progress-meta,
.count-hint {
  color: var(--muted-ink);
}

.progress-track {
  background: rgba(36, 35, 36, 0.15);
}

.progress-track span {
  background: var(--saffron-deep);
}

.reset-button {
  color: var(--muted-ink);
}

.reset-button:hover,
.reset-button:focus-visible {
  color: var(--ink);
}

.count-button {
  border-color: rgba(128, 61, 36, 0.68);
  color: var(--ink);
  background: rgba(255, 225, 163, 0.22);
}

.count-button span {
  color: var(--saffron-deep);
}

.count-button:hover,
.count-button:focus-visible {
  border-color: var(--saffron-deep);
  background: rgba(255, 225, 163, 0.38);
}

.completion-message {
  color: var(--saffron-deep);
}

.practice-card.is-complete .ambient-glow {
  background: radial-gradient(circle, rgba(255, 225, 163, 0.56), rgba(245, 192, 91, 0.2) 48%, transparent 72%);
}

.timeline-panel {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid rgba(45, 41, 34, 0.2);
  animation: timeline-in 240ms ease both;
}

.timeline-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.timeline-subtitle {
  margin: 7px 0 0;
  color: var(--muted-ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 13px;
  font-style: italic;
}

.timeline-close {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(45, 41, 34, 0.22);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  font-weight: 300;
  line-height: 20px;
  transition: border-color 180ms ease, color 180ms ease;
}

.timeline-close:hover,
.timeline-close:focus-visible {
  border-color: var(--saffron-deep);
  color: var(--saffron-deep);
  outline: none;
}

.timeline-list {
  max-height: 220px;
  margin-top: 17px;
  overflow-y: auto;
  scrollbar-color: rgba(128, 61, 36, 0.45) transparent;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(45, 41, 34, 0.11);
}

.timeline-entry:first-child {
  padding-top: 4px;
}

.timeline-marker {
  width: 7px;
  height: 7px;
  border: 1px solid var(--saffron-deep);
  border-radius: 50%;
  background: var(--saffron);
}

.timeline-entry-date,
.timeline-entry-detail {
  margin: 0;
}

.timeline-entry-date {
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-entry-detail {
  margin-top: 4px;
  color: var(--muted-ink);
  font-size: 11px;
}

.timeline-entry-time {
  color: var(--muted-ink);
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.timeline-empty {
  margin: 18px 0 0;
  color: var(--muted-ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 13px;
  font-style: italic;
}

@keyframes timeline-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
