/* DreamRecord — 夜・夢・静けさ・余白。暗すぎず、高コントラストを保つ。 */

:root {
  --bg: #0c0e18;
  --bg-soft: #141728;
  --bg-card: rgba(255, 255, 255, 0.035);
  --text: #edecf6;
  --text-muted: #a6a3c2;
  --text-faint: #7b7899;
  --accent: #9b8cff;
  --accent-strong: #7d6bf5;
  --accent-soft: rgba(155, 140, 255, 0.14);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --radius: 16px;
  --maxw: 1080px;
  --readw: 44rem;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.read { max-width: var(--readw); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent-strong); color: #fff; padding: 12px 20px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- ヘッダー ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 14, 24, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--text-muted); font-size: 0.9rem; padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }

/* ---------- ヒーロー ---------- */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(64px, 12vw, 128px) 0 clamp(56px, 9vw, 104px);
  background:
    radial-gradient(1100px 620px at 78% -12%, rgba(125, 107, 245, 0.34), transparent 62%),
    radial-gradient(760px 460px at 12% 8%, rgba(74, 122, 224, 0.2), transparent 58%);
}
/* 星。画像を使わずCSSだけで置く。 */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 28% 62%, #e6e2ff, transparent),
    radial-gradient(1.8px 1.8px at 45% 15%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 62% 48%, #dcd7ff, transparent),
    radial-gradient(1.5px 1.5px at 78% 28%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 88% 66%, #e8e4ff, transparent),
    radial-gradient(1.3px 1.3px at 8% 78%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 52% 84%, #d8d3ff, transparent);
}
.hero .wrap { position: relative; }
.hero-grid {
  display: grid; gap: clamp(40px, 6vw, 72px); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.16em;
  color: var(--accent); text-transform: uppercase; margin: 0 0 20px;
  padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 999px;
}
.hero h1 {
  margin: 0 0 24px; font-size: clamp(2rem, 5.2vw, 3.15rem);
  line-height: 1.35; letter-spacing: 0.01em; font-weight: 700;
}
.hero p.lead {
  margin: 0 0 36px; font-size: clamp(1rem, 1.9vw, 1.13rem);
  color: var(--text-muted); max-width: 34rem;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font-size: 1rem; font-weight: 600; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: #8b79ff; }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn[aria-disabled="true"] {
  background: var(--bg-soft); color: var(--text-faint);
  border-color: var(--border); cursor: default; transform: none;
}
.cta-note { font-size: 0.86rem; color: var(--text-faint); margin: 18px 0 0; }

/* ---------- 端末モックアップ ---------- */

.phone {
  width: min(268px, 76vw); margin-inline: auto;
  aspect-ratio: 9 / 19; border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #2b2f47, #171a2a);
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}
.phone-screen {
  height: 100%; border-radius: 32px; background: linear-gradient(180deg, #171a2c, #0e1020);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 24px; text-align: center;
}
.record-orb {
  width: 148px; height: 148px; border-radius: 50%;
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: #fff; box-shadow: 0 0 0 12px rgba(155, 140, 255, 0.1);
}
.record-orb svg { width: 34px; height: 34px; }
.record-orb span { font-size: 0.9rem; font-weight: 700; }
.phone-hint { font-size: 0.75rem; color: var(--text-faint); margin: 0; line-height: 1.6; }

/* ---------- セクション ---------- */

section { padding: clamp(56px, 9vw, 96px) 0; }
section.alt { background: var(--bg-soft); border-block: 1px solid var(--border); }

.section-head { margin: 0 auto clamp(36px, 5vw, 56px); max-width: 40rem; text-align: center; }
.section-head h2 {
  margin: 0 0 14px; font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.45; font-weight: 700;
}
.section-head p { margin: 0; color: var(--text-muted); }

.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 26px;
}
.card h3 { margin: 0 0 10px; font-size: 1.06rem; font-weight: 700; line-height: 1.6; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.card .icon svg { width: 22px; height: 22px; }

/* 3ステップ */
.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 34px; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 24px; right: 26px;
  font-size: 2.4rem; font-weight: 700; color: rgba(155, 140, 255, 0.22); line-height: 1;
}

/* プライバシーの約束 */
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.promise-list li {
  display: flex; gap: 14px; align-items: flex-start;
  color: var(--text-muted); font-size: 0.97rem;
}
.promise-list svg { width: 20px; height: 20px; flex: none; margin-top: 6px; color: var(--accent); }
.promise-list strong { color: var(--text); font-weight: 600; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: var(--readw); margin-inline: auto; }
.faq details {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 22px;
}
.faq summary {
  cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "＋"; color: var(--accent); font-weight: 400; flex: none;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 20px; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- 法務・サポートページ ---------- */

.page-header {
  padding: clamp(48px, 8vw, 80px) 0 clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
  background: radial-gradient(900px 400px at 70% -30%, rgba(125, 107, 245, 0.22), transparent 60%);
}
.page-header h1 { margin: 0 0 12px; font-size: clamp(1.65rem, 4vw, 2.3rem); line-height: 1.4; }
.page-meta { margin: 0; color: var(--text-faint); font-size: 0.85rem; }

.doc { padding: clamp(40px, 6vw, 64px) 0 clamp(64px, 9vw, 96px); }
.doc .read > *:first-child { margin-top: 0; }
.doc h2 {
  margin: 48px 0 16px; padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 1.2rem; line-height: 1.6; font-weight: 700;
}
.doc h3 { margin: 32px 0 12px; font-size: 1.02rem; font-weight: 700; }
.doc p { margin: 0 0 18px; color: var(--text-muted); }
.doc ul, .doc ol { margin: 0 0 20px; padding-left: 1.4em; color: var(--text-muted); }
.doc li { margin-bottom: 10px; }
.doc li::marker { color: var(--accent); }
.doc strong { color: var(--text); font-weight: 600; }

.callout {
  background: var(--accent-soft); border: 1px solid rgba(155, 140, 255, 0.28);
  border-radius: 12px; padding: 20px 24px; margin: 0 0 28px;
}
.callout p { margin: 0; color: var(--text); font-size: 0.95rem; }
.callout p + p { margin-top: 12px; }

.table-wrap { overflow-x: auto; margin: 0 0 28px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 32rem; }
th, td {
  text-align: left; padding: 14px 16px;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
th { color: var(--text); font-weight: 600; background: var(--bg-card); white-space: nowrap; }
td { color: var(--text-muted); }

.toc {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px 26px; margin: 0 0 40px;
}
.toc p { margin: 0 0 12px; font-weight: 600; color: var(--text); font-size: 0.9rem; }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin-bottom: 6px; font-size: 0.92rem; }

/* 手順ステップ */
.howto { list-style: none; counter-reset: howto; margin: 0 0 28px; padding: 0; }
.howto li {
  counter-increment: howto; position: relative;
  padding: 0 0 22px 52px; color: var(--text-muted);
}
.howto li::before {
  content: counter(howto); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.howto li:not(:last-child)::after {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 8px;
  width: 1px; background: var(--border);
}

/* ---------- フッター ---------- */

.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-soft);
  padding: clamp(44px, 6vw, 64px) 0 40px;
}
.footer-grid {
  display: grid; gap: 32px; grid-template-columns: 1fr;
  margin-bottom: 40px;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid h2 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 16px; font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text-muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--text); }
.footer-about p { margin: 12px 0 0; color: var(--text-muted); font-size: 0.9rem; max-width: 24rem; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 26px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: var(--text-faint); font-size: 0.84rem;
}
.footer-bottom p { margin: 0; }

/* ---------- 404 ---------- */

.center-page {
  min-height: 62vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 20px;
  padding: 80px 24px;
}
.center-page h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.center-page p { margin: 0; color: var(--text-muted); max-width: 30rem; }

/* ---------- 狭い画面のヘッダー調整 ---------- */
/* 4項目が折り返すと sticky ヘッダーが2段になって縦を圧迫するため、
   1行に収めて必要なら横スクロールさせる。 */
@media (max-width: 620px) {
  .site-header .wrap { min-height: 56px; gap: 10px; }
  .brand { font-size: 0.95rem; gap: 8px; }
  .brand svg { width: 22px; height: 22px; }
  .nav {
    flex-wrap: nowrap; gap: 0; overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 0.82rem; padding: 8px 9px; white-space: nowrap; }
}
