/* =========================================================
   common.css ― 訪問介護リルル 共通スタイル
   3ページ（index/services/recruit）で共有
   ページ固有のスタイルは各HTMLの <style> に残す
   ========================================================= */

/* ===== Design tokens ===== */
:root {
  /* Color */
  --pink: #f5b5c4;
  --pink-soft: #fce4ea;
  --pink-bg: #fdf5f7;
  --green: #6fa86b;
  --green-soft: #d9ead3;
  --green-bg: #f3f8ee;
  --text: #4a4a4a;
  --text-light: #6a6a6a;
  --white: #ffffff;
  --accent: #e89cae;

  /* Typography scale */
  --fs-h1: clamp(28px, 4vw, 42px);
  --fs-h2: clamp(24px, 3vw, 32px);
  --fs-h3: 18px;
  --fs-body: 15px;
  --fs-sm: 13px;
  --fs-xs: 12px;

  /* Spacing */
  --space-section: 120px;
  --space-section-sm: 64px;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-pink: 0 6px 16px rgba(232, 156, 174, 0.4);

  /* Flower SVG (data URI) ― 5枚花びら、薄ピンク + 黄色中心 */
  --flower-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' aria-hidden='true'><g fill='%23f5b5c4'><ellipse cx='12' cy='5' rx='3' ry='4'/><ellipse cx='12' cy='19' rx='3' ry='4'/><ellipse cx='5' cy='12' rx='4' ry='3'/><ellipse cx='19' cy='12' rx='4' ry='3'/><ellipse cx='12' cy='12' rx='3.2' ry='3.2' fill='%23e89cae'/></g><circle cx='12' cy='12' r='1.6' fill='%23ffd966'/></svg>");

  /* Font family */
  --font-heading: 'Shippori Mincho', 'Noto Serif JP', 'Noto Sans JP', serif;
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  line-height: 1.7;
  letter-spacing: 0.02em;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  font-size: var(--fs-body);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== Typography ===== */
h1, h2, h3 {
  line-height: 1.4;
  letter-spacing: 0.04em;
}
h1, h2 {
  font-family: var(--font-heading);
  font-weight: 700;
}

/* ===== Focus ring ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
label:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ===== Header (common) ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f0e8ea;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 40px;
  height: 40px;
  background: transparent !important;
  overflow: hidden;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-text .name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.logo-text .tagline {
  font-size: var(--fs-xs);
  color: var(--text-light);
}

/* ===== PC nav ===== */
nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}
nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
  display: inline-block;
  padding: 6px 4px;
}
nav a:hover {
  color: var(--green);
}
nav a[aria-current="page"] {
  color: var(--green);
  border-bottom: 2px solid var(--green);
}

/* ===== Header tel link ===== */
.header-tel {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.2;
  padding: 6px 10px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  margin-left: auto;
}
.header-tel:hover { background: var(--pink-bg); }
.header-tel .tel-num {
  font-size: 16px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.header-tel .tel-hours {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 400;
}
.mobile-drawer .header-tel-mobile {
  display: block;
  background: var(--pink-bg);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
  text-decoration: none;
  border-bottom: none;
}
.mobile-drawer .header-tel-mobile .tel-num {
  font-size: 22px;
  display: block;
}
.mobile-drawer .header-tel-mobile .tel-hours {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 400;
  display: block;
  margin-top: 2px;
}

/* ===== Contact button (header) ===== */
.contact-btn {
  background: var(--accent);
  color: var(--white);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pink);
}

/* ===== Hamburger menu (CSS only) =====
   <input type="checkbox" id="nav-toggle" hidden> + <label for="nav-toggle">
   モバイル時のみ表示 */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  -webkit-tap-highlight-color: transparent;
  z-index: 110;
}
.nav-toggle-label .bars {
  position: relative;
  width: 24px;
  height: 18px;
  display: inline-block;
}
.nav-toggle-label .bars::before,
.nav-toggle-label .bars::after,
.nav-toggle-label .bars span {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.nav-toggle-label .bars::before { top: 0; }
.nav-toggle-label .bars span { top: 8px; }
.nav-toggle-label .bars::after { top: 16px; }

/* ===== Section helpers ===== */
.section-pt-hero {
  padding-top: 120px;
}

/* ===== Common buttons ===== */
.btn-line,
.btn-recruit,
.btn-pink,
.btn-green,
.footer-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== Footer (common shared bits) ===== */
.footer-nav a {
  display: inline-block;
  padding: 10px 12px;
  min-height: 44px;
  font-size: var(--fs-xs);
}

/* breadcrumb */
.breadcrumb a {
  display: inline-block;
  padding: 6px 4px;
}

/* ===== Recruit card overlay button (hero) ===== */
.recruit-card a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== aria-hidden decorative icon helper ===== */
[aria-hidden="true"] {
  user-select: none;
}

/* ===== Flower icon (replacement for 🌸) =====
   span/i.flower や ::before/::after で使用 */
.flower {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: var(--flower-svg) no-repeat center / contain;
  vertical-align: middle;
}
.flower-sm {
  width: 16px;
  height: 16px;
}

/* section-title 既定: 花アイコンをbefore/afterで */
.section-title h2 {
  display: block;
}

/* ===== President greeting (index) ===== */
.president {
  background: var(--white);
  padding: var(--space-section) 24px;
}
.president-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
}
.president-photo {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-soft), var(--green-soft));
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.president-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.president-body .label {
  font-size: var(--fs-sm);
  color: var(--accent);
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 8px;
}
.president-body h2 {
  font-size: var(--fs-h2);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.president-body h2::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  background: var(--flower-svg) no-repeat center / contain;
}
.president-body p.message {
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 18px;
}
.president-name {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--green);
}
.president-name .role {
  font-size: var(--fs-sm);
  color: var(--text-light);
  margin-right: 8px;
  font-family: 'Noto Sans JP', sans-serif;
}

