/* Public home refinement: section continuity and footer. Homepage-only selectors.
   Nothing here draws over a WebGL canvas: the dusk gradient lives in section backgrounds
   (the particle renderer is transparent and paints on top of its section background). */

/* ---------------------------------------------------------------------------------------
   Memories -> Love, in Motion: one continuous dusk.
   A single curve (paper -> blush -> soft pink -> rose violet -> plum -> deep purple),
   interpolated in OKLab with a smooth spline and sampled into many stops so no stop forms a
   visible band. It is split at the section boundary into two pixel-aligned layers:
   the last 300px of Memories (fading in from transparent so the existing pink glows are not
   cut) and the first 260px of the particle section (fading out into its original radial).
   The boundary colour is identical on both sides. Mobile uses 230px + 180px.
   ------------------------------------------------------------------------------------- */
.home-page #catalog-gateway.catalog-gateway {
  background:
    linear-gradient(to bottom,
      rgb(255 248 251 / 0) 0%, rgb(255 248 251 / 0.019) 5%, rgb(255 247 250 / 0.123) 10%, rgb(254 245 249 / 0.321) 15%,
      rgb(254 243 248 / 0.567) 20%, rgb(253 241 246 / 0.795) 25%, rgb(253 238 245 / 0.945) 30%, rgb(252 235 243 / 0.998) 35%,
      rgb(252 232 241) 40%, rgb(251 229 239) 45%, rgb(251 226 237) 50%, rgb(251 222 235) 55%,
      rgb(251 218 232) 60%, rgb(250 214 230) 65%, rgb(249 209 227) 70%, rgb(246 203 224) 75%,
      rgb(243 196 221) 80%, rgb(237 187 218) 85%, rgb(231 177 215) 90%, rgb(223 165 211) 95%,
      rgb(214 153 207) 100%) bottom center / 100% 300px no-repeat,
    radial-gradient(circle at 21% 62%, rgba(255, 206, 221, 0.45), transparent 20%),
    radial-gradient(circle at 86% 28%, rgba(255, 221, 231, 0.56), transparent 18%),
    var(--paper);
}

.home-page #particle-heart.particle-heart-section {
  /* Same base layers as particle-heart.css; only the top fade is replaced. */
  background:
    linear-gradient(to bottom,
      rgb(214 153 207) 0%, rgb(203 140 202) 6.2%, rgb(190 127 196) 12.5%, rgb(176 112 190) 18.8%,
      rgb(160 97 183) 25%, rgb(144 82 174) 31.2%, rgb(128 68 164) 37.5%, rgb(111 55 151 / 0.997) 43.8%,
      rgb(92 43 135 / 0.962) 50%, rgb(73 32 118 / 0.869) 56.2%, rgb(57 23 101 / 0.720) 62.5%, rgb(44 16 87 / 0.534) 68.8%,
      rgb(35 11 76 / 0.343) 75%, rgb(29 9 65 / 0.178) 81.2%, rgb(25 8 56 / 0.064) 87.5%, rgb(23 8 50 / 0.009) 93.8%,
      rgb(22 8 48 / 0) 100%) top center / 100% 260px no-repeat,
    radial-gradient(ellipse at 50% 38%, var(--ph3d-bg1), var(--ph3d-bg2) 72%),
    var(--ph3d-bg2);
}

@media (max-width: 640px) {
  .home-page #catalog-gateway.catalog-gateway {
    background:
      linear-gradient(to bottom,
      rgb(255 248 251 / 0) 0%, rgb(255 248 251 / 0.022) 5%, rgb(255 247 250 / 0.138) 10%, rgb(254 245 249 / 0.354) 15%,
      rgb(254 243 248 / 0.613) 20%, rgb(253 240 246 / 0.839) 25%, rgb(253 237 244 / 0.969) 30%, rgb(252 234 242) 35%,
      rgb(251 231 240) 40%, rgb(251 228 238) 45%, rgb(251 224 236) 50%, rgb(251 220 233) 55%,
      rgb(250 216 231) 60%, rgb(249 211 228) 65%, rgb(247 205 225) 70%, rgb(244 198 222) 75%,
      rgb(239 189 219) 80%, rgb(232 179 216) 85%, rgb(225 167 212) 90%, rgb(215 155 208) 95%,
      rgb(205 142 203) 100%) bottom center / 100% 230px no-repeat,
      radial-gradient(circle at 21% 62%, rgba(255, 206, 221, 0.45), transparent 20%),
      radial-gradient(circle at 86% 28%, rgba(255, 221, 231, 0.56), transparent 18%),
      var(--paper);
  }

  .home-page #particle-heart.particle-heart-section {
    /* The title now sits on plum instead of the old light band: restore the light title. */
    --ph3d-title: #fff1f8;
    background:
      linear-gradient(to bottom,
      rgb(205 142 203) 0%, rgb(193 129 197) 6.2%, rgb(179 116 192) 12.5%, rgb(165 101 185) 18.8%,
      rgb(150 87 178) 25%, rgb(134 73 169) 31.2%, rgb(119 61 158) 37.5%, rgb(102 49 144 / 0.986) 43.8%,
      rgb(84 38 128 / 0.929) 50%, rgb(67 29 111 / 0.818) 56.2%, rgb(52 21 96 / 0.662) 62.5%, rgb(41 14 84 / 0.481) 68.8%,
      rgb(34 10 73 / 0.304) 75%, rgb(28 9 63 / 0.155) 81.2%, rgb(25 8 55 / 0.055) 87.5%, rgb(23 8 50 / 0.008) 93.8%,
      rgb(22 8 48 / 0) 100%) top center / 100% 180px no-repeat,
      radial-gradient(ellipse at 50% 38%, var(--ph3d-bg1), var(--ph3d-bg2) 72%),
      var(--ph3d-bg2);
  }

  .home-page #particle-heart .ph3d__title {
    text-shadow: 0 1px 10px rgba(42, 15, 85, 0.55);
  }
}

