/*
  「ペットのあの頃」Webページ共通のスタイル。
  色はアプリの AppColors（lib/app/app_theme.dart）に合わせる。
  レイアウト：1カラム・本文幅は約34em。スマホ表示を基準に、広い画面では余白だけを広げる。
*/
:root {
  --bg: #f7f5f2;          /* AppColors.homeBackground */
  --surface: #faf9f7;     /* AppColors.background */
  --fg: #252525;          /* AppColors.textPrimary */
  --fg-2: #6b6661;        /* AppColors.textSecondary */
  --fg-3: #a8a29b;        /* AppColors.textTertiary */
  --accent: #94634a;      /* AppColors.accent */
  --accent-soft: rgba(148, 99, 74, 0.1);
  --hairline: #e3ded7;    /* AppColors.hairline */
  --placeholder: #efebe5; /* AppColors.placeholder */

  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --measure: 34rem;
  --gutter: 24px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a18;
    --surface: #242120;
    --fg: #ede9e4;
    --fg-2: #b3aca4;
    --fg-3: #847d76;
    --accent: #d09a7c;
    --accent-soft: rgba(208, 154, 124, 0.14);
    --hairline: #38332f;
    --placeholder: #2c2826;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

.wrap {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ヘッダー：アプリの Welcome と同じ「細い線 + 字間を空けた名前」 */
.site-header {
  padding-block: 28px 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.wordmark::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--accent);
}

main {
  padding-block: 40px 72px;
}

h1,
h2,
h3 {
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  font-weight: 400;
}

h2 {
  font-size: 20px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

h3 {
  font-size: 16px;
  line-height: 1.7;
}

p {
  margin: 0;
}

.lead {
  color: var(--fg-2);
  font-size: 15px;
}

.muted {
  color: var(--fg-2);
}

.small {
  font-size: 13px;
  color: var(--fg-2);
}

.section {
  display: grid;
  gap: 18px;
  padding-block: 44px;
  border-top: 1px solid var(--hairline);
}

.section:first-child {
  border-top: 0;
  padding-top: 0;
}

.stack {
  display: grid;
  gap: 14px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
}

/* 箇条書き：小さな丸の印 */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.list li {
  position: relative;
  padding-left: 20px;
}

.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.8em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* 手順：順番に意味があるので番号を付ける */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
}

.steps li::before {
  content: counter(step);
  width: 24px;
  height: 24px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.path {
  white-space: nowrap;
  color: var(--fg);
  font-weight: 500;
}

/* 区切りの細い線と小さな印でつなぐ、アプリの時間軸のモチーフ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  bottom: 15px;
  width: 1px;
  background: var(--hairline);
}

.timeline li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 30px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
}

.timeline li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline li:nth-child(2) { opacity: 0.85; }
.timeline li:nth-child(3) { opacity: 0.7; }
.timeline li:nth-child(4) { opacity: 0.55; }
.timeline li:nth-child(5) { opacity: 0.42; }

/* FAQ：details を使い、JavaScript なしで開閉する */
.faq {
  display: grid;
  border-top: 1px solid var(--hairline);
}

.faq details {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  gap: 16px;
  align-items: center;
  padding-block: 18px;
  font-weight: 500;
  line-height: 1.7;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 8px;
  height: 8px;
  justify-self: center;
  border-right: 1.5px solid var(--fg-3);
  border-bottom: 1.5px solid var(--fg-3);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.faq summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.faq .answer {
  display: grid;
  gap: 12px;
  padding-bottom: 22px;
  color: var(--fg-2);
  font-size: 15px;
}

.faq .answer strong {
  color: var(--fg);
  font-weight: 500;
}

/* 注意・補足の囲み（1ページに少しだけ使う） */
.note {
  padding: 16px 18px;
  background: var(--placeholder);
  border-radius: 10px;
  font-size: 14px;
  color: var(--fg-2);
  display: grid;
  gap: 8px;
}

.contact {
  display: grid;
  gap: 6px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
}

.contact .address {
  font-size: 17px;
  font-weight: 500;
  color: var(--fg);
  overflow-wrap: anywhere;
  user-select: all;
}

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 28px 40px;
  font-size: 13px;
  color: var(--fg-2);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 14px;
}

.site-footer a {
  color: var(--fg-2);
}

/* ===== Marketing ===== */
.hero {
  display: grid;
  gap: 26px;
  padding-bottom: 52px;
}

.hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  border: 1px solid var(--hairline);
}

.hero h1 {
  font-size: 30px;
  line-height: 1.6;
}

.app-name {
  display: grid;
  gap: 2px;
}

.app-name strong {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.app-name span {
  font-size: 13px;
  color: var(--fg-2);
  letter-spacing: 0.06em;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta li {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.features {
  display: grid;
  gap: 28px;
}

.feature {
  display: grid;
  gap: 8px;
}

.animals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.animals li {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--fg-2);
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }

  main {
    padding-block: 64px 96px;
  }

  h1 {
    font-size: 30px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .section {
    padding-block: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after {
    transition: none;
  }
}
