/* ==========================================================================
   子育てまっぷ愛知「素材提供募集LP」
   ========================================================================== */

:root {
  /* Colors — 元チラシのグリーン/イエロー/クリームを基準に調整 */
  --color-primary: #2f9c46;
  --color-primary-dark: #1f7a34;
  --color-primary-light: #eaf6ea;
  --color-accent: #fdd000;
  --color-accent-dark: #caa100;
  --color-bg: #fffdf6;
  --color-surface: #ffffff;
  --color-text: #3a2415;
  --color-muted: #6f6a64;
  --color-border: #ecdfc4;
  --color-highlight: #e95377;
  --color-tint: #f6f7dd;

  /* Typography
     初期表示はシステムフォントとし、Webフォントの読み込み完了後（document.fonts.ready）に
     script.js が <html> へ .fonts-loaded を付与してから切り替える。
     これはフォント読み込み中の再描画タイミングにより一部の行が正しく再描画されない
     ブラウザ側の不具合を避けるための対応（見た目のみで、掲載内容には影響しない）。 */
  --font-jp: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  --font-en: 'Helvetica Neue', Arial, sans-serif;
  --font-display: var(--font-jp);

  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-hero: clamp(30px, 8vw, 48px);

  /* Layout */
  --container-max: 1120px;
  --container-narrow: 760px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;

  --radius-card: 18px;
  --radius-btn: 12px;

  --shadow-card: 0 6px 20px rgba(58, 36, 21, 0.08);
}

.fonts-loaded {
  --font-jp: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  --font-en: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-display: var(--font-jp);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-jp);
  font-weight: 400;
  line-height: 1.8;
  font-size: var(--text-base);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  font: inherit;
}

.sp-only {
  display: none;
}

@media (max-width: 767px) {
  .sp-only {
    display: inline;
  }
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.container.narrow {
  max-width: var(--container-narrow);
}

section {
  padding: var(--space-8) 0;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-align: center;
  margin-bottom: var(--space-4);
}

.accent-mark {
  color: var(--color-highlight);
}

/* focus-visible */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: stretch;
}

.cta-group.center {
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: var(--text-base);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 156, 70, 0.32);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn-lg {
  font-size: var(--text-lg);
  padding: 16px 32px;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
}

.btn-ghost:hover {
  background: var(--color-primary-light);
}

@media (min-width: 560px) {
  .cta-group {
    flex-direction: row;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

.site-logo img {
  height: clamp(16px, 5.5vw, 22px);
  width: auto;
  max-width: 100%;
}

.btn-contact {
  background: var(--color-text);
  color: #fff;
  min-height: 40px;
  padding: 8px 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-contact:hover {
  background: #2a180d;
}

@media (min-width: 768px) {
  .site-header {
    padding: 16px 0;
  }
  .site-logo img {
    height: 30px;
  }
  .btn-contact {
    min-height: 44px;
    padding: 10px 24px;
    font-size: var(--text-sm);
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  background: var(--color-bg);
  padding: 0;
}

.hero-visual {
  position: relative;
}

.hero-catchcopy {
  position: absolute;
  left: 6%;
  top: 4%;
  width: clamp(140px, 46%, 220px);
  height: auto;
  z-index: 1;
}

.hero-copy {
  position: absolute;
  left: 6%;
  top: 9%;
  width: 88%;
  z-index: 1;
}

.hero-photo {
  position: relative;
  z-index: 0;
}

.hero-photo picture,
.hero-photo > picture img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-badge {
  position: absolute;
  right: 4%;
  bottom: 4%;
  width: clamp(100px, 26vw, 150px);
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 4px 10px rgba(58, 36, 21, 0.2));
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 6.2vw, 28px);
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-2);
}

.hero-title .accent-mark {
  color: var(--color-primary);
}

.hero-lead {
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.85;
}

@media (min-width: 768px) {
  .hero-badge {
    width: clamp(140px, 12vw, 190px);
    right: 6%;
    bottom: 6%;
  }
}

.hero-actions-wrap {
  background: var(--color-primary);
  padding: var(--space-3) 0;
}

.hero-actions {
  justify-content: center;
}

.hero-actions .btn-primary {
  background: var(--color-accent);
  color: var(--color-text);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.hero-actions .btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
}

.hero-actions .btn-ghost {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border-color: var(--color-surface);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.hero-actions .btn-ghost:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .hero-catchcopy {
    position: absolute;
    left: 5%;
    top: 9%;
    width: clamp(200px, 24%, 340px);
    margin: 0;
  }

  .hero-copy {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(280px, 42vw, 560px);
    padding: 0;
  }

  .hero-copy .hero-title {
    font-size: clamp(24px, 3.4vw, 46px);
  }

  .hero-copy .hero-lead {
    font-size: clamp(13px, 1.4vw, 16px);
    line-height: 1.75;
  }

  .hero-actions-wrap {
    padding: var(--space-4) 0;
  }
}

/* --------------------------------------------------------------------------
   Benefits
   -------------------------------------------------------------------------- */

.benefits {
  background: var(--color-surface);
}

.benefits h2 .accent-mark {
  font-size: 1.5em;
  font-weight: 800;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6) var(--space-3);
}

