/* ============================================================
   MangaReel — プライバシーポリシー / デザインシステム
   方向: 「インクと紙、そして一色の赤」
         漫画の版面（黒インク × 白い紙 × 差し色の赤）をそのまま紙面に写す。
         アクセントは1色（MangaReel Red = アプリの AccentColor）。
   出典: MangaReel/Resources/Assets.xcassets/AccentColor.colorset/Contents.json
         MangaReel/Support/DesignSystem.swift（cardRadius 20 / chipRadius 12 / screenPadding 20）
   すべての色・余白・角丸はトークン経由。マジックナンバー禁止。
   ============================================================ */

:root {
  /* --- アクセント(ブランド): MangaReel Red ---
     #E8434E = AccentColor(light) / #FF5A64 = AccentColor(dark) をそのまま採用 */
  --accent:        #E8434E;   /* 基準。塗り・箇条書き・アイコン用。白地に 3.9:1 → 本文文字には使わない */
  --accent-deep:   #C62B37;   /* 文字・リンク用の沈んだ赤。on #FFF ≈ 5.5:1 */
  --accent-bright: #FF5A64;   /* dark系。ヒーロー上の装飾/ドット。on --ink ≈ 6.1:1 */
  --accent-soft:   rgba(232, 67, 78, 0.08);   /* ノート面の薄敷き */
  --accent-soft-2: rgba(232, 67, 78, 0.12);   /* チップ面(条番号) */

  /* --- インク(ヒーロー: 漫画の黒。わずかに紫を含ませて沈ませる) --- */
  --ink:        #14131A;   /* ヒーロー最暗(グラデの底) */
  --ink-2:      #24222E;   /* ヒーロー中間 */
  --ink-3:      #332F40;   /* ヒーロー上端 */

  /* --- ニュートラル(iOS grouped 準拠) --- */
  --bg:        #F2F2F7;   /* systemGroupedBackground */
  --surface:   #FFFFFF;   /* カード面(＝紙) */
  --surface-2: #F7F6F8;   /* 補助面 */
  --separator: rgba(60, 60, 67, 0.12);   /* 1px境界 */
  --hairline:  rgba(20, 19, 26, 0.10);   /* コマ枠のヘアライン */

  /* --- テキスト(コントラスト比はコメント。載る背景を明記) --- */
  --text:    #1B1B22;   /* primary.   on #FFF ≈ 15:1 / on #F2F2F7 ≈ 14:1 */
  --text-2:  #5C5C66;   /* secondary. on #FFF ≈ 6.6:1 / on --accent-soft(note面) ≈ 5.9:1 */
  --text-3:  #8A8A93;   /* tertiary.  on #FFF ≈ 3.4:1 → 24px未満は装飾/小ラベル限定 */
  --on-accent: #FFFFFF; /* on --accent ≈ 3.9:1 → 18px以上の太字のみ */
  --on-dark:   rgba(255, 255, 255, 0.92);  /* ヒーロー本文. on --ink ≈ 15.7:1 */
  --on-dark-2: rgba(255, 255, 255, 0.74);  /* ヒーロー補助. on --ink ≈ 10.4:1 */
  /* 条番号: --accent-deep on --accent-soft-2 面 ≈ 4.7:1 */

  /* --- 影(高さの体系・2段) --- */
  --shadow-1: 0 2px 10px rgba(20, 19, 26, 0.06), 0 1px 3px rgba(20, 19, 26, 0.05);
  --shadow-2: 0 24px 70px rgba(20, 19, 26, 0.18), 0 8px 24px rgba(20, 19, 26, 0.08);

  /* --- 角丸(DesignSystem.swift の DS トークンに合わせる) --- */
  --r-chip: 12px;      /* DS.chipRadius */
  --r-card: 20px;      /* DS.cardRadius */
  --r-card-lg: 24px;

  /* --- 余白(4の倍数スケール) --- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* --- フォント --- */
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
          -apple-system, "SF Pro JP", "Yu Gothic", sans-serif;

  --maxw: 720px;
}

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

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt" 1;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
  transition: color 180ms ease, opacity 180ms ease;
}
a:hover { color: var(--accent); }

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

/* ============================================================
   ヒーロー(インクの暗パネル・差し色の赤い光)
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -20%,
      var(--ink-3) 0%, var(--ink-2) 44%, var(--ink) 100%);
  color: var(--on-dark);
  padding: var(--s-6) var(--s-5) var(--s-8);
}
/* 赤い差し光（版面の一点だけ色が入る感じ） */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 32% at 86% 6%, rgba(255, 90, 100, 0.26), transparent 70%),
    radial-gradient(30% 24% at 8% 2%, rgba(255, 90, 100, 0.14), transparent 70%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* 言語切替 */
.lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-2);
  margin-bottom: var(--s-7);
  font-size: 14px;
  font-weight: 600;
}
.lang-switch a {
  color: var(--on-dark-2);
  padding: 6px 12px;
  border-radius: 999px;
}
.lang-switch a:hover { color: #fff; }
.lang-switch a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: var(--s-4);
}
.eyebrow .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent-bright);
}

