/* ─── the weatherman ─── */
/* there is no rush */

/* ─── reset ─── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── palette (samurai jack s5 × stone × clay) ─── */

:root {
  --paper: #f0ede6;
  --paper-warm: #eae6de;
  --paper-shadow: #dedad2;
  --ink: #3a3430;
  --ink-soft: #4e4640;
  --ink-wash: #6e685e;
  --ink-faint: #8e8880;
  --ink-ghost: #b0a89e;
  --terra: #8a4038;
  --terra-soft: #9e5248;
  --sage: #506050;
  --sage-soft: #607060;
  --crimson: #602040;
  --teal: #005060;
  --breath: rgba(58, 52, 48, 0.04);
  --breath-warm: rgba(138, 64, 56, 0.06);
  --stroke: rgba(58, 52, 48, 0.08);
  --stroke-soft: rgba(58, 52, 48, 0.04);
}

/* ─── glacial keyframes (as slow as the monk) ─── */

@keyframes tree-sway {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(0.8px, -0.3px) rotate(0.15deg); }
  45% { transform: translate(-0.4px, 0.4px) rotate(-0.1deg); }
  70% { transform: translate(0.6px, -0.2px) rotate(0.08deg); }
  90% { transform: translate(-0.3px, 0.1px) rotate(-0.05deg); }
}

@keyframes torii-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  30% { transform: translate(0.5px, -0.4px) rotate(0.1deg); }
  60% { transform: translate(-0.3px, 0.2px) rotate(-0.08deg); }
  85% { transform: translate(0.2px, -0.1px) rotate(0.05deg); }
}

@keyframes stones-settle {
  0%, 100% { transform: translate(0, 0); }
  35% { transform: translate(0.2px, -0.15px); }
  65% { transform: translate(-0.1px, 0.1px); }
}

@keyframes petals-wander {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  15% { transform: translate(2px, 0.8px) rotate(0.05deg); }
  35% { transform: translate(-0.5px, 1.5px) rotate(-0.03deg); }
  55% { transform: translate(1.5px, -0.3px) rotate(0.04deg); }
  75% { transform: translate(-1px, 0.5px) rotate(-0.02deg); }
  90% { transform: translate(0.5px, -0.2px) rotate(0.01deg); }
}

@keyframes wash-breathe {
  0%, 100% { opacity: 0.4; transform: scale(1) translate(0, 0); }
  30% { opacity: 0.36; transform: scale(1.01) translate(0.5px, 0.3px); }
  60% { opacity: 0.42; transform: scale(0.99) translate(-0.3px, -0.2px); }
}

@keyframes wash-breathe-alt {
  0%, 100% { opacity: 0.3; transform: rotate(160deg) scale(1) translate(0, 0); }
  40% { opacity: 0.27; transform: rotate(160deg) scale(1.015) translate(0.4px, -0.3px); }
  70% { opacity: 0.32; transform: rotate(160deg) scale(0.99) translate(-0.2px, 0.2px); }
}

@keyframes bird-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  8% { transform: translate(-3px, -1.5px) rotate(-0.15deg); }
  18% { transform: translate(-8px, -4px) rotate(-0.3deg); }
  30% { transform: translate(-5px, -8px) rotate(-0.1deg); }
  42% { transform: translate(-14px, -5px) rotate(-0.4deg); }
  55% { transform: translate(-10px, -10px) rotate(-0.2deg); }
  65% { transform: translate(-18px, -4px) rotate(-0.35deg); }
  78% { transform: translate(-8px, -7px) rotate(-0.15deg); }
  90% { transform: translate(-3px, -2px) rotate(-0.05deg); }
}

/* ─── base ─── */

html {
  font-size: 19px;
  cursor: url('images/leaf-cursor.svg') 6 1, auto;
}

body {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, 'Menlo', 'Monaco', monospace;
  background:
    url('images/noise-grain.svg') repeat,
    url('images/paper-grain.svg') repeat,
    url('images/sj-atmosphere.jpg') no-repeat center / cover,
    var(--paper);
  background-attachment: fixed, fixed, fixed, fixed;
  background-blend-mode: normal, normal, soft-light, normal;
  color: var(--ink);
  line-height: 1.7;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* cherry blossom petals — glacial drift */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('images/petals-drift.svg') no-repeat center / cover;
  opacity: 0.85;
  pointer-events: none;
  z-index: 2;
  animation: petals-wander 240s ease-in-out infinite;
}