/* Rubber-band overscroll (Safari) paints the root background beyond the page edges:
   keep it dark so the end of the dark footer never flashes the light paper colour.
   body keeps its own paper background, so the page itself is unchanged. */
html[data-public-home] {
  background-color: #07040f;
}

/* ---------------------------------------------------------------------------------------
   Footer. Starts exactly on the bloom section's edge colour (#030208) and deepens into a
   near-black plum with a faint rose-violet glow at the bottom. No animation.
   ------------------------------------------------------------------------------------- */
.home-page .home-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(64px, 8vw, 104px) clamp(24px, 7vw, 118px) calc(28px + env(safe-area-inset-bottom, 0px));
  color: rgba(230, 220, 250, 0.62);
  background:
    radial-gradient(ellipse 60% 120% at 50% 135%, rgba(122, 63, 160, 0.22), transparent 70%),
    linear-gradient(to bottom, #030208 0%, #06030e 40%, #0b0617 100%);
  font-family: var(--font-sans);
}

.home-page .home-footer p {
  margin: 0;
}

.home-page .home-footer__inner,
.home-page .home-footer__base {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.home-page .home-footer__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 56px;
  flex-wrap: wrap;
  padding-bottom: clamp(36px, 4.5vw, 52px);
}

.home-page .home-footer__name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.home-page .home-footer__alias {
  font-family: var(--font-script);
  font-size: clamp(38px, 3.4vw, 48px);
  line-height: 1;
  color: #fff1f8;
  text-shadow: 0 0 22px rgba(201, 138, 201, 0.35);
}

.home-page .home-footer__cjk {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: rgba(244, 198, 222, 0.78);
}

.home-page .home-footer p.home-footer__line {
  margin-top: 14px;
  font-family: var(--font-script);
  font-size: clamp(18px, 1.5vw, 21px);
  color: rgba(244, 198, 222, 0.66);
}

.home-page .home-footer__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 30px;
}

.home-page .home-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(240, 230, 252, 0.72);
  font-family: Georgia, "Times New Roman", serif; /* same voice as the section titles */
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.04em;
  transition: color 180ms ease;
}

.home-page .home-footer__nav a:not([lang]) {
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0.2em;
}

.home-page .home-footer__nav a:hover,
.home-page .home-footer__top:hover {
  color: #fff;
}

.home-page .home-footer__base {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
}

/* hairline that fades out at both ends */
.home-page .home-footer__base::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 198, 222, 0.26) 18%,
    rgba(244, 198, 222, 0.26) calc(50% - 20px), transparent calc(50% - 20px),
    transparent calc(50% + 20px), rgba(244, 198, 222, 0.26) calc(50% + 20px),
    rgba(244, 198, 222, 0.26) 82%, transparent);
}

.home-page .home-footer__since {
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(230, 220, 250, 0.5);
}

.home-page .home-footer__since time {
  font-variant-numeric: tabular-nums;
}

.home-page .home-footer__heart {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  font-size: 13px;
  line-height: 1;
  color: rgba(244, 198, 222, 0.7);
}

.home-page .home-footer__top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 6px 0 16px;
  border: 1px solid rgba(244, 198, 222, 0.22);
  border-radius: 999px;
  color: rgba(240, 230, 252, 0.78);
  font-size: 13px;
  letter-spacing: 0.14em;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.home-page .home-footer__top:hover {
  border-color: rgba(244, 198, 222, 0.48);
  background-color: rgba(244, 198, 222, 0.06);
}

.home-page .home-footer__arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(244, 198, 222, 0.12);
  color: #ffd9e8;
  transition: transform 180ms ease;
}

.home-page .home-footer__top:hover .home-footer__arrow {
  transform: translateY(-2px);
}

.home-page .home-footer a:focus-visible {
  outline: 2px solid #f4c6de;
  outline-offset: 4px;
  border-radius: 6px;
}

.home-page .home-footer a.home-footer__top:focus-visible {
  border-radius: 999px;
}

@media (max-width: 640px) {
  .home-page .home-footer {
    padding-top: 56px;
    text-align: center;
  }

  .home-page .home-footer__inner {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }

  .home-page .home-footer__name {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .home-page .home-footer__cjk {
    letter-spacing: 0.32em;
    padding-left: 0.32em; /* optically centre tracked text */
  }

  .home-page .home-footer__nav {
    justify-content: center;
    gap: 0 22px;
  }

  .home-page .home-footer__base {
    flex-direction: column-reverse;
    gap: 18px;
    padding-top: 30px;
  }

  .home-page .home-footer__since {
    letter-spacing: 0.2em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .home-footer__nav a,
  .home-page .home-footer__top,
  .home-page .home-footer__arrow {
    transition: none;
  }
}
