/* ============================================================
   lab3 subpages — shared template components (lead-managed)
   ============================================================ */

/* --- sub hero band ------------------------------------------ */
.sp-hero {
  position: relative;
  margin: 108px 16px 0;
  padding: 64px 48px 56px;
  background: var(--lavender);
  border-radius: 24px;
  overflow: hidden;
}
.sp-hero::before,
.sp-hero::after {
  content: "";
  position: absolute;
  border-radius: 47% 53% 46% 54% / 44% 47% 53% 56%;
  opacity: .55;
  pointer-events: none;
}
.sp-hero::before { width: 340px; height: 340px; right: -80px; top: -120px; background: var(--sp-accent, var(--blue)); }
.sp-hero::after  { width: 200px; height: 200px; right: 220px; bottom: -110px; background: #fff; }

.sp-heroEn {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: clamp(4.8rem, 9vw, 10rem);
  line-height: 1.02;
  color: var(--navy);
  position: relative;
  z-index: 1;
}
.sp-heroJp {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--navy);
  position: relative;
  z-index: 1;
}
.sp-heroJp::before {
  content: "";
  width: 16px;
  height: 11px;
  border-radius: 999px;
  background: var(--sp-accent, var(--blue));
}

/* --- breadcrumb bar (navy rounded, like the top page homebar) */
.sp-crumb {
  margin: 16px 16px 0;
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 1.3rem;
  font-weight: 700;
}
.sp-crumb a { color: #fff; text-decoration: none; opacity: .85; }
.sp-crumb a:hover { opacity: 1; text-decoration: underline; }
.sp-crumb .sep { margin: 0 10px; opacity: .5; }

/* --- content layout ----------------------------------------- */
.sp-main { padding-bottom: 40px; }

.sp-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 24px 8px;
}

.sp-h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 20px;
}
.sp-h2::before {
  content: "";
  flex: none;
  width: 18px;
  height: 12px;
  border-radius: 999px;
  background: var(--dot, var(--blue));
}

.sp-lead {
  font-size: 1.6rem;
  line-height: 2;
  font-weight: 500;
  color: var(--navy);
}
.sp-lead + .sp-lead { margin-top: 1em; }

/* --- cards --------------------------------------------------- */
.sp-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(40, 40, 64, .08);
  padding: 28px;
}
.sp-cardGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.sp-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 10px;
}
.sp-card h3::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot, var(--blue));
}
.sp-card p { font-size: 1.4rem; line-height: 1.9; color: var(--navy); }

/* --- framed photo ------------------------------------------- */
.sp-frame {
  --fc: var(--blue);
  position: relative;
  border: 7px solid var(--fc);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.sp-frameTab {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: var(--fc);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.5rem;
  padding: 6px 16px 8px 12px;
  border-radius: 0 0 12px 0;
}
.sp-framePhoto { display: block; width: 100%; object-fit: cover; }

/* --- definition table --------------------------------------- */
.sp-table { border-top: 1px solid rgba(40, 40, 64, .18); }
.sp-table > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 20px 8px;
  border-bottom: 1px solid rgba(40, 40, 64, .18);
}
.sp-table dt { font-weight: 900; font-size: 1.5rem; color: var(--navy); }
.sp-table dd { font-size: 1.5rem; line-height: 1.9; color: var(--navy); }

/* --- numbered steps ------------------------------------------ */
.sp-steps { display: flex; flex-direction: column; gap: 0; }
.sp-step {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 0 0 32px 0;
}
.sp-step::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 54px;
  bottom: 4px;
  width: 2px;
  background: rgba(40, 40, 64, .18);
}
.sp-step:last-child::before { display: none; }
.sp-stepNum {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--dot, var(--blue));
  color: #fff;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-stepBody h3 { font-size: 1.7rem; font-weight: 900; color: var(--navy); margin: 12px 0 6px; }
.sp-stepBody p { font-size: 1.4rem; line-height: 1.9; color: var(--navy); }

/* --- tags ---------------------------------------------------- */
.sp-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-tags span {
  border: 1px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  padding: 4px 14px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}

