/* In-Browser Browser — ホーム専用スタイル */

.home {
  --ink: #0d1b2e;
  --ink-2: #4a5a70;
  --blue: #0a66e0;
  --blue-bright: #0088ff;
  --sky: #e9f3ff;
  --mist: #f4f7fb;
  --night-2: #0d1b30;
  --night-ink: #a9bad1;
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  color: var(--ink);
  background: #fff;
  font-family: var(--product-font);
  -webkit-font-smoothing: antialiased;
  line-break: strict;
}

.home h1,
.home h2,
.home h3 { letter-spacing: -.02em; }

.home .line { display: block; }
.home .accent { color: var(--blue); }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.home a:focus-visible,
.home button:focus-visible,
.home video:focus-visible {
  outline: 3px solid #4b8bf7;
  outline-offset: 4px;
}

/* ---------- shared CTA ---------- */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 30px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}
.cta:hover { background: #0857c2; }
.cta:active { transform: scale(.98); }

/* ---------- phone (共通の端末枠) ---------- */
.phone {
  container-type: inline-size;
  position: relative;
  width: 300px;
  aspect-ratio: 71.5 / 149.6;
  border-radius: 16.4% / 7.84%;
  background: linear-gradient(122deg, #b7cee6 0%, #e5eff9 15%, #829ab5 49%, #e8f2fd 78%, #9ab0ca 100%);
  box-shadow:
    0 40px 80px -24px #1b3f6e55,
    0 12px 28px -12px #1b3f6e40,
    0 2px 5px #55718a30;
}

.phone::before {
  content: "";
  position: absolute;
  inset: .65%;
  z-index: 6;
  border: 1px solid #f2f8ffaa;
  border-radius: inherit;
  pointer-events: none;
}

.phone::after {
  content: "";
  position: absolute;
  right: -.7%;
  top: 21.6%;
  width: .8%;
  height: 9%;
  border-radius: 0 4px 4px 0;
  background: #94aac5;
}

.phone-display {
  position: absolute;
  inset: 1.6% 3.4%;
  overflow: hidden;
  isolation: isolate;
  border-radius: 14.2% / 6.53%;
  background: #f8f5ed;
  box-shadow: 0 0 0 1.4cqw #101823;
}

.phone-time {
  position: absolute;
  top: 2.15%;
  left: 9%;
  z-index: 4;
  color: #12171c;
  font-size: 3.4cqw;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.phone-island {
  position: absolute;
  top: 1.6%;
  left: 37.5%;
  z-index: 4;
  width: 25%;
  height: 3.1%;
  border-radius: 999px;
  background: #06090d;
}

.phone-dim {
  position: absolute;
  inset: 0 0 12% 0;
  z-index: 1;
  background: #1c1c1430;
  opacity: 0;
  transition: opacity .55s ease;
}

.phone-screen {
  position: absolute;
  top: 5.6%;
  left: 0;
  width: 100%;
  height: 82.4%;
  overflow: hidden;
}

.phone-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen-base { z-index: 0; }

/* シート画像の上部（暗くなった元ページの帯）は切り落とし、
   本物の元ページ＋暗幕の上にシートだけを重ねる */
.screen-sheet {
  z-index: 2;
  clip-path: inset(2% 0 0 0 round 10.6% 10.6% 0 0 / 5.9% 5.9% 0 0);
  transform: translateY(102%);
  transition: transform .72s var(--ease-sheet);
  will-change: transform;
}

.phone[data-state="sheet"] .screen-sheet { transform: none; }
.phone[data-state="sheet"] .phone-dim { opacity: 1; }

.phone-home {
  position: absolute;
  bottom: 1.1%;
  left: 33%;
  z-index: 4;
  width: 34%;
  height: .6%;
  border-radius: 999px;
  background: #25323a99;
}

/* 指の位置 */
.touch {
  position: absolute;
  z-index: 3;
  left: 27.6%;
  top: 72.0%;
  width: 9.5%;
  aspect-ratio: 1;
  border: 2px solid #ffffffe6;
  border-radius: 50%;
  background: #0a66e033;
  box-shadow: 0 0 0 6px #0a66e01f, 0 6px 16px #0d1b2e40;
  opacity: 0;
  translate: -50% -50%;
  pointer-events: none;
}

/* 静止画で操作位置を示すガイド（「開く」の章） */
.touch-hint {
  opacity: 1;
}
.touch-hint::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 120%;
  width: 70%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #0a66e0, #0a66e000);
  translate: 0 -50%;
}

/* ---------- 1. hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse 58% 46% at 50% 100%, #9cc6fb 0%, #c7e0ff 42%, transparent 75%),
    linear-gradient(180deg, #fff 0%, #fff 30%, #f2f8ff 58%, #dcebff 100%);
}

.hero-copy {
  width: min(1040px, 100% - 24px);
  margin-inline: auto;
  padding-top: clamp(56px, 8vw, 104px);
}

.kicker {
  margin: 0 0 clamp(14px, 2vw, 24px);
  color: var(--ink-2);
  font-size: clamp(.85rem, 1.2vw, 1rem);
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.5rem, 4.6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  text-wrap: balance;
}

.lede {
  width: min(42em, 100% - 16px);
  margin: clamp(20px, 3vw, 34px) auto 0;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 1.9vw, 1.3rem);
  font-weight: 500;
  line-height: 1.6;
  text-wrap: balance;
}

.lede:lang(ja) { word-break: keep-all; overflow-wrap: anywhere; }

.cta-group { margin-top: clamp(26px, 3vw, 36px); }

.hero-stage {
  --hero-phone-width: min(74vw, 360px);
  position: relative;
  margin: clamp(48px, 6vw, 76px) 0 0;
  padding-bottom: clamp(38px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-hero { width: var(--hero-phone-width); flex: none; }

.phone-hero video,
.phone-return video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  background: #fff;
}

/* ---------- chapters (共通) ---------- */
.chapter {
  padding-block: clamp(88px, 12vw, 160px);
}

.chapter h2 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.16;
  text-wrap: balance;
}

.chapter-head {
  width: min(760px, 100% - 40px);
  margin-inline: auto;
  text-align: center;
}

.chapter-lead {
  margin: clamp(20px, 2.6vw, 30px) 0 12px;
  color: var(--ink);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.5;
}

.chapter-body {
  max-width: 34em;
  margin: 0 auto .7em;
  color: var(--ink-2);
  font-size: clamp(.98rem, 1.5vw, 1.08rem);
  line-height: 1.85;
}

/* ---------- 2. open ---------- */
.chapter-open { padding-bottom: clamp(64px, 8vw, 110px); }

.duo {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: min(720px, 100% - 32px);
  margin: clamp(56px, 7vw, 88px) auto 0;
}

.phone-rear {
  width: 42%;
  max-width: 300px;
  margin-right: -7%;
  margin-bottom: 4%;
  z-index: 0;
}

.phone-front {
  width: 50%;
  max-width: 356px;
  z-index: 1;
}

/* ---------- 3. return ---------- */
.chapter-return { background: var(--mist); }

.return-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
  max-width: 1000px;
}

