/* =====================================================
   cocoiru（ココイル）製品サイト — 共通スタイル
   デザイントークンは LP（lp.cocoiru.net）から継承している。
   ⚠ 色・角丸・影を足すときは、まずここの変数を見ること。
      LP と値がずれるとブランドが割れる。
   ===================================================== */

:root {
  /* base / night */
  --bg:            #0a0b12;
  --bg-2:          #0d0e18;
  --bg-3:          #11131f;
  --surface:       #161829;
  --surface-2:     #1c1e30;
  --border:        rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);

  /* text */
  --text:          #eceef7;
  --text-soft:     #b9bcd0;
  --text-muted:    #83869e;
  --text-faint:    #5c5f76;

  /* accents */
  --iris:          #7b7ce8;   /* periwinkle purple (main) */
  --iris-soft:     #9a9bf0;
  --iris-deep:     #5f60d6;
  --coral:         #f0a6ad;   /* heart / warmth */
  --coral-soft:    #f6c2c6;
  --amber:         #f5b04e;   /* logo dot */
  --sky:           #7fb8e8;   /* calm days */

  --radius:        22px;
  --radius-lg:     30px;
  --radius-sm:     14px;
  --maxw:          1140px;
  --maxw-narrow:   760px;   /* 法務・FAQ など読み物ページ */

  --shadow-soft:   0 20px 60px -24px rgba(0, 0, 0, 0.7);
  --shadow-glow:   0 0 80px -20px rgba(123, 124, 232, 0.45);

  --ease:          cubic-bezier(0.22, 0.61, 0.36, 1);

  --nav-h:         66px;
}

/* ---------- reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* ヘッダーが追従するので、アンカー着地が隠れないようにする */
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont,
               "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  font-weight: 400;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* subtle full-page night gradient + aurora glows（LP と同一） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1000px 600px at 15% -5%, rgba(123, 124, 232, 0.18), transparent 60%),
    radial-gradient(900px 640px at 95% 8%, rgba(240, 166, 173, 0.10), transparent 55%),
    radial-gradient(1200px 800px at 50% 110%, rgba(95, 96, 214, 0.14), transparent 60%),
    linear-gradient(180deg, #0a0b12 0%, #0b0c16 40%, #090a11 100%);
}

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

:focus-visible {
  outline: 2px solid var(--iris-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 内部リンクをキーボードで飛ばせるようにする */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  font-weight: 500;
  color: var(--iris-soft);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--iris));
}
.eyebrow.center { justify-content: center; display: flex; }