.hero h1 {
  font-size: 41px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.hero .sub {
  margin-top: var(--s-3);
  font-size: 18px;
  font-weight: 500;
  color: var(--on-dark-2);
}
.hero .meta {
  margin-top: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  font-size: 14px;
  color: var(--on-dark-2);
}

/* ============================================================
   3つの約束(紙のストリップ・コマ枠のヘアラインを付けてヒーローに重ねる)
   ============================================================ */
.promises {
  max-width: var(--maxw);
  margin: calc(var(--s-7) * -1) auto 0;
  padding: 0 var(--s-5);
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.promise {
  background: var(--surface);
  border: 1px solid var(--hairline);   /* コマ枠 */
  border-radius: var(--r-card);
  box-shadow: var(--shadow-1);
  padding: var(--s-5) var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.promise__ic {
  width: 44px; height: 44px;
  border-radius: var(--r-chip);
  background: var(--accent-soft-2);
  display: flex; align-items: center; justify-content: center;
}
.promise__ic svg { width: 24px; height: 24px; color: var(--accent-deep); }
.promise h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.promise p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ============================================================
   本文
   ============================================================ */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-7) var(--s-5) var(--s-9);
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card-lg);
  box-shadow: var(--shadow-1);
  padding: var(--s-7) clamp(var(--s-5), 5vw, var(--s-7));
}

.intro {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-2);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--separator);
}

.section { padding-top: var(--s-7); }

.section h2 {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: var(--s-4);
}
.section-number {
  flex: none;
  min-width: 30px; height: 30px;
  padding: 0 9px;
  border-radius: var(--r-chip);
  background: var(--accent-soft-2);
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-1px);
  font-feature-settings: "tnum" 1;
}

.section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: var(--s-5) 0 var(--s-2);
}

.section p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-2);
  margin-bottom: var(--s-3);
}

.section ul {
  list-style: none;
  margin: var(--s-2) 0 var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.section li {
  position: relative;
  padding-left: var(--s-5);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-2);
}
/* 箇条書きの点は「コマ」に見立てた小さな角丸の四角 */
.section li::before {
  content: "";
  position: absolute;
  left: 4px; top: 0.68em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.section li strong { color: var(--text); font-weight: 600; }

/* 補足ノート(薄い赤の面) */
.note {
  margin: var(--s-4) 0 var(--s-2);
  padding: var(--s-4) var(--s-5);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-chip);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-2);   /* on --accent-soft 面 ≈ 5.9:1 */
}

/* お問い合わせカード */
.contact-card {
  margin-top: var(--s-6);
  background: var(--surface-2);
  border-radius: var(--r-card);
  padding: var(--s-6);
}
.contact-card h2 { margin-bottom: var(--s-5); }
.contact-row {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  font-size: 15px;
}
.contact-row + .contact-row { border-top: 1px solid var(--separator); }
.contact-label {
  flex: none;
  width: 92px;
  color: var(--text-3);   /* 小ラベル(15px)・補助情報のため許容 */
  font-weight: 600;
}
.contact-value { color: var(--text); line-height: 1.7; }

/* ============================================================
   フッター
   ============================================================ */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-7) var(--s-5) var(--s-8);
  text-align: center;
}
.footer .back {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 15px;
  font-weight: 600;
}
.footer .links {
  margin-top: var(--s-5);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  font-size: 14px;
}
.footer .copy {
  margin-top: var(--s-5);
  font-size: 13px;
  color: var(--text-3);   /* 装飾的なコピーライト表記 */
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: var(--s-5) var(--s-4) var(--s-8); }
  .hero h1 { font-size: 32px; }
  .promises {
    grid-template-columns: 1fr;
    padding: 0 var(--s-4);
  }
  /* アイコンを左に置き、見出しと本文は右側で縦に積む。
     flex-direction:row だと h3 と p まで横に並んで見出しが細く折れるため grid にする */
  .promise {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: var(--s-4);
    row-gap: var(--s-2);
  }
  .promise__ic { grid-row: span 2; }
  .promise h3, .promise p { grid-column: 2; }
  .container { padding: var(--s-6) var(--s-4) var(--s-8); }
  .content-card { padding: var(--s-6) var(--s-4); }
  .contact-row { flex-direction: column; gap: var(--s-1); }
  .contact-label { width: auto; }
  /* タップ領域(44px 相当)を確保 */
  .lang-switch a, .footer .links a { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
