/* AIパーソナル LP — 作り込み（写真の場面・動き・境目の演出）
   style.css のあとに読み込む。 */

/* ---------- 段の番号つき小見出し ---------- */
main { counter-reset: sec; }
.section, .dawn { counter-increment: sec; }
.eyebrow::before { order: -1; }
.section .eyebrow::after {
  content: counter(sec, decimal-leading-zero);
  order: -2;
  font-family: var(--serif); font-weight: 700; font-size: 15px; letter-spacing: .06em;
  color: var(--lamp-deep);
}
.night .eyebrow::after { color: var(--lamp); }

/* ---------- スクロールで現れる ---------- */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .rv.is-in { opacity: 1; transform: none; }

/* ---------- 最初の画面：灯りと動き ---------- */
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes lampBreath { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.hero__bg { transform-origin: 80% 45%; animation: heroZoom 28s ease-out forwards; }
.hero__glow {
  position: absolute; z-index: 1; left: 82%; top: 37%;
  width: min(52vw, 760px); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(244,183,64,.26) 0%, rgba(244,183,64,.10) 34%, rgba(244,183,64,0) 66%);
  animation: lampBreath 7s ease-in-out infinite;
}
.hero__copy > * { animation: rise 1s cubic-bezier(.2, .7, .2, 1) both; }
.hero__copy > :nth-child(1) { animation-delay: .15s; }
.hero__copy > :nth-child(2) { animation-delay: .3s; }
.hero__copy > :nth-child(3) { animation-delay: .5s; }
.hero__copy > :nth-child(4) { animation-delay: .65s; }
.hero__copy > :nth-child(5) { animation-delay: .8s; }

.hero__side {
  position: absolute; z-index: 2; right: 28px; top: 50%; translate: 0 -50%;
  writing-mode: vertical-rl; font-size: 11px; letter-spacing: .42em; font-weight: 700;
  color: rgba(244, 239, 230, .5);
}
.hero__cue {
  position: absolute; z-index: 2; left: 50%; bottom: 0; width: 1px; height: 64px;
  background: rgba(244, 239, 230, .18); overflow: hidden;
}
.hero__cue::after { content: ""; position: absolute; inset: 0; background: var(--lamp); animation: cue 2.6s ease-in-out infinite; }

/* ---------- 第2段：一日の4場面（写真） ---------- */
.scenes { margin-top: 64px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; counter-reset: scene; }
.scene {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--night); border: 1px solid var(--rule-night);
  counter-increment: scene;
}
.scene__img { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #0B0F11; }
.scene__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.scene:hover .scene__img img { transform: scale(1.04); }
.scene__body { position: relative; padding: 26px 32px 30px 84px; }
.scene__body::before {
  content: counter(scene, decimal-leading-zero);
  position: absolute; left: 30px; top: 24px;
  font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: 0; color: var(--lamp);
}
.scene__tag { font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--lamp); }
.scene__text {
  margin-top: 8px; font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.75;
  font-feature-settings: "palt"; letter-spacing: .04em; color: #fff;
}
.scenes__note { margin-top: 20px; font-size: 12px; color: var(--on-night-sub); letter-spacing: .04em; }