.grad-text {
  background: linear-gradient(120deg, var(--iris-soft) 0%, var(--coral-soft) 60%, var(--amber) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hl {
  color: var(--text);
  background: linear-gradient(180deg, transparent 62%, rgba(123, 124, 232, 0.28) 62%);
  padding: 0 2px;
}

/* ---------- header ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 11, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: 0.06em;
}
.logo .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px 2px rgba(245, 176, 78, 0.55);
  align-self: center;
}
.logo .sub {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0.14em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.nav-links a { transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--iris-soft); }

.nav-cta {
  flex: none;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  background: linear-gradient(120deg, var(--iris-deep), var(--iris));
  box-shadow: 0 8px 26px -12px rgba(123, 124, 232, 0.9);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -12px rgba(123, 124, 232, 1);
}

/* モバイル：ナビのリンク群は畳んで CTA だけ残す */
.nav-toggle {
  display: none;
  flex: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 16px; height: 1.5px;
  background: currentColor;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px; height: 1.5px;
  background: currentColor;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
  background: linear-gradient(120deg, var(--iris-deep), var(--iris));
  box-shadow: 0 14px 40px -16px rgba(123, 124, 232, 0.95);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  border: 0;
  color: var(--text);
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 46px -16px rgba(123, 124, 232, 1); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.btn-outline:hover {
  border-color: var(--iris);
  color: var(--text);
  background: rgba(123, 124, 232, 0.1);
}
.btn-outline .arrow,
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn-outline:hover .arrow,
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- sections ---------- */
.section { padding: 108px 0; }
.section-head { text-align: center; max-width: 780px; margin: 0 auto 64px; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  line-height: 1.55;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}
.section-head p { color: var(--text-soft); font-size: 1rem; }

/* ページ上部の見出し（下層ページ共通） */
.page-head {
  padding: calc(var(--nav-h) + 84px) 0 60px;
  text-align: center;
}
.page-head h1 {
  font-size: clamp(1.75rem, 4.2vw, 2.7rem);
  line-height: 1.5;
  font-weight: 700;
  margin-bottom: 22px;
}
.page-head .lead {
  color: var(--text-soft);
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.02rem;
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- notice（注意書き・相談窓口など） ---------- */
.notice {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--iris);
  border-radius: var(--radius-sm);
  background: rgba(123, 124, 232, 0.07);
  padding: 22px 26px;
  color: var(--text-soft);
  font-size: 0.94rem;
}
.notice strong { color: var(--text); }
.notice.warm {
  border-left-color: var(--coral);
  background: rgba(240, 166, 173, 0.07);
}

/* ---------- 法務・読み物ページ ---------- */
.legal { padding: calc(var(--nav-h) + 72px) 0 96px; }
.legal-inner { max-width: var(--maxw-narrow); }
.legal h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  line-height: 1.5;
  margin-bottom: 16px;
}
.legal .updated {
  color: var(--text-faint);
  font-size: 0.86rem;
  margin-bottom: 34px;
}
.legal .intro {
  color: var(--text-soft);
  padding-bottom: 34px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.legal section { margin-top: 46px; }
.legal h2 {
  font-size: 1.16rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-left: 14px;
  border-left: 3px solid var(--iris);
  line-height: 1.6;
}
.legal h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--iris-soft);
  margin: 28px 0 12px;
}
.legal p { color: var(--text-soft); margin-bottom: 16px; font-size: 0.96rem; }
.legal ul, .legal ol { color: var(--text-soft); margin: 0 0 18px 1.3em; font-size: 0.96rem; }
.legal li { margin-bottom: 9px; }
.legal strong { color: var(--text); font-weight: 500; }
.legal a { color: var(--iris-soft); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--coral-soft); }

/* 法務ページの表（特商法・プラン一覧など） */
.legal-table { width: 100%; margin: 6px 0 22px; border-collapse: collapse; font-size: 0.93rem; }
.legal-table th,
.legal-table td {
  border: 1px solid var(--border);
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  color: var(--text-soft);
}
.legal-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 500;
  width: 32%;
  white-space: nowrap;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ⚠ 公開前に値を差し替える箇所。目立たせて置き忘れを防ぐ。 */
.todo {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(245, 176, 78, 0.16);
  border: 1px dashed var(--amber);
  color: var(--amber);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  background: rgba(6, 7, 12, 0.6);
  padding: 62px 0 46px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 48px;
}
.footer-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 16px;
  line-height: 1.9;
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 32px;
}
.footer-nav h3 {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 12px;
}
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a {
  color: var(--text-soft);
  font-size: 0.9rem;
  transition: color 0.2s var(--ease);
}
.footer-nav a:hover { color: var(--iris-soft); }

.footer-meta {
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.79rem;
  line-height: 1.85;
}
.footer-meta p { margin-bottom: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .section { padding: 84px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  body { line-height: 1.85; }
  .wrap, .wrap-narrow { padding: 0 20px; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 20px 18px;
    background: rgba(10, 11, 18, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 13px 4px;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: inline-flex; order: 3; }
  .nav-cta { order: 2; padding: 8px 14px; font-size: 0.8rem; white-space: nowrap; }
  /* ロゴ・CTA・ハンバーガーを1行に収めるため、読みがなは畳む */
  .logo { font-size: 1.05rem; }
  .logo .sub { display: none; }
  .page-head { padding: calc(var(--nav-h) + 56px) 0 44px; }
  .legal { padding: calc(var(--nav-h) + 48px) 0 72px; }
  .legal-table th { white-space: normal; width: 38%; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
}

/* ---------- 公開前 / 公開後の出し分け ----------
   analytics.js が <html> に .is-prerelease / .is-released を付ける。
   ⚠ 既定（クラスが付かない＝JSが動かない環境）では「先行登録」側だけが出る。
      リンク先の無いストアバッジを見せるより、フォームが残るほうが安全。 */
[data-when="released"] { display: none; }
.is-released [data-when="released"] { display: revert; }
.is-released [data-when="pre-release"] { display: none; }

/* リンク先が未設定のストアバッジは押せない見た目にする */
[data-store][aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
