/* Addwave サイト共通スタイル。単一のダークテーマを全ページで共有する
   (2026-07-26: ページごとに配色を分ける設計をやめ、css/dark-theme.cssを
   ここに統合した)。 */

/* Outfit: サイト全体の基本フォント(2026-07-22決定)。Addwaveのロゴデザインで
   採用したフォントに全ページ揃える。Google Fonts配布元のバリアブルフォントを
   自前ホスティング。ライセンス: assets/fonts/Outfit-OFL.txt(SIL OFL 1.1)。 */
@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/Outfit-VariableFont.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

:root {
  --bg: #161616;
  --panel: #1e1e1e;
  --border: #383838;
  --border-strong: #424242;
  --text: #d9d9d9;
  --text-bright: #f2f2f2;
  --text-muted: #8c8c8c;
  --accent: #04cac4;
}

* { box-sizing: border-box; }

/* hidden属性は要素側でdisplayを上書きしていると効かなくなることがあるため
   (例: .cta-button の display:inline-flex)、常に優先されるよう明示的に指定する */
[hidden] {
  display: none !important;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  margin: 0;
}

a { color: var(--accent); }

header, footer {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}

header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

footer {
  border-top: 1px solid var(--border);
  font-size: 0.85em;
}

/* ロゴSVG(fill="black"固定)をmask-imageとして読み込み、background-colorで
   色を制御する。こうすることでファイルは1つのまま、CSSだけで色を出し分け
   られる(現状は全ページ暗背景なので明るい色で固定)。テキスト"Addwave"は
   text-indentで視覚的に隠すだけで、アクセシビリティ用にDOM上には残す。 */