.return-copy { container-type: inline-size; }
.return-copy h2 { font-size: clamp(1.35rem, 8.4cqw, 2.75rem); }
.return-copy .chapter-lead { margin-top: clamp(22px, 2.6vw, 30px); }
.return-copy .chapter-body { margin-inline: 0; }

.return-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-return { width: min(100%, 340px); }

/* ---------- 4. privacy (dark) ---------- */
.chapter-privacy {
  color: #fff;
  background: var(--night-2);
  text-align: center;
}

.privacy-inner {
  width: min(640px, 100% - 40px);
  margin-inline: auto;
}

.lock { width: 40px; height: 46px; margin: 0 auto 22px; color: #6fb3ff; }

.chapter-privacy h2 { font-size: clamp(1.75rem, 4.4vw, 2.9rem); }

.chapter-privacy p {
  margin: 20px auto 0;
  color: var(--night-ink);
  font-size: clamp(.98rem, 1.5vw, 1.08rem);
  line-height: 1.85;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  color: #8cc3ff;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
}
.text-link::after { content: "›"; margin-left: 6px; font-size: 1.2em; }
.text-link:hover { text-decoration: underline; }

/* ---------- 5. closing ---------- */
.closing {
  padding: clamp(88px, 11vw, 150px) 20px;
  scroll-margin-top: 80px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--sky) 100%);
}

.closing-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 26px;
  border-radius: 22.5%;
  box-shadow: 0 18px 40px -14px #0088ff80;
}

.closing h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.closing .cta { margin-top: 24px; }

/* ---------- footer ---------- */
.home .site-footer {
  border-top: 1px solid #0d1b2e14;
  background: var(--sky);
  font-size: .8rem;
}

.home .site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- scroll reveal (JS有効・動き許可時のみ) ---------- */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .9s var(--ease-sheet);
}
.reveal-ready .reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .return-layout { grid-template-columns: 1fr; }

  .return-copy { text-align: center; }

  .return-copy .chapter-body { margin-inline: auto; }

  .return-stage { order: 2; }
}

@media (max-width: 680px) {
  .hero-copy { padding-top: clamp(32px, 9vw, 46px); }
  .kicker { margin-bottom: 12px; }
  .hero h1 { font-size: clamp(1.45rem, 7.55vw, 3.25rem); line-height: 1.2; }
  .lede { width: min(42em, 100% - 8px); margin-top: 15px; font-size: 1rem; }
  .cta-group { margin-top: 20px; }
  .hero .cta { min-height: 48px; padding: 9px 22px; font-size: 1rem; }

  .hero-stage {
    --hero-phone-width: min(77vw, 324px);
    margin-top: 32px;
    padding-bottom: 28px;
  }

  .chapter { padding-block: clamp(60px, 14vw, 84px); }
  .duo { margin-top: 36px; }

  .phone-rear { width: 44%; margin-right: -9%; }
  .phone-front { width: 54%; }

  .phone-return { width: min(84%, 292px); }
  .closing { padding-block: 72px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cta,
  .phone-dim,
  .screen-sheet { transition: none; }

  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
}
