/* ============================================================
   Kirin OS — HP styles
   visual_bible_v3 正本 / Cream Studio palette
   3 ページ共通 (index / hypha / pricing) — W-HP02 award-level redesign
   ============================================================ */

/* ---- Waldenburg (Display) ----------------------------------
   KMR Waldenburg Book を配置済 (~/Dev/kirin_hp/fonts/)。
   読込失敗時は Georgia serif にフォールバックする。 */
@font-face {
  font-family: 'Waldenburg';
  src: url('/fonts/kmrwaldenburg-book.woff2') format('woff2'),
       url('/fonts/kmrwaldenburg-book.woff') format('woff');
  font-weight: 400 700;
  font-display: swap;
}

/* ============================================================
   Design tokens — visual_bible_v3
   ============================================================ */
:root {
  /* Canvas */
  --canvas-cream: oklch(0.97 0.010 72);
  --canvas-soft:  oklch(0.985 0.005 72);
  --canvas-deep:  oklch(0.93 0.014 75);

  /* Ink */
  --ink-primary: oklch(0.22 0.02 60);
  --ink-strong:  oklch(0.15 0.025 55);
  --ink-body:    oklch(0.42 0.01 60);
  --ink-muted:   oklch(0.62 0.008 60);
  --ink-whisper: oklch(0.78 0.005 60);

  /* Hairlines */
  --hairline:      oklch(0.89 0.003 85);
  --hairline-soft: oklch(0.93 0.008 70);

  /* Accent */
  --accent-terracotta:      oklch(0.62 0.13 85);
  --accent-terracotta-soft: oklch(0.81 0.075 85);

  /* Signal — HP の CTA アクセントは amber を使用 (terracotta はアプリ整合のため残置) */
  --signal-amber: oklch(0.72 0.16 70);
  --signal-amber-soft: oklch(0.85 0.09 70);

  /* Surface */
  --surface-card: oklch(0.99 0.005 70);

  /* Typography */
  --font-display: 'Waldenburg', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Purposeful Motion — G-115-176 */
  --motion-hover: 120ms ease-out;
  --motion-transition: 400ms ease-out;
  --motion-focus: 300ms ease-out;
  --motion-scroll: 600ms ease-out;

  /* Layout */
  --measure: 640px;
  --wide: 1080px;
  --gutter: 24px;
  --header-h: 68px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas-cream);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink-primary);
  font-weight: 600;
  line-height: 1.2;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ============================================================
   Header (全ページ共通) — fixed, scroll-aware
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color var(--motion-transition),
              border-color var(--motion-transition);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 18px var(--gutter);
}

.site-header--scrolled,
.site-header--solid {
  background: oklch(0.97 0.010 72 / 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--hairline);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--canvas-soft);
  transition: color var(--motion-transition);
}
.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: oklch(0.985 0.005 72 / 0.72);
  transition: color var(--motion-hover);
}
.site-nav a:hover { color: var(--canvas-soft); }

/* scrolled / solid → ink on cream */
.site-header--scrolled .site-logo,
.site-header--solid .site-logo { color: var(--ink-strong); }
.site-header--scrolled .site-logo:hover,
.site-header--solid .site-logo:hover { color: var(--signal-amber); }
.site-header--scrolled .site-nav a,
.site-header--solid .site-nav a { color: var(--ink-muted); }
.site-header--scrolled .site-nav a:hover,
.site-header--solid .site-nav a:hover { color: var(--ink-primary); }
.site-header--scrolled .site-nav a[aria-current='page'],
.site-header--solid .site-nav a[aria-current='page'] { color: var(--ink-primary); }

/* ============================================================
   Footer (全ページ共通)
   ============================================================ */
.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 48px var(--gutter);
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

/* ============================================================
   Layout primitives
   ============================================================ */
.section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 120px var(--gutter);
}
.section--tight { padding-top: 80px; padding-bottom: 80px; }