/* ancient tree — barely perceptible sway */
body::after {
  content: '';
  position: fixed;
  bottom: 4%;
  left: 2%;
  width: 140px;
  height: 245px;
  background: url('images/nature-tree.svg') no-repeat bottom center / contain;
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
  animation: tree-sway 120s ease-in-out infinite;
}

::selection {
  background-color: var(--paper-shadow);
  color: var(--ink);
}

/* ─── tribal rituals (transparent drawing layer) ─── */

.tribal-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('images/tribal-rituals.jpg') no-repeat center / cover;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

/* ─── bird (drifting, journey to the west slow) ─── */

.bird {
  position: fixed;
  bottom: 10%;
  right: 5%;
  width: 120px;
  height: 102px;
  background: url('images/bird.png') no-repeat center / contain;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
  animation: bird-drift 300s ease-in-out infinite;
  mix-blend-mode: multiply;
}

/* ─── drawing tree (from tribal rituals, top right) ─── */

.drawing-tree {
  position: fixed;
  top: 3%;
  right: 4%;
  width: 120px;
  height: 168px;
  background: url('images/drawing-tree.png') no-repeat center / contain;
  opacity: 0.25;
  pointer-events: none;
  z-index: 1;
  animation: tree-sway 160s ease-in-out infinite;
  mix-blend-mode: multiply;
}

/* ─── typography ─── */

a {
  color: var(--terra);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 1.24s ease, color 1.24s ease, opacity 0.9s ease;
  cursor: url('images/leaf-pointer.svg') 4 1, pointer;
}

a:hover {
  border-bottom-color: var(--terra-soft);
  color: var(--terra-soft);
  opacity: 0.7;
}

/* ─── desktop ─── */

.desktop {
  max-width: 520px;
  margin: 0 2rem 0 auto;
  margin-right: calc(50% - 260px + 2rem);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1rem;
  position: relative;
  z-index: 3;
}

/* torii gate — imperceptible drift */
.desktop::before {
  content: '';
  position: fixed;
  bottom: 12%;
  right: 3%;
  width: 100px;
  height: 125px;
  background: url('images/spiritual-torii.svg') no-repeat bottom center / contain;
  opacity: 0.45;
  pointer-events: none;
  z-index: -1;
  animation: torii-drift 180s ease-in-out infinite;
}

/* zen stones — the slowest settle */
.desktop::after {
  content: '';
  position: fixed;
  bottom: 3%;
  right: 18%;
  width: 90px;
  height: 60px;
  background: url('images/zen-stones.svg') no-repeat bottom center / contain;
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
  animation: stones-settle 150s ease-in-out infinite;
}

/* ─── orbit (fixed to left side, links circling the name) ─── */

.orbit-container {
  position: fixed;
  left: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  height: 200px;
  z-index: 4;
}

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.82rem;
  color: var(--ink);
  letter-spacing: 0.06em;
  white-space: nowrap;
  z-index: 2;
}

.orbit-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.orbit-link {
  position: absolute;
  font-size: 0.58rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  transition: color 0.9s ease;
}

.orbit-link:hover {
  color: var(--terra);
  border-bottom-color: transparent;
  opacity: 1;
}

/* ─── flow (the breathing scroll) ─── */

.flow {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 2rem 0.5rem;
  position: relative;
}

.flow::-webkit-scrollbar {
  display: none;
}

/* ink wash atmosphere — slow breathing */
.flow::before {
  content: '';
  position: absolute;
  top: 15%;
  left: -30%;
  width: 300px;
  height: 300px;
  background: url('images/ink-wash.svg') no-repeat center / contain;
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
  animation: wash-breathe 200s ease-in-out infinite;
}

.flow::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -25%;
  width: 240px;
  height: 240px;
  background: url('images/ink-wash.svg') no-repeat center / contain;
  opacity: 0.3;
  pointer-events: none;
  z-index: -1;
  transform: rotate(160deg);
  animation: wash-breathe-alt 200s ease-in-out infinite;
}

/* ─── breath (each paragraph — differently spaced, subtly bent) ─── */

.breath {
  max-width: 440px;
}

.breath p {
  font-size: 0.82rem;
  line-height: 2;
  color: var(--ink-soft);
}

.breath .verses {
  margin-top: 0.6rem;
  line-height: 2.2;
}

.category-label {
  font-size: 0.75rem;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-top: 1.4rem;
  margin-bottom: 0;
}

.category-label + .verses {
  margin-top: 0.2rem;
}

