/* Landing page (/about/): the hero. One view of the pond and the two-storey gate, painted in the four
   seasons and joined into one picture across the whole screen: spring on the left melting into summer,
   autumn, winter (top to bottom on a tall phone), each seam traced in a thread of gold as a mended bowl
   is (kintsugi). The picture breathes slowly; petals, motes, leaves and snow drift each over its own
   season (about-seasons.js). The seams are set here only; the script reads them back. */

.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fffaf0; text-align: center;
  margin-top: calc(-1 * var(--bar-h)); height: max(560px, min(100svh, 1080px));
  display: grid; grid-template-rows: 1fr auto; background: var(--sumi);
}

/* The picture: four layers of one frame, each later season masked in past its seam. */
.scene {
  --angle: 100deg; --b1: 27%; --b2: 51%; --b3: 75%; --feather: 4.5%;
  position: absolute; inset: 0; z-index: -2;
}
.scene-move { position: absolute; inset: -4%; transform-origin: 46% 58%; animation: hero-breathe 46s ease-in-out infinite alternate; will-change: transform; }
@keyframes hero-breathe { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.07) translate3d(-1.2%, -0.6%, 0); } }
.scene .season { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.scene .season[data-season="summer"] { -webkit-mask-image: linear-gradient(var(--angle), transparent calc(var(--b1) - var(--feather)), #000 calc(var(--b1) + var(--feather))); mask-image: linear-gradient(var(--angle), transparent calc(var(--b1) - var(--feather)), #000 calc(var(--b1) + var(--feather))); }
.scene .season[data-season="autumn"] { -webkit-mask-image: linear-gradient(var(--angle), transparent calc(var(--b2) - var(--feather)), #000 calc(var(--b2) + var(--feather))); mask-image: linear-gradient(var(--angle), transparent calc(var(--b2) - var(--feather)), #000 calc(var(--b2) + var(--feather))); }
.scene .season[data-season="winter"] { -webkit-mask-image: linear-gradient(var(--angle), transparent calc(var(--b3) - var(--feather)), #000 calc(var(--b3) + var(--feather))); mask-image: linear-gradient(var(--angle), transparent calc(var(--b3) - var(--feather)), #000 calc(var(--b3) + var(--feather))); }
/* Gold threads along the seams: a fine line in a faint glow. */
.seams {
  --thread: rgba(236, 194, 112, 0.85); --glow: rgba(255, 214, 140, 0.16);
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(var(--angle), transparent calc(var(--b1) - 0.09%), var(--thread) var(--b1), transparent calc(var(--b1) + 0.09%)),
    linear-gradient(var(--angle), transparent calc(var(--b2) - 0.09%), var(--thread) var(--b2), transparent calc(var(--b2) + 0.09%)),
    linear-gradient(var(--angle), transparent calc(var(--b3) - 0.09%), var(--thread) var(--b3), transparent calc(var(--b3) + 0.09%)),
    linear-gradient(var(--angle), transparent calc(var(--b1) - 0.7%), var(--glow) var(--b1), transparent calc(var(--b1) + 0.7%)),
    linear-gradient(var(--angle), transparent calc(var(--b2) - 0.7%), var(--glow) var(--b2), transparent calc(var(--b2) + 0.7%)),
    linear-gradient(var(--angle), transparent calc(var(--b3) - 0.7%), var(--glow) var(--b3), transparent calc(var(--b3) + 0.7%));
  -webkit-mask-image: linear-gradient(transparent 30%, #000 52%, #000 84%, transparent 97%); mask-image: linear-gradient(transparent 30%, #000 52%, #000 84%, transparent 97%);
  animation: seam-glow 7s ease-in-out infinite alternate;
}
@keyframes seam-glow { from { opacity: 0.55; } to { opacity: 1; } }
.drift { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Shade under the words at the top, and into the page at the bottom. */
.hero::before, .hero::after { content: ""; position: absolute; left: 0; right: 0; z-index: -1; pointer-events: none; }
.hero::before { top: 0; height: 72%; background: radial-gradient(ellipse 62% 70% at 50% 36%, rgba(14, 11, 9, 0.62), rgba(14, 11, 9, 0.28) 55%, rgba(14, 11, 9, 0) 80%), linear-gradient(rgba(14, 11, 9, 0.42), rgba(14, 11, 9, 0) 34%); }
.hero::after { bottom: 0; height: 34%; background: linear-gradient(rgba(14, 11, 9, 0), rgba(14, 11, 9, 0.72)); }

/* The words. */
.hero-copy { align-self: start; padding: calc(var(--bar-h) + clamp(28px, 7vh, 84px)) var(--gutter) 0; max-width: 1080px; margin: 0 auto; }
.kicker { font-size: 14px; letter-spacing: 0.28em; color: #f1cf86; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }
/* Japanese breaks only after 、 and 。 in the title (no browser splits its phrases the way it reads), by phrase in the lead. */
.hero h1, .lead { word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
@supports (word-break: auto-phrase) { .lead { word-break: auto-phrase; } }
.hero h1 { font-size: clamp(32px, 5vw, 72px); margin: 10px 0 16px; letter-spacing: 0.03em; line-height: 1.18; text-shadow: 0 2px 22px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.45); }
.lead { font-size: clamp(15px, 1.45vw, 18px); max-width: 720px; margin: 0 auto; color: #f3ead8; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
.hero-actions { margin-top: clamp(20px, 3.4vh, 34px); }
.hero-actions .go { padding: 16px 44px; font-size: 19px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 230, 190, 0.35) inset; }

/* The key at the foot: a seal for each season, today's marked いま. */
.hero-base { padding: 0 var(--gutter) clamp(16px, 3vh, 28px); }
.season-key { list-style: none; margin: 0 auto 12px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1360px; }
.season-key li { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--serif); font-size: 15px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.seal { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 4px; background: var(--vermilion); color: #fff; font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; font-size: 19px; text-shadow: none; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.25); }
.now-tag { display: none; padding: 1px 9px; border-radius: 999px; background: var(--gold); color: var(--sumi); font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-shadow: none; }
.season-key li.is-now .seal { box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(241, 207, 134, 0.7); }
.season-key li.is-now .now-tag { display: inline-block; }
.hero-foot { font-size: 12.5px; color: #d9cdb6; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.hero-foot .note { opacity: 0.8; }

/* Entrance: the words rise, the picture comes up out of the dark (only when scripts run). */
.js .hero .scene { opacity: 0; transition: opacity 1.6s ease; }
.js .hero.shown .scene { opacity: 1; }
.js .hero .hero-copy > *, .js .hero .hero-base { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .hero.shown .hero-copy > *, .js .hero.shown .hero-base { opacity: 1; transform: none; }
.js .hero .hero-copy > :nth-child(2) { transition-delay: 0.12s; }
.js .hero .hero-copy > :nth-child(3) { transition-delay: 0.24s; }
.js .hero .hero-copy > :nth-child(4) { transition-delay: 0.36s; }
.js .hero .hero-base { transition-delay: 0.6s; }

/* A tall screen: the seasons lie in bands from the top down, the key in one short row. */
@media (max-aspect-ratio: 1/1) {
  .scene { --angle: 166deg; --b1: 31%; --b2: 53%; --b3: 75%; --feather: 4%; }
  .scene .season { object-position: 47% 60%; }
  .scene-move { transform-origin: 50% 55%; }
}
/* Upright with scripts: the seasons follow one another, each sweeping down over the last behind a gold
   thread (about-hero-cycle.js moves --wipe). The seal of the season showing lights up. */
.scene.cycling { --angle: 172deg; --feather: 9%; --wipe: -9%; }
.scene.cycling .season { visibility: hidden; -webkit-mask-image: none; mask-image: none; }
.scene.cycling .season.is-base { visibility: visible; z-index: 0; }
.scene.cycling .season.is-next {
  visibility: visible; z-index: 1;
  -webkit-mask-image: linear-gradient(var(--angle), #000 calc(var(--wipe) - var(--feather)), transparent calc(var(--wipe) + var(--feather)));
  mask-image: linear-gradient(var(--angle), #000 calc(var(--wipe) - var(--feather)), transparent calc(var(--wipe) + var(--feather)));
}
.scene.cycling .seams {
  z-index: 2; opacity: 1; animation: none; -webkit-mask-image: none; mask-image: none;
  background:
    linear-gradient(var(--angle), transparent calc(var(--wipe) - 0.22%), var(--thread) var(--wipe), transparent calc(var(--wipe) + 0.22%)),
    linear-gradient(var(--angle), transparent calc(var(--wipe) - 2.4%), var(--glow) var(--wipe), transparent calc(var(--wipe) + 2.4%));
}
.season-key li { transition: opacity 0.6s ease; }
.season-key li .seal { transition: transform 0.6s ease, box-shadow 0.6s ease; }
.scene.cycling ~ .hero-base .season-key li:not(.is-shown) { opacity: 0.55; }
.scene.cycling ~ .hero-base .season-key li.is-shown .seal { transform: scale(1.14); }
@media (max-width: 700px) {
  .hero { height: max(600px, min(100svh, 900px)); }
  .hero-copy { padding-top: calc(var(--bar-h) + 22px); }
  .kicker { font-size: 12px; letter-spacing: 0.18em; }
  .lead { font-size: 15px; }
  .season-key { grid-template-columns: repeat(4, auto); justify-content: center; gap: 14px; }
  .season-key li { flex-direction: column; gap: 3px; font-size: 12px; }
  .season-key li span[data-t] { display: none; }
  .seal { width: 30px; height: 30px; font-size: 17px; }
  .hero-foot { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene-move, .seams { animation: none; }
  .js .hero .scene, .js .hero .hero-copy > *, .js .hero .hero-base { opacity: 1; transform: none; transition: none; }
}