/* --- bubble & character -------------------------------------- */
.sp-bubble {
  --bc: var(--blue);
  position: relative;
  display: inline-block;
  background: var(--bc);
  color: #fff;
  font-weight: 900;
  font-size: 1.4rem;
  padding: 10px 20px;
  border-radius: 999px;
}
.sp-bubble::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 26px;
  width: 14px;
  height: 14px;
  background: var(--bc);
  border-radius: 0 999px 999px 999px;
  transform: rotate(45deg);
}
.sp-char { display: block; }
.sp-float { animation: spFloat 3s ease-in-out infinite alternate; }
@keyframes spFloat { 0% { transform: translateY(10px); } 100% { transform: translateY(-8px); } }

/* --- bottom CTA ---------------------------------------------- */
.sp-cta {
  display: block;
  max-width: 960px;
  margin: 64px auto 0;
  padding: 44px 32px;
  text-align: center;
  border-radius: 20px;
  background:
    radial-gradient(300px 200px at 12% 20%, rgba(93, 63, 232, .16), transparent),
    radial-gradient(260px 180px at 88% 30%, rgba(247, 166, 60, .2), transparent),
    radial-gradient(240px 170px at 55% 95%, rgba(62, 201, 245, .18), transparent),
    #FDF6EE;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.sp-cta:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(40, 40, 64, .14); }
.sp-ctaEn {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: clamp(3.2rem, 6vw, 5.2rem);
  color: var(--navy);
  line-height: 1.1;
}
.sp-ctaJp { font-weight: 900; font-size: 1.5rem; color: var(--navy); margin-top: 6px; }

/* --- back to top link ---------------------------------------- */
.sp-back {
  display: block;
  width: fit-content;
  margin: 40px auto 0;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--navy);
  border-bottom: 2px solid var(--navy);
  padding-bottom: 2px;
  transition: opacity .3s var(--ease);
}
.sp-back:hover { opacity: .6; }

/* --- reveal -------------------------------------------------- */
.sp-reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.sp-reveal.show { opacity: 1; transform: none; }

/* --- mobile -------------------------------------------------- */
@media (max-width: 767px) {
  .sp-hero { margin: 76px 8px 0; padding: 36px 22px 30px; border-radius: 18px; }
  .sp-hero::before { width: 200px; height: 200px; right: -70px; top: -80px; }
  .sp-hero::after { display: none; }
  .sp-heroEn { font-size: clamp(3.6rem, 14vw, 5.6rem); }
  .sp-heroJp { font-size: 1.5rem; }
  .sp-crumb { margin: 10px 8px 0; padding: 11px 16px; font-size: 1.15rem; }
  .sp-section { padding: 36px 18px 4px; }
  .sp-h2 { font-size: 2rem; }
  .sp-lead { font-size: 1.4rem; }
  .sp-table > div { grid-template-columns: 1fr; gap: 4px; padding: 14px 4px; }
  .sp-cta { margin: 44px 16px 0; }
}

/* ============================================================
   subpage v2 — design upgrade (lead-managed)
   ============================================================ */