.logo {
  display: inline-block;
  width: 124px;
  height: 28px;
  overflow: hidden;
  text-indent: -9999px;
  background-color: var(--text-bright);
  -webkit-mask-image: url('/assets/img/common/addwave_logo.svg');
  mask-image: url('/assets/img/common/addwave_logo.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: left center;
  mask-position: left center;
}

/* トップページの見出し用: ヘッダーと同じロゴマークを大きく表示する。
   幅:高さはSVG本体の比率(724:164)に合わせてある */
.logo.logo-hero {
  width: 400px;
  height: 109px;
  margin: 0;
  mask-position: center;
  -webkit-mask-position: center;
}

nav a {
  margin-right: 1rem;
  color: var(--text-muted);
  text-decoration: none;
}

nav a:hover { color: var(--accent); }

main {
  padding: 0 2rem;
  max-width: 960px;
  margin: 0 auto;
}

section {
  border: none;
  background: transparent;
  padding: 3rem 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

/* 背景を画面幅いっぱいに塗るfull-bleedセクション共通クラス。背景色そのものが
   区切りの役目を果たすため、自身のborder-bottomは持たない */
.section-fill {
  background: var(--panel);
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  border-bottom: none;
}

/* 直後が塗り背景セクションなら自分のボーダーも不要(色の切り替わり自体が
   区切りになるため、線と色の境界が二重に見えるのを避ける)。これにより
   .section-fillを付けるだけで前後のボーダー管理が自動化される */
section:has(+ .section-fill) {
  border-bottom: none;
}

/* ヒーロー: full-bleed(画面幅いっぱい)。中身は各ページのラッパー
   (.hero-inner / .home-hero-inner)側でmax-widthを設け、超ワイド画面での
   間延びを防ぐ */
#hero {
  min-height: 66vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 4rem 4rem;
  border-bottom: none;
}

/* トップページ専用の背景画像。Loomaページの#heroは独自の2カラム構成が
   あるため、このクラスはトップページの#heroにだけ付与する */
#hero.hero-with-bg {
  background-image: url('/assets/img/common/hero_bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* トップページのヒーロー用ラッパー。単純な中央寄せの1カラム */
.home-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

/* Loomaページのヒーロー用ラッパー。CSS Grid化し、hero-contentとhero-imageを
   同じ行(row 1)に置くことで、hero-contentが画像の高さだけを基準に縦中央
   揃えされるようにしている。CTAは行を分けてrow 2に配置する */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  grid-template-rows: auto auto;
  column-gap: 2rem;
  row-gap: 3.5rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-content {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  min-width: 0;
}

.hero-image {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

h1 {
  color: var(--text-bright);
  font-size: 4.25rem;
  font-weight: 200;
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
}

.subtitle {
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

/* タグラインの色は意図的にaccentカラーを外している(2026-07-22、見出しの色と
   ボタンの色が食い合うという判断) */
.tagline {
  font-size: 1.8rem;
  margin-bottom: 3rem;
  font-weight: 200;
}

h2 {
  color: var(--text-bright);
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

h3 { color: var(--text-bright); }
p, li { color: var(--text); }

.draft-note {
  background: rgba(217, 164, 65, 0.12);
  border: 1px solid #d9a441;
  color: #d9a441;
  padding: 0.5rem 1rem;
  font-size: 0.85em;
  border-radius: 6px;
}

.todo {
  background: rgba(255, 107, 107, 0.15);
  color: #ff8a8a;
  padding: 0 0.3em;
  border-radius: 4px;
}

.fine-print {
  font-size: 0.8em;
  color: var(--text-muted);
}

/* ヒーローのCTA: Loomaページでは画像(hero-image)の下、column2/row2に配置
   (.hero-innerのgrid定義に対応)。上段にMac/Windowsのダウンロードボタンを
   横並び、その下にトライアル注記、さらに下にダウンロードボタン1つぶんの
   幅に揃えたPurchaseを中央配置する */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  grid-column: 2;
  grid-row: 2;
}

.cta-download-buttons {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.cta-download-buttons .cta-button {
  flex: 1;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}

.cta-button svg {
  flex-shrink: 0;
}

/* Download(Mac/Windows)を主導線として優先表示: 実機ノブのグローと同じ表現 */
.cta-primary {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(4, 202, 196, 0.4);
}

.cta-primary:hover { box-shadow: 0 0 13px rgba(4, 202, 196, 0.6); }

/* Purchaseはダウンロードボタン1つぶんの幅(50% - gapの半分)に揃えて中央配置 */
.cta-secondary {
  font-size: 0.9em;
  color: var(--accent);
  border-color: var(--accent);
  flex: none;
  width: calc(50% - 0.5rem);
}

.cta-secondary:hover { background: rgba(4, 202, 196, 0.2); }

.cta-note {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-top: 0;
  text-align: center;
}

/* ベータ案内セクション: full-bleedは.section-fillクラス(HTML側)で付与。
   本文は他セクションと同じ左寄せに揃える(センタリングだと前後の
   左寄せセクションと視線の流れが乱れるため) */
.beta-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

.beta-notes {
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.beta-notes li {
  margin-bottom: 0.3rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.video-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  border-radius: 8px;
}

/* video-placeholderの.todoは、赤バッジ用の塗りではなく控えめな警告色の
    破線にする(大きな面に赤の塗りを使うと浮いて見えるため) */
.video-placeholder.todo {
  background: var(--panel);
  border: 1px dashed #d9a441;
  color: #d9a441;
}

.video-embed {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-caption {
  margin-top: 0.5rem;
  font-size: 0.85em;
  color: var(--text-muted);
  text-align: center;
}

.feature {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.feature h3 {
  margin-top: 0;
}

.feature img,
.theory-engine-image img {
  border: 1px solid var(--border);
  border-radius: 6px;
}

.feature img {
  width: 300px;
  height: auto;
  flex-shrink: 0;
}

.theory-engine-image {
  text-align: center;
  margin-bottom: 1.5rem;
}

.theory-engine-image img {
  max-width: 100%;
  width: 450px;
  height: auto;
}

/* 中身はmainと同じ960px幅・2remパディングに揃えて、他セクションと左端を合わせる */
.theory-engine-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

.knob-item {
  margin-bottom: 1.25rem;
}

.knob-item h3 {
  margin-bottom: 0.3rem;
}

.feature,
.knob-item,
.product-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.product-card {
  margin-bottom: 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
}

@media (max-width: 900px) {
  #hero {
    text-align: center;
    padding-top: 0;
  }
  /* gridをやめてシンプルな縦積みに(DOM順: content → image → cta) */
  .hero-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  header, footer {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  main {
    padding: 0 1.25rem;
  }

  #hero {
    min-height: 50vh;
    /* 左右の余白はfull-bleed化以前(mainのpaddingが担っていた1.25rem)と
       同じ見た目になるよう明示的に指定する */
    padding: 1rem 1.25rem 3rem;
  }

  h1 { font-size: 2.6rem; }
  .tagline { font-size: 1.2rem; }
  h2 { font-size: 1.35rem; }

  .logo.logo-hero {
    width: 260px;
    height: 59px;
  }

  .feature {
    flex-direction: column;
  }

  .feature img {
    width: 100%;
  }
}