/* ─── individual rhythm & tilt ─── */

/* about */
.breath:nth-child(1) {
  margin: 3rem 0 7rem;
  transform: rotate(-0.3deg);
}

/* upcoming gatherings */
.breath:nth-child(2) {
  margin: 0 0 6rem;
  padding-left: 1.5rem;
  transform: rotate(0.4deg);
}

/* listen */
.breath:nth-child(3) {
  margin: 0 0 7.5rem;
  margin-left: auto;
  text-align: right;
  transform: rotate(-0.2deg);
}

/* player */
.breath:nth-child(4) {
  margin: 0 auto 8rem;
  text-align: center;
  transform: rotate(0.15deg);
}

/* past gatherings */
.breath:nth-child(5) {
  margin: 0 0 8rem;
  padding-left: 2.5rem;
  transform: rotate(0.35deg);
}

/* words */
.breath:nth-child(6) {
  margin: 0 0 7rem;
  margin-left: auto;
  text-align: right;
  transform: rotate(-0.25deg);
}

/* stay close */
.breath:nth-child(7) {
  margin: 0 auto 8rem;
  text-align: center;
  transform: rotate(0.2deg);
}

/* closing */
.breath:nth-child(8) {
  margin: 0 auto 5rem;
  text-align: center;
  transform: rotate(-0.15deg);
}

.breath:nth-child(8) p {
  font-style: italic;
  color: var(--terra);
}

/* ─── bandcamp embed (slightly askew) ─── */

.bandcamp-embed {
  border: 0;
  width: 100%;
  max-width: 400px;
  height: 42px;
  margin: 0.4rem auto;
  display: block;
  transform: rotate(0.25deg);
  opacity: 0.85;
}

.player-purchase {
  font-size: 0.65rem;
  color: var(--ink-faint);
  display: block;
  text-align: center;
  margin-top: 0.3rem;
}

.player-purchase:hover {
  color: var(--terra);
  opacity: 1;
}

/* ─── stay close (tilted form) ─── */

.invite {
  font-style: italic;
  color: var(--ink-wash);
  margin-bottom: 0.9rem;
}

.email-form {
  display: flex;
  align-items: stretch;
  max-width: 340px;
  border: 1px solid var(--stroke);
  border-radius: 20px 28px 24px 22px / 22px 20px 26px 24px;
  overflow: hidden;
  margin: 0 auto;
  transform: rotate(-0.35deg);
}

.email-form input[type="email"] {
  flex: 1;
  padding: 0.45rem 0.8rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  background-color: transparent;
  border: none;
  outline: none;
  letter-spacing: 0.01em;
}

.email-form input[type="email"]::placeholder {
  color: var(--ink-ghost);
}

.email-form input[type="email"]:focus {
  background-color: rgba(242, 239, 232, 0.5);
}

.email-form button {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: var(--ink-wash);
  background: var(--breath);
  border: none;
  border-left: 1px solid var(--stroke-soft);
  padding: 0.45rem 0.9rem;
  cursor: url('images/leaf-pointer.svg') 4 1, pointer;
  transition: color 0.9s ease, background 0.9s ease;
  white-space: nowrap;
}

.email-form button:hover {
  color: var(--terra);
  background: var(--breath-warm);
}

.email-thank-you {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--terra);
  opacity: 0;
  transition: opacity 1.8s ease;
  margin-top: 0.5rem;
}

.email-thank-you.visible {
  opacity: 1;
}

/* ─── status bar (leaning the other way) ─── */

.statusbar {
  padding: 0.6rem 0.2rem 0.2rem;
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  transform: rotate(0.2deg);
}

.statusbar span {
  font-size: 0.6rem;
  color: var(--ink-ghost);
  letter-spacing: 0.03em;
}

/* ─── responsive ─── */

@media (max-width: 600px) {
  html {
    font-size: 17px;
  }

  .desktop {
    padding: 0.8rem 0.7rem;
  }

  .orbit-container {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 180px;
    height: 180px;
    margin: 0.5rem auto 0.5rem;
  }

  .desktop {
    margin: 0 auto;
  }

  .breath {
    max-width: 100%;
    padding-left: 0 !important;
  }

  .breath:nth-child(3),
  .breath:nth-child(6) {
    margin-left: 0;
    text-align: left;
  }

  .statusbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }

  .email-form {
    flex-direction: column;
    border-radius: 16px;
  }

  .email-form input[type="email"] {
    border-bottom: 1px solid var(--stroke-soft);
  }
}
