/* Blossum AFK — cherry grove at dusk
   paper: pale petal wash · ink: bark plum · accents: moss + lantern amber
   machine things are square (HUD, buttons, steps), grown things are round */

:root {
  --paper:      #FDF4F6;
  --paper-2:    #F8E7EC;
  --petal:      #F3B8CE;
  --petal-pale: #FBE3EB;
  --blossom:    #DD6E9C;
  --bark:       #3C2130;
  --bark-soft:  #6B4453;
  --moss:       #4E7B4F;
  --lantern:    #E3922E;
  --night:      #2A1826;

  --display: "Zen Maru Gothic", ui-rounded, "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --text: "Zen Kaku Gothic New", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "Silkscreen", "Courier New", monospace;

  --w: 1160px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --spine: 35px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--bark);
  font: 400 17px/1.62 var(--text);
  overflow-x: hidden;
}

/* soft dusk light at the top of the page, under everything */
body::before {
  content: "";
  position: fixed;
  inset: -10% -10% auto -10%;
  height: 70vh;
  background:
    radial-gradient(60% 70% at 78% 8%, rgba(243, 184, 206, .55), transparent 70%),
    radial-gradient(50% 60% at 12% 0%, rgba(227, 146, 46, .16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* the away state: the page dims while nothing is happening */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(130% 95% at 50% 38%, transparent 40%, rgba(42, 24, 38, .2));
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
  z-index: 5;
}
body.away::after { opacity: 1; }

#petals { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

.top, main, .foot { position: relative; z-index: 2; }

img, svg { max-width: 100%; }

a { color: var(--bark); text-decoration-color: var(--petal); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--blossom); }

:focus-visible {
  outline: 3px solid var(--lantern);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--bark); color: var(--paper);
  padding: .7rem 1.1rem; z-index: 40;
}
.skip:focus { left: .5rem; top: .5rem; }

h1, h2, h3 { font-family: var(--display); font-weight: 900; margin: 0; letter-spacing: -.015em; }

/* ---------- header ---------- */

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.5rem;
  max-width: var(--w); margin-inline: auto;
  padding: .85rem var(--pad);
  background: rgba(253, 244, 246, .82);
  backdrop-filter: blur(9px);
}
@supports not (backdrop-filter: blur(1px)) { .top { background: var(--paper); } }

.mark {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--display); font-weight: 700; font-size: 1.12rem;
  text-decoration: none; letter-spacing: -.01em;
}
.mark em { font-style: normal; color: var(--blossom); }
.mark__glyph { width: 27px; height: 27px; color: var(--blossom); transition: transform .6s cubic-bezier(.2,.9,.3,1.2); }
.mark:hover .mark__glyph { transform: rotate(72deg); }

.top__nav { display: flex; gap: 1.6rem; margin-left: auto; font-size: .95rem; }
.top__nav a { text-decoration: none; color: var(--bark-soft); }
.top__nav a:hover { color: var(--blossom); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--text); font-weight: 700; font-size: 1rem;
  text-decoration: none;
  padding: .82rem 1.45rem;
  border: 2px solid var(--bark);
  border-radius: 3px;
  background: var(--bark);
  color: var(--paper);
  box-shadow: 5px 5px 0 var(--petal);
  transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--petal); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--petal); }

.btn--ghost {
  background: transparent; color: var(--bark);
  box-shadow: 5px 5px 0 rgba(243, 184, 206, .55);
}
.btn--ghost:hover { background: var(--petal-pale); box-shadow: 3px 3px 0 rgba(243, 184, 206, .55); }

.btn--sm { padding: .5rem 1rem; font-size: .92rem; box-shadow: 4px 4px 0 var(--petal); }

