/* ============================================================
   Xeluvi landing page
   ============================================================ */

:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --ink: #0b0d12;
  --muted: #60687a;
  --line: #e6e8ee;
  --blue: #0a6cff;
  --blue-deep: #0047e0;
  --blue-soft: #eaf2ff;
  --ios-red: #ff3b30;
  --ios-green: #34c759;
  --radius: 22px;
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-feature-settings: "palt";
  letter-spacing: 0.01em;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: 1120px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
}
.brand img { border-radius: 7px; }
.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  border: 1px solid color-mix(in srgb, var(--blue) 35%, transparent);
  padding: 7px 16px;
  border-radius: 99px;
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--blue); color: #fff; }

/* ---------- Hero ---------- */

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 72px) 24px 96px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  min-height: 92vh;
}

.hero-copy h1 {
  font-size: clamp(46px, 6.6vw, 84px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.accent {
  background: linear-gradient(120deg, #3ea0ff 0%, var(--blue) 55%, var(--blue-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin-top: 24px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted);
  animation: rise .8s .12s cubic-bezier(.2,.7,.2,1) both;
}
.cta-row { margin-top: 36px; animation: rise .8s .24s cubic-bezier(.2,.7,.2,1) both; }
.cta-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 14px;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s;
  box-shadow: 0 1px 2px rgba(11,13,18,.2);
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11,13,18,.18); }
.store-btn span { display: flex; flex-direction: column; line-height: 1.25; font-weight: 600; font-size: 17px; }
.store-btn small { font-size: 10px; font-weight: 400; opacity: .8; }

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   iPhone モック(共通)
   ============================================================ */

.hero-phone { display: flex; justify-content: center; animation: rise .9s .2s cubic-bezier(.2,.7,.2,1) both; }

.phone {
  width: 292px;
  height: 600px;
  background: #111318;
  border-radius: 48px;
  padding: 9px;
  box-shadow:
    0 32px 64px -24px rgba(10, 60, 160, .35),
    0 4px 16px rgba(11,13,18,.18);
  position: relative;
}
.screen {
  border-radius: 39px;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* 物理ボタン(左: アクションボタン・音量 / 右: サイドボタン) */
.hw {
  position: absolute;
  width: 3.5px;
  background: #2a2e36;
  border-radius: 2px;
}
.hw-action { left: -3.5px; top: 118px; height: 26px; border-radius: 2px 0 0 2px; }
.hw-volup  { left: -3.5px; top: 168px; height: 40px; border-radius: 2px 0 0 2px; }
.hw-voldn  { left: -3.5px; top: 216px; height: 40px; border-radius: 2px 0 0 2px; }
.hw-power  { right: -3.5px; top: 176px; height: 64px; border-radius: 0 2px 2px 0; }

/* アクションボタン押下の連動ハイライト(動画の押下タイミングに同期) */
.hw-action.pressing {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 108, 255, .25), 0 0 16px 4px rgba(10, 108, 255, .55);
  transition: box-shadow .2s;
}

/* ============================================================
   モック 1: 実アプリの記帳フロー(シミュレーター実録画)
   ============================================================ */

/* 動画(736x1600)のアスペクト比に合わせ、クロップが発生しない高さにする */
.phone-video { height: 614px; }
.video-screen { background: #f2f2f7; }
.video-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   モック 2: ホーム画面(ウィジェット & ショートカット)
   ============================================================ */

.demo-section { text-align: center; }
.demo-copy { max-width: 640px; margin: 0 auto 60px; }
.demo-copy .section-lead { margin-left: auto; margin-right: auto; }
.demo-points {
  list-style: none;
  margin-top: 26px;
  display: inline-block;
  text-align: left;
}
.demo-points li {
  position: relative;
  padding: 7px 0 7px 28px;
  font-size: 15px;
  color: var(--ink);
}
.demo-points li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: var(--blue);
  font-weight: 700;
}
.demo-phones {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

/* Apple Watch フレーム */
.watch {
  width: 232px;
  background: #111318;
  border-radius: 58px;
  padding: 9px;
  position: relative;
  margin: 0 auto;
  box-shadow:
    0 24px 48px -20px rgba(10, 60, 160, .35),
    0 4px 14px rgba(11,13,18,.18);
}
.watch-screen {
  border-radius: 50px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 590 / 730;
}
.watch-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 右上: デジタルクラウン / 右下: サイドボタン */
.watch-crown {
  position: absolute;
  right: -6px; top: 16%;
  width: 7px; height: 50px;
  border-radius: 3.5px;
  background: linear-gradient(90deg, #3a3f48, #23262d);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.12);
}
.watch-button {
  position: absolute;
  right: -4.5px; top: 56%;
  width: 4.5px; height: 60px;
  border-radius: 2.5px;
  background: #262a31;
}
.demo-item { margin: 0; }
.demo-item figcaption {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.cap-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 7px;
  vertical-align: 1px;
  animation: cap-pulse 2.4s ease-in-out infinite;
}
@keyframes cap-pulse {
  0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(10, 108, 255, .35); }
  35% { box-shadow: 0 0 0 5px rgba(10, 108, 255, 0); }
}

/* ---------- Sections ---------- */

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 110px 24px;
}
.section h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.section-lead {
  margin-top: 18px;
  max-width: 640px;
  color: var(--muted);
  font-size: 16px;
}

/* bento */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px -20px rgba(11,13,18,.16);
}
.card h3 { font-size: 18px; }
.card p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.pro-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 6px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: 2px;
}

