/* ============================================================
   Petatto.md — 紹介サイト
   ブランドカラーは実アプリ（src/styles/tokens.css / db.rs）と一致
   ============================================================ */

:root {
  /* Primary（アプリ メインウィンドウと同値） */
  --c-primary: #4ea18d;
  --c-primary-600: #3e8f9d;
  --c-primary-700: #2f6f7d;
  --c-heading: #24486a;

  /* 付箋カラー（アクセント用） */
  --s-honey: #f4dba0;
  --s-strawberry: #ecb6bd;
  --s-soda: #badaff;
  --s-pistachio: #c5e1b5;
  --s-lemon: #fac800;
  --s-cherry: #e04d75;
  --s-ocean: #2b82f6;
  --s-lime: #22c55e;

  /* Neutral */
  --c-bg: #fbfaf6;
  --c-bg-alt: #f3f6f4;
  --c-surface: #ffffff;
  --c-border: #e6e2d6;
  --c-text: #2a2f3a;
  --c-text-soft: #5a6577;
  --c-text-mute: #8b95a5;

  --font: "Meiryo", "メイリオ", "Yu Gothic UI", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 3px rgba(26, 35, 50, 0.06);
  --shadow-md: 0 6px 20px rgba(26, 35, 50, 0.09);
  --shadow-lg: 0 24px 60px rgba(26, 35, 50, 0.16);
  --maxw: 1120px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 78px; }

body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--font-mono); }

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

/* ───────── Buttons ───────── */
.btn {
  --btn-bg: var(--c-primary);
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--c-primary); color: #fff;
  box-shadow: 0 6px 16px rgba(78, 161, 141, 0.35);
}
.btn-primary:hover { background: var(--c-primary-600); box-shadow: 0 10px 24px rgba(78, 161, 141, 0.42); transform: translateY(-1px); }
.btn-ghost {
  background: var(--c-surface); color: var(--c-heading); border-color: var(--c-border);
}
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary-700); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-xl { padding: 17px 38px; font-size: 18px; }