.btn--lantern {
  background: var(--lantern); border-color: var(--lantern); color: #33190F;
  box-shadow: 5px 5px 0 #7A3F55;
}
.btn--lantern:hover { box-shadow: 3px 3px 0 #7A3F55; }

.btn--night { color: var(--petal-pale); border-color: var(--petal); box-shadow: 5px 5px 0 rgba(221,110,156,.5); }
.btn--night:hover { background: rgba(243,184,206,.14); box-shadow: 3px 3px 0 rgba(221,110,156,.5); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  max-width: var(--w); margin-inline: auto;
  padding: clamp(2rem, 4.5vw, 3.6rem) var(--pad) clamp(3.5rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.branch {
  position: absolute;
  top: -40px; right: -60px;
  width: min(660px, 78vw); height: auto;
  z-index: -1;
  opacity: .96;
}
.blooms use {
  transform-box: fill-box;
  transform-origin: center;
  animation: bloom .9s cubic-bezier(.2,.8,.25,1.3) both;
  animation-delay: var(--d);
}
@keyframes bloom {
  from { transform: scale(0) rotate(-50deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}

.hero__chip {
  display: inline-flex; align-items: center; gap: .55rem;
  margin: 0 0 1.15rem;
  font-size: .82rem; color: var(--bark-soft);
}
.hero__chip span {
  font-family: var(--pixel); font-size: .72rem;
  background: var(--bark); color: var(--petal-pale);
  padding: .34rem .5rem .28rem; border-radius: 2px;
}

.hero h1 {
  font-size: clamp(2.7rem, 6.6vw, 5.1rem);
  line-height: .98;
  letter-spacing: -.035em;
  margin-bottom: 1.25rem;
}

.hero__lede {
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--bark-soft);
  margin: 0 0 1.8rem;
}

.hero__act { display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 0 0 1.3rem; }

.hero__fine { margin: 0; font-size: .87rem; color: var(--bark-soft); max-width: 42ch; }

/* ---------- the status window ---------- */

.hud {
  margin: 0;
  background: var(--night);
  color: var(--petal-pale);
  border: 2px solid var(--bark);
  box-shadow: 9px 9px 0 rgba(221, 110, 156, .34);
  justify-self: end;
  width: 100%;
  max-width: 400px;
}

.hud__bar {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--pixel); font-size: .68rem;
  padding: .6rem .8rem .5rem;
  background: #1D0F1A;
  color: #C79BB0;
  border-bottom: 2px solid #4A2B3F;
}
.hud__led {
  width: 8px; height: 8px; background: #7DC97E; border-radius: 1px;
  box-shadow: 0 0 0 0 rgba(125, 201, 126, .6);
  animation: beat 2.4s ease-out infinite;
}
@keyframes beat {
  0%   { box-shadow: 0 0 0 0 rgba(125, 201, 126, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(125, 201, 126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 201, 126, 0); }
}

.hud__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; margin: 0; background: #4A2B3F;
  border-bottom: 1px solid #4A2B3F;
}
.hud__grid > div { background: var(--night); padding: 1rem .9rem; }
.hud__grid dt { font-size: .74rem; color: #B08699; margin-bottom: .3rem; }
.hud__grid dd {
  margin: 0; font-family: var(--pixel); font-size: 1.12rem; color: var(--lantern);
  word-break: break-all;
}

.hud__state {
  margin: 0; padding: .85rem .9rem;
  font-size: .85rem; color: #D9B5C4; min-height: 3.2em;
}

.hud__meter { height: 8px; background: #1D0F1A; }
.hud__meter span {
  display: block; height: 100%; width: 4%;
  background: linear-gradient(90deg, var(--blossom), var(--lantern));
  transition: width 1.4s ease;
}

/* ---------- the branch that runs down the page ---------- */

.grove {
  position: relative;
  max-width: var(--w); margin-inline: auto;
  padding-inline: var(--pad);
}
.grove::before {
  content: "";
  position: absolute;
  left: calc(var(--pad) + var(--spine));
  top: 2.5rem; bottom: 4rem;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--petal) 4%, var(--petal) 94%, transparent);
}

.sec { position: relative; padding: clamp(3rem, 7vw, 5.5rem) 0 0 96px; }

.node {
  position: absolute;
  left: 12px; top: clamp(3rem, 7vw, 5.5rem);
  width: 46px; height: 46px;
  color: var(--blossom);
  background: radial-gradient(closest-side, var(--paper) 74%, transparent);
}

.sec__head { max-width: 58ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec__head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.06;
  margin-bottom: .9rem;
}
.sec__head p { margin: 0; color: var(--bark-soft); max-width: 52ch; }

/* ---------- features, falling in a stagger ---------- */

.feats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.feat { margin: 0; }
.feat h3 { font-size: 1.22rem; font-weight: 700; margin-bottom: .5rem; }
.feat p { margin: 0; color: var(--bark-soft); font-size: .97rem; }

.feat:not(.feat--lead) {
  border-top: 1px solid var(--petal);
  padding: 1.5rem 0 2.2rem;
}
.feat:nth-child(odd):not(.feat--lead) { margin-top: 3rem; }

.feat--lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr);
  column-gap: clamp(1.5rem, 3vw, 3rem);
  align-items: end;
  background: linear-gradient(118deg, #F7D8E3, #FBE9EF 58%, #FDF1F5);
  border-radius: 22px;
  padding: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 2.5rem;
}
.feat--lead h3 {
  grid-column: 1 / -1;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 900; margin-bottom: .8rem;
}
.feat--lead p { color: var(--bark); font-size: clamp(1rem, 1.35vw, 1.1rem); }
.feat__note {
  font-size: .89rem !important;
  color: var(--bark-soft) !important;
  padding-left: clamp(1.5rem, 3vw, 3rem);
  border-left: 1px dashed rgba(221, 110, 156, .5);
}

/* ---------- the log ---------- */

.log { list-style: none; margin: 0; padding: 0; max-width: 62ch; }
.log li {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.6rem;
  padding: 1.35rem 0;
  border-top: 1px dashed rgba(221, 110, 156, .4);
}
.log li:last-child { border-bottom: 1px dashed rgba(221, 110, 156, .4); }
.log__t {
  font-weight: 700; color: var(--blossom);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.log p { margin: 0; color: var(--bark-soft); }

/* ---------- setup ---------- */

.steps { list-style: none; counter-reset: step; margin: 0 0 3rem; padding: 0; max-width: 64ch; }
.steps li { counter-increment: step; padding: 0 0 1.9rem 3.6rem; position: relative; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: .1rem;
  width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center;
  background: var(--bark); color: var(--petal-pale);
  font-family: var(--pixel); font-size: .82rem;
  border-radius: 3px;
}
.steps h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .35rem; }
.steps p { margin: 0; color: var(--bark-soft); }

.specs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.specs dl { margin: 0; display: grid; gap: .1rem; }
.specs dl > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--paper-2);
  font-size: .95rem;
}
.specs dt { color: var(--bark-soft); }
.specs dd { margin: 0; font-weight: 500; text-align: right; }
.specs__warn {
  margin: 0;
  background: #FCF0DF;
  border-left: 3px solid var(--lantern);
  border-radius: 0 16px 16px 0;
  padding: 1.1rem 1.3rem;
  font-size: .93rem;
  color: #6A4520;
}

