/* Layout: 夜空の帯（はなびのこびとの世界）がフォームを抱え、精霊がフォームの縁からのぞく。
   その下の昼の地に、アプリが親の代わりにやることを1列で並べ、最後にもらえるカードを見せる。
   外部の読み込みはしない（書体は同梱。プライバシーポリシーの記載どおり） */

@font-face {
  font-family: "M PLUS Rounded 1c";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/mplusrounded1c-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "M PLUS Rounded 1c";
  font-weight: 800;
  font-display: swap;
  src: url("fonts/mplusrounded1c-800-latin.woff2") format("woff2");
}

:root {
  --ground: #eeedf5;
  --surface: #ffffff;
  --ink: #22214a;
  --ink-soft: #5c5a80;
  --line: #dad8ea;
  --night: #26245e;
  --night-deep: #1b1a47;
  --on-night: #f3f1ff;
  --flame: #f07a2a;
  --flame-ink: #b9500f;
  --flame-soft: #fde9da;
  --spark: #ffd27a;

  --display: "M PLUS Rounded 1c", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #15143a;
    --surface: #211f52;
    --ink: #eeecfb;
    --ink-soft: #b3b0d6;
    --line: #35336d;
    --night: #0f0e2c;
    --night-deep: #0a0920;
    --on-night: #f3f1ff;
    --flame: #ff8a3d;
    --flame-ink: #ffa066;
    --flame-soft: #3b2440;
    --spark: #ffd27a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; }

.wrap {
  max-width: 600px;
  margin-inline: auto;
  padding-inline: 16px;
}

h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
  margin: 0;
}

a { color: var(--flame-ink); }
a:focus-visible { outline: 3px solid var(--flame); outline-offset: 2px; border-radius: 4px; }

/* ── 夜空の帯 ── */
.sky {
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, var(--spark) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 64%, var(--on-night) 50%, transparent 51%),
    radial-gradient(2px 2px at 47% 14%, var(--spark) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 40%, var(--on-night) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 18%, var(--on-night) 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 58%, var(--spark) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 78%, var(--on-night) 50%, transparent 51%),
    linear-gradient(180deg, var(--night-deep), var(--night) 70%);
  color: var(--on-night);
  padding-block: 32px 40px;
}

.sky .eyebrow {
  margin: 0 0 6px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.sky h1 {
  font-size: clamp(1.7rem, 6vw, 2.2rem);
  margin-bottom: 56px;
}

.form-card {
  position: relative;
  background: var(--surface);
  color: var(--ink);
  border-radius: 20px;
  padding: 28px 20px 20px;
  box-shadow: 0 18px 40px rgb(10 9 32 / 0.35);
}

/* 精霊がフォームの縁からのぞく */
.form-card .peek {
  position: absolute;
  right: 18px;
  top: -64px;
  width: 78px;
  height: auto;
  filter: drop-shadow(0 6px 10px rgb(10 9 32 / 0.35));
}

.form-card p { margin: 0 0 14px; }

.form-card .lead {
  font-weight: 600;
  padding-right: 64px;
}

.small {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ── 登録フォーム（Brevo へ直接送る） ── */
.signup-form {
  display: grid;
  gap: 12px;
  margin: 4px 0 16px;
}

.field-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.field {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 13px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--ground);
  color: var(--ink);
}

.field:focus-visible {
  outline: none;
  border-color: var(--flame);
  box-shadow: 0 0 0 3px var(--flame-soft);
}

.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-soft);
  cursor: pointer;
}

.consent input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--flame);
}

.submit {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 15px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--flame);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--flame-ink);
  text-wrap: balance;
  transition: transform 80ms ease, box-shadow 80ms ease;
}

.submit:hover { filter: brightness(1.05); }
.submit:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--flame-ink); }
.submit:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.form-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.form-status--error { color: var(--flame-ink); font-weight: 600; }
.submit:disabled { opacity: 0.6; cursor: progress; }

/* ロボット対策の欄（人には見せない。Brevo の email_address_check） */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ── ベネフィット ── */
.benefits-section { padding-block: 40px 8px; }

.benefits-section h2 {
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.benefits li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
}

.benefits .ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--flame-soft);
  color: var(--flame-ink);
  display: grid;
  place-items: center;
}

.benefits .ico svg { width: 24px; height: 24px; }

.benefits strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 2px;
}

.benefits p { margin: 0; color: var(--ink-soft); min-width: 0; }

/* ── もらえるカード ── */
.cards {
  margin: 36px 0 0;
  text-align: center;
}

.fan {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.fan > * {
  width: min(30%, 150px);
  margin-inline: -10px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgb(20 18 60 / 0.25);
}

.fan > img { height: auto; }

.fan > :nth-child(1) { transform: rotate(-8deg) translateY(10px); }
.fan > :nth-child(2) { transform: translateY(-4px); position: relative; z-index: 1; }
.fan > :nth-child(3) { transform: rotate(8deg) translateY(10px); }

/* フランス語版：カードの文字（ドイツ語）を見せず、絵の部分だけを切り出す */
.art {
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 22px;
  background-repeat: no-repeat;
  border: 3px solid var(--surface);
}
.art-n1 { background-image: url("img/card-n1.webp"); background-size: 140%; background-position: 50% 43%; }
.art-r1 { background-image: url("img/card-r1.webp"); background-size: 134.6%; background-position: 50% 45%; }
.art-r6 { background-image: url("img/card-r6.webp"); background-size: 152%; background-position: 50% 43%; }

.cards figcaption {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.facts {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.facts li {
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
}

/* ── 共通（サブページ・フッター） ── */
.page { padding-block: 40px 56px; }
.page h1 { font-size: 1.8rem; margin-bottom: 16px; }
.page h2 { font-size: 1.15rem; margin: 32px 0 10px; }
.page p { margin: 0 0 14px; }
.page .lead { font-size: 1.1rem; color: var(--ink-soft); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-block: 16px 40px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

footer a { color: var(--ink-soft); }

address { font-style: normal; }

@media (prefers-reduced-motion: no-preference) {
  .form-card .peek { animation: peek 700ms ease-out both; }
  @keyframes peek {
    from { transform: translateY(18px); }
    to { transform: translateY(0); }
  }
}