/* ───────── Header ───────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 250, 246, 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  width: 28px; height: 28px; display: block;
  filter: drop-shadow(0 1px 1.5px rgba(26, 35, 50, 0.18));
  transform: rotate(-4deg);
}
.brand-name { font-size: 19px; color: var(--c-heading); letter-spacing: -0.01em; }
.brand-dot { color: var(--c-primary); }
.nav { display: flex; gap: 26px; margin-left: 8px; flex: 1; }
.nav a { font-size: 14.5px; font-weight: 600; color: var(--c-text-soft); transition: color .15s; }
.nav a:hover { color: var(--c-primary-700); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-toggle { display: inline-flex; border: 1.5px solid var(--c-border); border-radius: 999px; overflow: hidden; background: var(--c-surface); }
.lang-toggle button {
  font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--c-text-mute);
  padding: 6px 12px; border: 0; background: transparent; cursor: pointer; transition: all .15s;
}
.lang-toggle button.is-active { background: var(--c-primary); color: #fff; }

/* ───────── Hero ───────── */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 56px;
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(186, 218, 255, 0.45), transparent 60%),
    radial-gradient(760px 420px at 6% 18%, rgba(244, 219, 160, 0.40), transparent 58%),
    radial-gradient(600px 500px at 60% 110%, rgba(197, 225, 181, 0.40), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  color: var(--c-primary-700); background: rgba(78, 161, 141, 0.12);
  padding: 5px 13px; border-radius: 999px; margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.1rem, 4.4vw, 3.35rem); line-height: 1.18; font-weight: 800;
  color: var(--c-heading); letter-spacing: -0.02em; margin-bottom: 18px;
}
.hero-title .nowrap { white-space: nowrap; }
.hero-title .word-petatto { font-style: italic; white-space: nowrap; }
.hero-title .hl {
  background: linear-gradient(transparent 62%, var(--s-honey) 62%);
  padding: 0 2px; border-radius: 2px;
}
.hero-sub { font-size: 17px; color: var(--c-text-soft); max-width: 30em; margin-bottom: 28px; }
.hero-sub strong { color: var(--c-text); }
.hero-sub .soon {
  display: block; width: fit-content; margin-top: 14px;
  font-size: 13.5px; font-weight: 700; color: var(--c-primary-700);
  background: rgba(78, 161, 141, 0.12); padding: 5px 14px; border-radius: 999px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.hero-meta { font-size: 13.5px; color: var(--c-text-mute); font-weight: 600; }
.hero-media img {
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
  background: #fff;
  /* ページを開いた瞬間に付箋がぽこっと現れる（スプリング overshoot） */
  animation: pop-in 0.72s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transform-origin: 60% 80%;
}
@keyframes pop-in {
  0%   { opacity: 0; transform: scale(0.55) rotate(-5deg); }
  55%  { opacity: 1; transform: scale(1.05) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(1deg); }
}

/* trust strip */
.trust {
  display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: center;
  list-style: none; margin-top: 52px; padding-top: 26px;
  border-top: 1px dashed var(--c-border);
}
.trust li { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; color: var(--c-text-soft); }
.trust-ic { font-size: 18px; }

/* ───────── Generic section ───────── */
.section { padding: 84px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; color: var(--c-heading);
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.section-head p { font-size: 16.5px; color: var(--c-text-soft); }

/* ───────── Features ───────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 26px 24px 24px; box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent, var(--c-primary));
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.card-ic {
  width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center;
  font-size: 25px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent) 24%, #fff);
}
.card h3 { font-size: 17.5px; color: var(--c-heading); margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--c-text-soft); }
.card code { background: var(--c-bg-alt); padding: 1px 5px; border-radius: 4px; font-size: .92em; color: var(--c-primary-700); }

/* ───────── Screenshots ───────── */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.shot {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.shot:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.shot-wide { grid-column: span 2; }
.shot img { border-radius: var(--radius-sm); margin: 0 auto; }
.shot figcaption { text-align: center; font-size: 13.5px; color: var(--c-text-mute); font-weight: 600; margin-top: 14px; }

/* ───────── Steps ───────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; list-style: none; margin-bottom: 44px; }
.step {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 28px 24px; text-align: left;
}
.step-n {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  font-size: 19px; font-weight: 800; color: #fff; background: var(--c-primary);
  margin-bottom: 16px; box-shadow: 0 5px 12px rgba(78, 161, 141, 0.35);
}
.step h3 { font-size: 17.5px; color: var(--c-heading); margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--c-text-soft); }
.step code { background: var(--c-bg-alt); padding: 1px 5px; border-radius: 4px; font-size: .9em; color: var(--c-primary-700); }

/* code card */
.code-card {
  max-width: 560px; margin: 0 auto; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--c-border); box-shadow: var(--shadow-md); background: #1e2530;
}
.code-head {
  font-family: var(--font-mono); font-size: 13px; color: #aeb6c2;
  padding: 10px 18px; background: #161c25; border-bottom: 1px solid #2a3340;
}
.code-card pre { margin: 0; padding: 20px 22px; overflow-x: auto; }
.code-card code { font-size: 13.5px; line-height: 1.85; color: #d7dde6; white-space: pre; }

/* ───────── Markdown support ───────── */
.md-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.md-grid h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; color: var(--c-heading); margin-bottom: 14px; letter-spacing: -0.02em; }
.md-lead { font-size: 16px; color: var(--c-text-soft); }
.md-list { list-style: none; display: grid; gap: 12px; }
.md-list li {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 13px 18px 13px 44px; font-size: 15px; font-weight: 600; color: var(--c-text); position: relative;
}
.md-list li::before {
  content: "✓"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--c-primary); font-weight: 800;
}

/* ───────── Download ───────── */
.section-download {
  background:
    radial-gradient(700px 360px at 50% -10%, rgba(78, 161, 141, 0.12), transparent 60%),
    var(--c-bg);
}
.dl-cta { text-align: center; margin-bottom: 44px; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin: 0 auto; }
.dl-box {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.dl-box h3 { font-size: 16.5px; color: var(--c-heading); margin-bottom: 14px; }
.dl-box ul { list-style: none; display: grid; gap: 10px; }
.dl-box li { font-size: 14.5px; color: var(--c-text-soft); padding-left: 20px; position: relative; }
.dl-box li::before { content: "•"; position: absolute; left: 4px; color: var(--c-primary); font-weight: 800; }
.dl-note { border-color: #f0d9a8; background: #fffaf0; }
.dl-note p { font-size: 14px; color: var(--c-text-soft); margin-bottom: 14px; }
.dl-note img { border-radius: var(--radius-sm); border: 1px solid var(--c-border); }

/* ───────── FAQ ───────── */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 4px 20px; transition: border-color .15s;
}
.faq details[open] { border-color: var(--c-primary); }
.faq summary {
  font-weight: 700; font-size: 15.5px; color: var(--c-heading); cursor: pointer;
  padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--c-primary); font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { font-size: 14.5px; color: var(--c-text-soft); padding: 0 0 16px; }
.faq details p a {
  color: var(--c-primary-700); font-weight: 700;
  text-decoration: underline; text-underline-offset: 2px;
}
.faq details p a:hover { color: var(--c-primary); }
.faq code { background: var(--c-bg-alt); padding: 1px 5px; border-radius: 4px; font-size: .92em; color: var(--c-primary-700); }

/* ───────── Footer ───────── */
.site-footer { background: #1e2530; color: #c4ccd6; padding: 48px 0 28px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid #2c3542; }
.footer-brand .brand-name { font-size: 20px; color: #fff; }
.footer-brand .brand-dot { color: var(--s-honey); }
.footer-brand p { font-size: 13.5px; color: #8b95a5; margin-top: 6px; }
.footer-right { display: flex; flex-direction: column; gap: 18px; align-items: flex-end; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.footer-links a { font-size: 14px; font-weight: 600; color: #c4ccd6; transition: color .15s; }
.footer-links a:hover { color: var(--s-honey); }

.footer-support { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.support-label { font-size: 12.5px; font-weight: 700; color: #8b95a5; }
.support-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.support-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; padding: 8px 16px; border-radius: 999px;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), filter .15s var(--ease);
}
.support-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28); }
.support-btn.sponsor { background: #ea4aaa; color: #fff; }
.support-btn.bmc { background: #ffdd00; color: #000; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; font-size: 12.5px; color: #7c8696; }

/* ───────── Responsive ───────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-media { order: -1; }
  .hero-media img { max-width: 560px; margin: 0 auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .md-grid { grid-template-columns: 1fr; gap: 24px; }
  .dl-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 600px) {
  .section { padding: 60px 0; }
  .hero { padding: 48px 0 40px; }
  /* スマホ幅では画像の幅上限を画面幅に合わせる。
     560px のままだとグリッド列ごと膨らみ、見出し・ボタンまで画面外へはみ出して切れる */
  .hero-media img { max-width: 100%; }
  /* 長いダウンロードボタンを折り返し可にして横スクロールの発生を防ぐ */
  .btn-xl { white-space: normal; }
  .cards, .shots { grid-template-columns: 1fr; }
  .shot-wide { grid-column: auto; }
  .header-actions .btn-ghost { display: none; }
  .container { padding: 0 18px; }
  .footer-inner { flex-direction: column; gap: 20px; }
  .footer-right { align-items: flex-start; }
  .footer-links { justify-content: flex-start; }
  .footer-support { align-items: flex-start; }
  .support-btns { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .hero-media img { opacity: 1; transform: rotate(1deg); }
}