/* 置き換えのカード：線の印 */
.swap__list li { position: relative; padding-top: 52px; }
.swap__list li::before {
  content: ""; position: absolute; left: 32px; top: 2px; width: 34px; height: 34px;
  background: var(--lamp-deep);
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.swap__list li:first-child::before { left: 0; }
.swap__list li:nth-child(1) { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h24v15H16l-6 5v-5H5z'/%3E%3Cpath d='M11 13h12M11 17.5h8'/%3E%3C/svg%3E"); }
.swap__list li:nth-child(2) { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='12.5' y='4' width='9' height='16' rx='4.5'/%3E%3Cpath d='M7 16a10 10 0 0 0 20 0M17 26v4M12 30h10'/%3E%3C/svg%3E"); }
.swap__list li:nth-child(3) { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4h11l6 6v20H9z'/%3E%3Cpath d='M20 4v6h6M13 16h9M13 20.5h9M13 25h5'/%3E%3C/svg%3E"); }

/* ---------- 第3段：写真と呼びかけ ---------- */
.split--photo { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 72px; align-items: center; }
.shot { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 70px rgba(28, 31, 32, .16); }
.shot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.shot__say {
  position: absolute; left: 24px; bottom: 24px;
  display: inline-flex; align-items: center; gap: 12px;
  background: rgba(15, 20, 22, .86); color: #fff; backdrop-filter: blur(6px);
  padding: 12px 20px 12px 16px; border-radius: 999px;
  font-family: var(--serif); font-weight: 700; font-size: 16px; letter-spacing: .06em;
}
.shot__say::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 5px rgba(244,183,64,.25); }
.voice--top { margin-bottom: 30px; padding-left: 24px; border-left: 2px solid var(--lamp-deep); }

/* ---------- 第4段：数える（メモの写真とカード） ---------- */
.calc--photo { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; border: 0; padding-block: 0; margin-top: 60px; }
.memo { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule-night); }
.memo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.calc--photo .calc__text { font-size: 17px; line-height: 2.05; }
.calc--photo .calc__text .q {
  margin-top: 1.2em; font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.7;
  font-feature-settings: "palt"; letter-spacing: .04em; color: #fff;
}

.count { gap: 24px; margin-top: 80px; }
.count > li {
  position: relative; padding: 40px 36px 40px;
  background: var(--night-2); border: 1px solid var(--rule-night); border-radius: var(--radius);
}
.count > li::after {
  content: ""; position: absolute; right: 32px; top: 38px; width: 40px; height: 40px;
  background: rgba(244, 239, 230, .3);
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.count > li:nth-child(1) { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='20' cy='20' r='15'/%3E%3Cpath d='M20 11v9l6 4'/%3E%3C/svg%3E"); }
.count > li:nth-child(2) { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='20' cy='20' r='15'/%3E%3Cpath d='M14 11l6 9 6-9M14 21h12M14 25.5h12M20 20v10'/%3E%3C/svg%3E"); }
.count > li:nth-child(3) { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5h20v30l-3.3-2.5L23.3 35 20 32.5 16.7 35l-3.4-2.5L10 35z'/%3E%3Cpath d='M15 13h10M15 18h10M15 23h6'/%3E%3C/svg%3E"); }

/* 夜が明ける境目 */
.daybreak {
  height: 180px;
  background: linear-gradient(180deg, var(--night) 0%, #1A2226 26%, #4A4038 52%, #B9966B 72%, #EBD3AE 86%, var(--paper) 100%);
}

/* ---------- 第5段：流れ（無料／有料の札） ---------- */
.flow__tag {
  display: inline-block; margin-bottom: 12px; padding: 3px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  background: var(--sand); color: var(--ink-sub);
}
.flow__tag--paid { background: var(--ink); color: #fff; }
.flow__step::before { border-color: var(--lamp-deep); color: var(--lamp-deep); }

/* ---------- 第6段：プラン（ひと月の進み方） ---------- */
.plan { position: relative; overflow: hidden; }
.plan::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--lamp), #F7D58A); }
.plan__badge {
  display: inline-block; margin-bottom: 14px; padding: 4px 14px; border-radius: 999px;
  border: 1px solid var(--lamp-deep); color: var(--lamp-deep);
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
}
.cycle { margin-top: 40px; padding: 32px 32px 30px; background: var(--paper); border-radius: var(--radius); }
.cycle__title { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--ink-sub); }
.cycle__row { margin-top: 20px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; }
.cycle__node { text-align: center; }
.cycle__node b {
  display: block; font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.5;
  font-feature-settings: "palt"; letter-spacing: .04em;
}
.cycle__node span { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-sub); line-height: 1.6; }
.cycle__arrow { width: 28px; height: 10px; background: var(--lamp-deep); clip-path: polygon(0 4px, 22px 4px, 22px 0, 28px 5px, 22px 10px, 22px 6px, 0 6px); }
.cycle__next { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--rule); text-align: center; font-size: 14px; color: var(--ink-sub); }

/* ---------- 第7段：担当（紹介のカード） ---------- */
.person__photo { position: relative; border-style: solid; }
.person__photo::after {
  content: ""; position: absolute; left: 18px; top: 18px; right: -18px; bottom: -18px; z-index: -1;
  border-radius: var(--radius); background: var(--sand);
}
.person__col { position: relative; z-index: 1; }
.facts { margin: 32px 0 0; border-top: 1px solid var(--rule); }
.facts > div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 1.8; }
.facts dt { color: var(--ink-sub); font-weight: 700; letter-spacing: .08em; font-size: 13px; padding-top: 2px; }
.facts dd { margin: 0; }

/* ---------- フッターのリンク ---------- */
.footer__links a { color: var(--ink-sub); text-underline-offset: 4px; text-decoration-color: var(--rule); transition: color .2s ease; }
.footer__links a:hover { color: var(--ink); }

/* ---------- 締め：朝の光 ---------- */
.dawn__sun {
  position: absolute; z-index: 1; left: -8%; top: -30%; width: 60%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 244, 214, .9) 0%, rgba(255, 244, 214, .35) 40%, rgba(255, 244, 214, 0) 70%);
}

/* ============ タブレット以下 ============ */
@media (max-width: 960px) {
  .split--photo { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .calc--photo { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .count { grid-template-columns: minmax(0, 1fr); }
}

/* ============ スマホ ============ */
@media (max-width: 767px) {
  .section .eyebrow::after { font-size: 13px; }

  .hero__glow { left: 90%; top: 20%; width: 110vw; }
  .hero__side, .hero__cue { display: none; }

  .scenes { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 36px; }
  .scene__body { padding: 20px 22px 24px 66px; }
  .scene__body::before { left: 22px; top: 20px; font-size: 24px; }
  .scene__text { font-size: 17px; line-height: 1.7; margin-top: 4px; }
  .scenes__note { font-size: 11px; margin-top: 14px; }

  .swap__list li, .swap__list li:first-child { padding: 18px 0 18px 50px; min-height: 66px; }
  .swap__list li:first-child { padding-top: 4px; }
  .swap__list li::before, .swap__list li:first-child::before { left: 0; top: 18px; width: 32px; height: 32px; }
  .swap__list li:first-child::before { top: 4px; }

  .shot__say { left: 14px; bottom: 14px; font-size: 14px; padding: 9px 16px 9px 12px; }
  .voice--top { padding-left: 16px; margin-bottom: 22px; }

  .calc--photo { margin-top: 36px; gap: 24px; }
  .calc--photo .calc__text { font-size: 15px; line-height: 1.95; }
  .calc--photo .calc__text .q { font-size: 19px; }
  .count { gap: 14px; margin-top: 48px; }
  .count > li { padding: 30px 24px 30px; }
  .count > li::after { right: 22px; top: 28px; width: 34px; height: 34px; }
  .daybreak { height: 120px; }

  .flow__tag { font-size: 11px; margin-bottom: 6px; }

  .cycle { margin-top: 28px; padding: 24px 20px 22px; }
  .cycle__row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cycle__arrow { justify-self: center; rotate: 90deg; margin-block: 4px; }
  .cycle__node b { font-size: 17px; }
  .cycle__next { font-size: 13px; }

  .person__photo::after { left: 12px; top: 12px; right: -12px; bottom: -12px; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; padding: 14px 0; font-size: 14px; }
  .dawn__sun { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg, .hero__glow, .hero__copy > *, .hero__cue::after { animation: none !important; }
  .js .rv { opacity: 1; transform: none; }
}