/* ============================================================
   iCloud同期(Pro)の演出
   ============================================================ */

.sync-section { text-align: center; }
.sync-section .section-lead { margin-left: auto; margin-right: auto; }

.sync-stage {
  margin-top: 64px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* ミニWatch */
.sync-watch {
  width: 158px;
  background: #111318;
  border-radius: 40px;
  padding: 7px;
  position: relative;
  box-shadow: 0 18px 36px -16px rgba(10, 60, 160, .35), 0 3px 10px rgba(11,13,18,.18);
}
.sync-watch .watch-crown { height: 34px; top: 15%; }
.sync-watch .watch-button { height: 40px; top: 55%; }
.sync-watch-screen {
  background: #000;
  border-radius: 34px;
  aspect-ratio: 0.82;
  padding: 20px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #fff;
  position: relative;
  overflow: hidden;
  text-align: left;
}
.sw-label { font-size: 10px; color: #9ba1ad; }
.sw-value {
  font-size: 21px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.sw-preset {
  all: unset;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  background: #2c2e33;
  border-radius: 14px;
  transition: transform .15s, background .15s;
}
.sw-preset svg { color: var(--ios-red); flex: none; }
.sw-preset.pressing { transform: scale(.93); background: #43464d; }
.swp-text { display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.swp-text small { font-size: 9px; font-weight: 500; color: #9ba1ad; }
.sw-toast {
  position: absolute;
  left: 50%; bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ios-green);
  background: rgba(60,62,68,.92);
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s;
}
.sw-toast.show { opacity: 1; }

/* 同期リンク(Watch → クラウド → iPhone) */
.sync-link {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b9c2d2;
}
.sync-cloud { color: #96a3ba; transition: color .3s, transform .3s; }
.sync-link.run .sync-cloud {
  color: var(--blue);
  transform: scale(1.12);
  filter: drop-shadow(0 0 10px rgba(10,108,255,.45));
}
.sync-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #c3cbd9;
}
.sync-link.run .sync-dot { animation: sync-dot-run 1.1s ease-in-out both; }
.sync-link.run .sync-dot:nth-child(1) { animation-delay: 0s; }
.sync-link.run .sync-dot:nth-child(2) { animation-delay: .08s; }
.sync-link.run .sync-dot:nth-child(3) { animation-delay: .16s; }
.sync-link.run .sync-dot:nth-child(5) { animation-delay: .45s; }
.sync-link.run .sync-dot:nth-child(6) { animation-delay: .53s; }
.sync-link.run .sync-dot:nth-child(7) { animation-delay: .61s; }
@keyframes sync-dot-run {
  0%, 100% { background: #c3cbd9; transform: scale(1); }
  45% { background: var(--blue); transform: scale(1.7); }
}

/* ミニiPhone */
.sync-phone {
  width: 196px;
  background: #111318;
  border-radius: 34px;
  padding: 7px;
  box-shadow: 0 18px 36px -16px rgba(10, 60, 160, .35), 0 3px 10px rgba(11,13,18,.18);
}
.sync-phone-screen {
  border-radius: 28px;
  aspect-ratio: 0.62;
  overflow: hidden;
  background:
    radial-gradient(130% 80% at 15% 0%, #dfeaff 0%, transparent 55%),
    linear-gradient(165deg, #eef3fb, #dbe4f3);
  padding: 26px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sync-widget {
  background: #fff;
  border-radius: 17px;
  padding: 12px 14px;
  text-align: left;
  box-shadow: 0 8px 20px -8px rgba(11,13,18,.18);
  transition: box-shadow .3s;
}
.sync-widget.flash {
  box-shadow: 0 0 0 3px rgba(10,108,255,.35), 0 10px 26px -8px rgba(10,108,255,.35);
}
.swg-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.swg-yen {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 12px;
  text-align: center;
}
.swg-label { font-size: 9px; color: var(--muted); }
.swg-value {
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.swg-sub { font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sync-icons {
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
}
.sync-icons i {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(150deg, #b9c4d6, #96a3ba);
  opacity: .7;
}

@media (max-width: 640px) {
  .sync-link { transform: rotate(90deg); margin: -6px 0; }
}

/* pro */
.price-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 760px;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.price-card.featured {
  border: 1.5px solid color-mix(in srgb, var(--blue) 55%, transparent);
  background: linear-gradient(170deg, var(--blue-soft), #fff 45%);
}
.price-card h3 { font-size: 16px; color: var(--muted); font-weight: 700; }
.price {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 6px 0 18px;
}
.price small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.price-card ul { list-style: none; }
.price-card li {
  font-size: 14.5px;
  padding: 9px 0 9px 26px;
  border-top: 1px solid var(--line);
  position: relative;
}
.price-card li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: var(--blue);
  font-weight: 700;
}

/* final cta */
.final-cta {
  text-align: center;
  padding-bottom: 140px;
}
.final-icon {
  margin: 0 auto 28px;
  border-radius: 22px;
  box-shadow: 0 20px 48px -16px rgba(10, 90, 220, .45);
}
.final-cta h2 { margin-bottom: 36px; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); }
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.footer nav { display: flex; gap: 20px; }
.footer a:hover { color: var(--ink); }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-h) + 48px);
    min-height: auto;
    gap: 64px;
  }
  .cta-row { display: flex; flex-direction: column; align-items: center; }
  .bento { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy h1, .lead, .cta-row, .hero-phone { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
