:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #111112;
  --muted: #6e6e73;
  --faint: #a4a4a8;
  --line: #e2e2e0;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1120px;
  --gutter: 32px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0d;
    --surface: #151517;
    --text: #ededec;
    --muted: #9a9a9f;
    --faint: #5c5c61;
    --line: #232326;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
/* 日本語は <wbr> と空白の位置でだけ改行する（入りきらない時だけ例外的に折る） */
.jp { word-break: keep-all; overflow-wrap: anywhere; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 20;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-color: var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-size: 14px; font-weight: 700; letter-spacing: .01em; }
.site-nav { display: flex; gap: 32px; font-size: 13px; }
.site-nav a { position: relative; color: var(--muted); transition: color .3s; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end; overflow: hidden;
}
.hero-city { position: absolute; inset: 0; opacity: 0; transition: opacity 2s ease; }
.hero-city.is-ready { opacity: 1; }
.hero-city canvas {
  display: block; width: 100%; height: 100%;
  filter: grayscale(1) brightness(.8) contrast(1.6);
}
@media (prefers-color-scheme: dark) {
  .hero-city canvas { filter: grayscale(1) invert(.94) contrast(.92); }
}
.hero-veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 0%, transparent) 30%),
    linear-gradient(90deg, var(--bg) 0%, var(--bg) 30%, color-mix(in srgb, var(--bg) 50%, transparent) 44%, transparent 60%);
}
.hero-inner { position: relative; padding-bottom: clamp(96px, 16vh, 160px); }
/* 横長画面では、ヒーローの文字だけ版面の枠を外して左に寄せる */
@media (min-width: 881px) {
  .hero-inner.wrap { max-width: none; margin: 0; padding-left: clamp(48px, 6vw, 120px); }
}
.hero h1 {
  font-size: clamp(64px, 10.5vw, 148px);
  font-weight: 700; line-height: .92; letter-spacing: -.03em;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; }
.hero-ja { margin-top: 28px; font-size: clamp(15px, 1.4vw, 18px); color: var(--muted); letter-spacing: .2em; }
.hero-lead { margin-top: 36px; font-size: clamp(20px, 2vw, 26px); font-weight: 700; line-height: 1.6; }
.hero-sub { margin-top: 10px; font-size: 14px; color: var(--muted); }

