/* ===========================
   デザイントークン（ライトモード）
   ミニマル × エディトリアル
   =========================== */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #6b6864;
  --text-muted: #8a8782;
  --accent: #b8503a;
  --border: rgba(26, 26, 26, 0.10);
  --border-strong: rgba(26, 26, 26, 0.20);
  --radius-card: 14px;

  --max-content: 720px;
  --max-wide: 880px;

  --font-serif: ui-serif, "New York", "Iowan Old Style", "Apple Garamond", "Baskerville", "Source Serif Pro", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", "Hiragino Sans", "Noto Sans JP", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0c0a;
    --surface: #161412;
    --text-primary: #f0ece6;
    --text-secondary: #a39e95;
    --text-muted: #6e6a64;
    --accent: #e88865;
    --border: rgba(240, 236, 230, 0.10);
    --border-strong: rgba(240, 236, 230, 0.22);
  }
}

/* ===========================
   リセット & ベース
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "calt", "palt";
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

img { max-width: 100%; display: block; }
ol, ul { list-style: none; }

/* ===========================
   モーション低減
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================
   キーフレーム
   =========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes navFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===========================
   ナビゲーション
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
  animation: navFadeIn 0.6s ease both;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.nav {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.nav-links a {
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-contact {
  color: var(--text-primary) !important;
}

@media (max-width: 560px) {
  .nav { padding: 14px 20px; }
  .nav-links { gap: 18px; font-size: 0.85rem; }
}

/* ===========================
   レイアウト共通
   =========================== */
main {
  flex: 1;
  width: 100%;
}

.hero,
.apps-section,
.about-section {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

@media (max-width: 560px) {
  .hero,
  .apps-section,
  .about-section {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ===========================
   ヒーロー
   =========================== */
.hero {
  padding-top: 96px;
  padding-bottom: 112px;
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 32px;
  padding: 6px 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6.4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 32px;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 540px;
}

@media (max-width: 560px) {
  .hero {
    padding-top: 64px;
    padding-bottom: 72px;
  }
  .hero-eyebrow { margin-bottom: 24px; }
  .hero-title { margin-bottom: 24px; }
  .hero-sub { font-size: 0.98rem; }
  .hero-title br { display: none; }
}

/* ===========================
   セクション見出し
   =========================== */
.section-header {
  margin-bottom: 56px;
}

.section-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
}

@media (max-width: 560px) {
  .section-header { margin-bottom: 36px; }
}

/* ===========================
   アプリ一覧
   =========================== */
.apps-section {
  padding-top: 64px;
  padding-bottom: 64px;
}

.app-list {
  border-top: 1px solid var(--border);
}

.app-item {
  display: grid;
  grid-template-columns: 56px 64px 1fr;
  gap: 28px;
  padding: 36px 4px;
  border-bottom: 1px solid var(--border);
  align-items: start;

  /* スクロール入場 */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--app-index, 0) * 70ms);
}

.app-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-muted);
  padding-top: 4px;
  letter-spacing: 0.02em;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-card);
  object-fit: cover;
  background: var(--border);
  border: 1px solid var(--border);
}

.app-icon-placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  font-size: 1.6rem;
}

.app-meta {
  min-width: 0;
}

.app-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.app-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.005em;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.store-link:hover {
  background: var(--text-primary);
  color: var(--bg);
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

.store-link:active {
  transform: translateY(0);
}

.store-link .arrow {
  font-size: 0.95em;
  opacity: 0.65;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.store-link:hover .arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

@media (max-width: 640px) {
  .app-item {
    grid-template-columns: 48px 1fr;
    grid-template-areas:
      "num icon"
      "meta meta";
    gap: 16px 18px;
    padding: 32px 0;
  }
  .app-num { grid-area: num; align-self: center; padding-top: 0; font-size: 1.3rem; }
  .app-icon, .app-icon-placeholder { grid-area: icon; width: 56px; height: 56px; }
  .app-meta { grid-area: meta; margin-top: 4px; }
  .app-name { font-size: 1.2rem; }
}

.loading-text {
  text-align: center;
  color: var(--text-secondary);
  padding: 60px 0;
  font-size: 0.95rem;
}

/* ===========================
   会社概要
   =========================== */
.about-section {
  padding-top: 96px;
  padding-bottom: 120px;
}

.about-info {
  border-top: 1px solid var(--border);
}

.about-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.about-row dt {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  font-weight: 500;
}

.about-row dd {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.about-row a {
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.about-row a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@media (max-width: 560px) {
  .about-section {
    padding-top: 64px;
    padding-bottom: 80px;
  }
  .about-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 20px 0;
  }
}

/* ===========================
   フッター
   =========================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 28px;
  margin-top: 0;
}

.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.footer-meta {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 460px) {
  .footer-inner { flex-direction: column; gap: 8px; }
}

/* ===========================
   選択スタイル
   =========================== */
::selection {
  background: var(--accent);
  color: #fff;
}