.card {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.card-icon img {
  width: auto;
  height: auto;
  max-width: 44px;
  max-height: 44px;
}

.card-body {
  background: var(--color-tint);
  border-radius: var(--radius-card);
  padding: 84px var(--space-3) var(--space-3);
  margin-top: -60px;
  flex: 1;
}

.card h3 {
  color: var(--color-primary);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: 1.5;
}

.card p {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.75;
}

@media (min-width: 768px) {
  .card-grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Flow / Steps
   -------------------------------------------------------------------------- */

.flow {
  background: var(--color-primary-light);
}

.flow .note {
  margin-top: var(--space-3);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.steps li {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-4) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-label {
  color: var(--color-primary);
  font-family: var(--font-en);
  font-weight: 700;
  font-size: var(--text-xl);
  letter-spacing: 0.03em;
  margin-bottom: var(--space-2);
}

.step-icon {
  width: 120px;
  height: auto;
  margin-bottom: var(--space-2);
}

.steps h3 {
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .steps {
    flex-direction: row;
  }
  .steps li {
    flex: 1;
  }
}

/* --------------------------------------------------------------------------
   Materials
   -------------------------------------------------------------------------- */

.materials {
  background: var(--color-surface);
}

.material-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.material-item {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.material-item img {
  width: 100%;
  aspect-ratio: 612 / 379;
  object-fit: cover;
  display: block;
}

.material-body {
  padding: var(--space-3);
}

.material-item h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.5;
}

.material-item p {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.75;
}

.note {
  text-align: center;
  color: var(--color-muted);
  font-size: var(--text-sm);
  max-width: var(--container-narrow);
  margin: 0 auto;
  line-height: 1.8;
}

@media (min-width: 768px) {
  .material-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Showcase
   -------------------------------------------------------------------------- */

.showcase {
  background: var(--color-primary-light);
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}

.showcase-text h2 {
  text-align: left;
  margin-bottom: var(--space-2);
}

.showcase-text .lead {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-primary-dark);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.showcase-text p {
  color: var(--color-muted);
  line-height: 1.85;
  margin-bottom: var(--space-2);
}

.showcase-text .note {
  text-align: left;
  font-size: var(--text-sm);
  margin-top: var(--space-2);
  margin-bottom: 0;
}

.showcase-media img {
  border-radius: var(--radius-card);
  margin: 0 auto;
}

@media (min-width: 900px) {
  .showcase-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   Media partner
   -------------------------------------------------------------------------- */

.media-partner {
  background: var(--color-surface);
}

.media-partner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}

.media-partner-media {
  position: relative;
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0;
  order: 2;
}

.media-partner-text {
  order: 1;
}


.media-partner-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
}

.media-partner-text h2 {
  text-align: left;
}

.media-partner-text p.media-partner-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: var(--text-base);
  padding: 0.5em 1.3em;
  border-radius: 999px;
  margin: var(--space-3) 0;
}

.media-partner-text p {
  color: var(--color-muted);
  line-height: 1.85;
}

@media (min-width: 900px) {
  .media-partner-grid {
    grid-template-columns: 1fr 1.3fr;
  }

  .media-partner-media,
  .media-partner-text {
    order: 0;
  }
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq {
  background: var(--color-bg);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}

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

.faq-question::marker {
  content: "";
}

.faq-question:focus-visible {
  outline: 3px solid var(--color-accent-dark);
  outline-offset: -3px;
  border-radius: 4px;
}

.faq-q-mark {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-question-text {
  flex: 1;
}

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--color-primary);
  border-radius: 2px;
}

.faq-icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

.faq-icon::after {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  margin: 0 var(--space-3) var(--space-3);
  border-top: 1px solid var(--color-border);
}

.faq-answer p {
  padding-top: var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.85;
}

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */

.final-cta {
  position: relative;
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  overflow: hidden;
  padding-bottom: 140px;
}

.final-cta-text {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.final-cta-illust {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 120px;
  height: auto;
  z-index: 0;
  pointer-events: none;
}

.final-cta h2 {
  color: #fff;
  margin-bottom: var(--space-2);
}

.final-cta p {
  color: #eafbe9;
  margin-bottom: var(--space-4);
}

.final-cta .btn::after {
  content: "\203A";
  margin-left: 8px;
  font-weight: 700;
}

.final-cta .btn-ghost {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border-color: var(--color-surface);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.final-cta .btn-ghost:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
}

.final-cta .btn-primary {
  background: var(--color-accent);
  color: var(--color-text);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.final-cta .btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
}

.contact-hint {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: #eafbe9;
}

@media (min-width: 640px) {
  .final-cta {
    padding-bottom: 190px;
  }

  .final-cta-illust {
    width: 200px;
  }
}

@media (min-width: 900px) {
  .final-cta {
    padding-bottom: var(--space-8);
  }

  .final-cta-illust {
    width: 120px;
  }
}

@media (min-width: 1200px) {
  .final-cta-illust {
    width: 190px;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-6) 0 var(--space-4);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  width: 180px;
  height: auto;
  margin-bottom: var(--space-3);
}

.footer-org {
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--color-muted);
  margin-bottom: var(--space-3);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  margin-bottom: var(--space-4);
}

.footer-nav a {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-border);
  padding: 10px 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--color-primary);
  text-decoration-color: var(--color-primary);
}

.footer-nav-sep {
  color: var(--color-border);
}

.copyright {
  width: 100%;
  max-width: var(--container-narrow);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */

.back-to-top {
  position: fixed;
  right: var(--space-2);
  bottom: var(--space-2);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background-color 0.15s ease;
  z-index: 50;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-dark);
}

@media (min-width: 768px) {
  .back-to-top {
    right: var(--space-4);
    bottom: var(--space-4);
    width: 52px;
    height: 52px;
  }
}

/* --------------------------------------------------------------------------
   Section max width helper
   -------------------------------------------------------------------------- */

.showcase .container,
.materials .container,
.benefits .container,
.flow .container {
  max-width: var(--container-max);
}
