/* Hallmark · macrostructure: Marquee Hero · nav: N9 edge-aligned · tone: technical / austere · anchor hue: none (achromatic)
 * genre: modern-minimal (dev tool) · enrichment: 実機スクリーンショット2枚 (device frame は描かない)
 * theme: Prism graphite (製品本体の既定テーマの実値) · 下敷きCSS: Sendy download site
 * pre-emit critique: P5 H5 E4 S5 R5 V4
 * 生値の直書き禁止 — 色/書体/余白/角/影/イージングは tokens.css の var() 経由のみ。
 */

/* ==========================================================================
   base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  /* 横スクロールを出さない。hidden ではなく clip (position: sticky を壊さない) */
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.75;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  /* リングは即時表示 (アニメーションさせない) */
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   header — アプリのトップバーと同じ作法: 全幅・ヘアライン1本・浮かせない
   (下敷きの liquid-glass ピル収縮ヘッダーは採用しない = 「新しいサイトの方」)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--topbar-tint) 88%, transparent);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--stroke);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-strong);
}

.brand__mark {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  box-shadow: 0 0 0 1px var(--stroke-strong);
}

.header__spacer {
  flex: 1 1 auto;
}

/* 版数チップ — アプリのステータスチップと同じ質感 (面 + ヘアライン + mono) */
.version-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  flex: 0 0 auto;
  padding: 3px var(--space-xs);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xs);
  background: var(--panel-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  line-height: 1.6;
  white-space: nowrap;
}

/* ==========================================================================
   button — アプリの primary ボタンの実トークン (白面 / 黒文字)。グラデ無し
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  white-space: nowrap; /* 2行になるボタンを作らない */
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.btn--primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
}

.btn--primary:hover {
  background: var(--button-primary-bg-hover);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--primary[aria-disabled='true'] {
  background: var(--accent-soft);
  color: var(--muted-2);
  cursor: default;
}

.btn--sm {
  height: 32px;
  padding: 0 var(--space-md);
  font-size: var(--text-sm);
}

.btn--lg {
  height: 48px;
  padding: 0 var(--space-lg);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.btn__icon {
  flex: 0 0 auto;
}

/* ==========================================================================
   hero
   ========================================================================== */
.hero {
  position: relative;
  padding: var(--space-3xl) var(--space-lg) var(--space-3xl);
  /* 有彩の wash は入れない。面の階調だけで奥行きを作る (graphite と同じ考え方) */
  background:
    radial-gradient(120% 70% at 50% -10%, var(--panel-2) 0%, transparent 62%),
    var(--bg);
}

.hero::after {
  /* アプリのウィンドウ下端と同じヘアライン1本で、ヒーローの底を閉じる */
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--stroke);
}

.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero__copy {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: var(--text-strong);
  /* 日本語の長い複合語でも枠から出さない */
  overflow-wrap: anywhere;
  min-width: 0;
  text-wrap: balance;
}

/* 日本語の禁則で行頭に句点が落ちないようにする */
.hero h1,
.hero__lead,
.fact__body {
  line-break: strict;
}

.hero__lead {
  margin: var(--space-lg) auto 0;
  max-width: var(--measure);
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--muted);
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  /* --muted-2 (#6f747f) は #1e1e1e 上で 3.6:1 = 小さい文字だと AA 未達だったので --muted (7.0:1) */
  color: var(--muted);
}

.hero__meta .sep {
  color: var(--stroke-bright);
}

/* --- 事実の2列 (装飾アイコンは置かない。ヘアラインと文字階層だけ) --- */
.hero__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
  max-width: 880px;
  margin: var(--space-3xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--stroke);
  text-align: left;
}

.fact {
  min-width: 0;
}

.fact__label {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

.fact__body {
  margin: var(--space-2xs) 0 0;
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--muted);
}

/* ==========================================================================
   hero figures — 実機スクリーンショット。端末フレームは描かない (ヘアライン+影のみ)
   ========================================================================== */
.hero__shots {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  max-width: 1120px;
  margin: var(--space-2xl) auto 0;
}

.shot {
  margin: 0;
  min-width: 0;
}

.shot img {
  width: 100%;
  border: 1px solid var(--stroke-strong);
  background: var(--panel-1);
}

.shot--desktop {
  flex: 1 1 auto;
}

.shot--desktop img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.shot--mobile {
  flex: 0 0 216px;
  width: 216px;
  /* PC のスクショの右下に重ねる。重ね順とオフセットで「同じ1つの製品」に見せる */
  margin-left: -72px;
  transform: translateY(var(--space-xl));
}

.shot--mobile img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.shot__caption {
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
}

/* ==========================================================================
   1つのページロード演出 (staggered reveal)。動かすのは transform / opacity だけ
   ========================================================================== */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rise {
  animation: rise var(--dur-slow) var(--ease-out) both;
}

.rise-1 { animation-delay: 40ms; }
.rise-2 { animation-delay: 110ms; }
.rise-3 { animation-delay: 180ms; }
.rise-4 { animation-delay: 250ms; }
.rise-5 { animation-delay: 320ms; }

/* 重ねてある mobile shot は translateY を持つので、reveal 側で上書きしない */
@keyframes rise-shots {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero__shots.rise {
  animation-name: rise-shots;
  animation-delay: 320ms;
}

/* ==========================================================================
   responsive — 1440 / 1024 / 768 / 414 / 375 / 320 で崩れないこと
   ========================================================================== */
@media (max-width: 1024px) {
  .hero {
    padding-top: var(--space-3xl);
  }

  .hero__shots {
    margin-top: var(--space-2xl);
  }

  .shot--mobile {
    flex-basis: 176px;
    width: 176px;
    margin-left: -56px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding-inline: var(--space-md);
  }

  .hero__copy {
    text-align: left;
  }

  .hero__lead {
    margin-inline: 0;
    font-size: var(--text-sm);
  }

  .hero__cta {
    align-items: flex-start;
  }

  .hero__meta {
    justify-content: flex-start;
  }

  .hero__facts {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-xl);
  }

  .hero__shots {
    /* 横並びのままだと PC スクショが潰れるので、縦に積んで mobile を右下に寄せる */
    display: block;
  }

  .shot--mobile {
    /* 縦積みでも「PC の右下に重なっている」構図は崩さない (下に大きな空白を作らない) */
    width: 148px;
    margin: -280px 0 0 auto;
    transform: none;
  }

  .shot__caption {
    text-align: left;
  }

  .shot--mobile .shot__caption {
    text-align: right;
  }
}

@media (max-width: 560px) {
  .site-header__inner {
    padding-inline: var(--space-md);
    gap: var(--space-xs);
  }

  .hero {
    padding-top: var(--space-2xl);
  }

  .hero__cta .btn--lg {
    /* 幅の狭い端末では CTA を全幅に。文字は折り返させない */
    width: 100%;
    max-width: 320px;
  }

  .shot--mobile {
    width: 116px;
    margin-top: -210px;
  }
}

@media (max-width: 400px) {
  .version-chip {
    display: none; /* 320-400px は brand + CTA だけに絞る (詰めて崩すより消す) */
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rise,
  .hero__shots.rise {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .btn {
    transition-duration: 1ms;
  }
}
