:root {
  --paper: #efe4d6;
  --paper-2: #e6d7c5;
  --ink: #4a3b33;
  --ink-soft: #7a685c;
  --rose: #d9a3a0;
  --rose-deep: #b97a78;
  --sage: #9fb39a;
  --sage-deep: #6f8a6a;
  --card: #f7f0e6;
  --shadow: 0 18px 40px -22px rgba(74, 59, 51, .55);
  --radius: 22px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #2a2320;
    --paper-2: #322a26;
    --ink: #eadccb;
    --ink-soft: #b9a796;
    --card: #362d29;
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, .8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.65 var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.grain {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: multiply;
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; color: #fff8ee; overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: drift 40s ease-in-out infinite alternate;
  transition: opacity 1.2s ease;
}
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(40, 28, 22, .35) 0%, rgba(40, 28, 22, 0) 30%),
    linear-gradient(90deg, rgba(48, 34, 27, .62) 0%, rgba(48, 34, 27, .25) 55%, rgba(48, 34, 27, 0) 80%);
}

.nav {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px clamp(16px, 5vw, 64px);
}
.logo { font-family: var(--mono); font-size: 15px; letter-spacing: .08em; text-decoration: none; text-transform: lowercase; }
.logo span { color: var(--rose); padding: 0 2px; }
.nav__links { display: flex; gap: clamp(12px, 3vw, 32px); font-family: var(--mono); font-size: 14px; }
.nav__links a { text-decoration: none; opacity: .85; }
.nav__links a:hover { opacity: 1; text-decoration: underline wavy var(--rose); text-underline-offset: 6px; }

.hero__body {
  position: relative; z-index: 2; margin: auto 0;
  padding: 0 clamp(16px, 5vw, 64px) 96px; max-width: 760px;
}
.hero__time { font-family: var(--mono); font-size: 14px; letter-spacing: .06em; opacity: .9; margin: 0 0 14px; }
.hero h1 {
  font-weight: 400; font-size: clamp(38px, 6.4vw, 78px); line-height: 1.05; margin: 0 0 22px;
  text-shadow: 0 2px 30px rgba(40, 28, 22, .35);
}
.hero__lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 520px; margin: 0 0 32px; opacity: .95; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 15px var(--mono); color: #3d2f28; background: #fff3e4;
  border: 0; border-radius: 999px; padding: 14px 24px; cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45);
  transition: transform .3s ease, background .3s ease;
}
.btn:hover { transform: translateY(-2px); background: #fff; }
.btn__icon { color: var(--rose-deep); }

.scroll-hint {
  position: absolute; z-index: 2; left: 50%; bottom: 96px; transform: translateX(-50%);
  font-size: 28px; text-decoration: none; opacity: .7; animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 10vw, 120px) clamp(16px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.section--soft { max-width: none; background: var(--paper-2); }
.eyebrow { font: 13px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sage-deep); margin: 0 0 8px; }
h2 { font-weight: 400; font-size: clamp(30px, 4vw, 46px); line-height: 1.15; margin: 0 0 40px; }
h3 { font-weight: 400; font-size: 26px; margin: 6px 0 8px; }

.rituals { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.card {
  grid-column: span 2; background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .5s ease;
}
.card--wide { grid-column: span 3; }
.card:hover { transform: translateY(-4px) rotate(-.3deg); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card__text { padding: 22px 26px 28px; }
.card__text p { margin: 0; color: var(--ink-soft); }
.tag { font: 12px var(--mono); letter-spacing: .08em; color: var(--rose-deep); }

/* ---------- breathe ---------- */
.breathe {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 7vw, 96px); align-items: center;
}
.breathe__circle {
  width: clamp(200px, 26vw, 280px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #f6d7cf, var(--rose) 60%, var(--rose-deep));
  color: #fff8ee; font: 15px var(--mono); letter-spacing: .1em;
  box-shadow: 0 0 0 18px rgba(217, 163, 160, .18), 0 0 0 40px rgba(217, 163, 160, .08);
  transform: scale(.72); transition: transform 4s ease-in-out;
}
.breathe__circle.is-in { transform: scale(1); }
.breathe__circle.is-out { transition-duration: 6s; }
.breathe__text p { color: var(--ink-soft); max-width: 520px; }
.quote {
  margin: 32px 0 0; padding-left: 20px; border-left: 3px solid var(--sage);
  font-style: italic; color: var(--ink); transition: opacity .8s ease;
}

/* ---------- notebook ---------- */
.notebook {
  max-width: 560px; background: #fbf6ec; color: #4a3b33;
  border-radius: 6px 18px 18px 6px; padding: 32px 36px 24px 56px; position: relative;
  box-shadow: var(--shadow);
  background-image: repeating-linear-gradient(#fbf6ec 0 39px, #e8dccb 39px 40px);
  transform: rotate(-.6deg);
}
.notebook::before { content: ""; position: absolute; left: 36px; top: 0; bottom: 0; width: 2px; background: rgba(217, 163, 160, .6); }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { line-height: 40px; font-size: 20px; }
.todo label { cursor: pointer; display: flex; align-items: center; gap: 12px; }
.todo input { width: 18px; height: 18px; accent-color: var(--sage-deep); }
.todo label:has(input:checked) { text-decoration: line-through; text-decoration-color: var(--rose-deep); color: #9c8a7d; }
.notebook__note { font: 12px var(--mono); color: #9c8a7d; margin: 14px 0 0; }

/* ---------- footer ---------- */
.footer { text-align: center; padding: 48px 16px 140px; font: 14px var(--mono); color: var(--ink-soft); }
.footer p { margin: 4px 0; }
.footer__small { font-size: 12px; opacity: .75; }

/* ---------- player ---------- */
.player {
  position: fixed; z-index: 50; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  width: min(520px, calc(100% - 32px));
  padding: 10px 18px 10px 10px; border-radius: 999px;
  background: rgba(251, 244, 234, .82); color: #4a3b33;
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 14px 40px -14px rgba(48, 34, 27, .5);
}
.player__btn {
  flex: none; width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--rose); display: grid; place-items: center;
  transition: background .3s ease;
}
.player__btn:hover { background: var(--rose-deep); }
.tape { display: flex; gap: 6px; }
.tape__reel {
  width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff8ee; position: relative;
}
.tape__reel::after { content: ""; position: absolute; left: 50%; top: -2px; width: 2px; height: 14px; margin-left: -1px; background: #fff8ee; }
.is-playing .tape__reel { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.player__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.player__status { font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #8d7a6d; }
.player__station {
  font: 16px var(--serif); color: inherit; background: transparent; border: 0; padding: 0;
  cursor: pointer; max-width: 100%; text-overflow: ellipsis;
}
.player__station:focus-visible { outline: 2px solid var(--sage); border-radius: 4px; }

.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 3px; height: 4px; background: var(--sage-deep); border-radius: 2px; }
.is-playing .eq i { animation: eq 1.2s ease-in-out infinite; }
.is-playing .eq i:nth-child(2) { animation-delay: -.4s; }
.is-playing .eq i:nth-child(3) { animation-delay: -.8s; }
.is-playing .eq i:nth-child(4) { animation-delay: -.2s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }

.player__vol { width: 90px; accent-color: var(--rose-deep); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .rituals { grid-template-columns: 1fr; }
  .card, .card--wide { grid-column: auto; }
  .breathe { grid-template-columns: 1fr; justify-items: center; text-align: left; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .nav__links { display: none; }
  .player__vol, .eq { display: none; }
  .notebook { padding: 24px 20px 20px 44px; }
  .notebook::before { left: 28px; }
  .todo li { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