/* ============================================================
   Hero — 全ページ共通 / 100vh / parallax
   .hero__bg と .hero__content の transform は script.js が制御。
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-color: var(--canvas-deep);
  background-size: cover;
  background-position: center;
  transform: scale(1.1);
  will-change: transform;
}
.hero--top .hero__bg { background-image: url('assets/hero-top.jpg'); }
.hero--hypha .hero__bg {
  background-image: url('assets/hero-hypha.jpg');
  background-position: right center;
}

/* オーバーレイ — 純黒禁止 / 暖色ダークで可読性確保 */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    oklch(0.15 0.02 60 / 0.55) 40%,
    transparent 100%
  );
}
.hero--hypha .hero__overlay {
  background: linear-gradient(
    to left,
    oklch(0.15 0.02 60 / 0.55) 40%,
    transparent 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--wide);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.hero__content {
  max-width: 720px;
  will-change: transform, opacity;
}
.hero__content--right {
  margin-left: auto;
  text-align: right;
}

.hero__kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: oklch(0.985 0.005 72 / 0.7);
  margin-bottom: 24px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--canvas-soft);
}
.hero__title--mega {
  font-size: clamp(4rem, 10vw, 9rem);
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero__lead {
  margin-top: 24px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 3.5rem);
  line-height: 1.18;
  color: var(--canvas-soft);
}

/* hypha — 2 行見出し */
.hero__headline {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
}
.hero__line {
  display: block;
  color: var(--canvas-soft);
}
.hero__line--1 {
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.hero__line--2 {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 0.08em;
}

/* scroll indicator — static, 点滅なし */
.hero__scroll {
  position: absolute;
  z-index: 2;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  line-height: 1;
  color: oklch(0.985 0.005 72 / 0.6);
}

/* hero 入場 — 一度きりの focus reveal */
@keyframes heroRise {
  to { opacity: 1; transform: translateY(0); }
}
.hero__content .hero__kicker,
.hero__content .hero__title,
.hero__content .hero__lead,
.hero__content .hero__line {
  opacity: 0;
  transform: translateY(20px);
  animation: heroRise 700ms ease-out forwards;
}
.hero__content .hero__kicker { animation-delay: 60ms; }
.hero__content .hero__title,
.hero__content .hero__line--1 { animation-delay: 200ms; }
.hero__content .hero__lead,
.hero__content .hero__line--2 { animation-delay: 400ms; }

/* ============================================================
   Statement — 余白たっぷり / 中央
   ============================================================ */
.statement {
  text-align: center;
}
.statement__headline {
  --reveal-offset: 32px;
  max-width: var(--measure);
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.3;
  color: var(--ink-strong);
}
.statement__body {
  max-width: var(--measure);
  margin: 48px auto 0;
}
.statement__body p {
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--ink-body);
}
.no-guess {
  margin: 5rem auto;
  max-width: 800px;
}
.no-guess__line {
  font-family: 'Waldenburg', Georgia, serif;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--ink-muted);
  line-height: 1.2;
  margin: 0;
}
.no-guess__line.reveal {
  transition-delay: calc(var(--i, 0) * 180ms);
}

/* ============================================================
   Product grid (index) — border-left のみ / シャドウなし
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.product-card {
  border-left: 2px solid var(--hairline);
  padding: 12px 0 12px 28px;
  transition: border-color var(--motion-transition);
}
.product-card:hover { border-left-color: var(--signal-amber); }
.product-card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  color: var(--ink-strong);
}
.product-card__price {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-primary);
}
.product-card__desc {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-body);
}
.product-card__link {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--signal-amber);
  border-bottom: 1px solid var(--signal-amber-soft);
  transition: border-color var(--motion-hover);
}
.product-card__link:hover { border-color: var(--signal-amber); }

/* ============================================================
   Feature list (hypha) — 縦積み / 大番号 (水印)
   ============================================================ */
.feature-list { padding-top: 40px; }
.feature-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1.2fr;
  gap: 56px;
  align-items: start;
  padding: 56px 0;
  border-top: 1px solid var(--hairline);
}
.feature-row:last-child { border-bottom: 1px solid var(--hairline); }
.feature-row__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 6rem;
  line-height: 0.9;
  color: var(--ink-whisper);
}
.feature-row__title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: 0.01em;
  color: var(--ink-strong);
}
.feature-row__body {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink-body);
  padding-top: 8px;
}

