:root {
  --pink: #E8799A;
  --pink-mid: #F7C6D3;
  --pink-light: #FCE4EB;
  --bg: #ffffff;
  --bg-soft: #fff7f9;
  --text: #3b2b32;
  --muted: #8a7179;
  --line: #f3dce3;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(232, 121, 154, .14);
  --header-h: 64px;
  color-scheme: light; /* 端末がダークモードでも白ベースで表示する */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Zen Kaku Gothic New", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; }

/* ロゴ：本体と区画を重ねて全体のロゴにする（区画の位置は img/piece.svg の viewBox から） */
.mark { position: relative; display: block; aspect-ratio: 221 / 219; }
.mark img { position: absolute; }
.mark-body { inset: 0; width: 100%; height: 100%; }
.mark-piece {
  left: 57.354%;   /* 126.75 / 221 */
  top: 25.863%;    /* 56.64 / 219 */
  width: 41.43%;   /* 91.56 / 221 */
  height: 48.279%; /* 105.73 / 219 */
}

/* ヘッダー */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark { width: 38px; }
.brand-name { font-family: "Outfit", sans-serif; font-weight: 700; font-size: 1.3rem; letter-spacing: .02em; }
.site-nav { display: flex; gap: clamp(14px, 3vw, 28px); font-size: .95rem; }
.site-nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.site-nav a:hover { color: var(--pink); }

/* ヒーロー */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: calc(var(--header-h) + 24px) clamp(16px, 8vw, 120px) 64px;
  max-width: 1100px; margin: 0 auto;
}
.hero-kicker { margin: 0 0 12px; font-family: "Outfit", sans-serif; font-weight: 500; color: var(--pink); letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; }
.hero-title { margin: 0; font-size: clamp(2rem, 6.4vw, 3.8rem); line-height: 1.3; font-weight: 700; letter-spacing: .02em; }
.hero-lead { margin: 20px 0 32px; color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.15rem); }
.hero-cta {
  display: inline-block; padding: 12px 28px; border-radius: 999px;
  background: var(--pink); color: #fff; text-decoration: none; font-weight: 700;
  box-shadow: 0 8px 20px rgba(232, 121, 154, .35);
  transition: transform .2s, box-shadow .2s;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(232, 121, 154, .42); }

/* セクション */
.section { max-width: 1100px; margin: 0 auto; padding: 72px clamp(16px, 8vw, 120px); }
.section-title { margin: 0 0 28px; font-size: 1.6rem; display: flex; align-items: center; gap: 12px; }
.section-title::before {
  content: ""; width: 14px; height: 16px; background: var(--pink);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.app {
  display: flex; gap: 20px; padding: 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.app:not(.app-soon):hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(232, 121, 154, .22); }
.app-icon { width: 72px; height: 72px; border-radius: 18px; flex: none; }
.app-body { min-width: 0; }
.app-name { margin: 0; font-family: "Outfit", "Zen Kaku Gothic New", sans-serif; font-size: 1.35rem; }
.app-platform { margin: 2px 0 10px; font-size: .85rem; color: var(--muted); }
.app-desc { margin: 0 0 14px; }
.app-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.app-tags li { padding: 2px 12px; border-radius: 999px; background: var(--pink-light); color: #b04a6c; font-size: .8rem; }
.app-link { display: inline-flex; gap: 6px; font-weight: 700; color: var(--pink); text-decoration: none; }
.app-link span { transition: transform .2s; }
.app-link:hover span { transform: translateX(4px); }
.app-soon { background: transparent; box-shadow: none; border: 2px dashed var(--line); align-items: center; }
.app-soon .app-name { font-size: 1.1rem; }
.app-soon .app-desc { margin: 0; color: var(--muted); }
.app-soon-mark { width: 44px; flex: none; transform: rotate(90deg); opacity: .7; margin: 0 14px 0 14px; }

@media (max-width: 480px) {
  .app { flex-direction: column; gap: 14px; }
  .app-soon { flex-direction: row; }
}

.about-text { margin: 0; max-width: 40em; }

.site-footer {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 16px 96px; color: var(--muted); border-top: 1px solid var(--line);
}
.footer-mark { width: 36px; }

/* topへ戻るボタン（落ちてきた区画） */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 45;
  width: 56px; height: 56px;
  display: grid; place-items: center;
}
.to-top-bg {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--card); border: 1.5px solid var(--pink-mid);
  box-shadow: 0 8px 22px rgba(232, 121, 154, .35);
  transition: transform .2s;
}
.to-top-icon {
  position: relative; width: 22px;
  transform: translateY(-2px) rotate(90deg); /* 左向きの三角を上向きにする */
  transition: transform .2s;
}
.to-top:hover .to-top-bg { transform: scale(1.08); }
.to-top:hover .to-top-icon { transform: translateY(-5px) rotate(90deg); }

/* 開いたときのアニメーション */
.stage { display: none; }
.fly-piece { position: fixed; z-index: 60; pointer-events: none; transform-origin: 50% 50%; will-change: transform; }
html.intro .stage {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
}
html.intro .mark-stage { width: min(52vw, 240px); margin-bottom: 6vh; will-change: transform; }
html.intro .brand .mark { visibility: hidden; }
html.intro .to-top { pointer-events: none; }
html.intro .to-top:not(.ready) .to-top-bg,
html.intro .to-top:not(.ready) .to-top-icon { opacity: 0; }
html.intro .hero > * { opacity: 0; }
