@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap");

:root {
  --ink: #141516;
  --sub: #5c6066;
  --line: #e1e3e6;
  --bg: #e4e6e9;
  --paper: #ffffff;
  --accent: #00a19c;        /* ペトロナスグリーン（装飾・ボタン） */
  --accent-hi: #00d2be;
  --accent-lo: #007f7b;
  --accent-text: #00807c;   /* 文字用：白地で読める濃さ */
  --edge: #c6c9ce;          /* 面の厚み（下の縁） */
  --edge-accent: #00635f;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(22, 24, 27, 0.06), 0 4px 10px rgba(22, 24, 27, 0.06);
  --shadow-md: 0 10px 18px rgba(22, 24, 27, 0.08), 0 24px 44px rgba(22, 24, 27, 0.10);
  --shadow-lg: 0 14px 24px rgba(22, 24, 27, 0.14), 0 40px 80px rgba(22, 24, 27, 0.24);
  /* 厚みのある面：上面のハイライト＋下の縁＋落ち影 */
  --solid: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 0 var(--edge), var(--shadow-md);
  --solid-hover: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 0 var(--edge), var(--shadow-lg);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f0f1f3 38%, #d6d9dd 100%);
  background-color: var(--bg);
  min-height: 100vh;
  color: var(--ink);
  font-family: "Montserrat", "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* 言語の案内 */
.lang-banner { background: var(--ink); color: #fff; font-size: 14px; }
.lang-banner .wrap { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.lang-banner a { color: var(--accent-hi); font-weight: 600; }
.lang-banner button { background: none; border: 0; color: rgba(255, 255, 255, 0.7); font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 8px; }

/* ヘッダー：浮いて見える帯 */
header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line), 0 10px 28px rgba(22, 24, 27, 0.08);
}
header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 16px; padding-bottom: 16px; }
.logo { font-size: 22px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink); text-decoration: none; }
.logo img { height: 34px; width: auto; display: block; mix-blend-mode: multiply; }
nav { display: flex; flex-wrap: wrap; align-items: center; }
nav a { margin-left: 24px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
nav a:first-child { margin-left: 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.theme-toggle { margin-left: 20px; width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 0; background: var(--paper); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 0 var(--edge), var(--shadow-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.15s, box-shadow 0.15s; }
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 var(--edge), var(--shadow-sm); }

main { padding: 48px 0 88px; }

h1 { font-size: 30px; font-weight: 700; line-height: 1.5; letter-spacing: 0.01em; margin: 0 0 16px; }
h2 { font-size: 20px; font-weight: 700; margin: 68px 0 22px; display: flex; align-items: center; gap: 12px; }
h2::before { content: ""; width: 28px; height: 6px; border-radius: 3px; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); box-shadow: 0 2px 0 var(--edge-accent); flex: none; }
.lead { color: var(--sub); margin: 0 0 32px; }

/* ヒーロー：点の球体と緑の航路が動く映像（描画は hero.js） */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 56px; min-height: 440px;
  border-radius: 30px;
  color: #fff;
  background: radial-gradient(120% 130% at 76% 48%, #0d2221 0%, #0a0d0e 52%, #020202 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 0 #000, var(--shadow-lg);
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* 文字側を読みやすくする暗幕と、全体に重ねる走査線 */
.hero::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(3, 3, 3, 0.9) 0%, rgba(3, 3, 3, 0.5) 36%, rgba(3, 3, 3, 0) 60%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, rgba(255, 255, 255, 0) 1px 3px); }
.hero > h1, .hero > .lead, .hero > .button { position: relative; z-index: 4; }
.hero h1 { font-size: 36px; margin-bottom: 20px; max-width: 54%; text-shadow: 0 0 24px rgba(0, 210, 190, 0.35), 0 2px 14px rgba(0, 0, 0, 0.6); }
.hero .lead { color: rgba(255, 255, 255, 0.8); max-width: 52%; }
/* 文字も映像に合わせて順に現れる */
.hero.play > h1, .hero.play > .lead, .hero.play > .button { opacity: 0; animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.hero.play > h1 { animation-delay: 0.5s; }
.hero.play > .lead { animation-delay: 0.9s; }
.hero.play > .button { animation-delay: 1.3s; }
@keyframes rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
/* 押し込めるボタン */
.button {
  display: inline-block; padding: 13px 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, #00b5af 0%, var(--accent) 45%, var(--accent-lo) 100%);
  color: #fff; text-decoration: none; font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 60, 58, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 0 var(--edge-accent), 0 16px 28px rgba(0, 161, 156, 0.38);
  transition: transform 0.15s, box-shadow 0.15s;
}
.button:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 0 var(--edge-accent), 0 22px 36px rgba(0, 161, 156, 0.45); }
.button:active { transform: translateY(5px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 0 var(--edge-accent), 0 6px 12px rgba(0, 161, 156, 0.35); }

/* 厚みのあるカード */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card, .panel {
  background: linear-gradient(180deg, #ffffff 0%, #f2f3f5 100%);
  border-radius: var(--radius);
  box-shadow: var(--solid);
  padding: 30px;
}
.card { transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; transform-style: preserve-3d; will-change: transform; }
.card:hover { transform: translateY(-6px); box-shadow: var(--solid-hover); }
.card .num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(160deg, var(--accent-hi), var(--accent) 55%, var(--accent-lo)); color: #fff; font-weight: 700; font-size: 15px; text-shadow: 0 1px 2px rgba(0, 60, 58, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 0 var(--edge-accent), 0 10px 18px rgba(0, 161, 156, 0.35); margin-bottom: 18px; }
.card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.6; }
.card p, .panel p { margin: 0; color: var(--sub); font-size: 15px; }
.panel a { font-weight: 600; }

.product { display: grid; grid-template-columns: 340px 1fr; gap: 44px; align-items: center; }
.product-photo { width: 100%; height: auto; display: block; border-radius: 24px; box-shadow: 0 8px 0 var(--edge), var(--shadow-lg); }

table.info { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border-radius: var(--radius); box-shadow: var(--solid); overflow: hidden; }
table.info th, table.info td { text-align: left; vertical-align: top; padding: 16px 22px; border-bottom: 1px solid var(--line); }
table.info tr:last-child th, table.info tr:last-child td { border-bottom: 0; }
table.info th { width: 13em; font-weight: 600; color: var(--sub); background: linear-gradient(180deg, #f6f7f8 0%, #eceef0 100%); }
/* 日本語の項目名は途中で折り返さない */
html[lang="ja"] table.info th { white-space: nowrap; }

ul.plain { padding-left: 1.2em; margin: 0; }
ul.plain li { margin-bottom: 6px; }
main > .wrap > ul.plain { background: var(--paper); border-radius: var(--radius); box-shadow: var(--solid); padding: 24px 28px 18px 48px; }

.note { font-size: 13px; color: var(--sub); margin-top: 22px; }

footer { background: linear-gradient(180deg, #232426 0%, #050505 100%); color: rgba(255, 255, 255, 0.6); padding: 28px 0; font-size: 13px; box-shadow: inset 0 3px 0 var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .card, .button, .theme-toggle { transition: none; }
}

@media (max-width: 760px) {
  .hero::before { background: rgba(3, 3, 3, 0.55); }
  .hero h1, .hero .lead { max-width: 100%; }
}

@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .hero { padding: 56px 26px; min-height: 360px; border-radius: 24px; }
  .hero h1 { font-size: 26px; }
  .cards, .product { grid-template-columns: 1fr; }
  nav a { margin-left: 0; margin-right: 16px; }
  table.info th { width: 7em; padding: 14px; }
  html[lang="ja"] table.info th { width: 1%; }
  table.info td { padding: 14px; }
}

/* ダークモード：theme.js が <html data-theme="dark"> を設定する（端末の設定に自動追従＋ボタンで手動切り替え） */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eceae6;
  --sub: #a4abb3;
  --line: #2c3036;
  --bg: #101113;
  --paper: #1d2024;
  --accent-text: #35dccb;
  --edge: #08090a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 18px rgba(0, 0, 0, 0.4), 0 24px 44px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 24px rgba(0, 0, 0, 0.5), 0 40px 80px rgba(0, 0, 0, 0.6);
  --solid: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 6px 0 var(--edge), var(--shadow-md);
  --solid-hover: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 0 var(--edge), var(--shadow-lg);
}
[data-theme="dark"] body { background: linear-gradient(180deg, #17191c 0%, var(--bg) 420px); background-color: var(--bg); }
[data-theme="dark"] .lang-banner { background: #000; }
[data-theme="dark"] header { background: rgba(16, 17, 19, 0.82); box-shadow: 0 1px 0 var(--line), 0 10px 28px rgba(0, 0, 0, 0.45); }
[data-theme="dark"] .logo img { filter: invert(1); mix-blend-mode: screen; }
[data-theme="dark"] .theme-toggle { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 3px 0 var(--edge), var(--shadow-sm); }
[data-theme="dark"] .theme-toggle:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 var(--edge), var(--shadow-sm); }
[data-theme="dark"] .card, [data-theme="dark"] .panel { background: linear-gradient(180deg, #23262b 0%, #1b1d21 100%); }
[data-theme="dark"] table.info th { background: #23262b; }
[data-theme="dark"] .product-photo { box-shadow: 0 8px 0 var(--edge), var(--shadow-lg); }
[data-theme="dark"] footer { background: #0b0c0d; }

/* 幅の狭い画面では、項目名を値の上に重ねる */
@media (max-width: 440px) {
  table.info, table.info tbody, table.info tr, table.info th, table.info td { display: block; width: 100%; }
  html[lang="ja"] table.info th { width: 100%; }
  table.info th { border-bottom: 0; padding: 12px 16px 2px; background: transparent; font-size: 13px; }
  table.info td { padding: 0 16px 12px; }
  [data-theme="dark"] table.info th { background: transparent; }
}

/* 英語の項目名：広い画面では1行に収め、狭い画面では項目名を値の上に重ねる */
@media (min-width: 641px) {
  html[lang="en"] table.info th { white-space: nowrap; width: 1%; }
}
@media (max-width: 640px) {
  html[lang="en"] table.info, html[lang="en"] table.info tbody, html[lang="en"] table.info tr, html[lang="en"] table.info th, html[lang="en"] table.info td { display: block; width: 100%; }
  html[lang="en"] table.info th { border-bottom: 0; padding: 12px 16px 2px; background: transparent; font-size: 13px; }
  html[lang="en"] table.info td { padding: 0 16px 12px; }
}