/* --- hero: page-color tint + entrance ----------------------- */
.sp-hero {
  background: color-mix(in srgb, var(--sp-accent, var(--blue)) 10%, #fff);
}
.sp-hero::before { opacity: .8; animation: spHeroBlob .9s cubic-bezier(.34,1.56,.64,1) both; }
.sp-hero::after  { opacity: .9; animation: spHeroBlob .9s .12s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes spHeroBlob { 0% { transform: scale(0) rotate(-20deg); } 100% { transform: scale(1) rotate(0); } }

.sp-heroEn { animation: spHeroTitle .7s .08s cubic-bezier(.3,1.4,.5,1) both; }
.sp-heroJp { animation: spHeroTitle .7s .22s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes spHeroTitle { 0% { opacity: 0; transform: translateY(34px); } 100% { opacity: 1; transform: none; } }

.sp-heroChar {
  position: absolute;
  right: clamp(24px, 6vw, 90px);
  bottom: -6px;
  width: clamp(110px, 14vw, 190px);
  z-index: 2;
  animation: spFloat 3s ease-in-out infinite alternate;
}

/* extra deco dots on hero */
.sp-hero .sp-heroDot {
  position: absolute;
  border-radius: 50%;
  background: var(--sp-accent, var(--blue));
  opacity: .8;
}
.sp-hero .sp-heroDot--1 { width: 18px; height: 18px; left: 46%; top: 24%; animation: spFloat 2.4s ease-in-out infinite alternate; }
.sp-hero .sp-heroDot--2 { width: 10px; height: 10px; left: 56%; top: 62%; background: var(--navy); opacity: .25; animation: spFloat 3.2s ease-in-out infinite alternate; }

/* --- section rhythm bands ------------------------------------ */
.sp-band {
  --band: var(--lavender);
  background: var(--band);
  border-radius: 28px;
  margin: 48px 16px 0;
  padding: 8px 0 56px;
}
.sp-band > .sp-section { padding-top: 48px; }
.sp-band--cream  { --band: #FDF6EE; }
.sp-band--tint   { --band: color-mix(in srgb, var(--sp-accent, var(--blue)) 7%, #fff); }

/* --- EN mini label above h2 ---------------------------------- */
.sp-h2En {
  display: block;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dot, var(--blue));
  margin-bottom: 6px;
}

/* --- link cards: arrow circle -------------------------------- */
.sp-card { position: relative; }
a.sp-card { padding-right: 64px; }
a.sp-card .sp-arrow,
.sp-arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dot, var(--blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.5rem;
  transition: transform .3s var(--ease);
}
a.sp-card:hover .sp-arrow { transform: translateX(4px) scale(1.08); }

/* colored notch corner for cards */
.sp-card--notch::before {
  display: none;
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: radial-gradient(circle 16px at 0 100%, transparent 15.4px, var(--dot, var(--blue)) 15.8px);
  border-radius: 0 16px 0 0;
}

/* --- photo strip (casual gallery row) ------------------------ */
.sp-photoRow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.sp-photoRow img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
}
.sp-photoRow img:nth-child(2) { transform: translateY(14px); }

/* --- CTA v2: floating characters + arrow --------------------- */
.sp-cta { position: relative; overflow: hidden; }
.sp-cta .sp-ctaChar {
  position: absolute;
  bottom: -4px;
  width: clamp(70px, 9vw, 120px);
  opacity: .95;
}
.sp-cta .sp-ctaChar--l { left: clamp(12px, 5vw, 70px); animation: spFloat 2.6s ease-in-out infinite alternate; }
.sp-cta .sp-ctaChar--r { right: clamp(12px, 5vw, 70px); animation: spFloat 3.4s ease-in-out infinite alternate; }
.sp-cta .sp-ctaArrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
  margin-top: 14px;
  transition: transform .3s var(--ease);
}
.sp-cta:hover .sp-ctaArrow { transform: translateX(6px); }

/* --- qa accordion v2 ----------------------------------------- */
details.sp-card summary { cursor: pointer; list-style: none; }
details.sp-card summary::-webkit-details-marker { display: none; }
details.sp-card { transition: box-shadow .3s var(--ease); }
details.sp-card[open] { box-shadow: 0 10px 34px rgba(40, 40, 64, .12); }

/* --- steps: per-step colors via nth-child -------------------- */
.sp-steps--rainbow .sp-step:nth-child(1) .sp-stepNum { background: var(--blue); }
.sp-steps--rainbow .sp-step:nth-child(2) .sp-stepNum { background: var(--magenta); }
.sp-steps--rainbow .sp-step:nth-child(3) .sp-stepNum { background: var(--orange); }
.sp-steps--rainbow .sp-step:nth-child(4) .sp-stepNum { background: var(--green); }

@media (max-width: 767px) {
  .sp-heroChar { width: 86px; right: 14px; }
  .sp-band { margin: 32px 8px 0; border-radius: 18px; padding-bottom: 36px; }
  .sp-photoRow { grid-template-columns: repeat(2, 1fr); }
  .sp-photoRow img { height: 130px; }
  .sp-cta .sp-ctaChar { display: none; }
}

/* 見出しの1文字落ち改行を防ぐ + 2行時のドット位置 */
.sp-card h3, .sp-h2, .sp-stepBody h3 { text-wrap: balance; }
.sp-card h3 { align-items: flex-start; }
.sp-card h3::before { margin-top: .55em; }