/* ============================================================
   Copy blocks (hypha statement / bridge / download)
   ============================================================ */
.copy-block { text-align: center; max-width: var(--measure); margin: 0 auto; }
.copy-block .body {
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--ink-body);
}
.copy-block .body + .body { margin-top: 20px; }

/* ============================================================
   Buttons / CTA
   ============================================================ */
.cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-section { text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color var(--motion-hover),
              background-color var(--motion-hover),
              color var(--motion-hover);
}
.btn--primary {
  border-color: var(--signal-amber);
  color: var(--signal-amber);
  background: transparent;
}
.btn--primary:hover {
  background: var(--signal-amber);
  color: var(--canvas-soft);
}
.btn--ghost {
  border-color: var(--hairline);
  color: var(--ink-body);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--ink-muted);
  color: var(--ink-primary);
}

.download-sub {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

/* ============================================================
   Bridge (hypha → Kirin OS)
   ============================================================ */
.bridge {
  text-align: center;
}
.bridge__text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.4;
  color: var(--ink-strong);
  max-width: var(--measure);
  margin: 0 auto;
}
.bridge__link {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--signal-amber);
  border-bottom: 1px solid var(--signal-amber-soft);
  transition: border-color var(--motion-hover);
}
.bridge__link:hover { border-color: var(--signal-amber); }

/* ============================================================
   Pricing
   ============================================================ */
.pricing-header {
  text-align: center;
  padding-top: calc(var(--header-h) + 96px);
}
.pricing-header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 6vw, 5rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink-strong);
}
.pricing-header .sub {
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  line-height: 1.3;
  color: var(--ink-muted);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}
.price-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
}
.price-card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.625rem;
  letter-spacing: 0.02em;
  color: var(--ink-strong);
}
.price-card__amount {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-primary);
}
.price-card__tagline {
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-primary);
  font-weight: 600;
}
.price-card__list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.price-card__list li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-body);
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.price-card__list li:last-child { border-bottom: 0; }
.price-card__upgrade {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--signal-amber);
}
.price-card .btn {
  margin-top: 32px;
  align-self: flex-start;
}

.upgrade-link {
  text-align: center;
  margin-top: 72px;
  font-size: 15px;
  color: var(--ink-body);
}
.upgrade-link a {
  color: var(--signal-amber);
  border-bottom: 1px solid var(--signal-amber-soft);
  transition: border-color var(--motion-hover);
}
.upgrade-link a:hover { border-color: var(--signal-amber); }

/* ============================================================
   Scroll reveal — G-115-176 / stagger
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-offset, 40px));
  transition: opacity 700ms ease-out, transform 700ms ease-out;
  transition-delay: calc(var(--i, 0) * 100ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Reduced motion — 全モーション無効化
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__content .hero__kicker,
  .hero__content .hero__title,
  .hero__content .hero__lead,
  .hero__content .hero__line {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .hero__bg { transform: scale(1.1); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .section { padding: 88px var(--gutter); }
  .product-grid { grid-template-columns: 1fr; gap: 0; }
  .product-card {
    padding: 28px 0 28px 24px;
    border-left: 2px solid var(--hairline);
    border-top: 1px solid var(--hairline-soft);
  }
  .product-card:first-child { border-top: 0; }
  .feature-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 44px 0;
  }
  .price-grid { grid-template-columns: 1fr; }
  .hero__content { max-width: 100%; }
  .hero__content--right { text-align: left; margin-left: 0; }
  .hero--hypha .hero__overlay {
    background: linear-gradient(
      to right,
      oklch(0.15 0.02 60 / 0.55) 40%,
      transparent 100%
    );
  }
}

@media (max-width: 520px) {
  .site-header__inner { padding: 14px var(--gutter); }
  .site-nav { gap: 18px; }
  .hero__line--1 { white-space: normal; }
  .statement__body p { font-size: 1.25rem; }
  .copy-block .body { font-size: 1.25rem; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