/* ===== Stats (index) ===== */
.stats {
  background: var(--green-bg);
  padding: var(--space-section) 24px;
}
.stats-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.stat-card::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  background: var(--flower-svg) no-repeat center / contain;
}
.stat-num {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 42px);
  color: var(--accent);
  font-weight: 700;
  line-height: 1.2;
  display: block;
  margin-bottom: 6px;
}
.stat-num .unit {
  font-size: 18px;
  color: var(--green);
  margin-left: 2px;
}
.stat-label {
  font-size: var(--fs-sm);
  color: var(--text-light);
}

/* ===== Voice (利用者の声 - index) ===== */
.user-voice {
  background: var(--pink-bg);
  padding: var(--space-section) 24px;
}
.user-voice-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.uv-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.uv-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-soft), var(--green-soft));
  overflow: hidden;
  margin-bottom: 14px;
}
.uv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uv-name {
  font-family: var(--font-heading);
  font-size: 17px;
  color: var(--green);
  margin-bottom: 4px;
}
.uv-meta {
  font-size: var(--fs-xs);
  color: var(--text-light);
  margin-bottom: 12px;
}
.uv-card p {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--text);
}
.uv-note {
  max-width: 1100px;
  margin: 18px auto 0;
  font-size: var(--fs-xs);
  color: var(--text-light);
  text-align: right;
}

@media (max-width: 900px) {
  .president-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
  .president-photo {
    max-width: 240px;
    margin: 0 auto;
  }
  .president-body h2 { justify-content: center; }
  .stats-grid { grid-template-columns: 1fr; gap: 14px; }
  .user-voice-grid { grid-template-columns: 1fr; }
  .president,
  .stats,
  .user-voice { padding: var(--space-section-sm) 16px; }
}

/* ===== Responsive (common) ===== */
/* ===== Mobile drawer (default hidden / shown only when toggled & mobile) ===== */
.mobile-drawer,
.nav-scrim {
  display: none;
}

@media (max-width: 900px) {
  /* PCナビ非表示・ハンバーガー表示 */
  nav.global-nav { display: none; }
  .nav-toggle-label { display: inline-flex; }

  /* ヘッダー右の .contact-btn / .header-tel は隠す（ドロワー内で表示） */
  .header-inner > .contact-btn { display: none; }
  .header-inner > .header-tel { display: none; }

  /* ドロワー本体（body直下に置かれる前提） */
  .mobile-drawer {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    width: min(80vw, 320px);
    height: 100vh;
    background: var(--white);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
    padding: 80px 28px 32px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 105;
    overflow-y: auto;
    visibility: hidden;
  }
  .mobile-drawer ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .mobile-drawer a {
    display: block;
    padding: 14px 12px;
    min-height: 44px;
    font-size: 15px;
    color: var(--text);
    border-bottom: 1px solid #f0e8ea;
  }
  .mobile-drawer a[aria-current="page"] {
    color: var(--green);
    font-weight: 700;
  }
  .mobile-drawer .contact-btn {
    margin-top: 18px;
    width: 100%;
  }

  /* スクリム */
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 102;
  }

  /* 開閉トリガ: <input id="nav-toggle"> を <body> 直下 / .mobile-drawer/.nav-scrim より前に置く */
  .nav-toggle:checked ~ .mobile-drawer {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-toggle:checked ~ .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  /* ハンバーガー → × アニメ */
  .nav-toggle:checked ~ header .nav-toggle-label .bars::before {
    top: 8px;
    transform: rotate(45deg);
  }
  .nav-toggle:checked ~ header .nav-toggle-label .bars::after {
    top: 8px;
    transform: rotate(-45deg);
  }
  .nav-toggle:checked ~ header .nav-toggle-label .bars span {
    opacity: 0;
  }
}