/* ---------- download ---------- */

.get {
  margin-top: clamp(4rem, 9vw, 7rem);
  background: var(--night);
  color: var(--petal-pale);
  background-image: radial-gradient(70% 120% at 50% -20%, rgba(221, 110, 156, .28), transparent 65%);
}
.get__inner {
  max-width: var(--w); margin-inline: auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--pad);
  text-align: center;
}
.get h2 { font-size: clamp(2.2rem, 5.5vw, 3.9rem); margin-bottom: 1rem; letter-spacing: -.03em; }
.get p { margin: 0 auto; max-width: 48ch; color: #D6AEBF; }
.get__act { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: 2.2rem 0 1.4rem !important; }
.get__fine { font-size: .87rem; color: #A87F91; }

/* ---------- footer ---------- */

.foot {
  max-width: var(--w); margin-inline: auto;
  padding: 2.5rem var(--pad) 3.5rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem;
  font-size: .9rem; color: var(--bark-soft);
}
.foot p { margin: 0; }
.foot__mark { display: flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 700; color: var(--bark); }
.foot__glyph { width: 20px; height: 20px; color: var(--petal); }
.foot nav { display: flex; gap: 1.3rem; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--blossom); }
.foot__legal { width: 100%; max-width: 46ch; font-size: .82rem; opacity: .8; }

/* ---------- away ribbon ---------- */

.afk-bar {
  position: fixed; z-index: 30;
  left: 0; right: 0; bottom: 1.5rem;
  width: max-content; margin-inline: auto;
  transform: translateY(240%);
  display: flex; align-items: center; gap: .8rem;
  background: var(--night);
  color: var(--petal-pale);
  border: 2px solid #4A2B3F;
  border-radius: 3px;
  padding: .7rem 1.1rem;
  box-shadow: 0 10px 30px rgba(42, 24, 38, .28);
  transition: transform .5s cubic-bezier(.2,.8,.3,1.1);
  max-width: calc(100vw - 2rem);
}
body.away .afk-bar { transform: translateY(0); }
.afk-bar p { margin: 0; font-size: .93rem; }
.afk-bar__glyph { width: 20px; height: 20px; color: var(--blossom); flex: none; }
#afk-clock { font-family: var(--pixel); color: var(--lantern); font-size: .88rem; }
.afk-bar__hint { font-size: .78rem; color: #9E7688; border-left: 1px solid #4A2B3F; padding-left: .8rem; flex: none; }

/* ---------- narrow ---------- */

@media (max-width: 900px) {
  body { font-size: 16px; }
  .top__nav { display: none; }
  .top__nav + .btn { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 1.5rem; overflow: hidden; }
  .hud { justify-self: stretch; max-width: none; }
  .branch { top: -20px; bottom: auto; right: -80px; width: 122vw; opacity: .55; z-index: -1; }
  .grove::before { display: none; }
  .sec { padding-left: 0; }
  .node { position: static; width: 34px; height: 34px; margin-bottom: .8rem; display: block; background: none; }
  .feats { grid-template-columns: 1fr; }
  .feat--lead { grid-template-columns: 1fr; row-gap: 1.1rem; }
  .feat__note { padding-left: 0; border-left: 0; padding-top: 1rem; border-top: 1px dashed rgba(221, 110, 156, .5); }
  .feat:nth-child(odd):not(.feat--lead) { margin-top: 0; }
  .specs { grid-template-columns: 1fr; }
  .afk-bar__hint { display: none; }
}

@media (max-width: 520px) {
  .log li { grid-template-columns: 1fr; gap: .3rem; }
  .hero__act .btn { flex: 1 1 auto; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  body::after { display: none; }
}
