/* The home page (index.html), on top of app.css, site.css (the feature cards) and about/about.css (the page's frame):
   Tracy's cloud Cinnamoroll as a sky across the top with one line of lettering, and the things to make sitting on its
   clouds, each a picture and its name. */

.hm { padding-top: 26px; }

/* ---------------------------------------------------------------- the sky */

/* Her painting (about/art/hero-full.jpg) on the right, crisp, showing its middle (his head and the tops of the clouds
   under it: about 190 to 900 of its 1354 px height); under it the top of the same painting, blown up and blurred, fills
   the rest of the banner with its own sky, and the lettering sits there. The cards overlap its foot. */
.hm-hero {
  --hh: clamp(300px, min(36vw, 52vh), 440px);   /* shorter on a short laptop screen, so the cards stay in view */
  position: relative; isolation: isolate; display: flex; align-items: center; height: var(--hh); border-radius: 34px;
  overflow: hidden; background: #7cc2ee; box-shadow: 0 0 0 4px #fff, 0 20px 50px rgba(20, 70, 130, 0.16);
}
.hm-sky {
  position: absolute; z-index: -2; left: -50%; top: -80px; width: 200%; height: calc(100% + 160px); max-width: none;
  object-fit: cover; object-position: 50% 0; filter: blur(30px);   /* only the clear sky above his head */
}
.hm-art {
  position: absolute; z-index: -1; right: 4%; top: calc(var(--hh) * -190 / 710); width: auto; max-width: none;
  height: calc(var(--hh) * 1354 / 710);
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 12%, #000 90%, transparent);
}
.hm-say { position: relative; width: 46%; padding: 0 0 64px 56px; }   /* clear of the cards along the foot */
.hm-h1 {   /* sticker lettering: the site's blue, a thick white outline, a soft shadow */
  margin: 0; font-weight: normal; font-size: clamp(36px, 4.3vw, 60px); line-height: 1.25; letter-spacing: 0.03em; white-space: pre-line;
  color: var(--deep); -webkit-text-stroke: 0.2em #fff; paint-order: stroke fill;
  filter: drop-shadow(0 6px 12px rgba(20, 70, 130, 0.3));
}
.hm-credit {   /* whose painting it is */
  position: absolute; top: 16px; right: 18px; display: flex; align-items: center; gap: 6px; padding: 5px 13px 5px 11px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.72); color: var(--deep); font-size: 13px; text-decoration: none;
  backdrop-filter: blur(4px); transition: background 0.15s;
}
.hm-credit:hover { background: #fff; }
.hm-credit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.hm-credit svg .dot { fill: currentColor; stroke: none; }

/* a reel in progress in this browser: a way straight back to it (home.js) */
.hm-continue {
  display: flex; align-items: center; gap: 14px; width: fit-content; max-width: 100%; margin: 24px 0 0; padding: 9px 10px 9px 12px;
  border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none;
  box-shadow: 0 0 0 2px var(--pink), 0 10px 26px rgba(238, 127, 168, 0.22); transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1), box-shadow 0.2s;
}
.hm-continue[hidden] { display: none; }
.hm-continue:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--pink-deep), 0 14px 30px rgba(238, 127, 168, 0.3); }
.hm-thumbs { display: flex; flex: none; padding-left: 12px; }
.hm-thumbs img {
  width: 46px; height: 46px; margin-left: -12px; border-radius: 50%; object-fit: cover; background: var(--sky-1);
  box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(44, 132, 198, 0.2);
}
.hm-thumbs img:nth-child(2) { transform: translateY(-3px); }
.hm-continue-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.hm-continue-text b { font-weight: normal; font-size: 16.5px; color: var(--deep); }
.hm-continue-text small { color: var(--muted); }
.hm-continue-go {
  display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; margin-left: 8px; border-radius: 50%;
  background: linear-gradient(180deg, #ffa3c2, var(--pink-deep)); color: #fff; box-shadow: 0 3px 0 #c95c86;
}
.hm-continue-go::before {
  content: ""; width: 22px; height: 22px; background: currentColor; transition: translate 0.15s;
  -webkit-mask: var(--ic-go) center / contain no-repeat; mask: var(--ic-go) center / contain no-repeat;
}
.hm-continue:hover .hm-continue-go::before { translate: 2px 0; }

/* ---------------------------------------------------------------- the things to make */

/* One row on the clouds: the lead one (picked in index.html) twice as wide. Each is its picture, then just its name and
   an arrow (the lead one's a button); the badges sit on the picture. */
.ft-home {
  position: relative; z-index: 1; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: -64px; padding: 0 24px;
}
.ft-home .ft.featured { grid-column: auto; }
.ft-home .ft-stage { aspect-ratio: auto; height: clamp(170px, 16vw, 220px); }
.ft-home .ft-sub { display: none; }
.ft-home .ft-text { flex: none; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 14px 18px; }
.ft-home .ft-title { font-size: 19px; line-height: 1.3; }
.ft-home .ft-badge { position: absolute; z-index: 3; top: 20px; box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(44, 132, 198, 0.18); }
.ft-home .ft-badge.new { left: 20px; }
.ft-home .ft-badge.xmas { right: 20px; }
.ft-home .featured .ft-title { font-size: 22px; }

/* The buttons, in Cinnamoroll's colours: sky blue (the blue of his eyes), white and cloud. The lead card's is the one
   candy button, sky blue with white words; the others are soft cloud-white circles with a sky-blue arrow that turn sky
   blue when their card is hovered. The arrow is app.css's, drawn in the middle of its 24 px box; the round buttons'
   words are hidden (font-size 0) and take no gap, so it sits dead centre. Hovering lifts the whole button, pressing
   sinks it; the arrow never slides off centre. */
.ft-home {
  --arrow: var(--ic-go);   /* app.css */
  --cinna-sky: linear-gradient(180deg, #62b9f1, #3a97e2 55%, #2f88d6);
  --cinna-glow: 0 6px 16px rgba(58, 151, 226, 0.32);
}
.ft-home .ft-go {
  display: flex; align-items: center; justify-content: center; gap: 0; flex: none; align-self: center;
  width: 44px; height: 44px; margin: 0; padding: 0; border-radius: 999px; font-size: 0; color: #2f88d6;
  background: linear-gradient(180deg, #f3fbff, #d9effd);
  box-shadow: inset 0 0 0 1.5px #c4e5fa, inset 0 2px 0 #fff, 0 4px 10px rgba(58, 151, 226, 0.16);
  transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1), box-shadow 0.2s, color 0.2s;
}
.ft-home .ft-go::after {
  content: ""; flex: none; width: 24px; height: 24px; margin: 0; background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
}
.ft-home .ft:hover .ft-go, .ft-home .ft:focus-visible .ft-go {
  color: #fff; background: var(--cinna-sky); transform: translateY(-2px) scale(1.06);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), var(--cinna-glow);
}
.ft-home .ft:hover .ft-go::after, .ft-home .ft:focus-visible .ft-go::after { translate: none; }
.ft-home .ft:active .ft-go { transform: scale(0.95); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 2px 6px rgba(58, 151, 226, 0.25); }
.ft-home .featured .ft-go, .ft-home .featured:hover .ft-go {   /* the candy one */
  width: auto; height: 44px; gap: 8px; padding: 0 20px; font-size: 16px; letter-spacing: 0.02em; color: #fff;
  background: var(--cinna-sky); text-shadow: 0 1px 2px rgba(20, 85, 150, 0.45);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), var(--cinna-glow);
}
.ft-home .featured:hover .ft-go { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 9px 20px rgba(58, 151, 226, 0.42); }
.ft-home .featured .ft-go::after { width: 20px; height: 20px; }

.home .credit { margin-top: 100px; }

/* ---------------------------------------------------------------- narrower */

@media (max-width: 1100px) {   /* the lead one across the top, the others three across under it */
  .ft-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ft-home .ft.featured { grid-column: 1 / -1; }
}
@media (max-width: 860px) {   /* the whole painting, with the lettering on its clouds */
  .hm-hero { height: auto; min-height: clamp(420px, 112vw, 560px); align-items: flex-end; border-radius: 28px; }
  .hm-sky { display: none; }
  .hm-art { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; -webkit-mask: none; mask: none; }
  .hm-say { flex: 1; width: auto; padding: 0 12px 74px; text-align: center; }
  .hm-h1 { font-size: clamp(30px, 8.6vw, 46px); }
  .hm-continue { margin: 16px auto 0; text-align: left; }
}
/* Phones: one column, every edge lined up. The sky is a card of its own (cards overlapping it at the same width only
   doubled its edges), then the lead card, then the others one per row with the picture beside the name, like the list
   on About (site.css); their badges sit over the name instead of on the small picture. */
@media (max-width: 760px) {
  .hm { padding-top: 16px; }
  .hm-hero { min-height: clamp(360px, 100vw, 480px); box-shadow: 0 0 0 2px #fff, 0 14px 34px rgba(20, 70, 130, 0.16); }
  .hm-say { padding-bottom: 24px; }
  .ft-home { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 16px; padding: 0; }
  .ft-home .featured .ft-stage { height: 190px; }
  .ft-home .featured .ft-text { padding: 10px 8px 10px 14px; }
  .ft-home .featured .ft-title { font-size: 19px; }
  .ft-home .ft-go { width: 38px; height: 38px; }
  .ft-home .ft-go::after { width: 21px; height: 21px; }
  .ft-home .featured .ft-go { width: auto; height: 40px; padding: 0 16px; font-size: 15px; }
  .ft-home .featured .ft-go::after { width: 18px; height: 18px; }
  .ft-home .featured .ft-badge { top: 15px; font-size: 11px; }
  .ft-home .featured .ft-badge.new { left: 15px; }
  .ft-home .featured .ft-badge.xmas { right: 15px; }

  .ft-home .ft:not(.featured) { flex-direction: row; border-radius: 22px; }
  .ft-home .ft:not(.featured) .ft-stage { --spread: 0.85; flex: none; width: 44%; height: auto; aspect-ratio: 4 / 3; margin: 8px 0 8px 8px; border-radius: 16px; }
  .ft-home .ft:not(.featured) .ft-text { flex: 1; min-width: 0; gap: 10px; padding: 10px 10px 10px 14px; }
  .ft-home .ft:not(.featured) .ft-head { flex: 1; min-width: 0; gap: 6px; }
  .ft-home .ft:not(.featured) .ft-title { order: 1; flex-basis: 100%; font-size: 17px; }   /* under its badges */
  .ft-home .ft:not(.featured) .ft-badge { position: static; font-size: 11px; box-shadow: none; }
  .ft-home .ft:not(.featured) .ft-go { margin: 0; font-size: 0; }   /* still just the arrow (site.css words it on phones) */
}
@media (max-width: 600px) {
  .hm-continue { gap: 10px; padding-right: 8px; }
  .hm-continue-text small { display: none; }   /* just where it goes, beside its pictures */
  .hm-thumbs img { width: 40px; height: 40px; }
  .hm-continue-text b { font-size: 14.5px; white-space: nowrap; }
  .hm-credit { top: 12px; right: 12px; font-size: 12px; }
}
@media (max-width: 400px) {   /* small phones (down to 320): a narrower picture, so 免費手機桌布 stays on one line */
  .ft-home .ft:not(.featured) .ft-stage { width: 40%; }
  .ft-home .ft:not(.featured) .ft-text { gap: 8px; padding-left: 12px; }
  .ft-home .ft:not(.featured) .ft-title { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-continue, .hm-continue-go::before, .ft-home .ft-go, .ft-home .ft-go::after { transition: none; }
}