.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: .2em; color: var(--muted);
  writing-mode: vertical-rl;
}
.scroll-cue i { position: relative; width: 1px; height: 64px; background: var(--line); overflow: hidden; }
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 24px; background: var(--text);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { from { transform: translateY(-24px); } to { transform: translateY(64px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 14vw, 168px) 0; }
.section + .section { padding-top: 0; }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { font-size: clamp(44px, 6.2vw, 80px); font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.section-head p { margin-top: 14px; font-size: 14px; color: var(--muted); letter-spacing: .16em; line-height: 1.6; }
.section-head::after { content: ""; display: block; width: min(100%, 520px); height: 1px; margin-top: 28px; background: var(--line); }

/* ---------- Product ---------- */
.product {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: hidden;
}
.product-stage { order: 2; }
.product + .product { margin-top: 32px; }
.product-stage {
  display: grid; place-items: center; padding: clamp(40px, 5vw, 64px) clamp(24px, 4vw, 48px);
  background: var(--brand);
}
.product--ping { --brand: #fff0db; }
.product--odot { --brand: #ece0f0; }
@media (prefers-color-scheme: dark) {
  .product--ping { --brand: #2a1f10; }
  .product--odot { --brand: #1e1630; }
}
.product-info { padding: clamp(32px, 4.5vw, 56px); display: flex; flex-direction: column; justify-content: center; }

/* スマホの大きさと位置はすべてステージ幅（cqw）基準にして、どの画面幅でも同じ重なり方にする */
.product-media {
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 1 / 1.34;
  container-type: inline-size;
  --w: 52cqw; --inset: 6cqw;
}
.phone {
  position: absolute; width: var(--w);
  padding: calc(var(--w) * .035);
  border-radius: calc(var(--w) * .165);
  background: #0d0d0e;
  box-shadow:
    inset 0 0 0 1px #3b3b3e,
    inset 0 0 0 calc(var(--w) * .012) #1c1c1e,
    0 1px 2px rgb(0 0 0 / .12),
    0 30px 60px -24px rgb(0 0 0 / .38);
}
.phone::before {
  content: ""; position: absolute; right: calc(var(--w) * -.012); top: 26%;
  width: calc(var(--w) * .012); height: 11%; border-radius: 0 2px 2px 0; background: #2a2a2d;
}
.phone .screen { position: relative; overflow: hidden; border-radius: calc(var(--w) * .13); background: #000; }
.phone .screen::after {
  content: ""; position: absolute; left: 50%; top: 1.5%;
  width: 30%; aspect-ratio: 3.3 / 1; transform: translateX(-50%);
  border-radius: 999px; background: #000;
}
.phone img { width: 100%; height: auto; }
.phone img.pixel { image-rendering: pixelated; }
.phone--back { left: var(--inset); top: 0; transform: scale(.9); transform-origin: top left; z-index: 1; }
.phone--front { right: var(--inset); bottom: 0; z-index: 2; }
.phone-shift { position: absolute; inset: 0; will-change: transform; }

.product-id { display: flex; align-items: center; gap: 16px; }
.product-id img { width: 56px; height: 56px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgb(0 0 0 / .06); }
.product-id h3 { font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.product-id p { font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: .04em; }

.award {
  display: inline-flex; align-items: center; margin-top: 28px;
  padding: 5px 16px; border: 1px solid var(--text); border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .04em;
}

.product-id + .product-lead { margin-top: 28px; }
.product-lead { margin-top: 24px; font-size: clamp(19px, 1.8vw, 22px); font-weight: 700; line-height: 1.6; }
.product-desc { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 2; }

.spec { margin-top: 32px; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.spec dt { color: var(--faint); letter-spacing: .08em; }

.links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 32px; }
.btn-more {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 26px 0 30px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-size: 15px; font-weight: 500; letter-spacing: .08em;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.btn-more svg { width: 15px; height: 15px; transition: transform .4s var(--ease); }
.btn-more:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgb(0 0 0 / .4); }
.btn-more:hover svg { transform: translateX(3px); }
.arrow-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; padding: 4px 0;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.arrow-link svg { width: 12px; height: 12px; transition: transform .4s var(--ease); }
.arrow-link:hover { background-size: 100% 1px; }
.arrow-link:hover svg { transform: translate(2px, -2px); }

/* ---------- News ---------- */
.news li { border-bottom: 1px solid var(--line); }
.news a {
  display: grid; grid-template-columns: 120px 96px 1fr 20px; align-items: center; gap: 24px;
  padding: 28px 0; transition: padding .5s var(--ease);
}
.news time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.news .cat { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.news .title { font-size: 16px; font-weight: 500; }
.news svg { width: 14px; height: 14px; color: var(--faint); transition: transform .4s var(--ease), color .3s; }
.news a:hover { padding-left: 12px; }
.news a:hover svg { transform: translate(2px, -2px); color: var(--text); }

/* ---------- Contact ---------- */
.contact-mail {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: clamp(22px, 5.4vw, 56px); font-weight: 700; letter-spacing: -.03em; line-height: 1.2;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 2px no-repeat;
  padding-bottom: .1em;
  transition: background-size .6s var(--ease);
}
.contact-mail svg { width: .5em; height: .5em; transition: transform .5s var(--ease); }
.contact-mail:hover { background-size: 0 2px; background-position: right bottom; }
.contact-mail:hover svg { transform: translateX(.12em); }

.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }
.site-footer a:hover { color: var(--text); }

/* ---------- Motion ---------- */
.js .hero h1 .line > span { transform: translateY(105%); }
.js.is-loaded .hero h1 .line > span { transform: none; transition: transform 1.2s var(--ease); }
.js.is-loaded .hero h1 .line:nth-child(2) > span { transition-delay: .08s; }
.js [data-reveal] { opacity: 0; transform: translateY(24px); }
.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .phone--back[data-reveal] { transform: translate(-24px, 24px) scale(.9); }
.js .phone--back[data-reveal].is-in { transform: scale(.9); }
.js .phone--front[data-reveal] { transform: translate(24px, 40px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero h1 .line > span, .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .phone--back[data-reveal] { transform: scale(.9) !important; }
  .scroll-cue i::after { animation: none; }
  .hero-city { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .product { grid-template-columns: 1fr; }
  .product-stage { order: 0; }
  .product-media { max-width: 360px; }
  .news a { grid-template-columns: 1fr 20px; gap: 4px 16px; }
  .news time, .news .cat { grid-column: 1; }
  .news .cat { display: none; }
  .news .title { grid-column: 1; }
  .news svg { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .site-nav { gap: 20px; }
  .scroll-cue { display: none; }
  .hero-veil {
    background:
      linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 45%, color-mix(in srgb, var(--bg) 10%, transparent) 75%);
  }
  .spec div { grid-template-columns: 72px 1fr; }
  .product { border-radius: 22px; }
}
