﻿/* ============================================================
   植木いまふじクリニック — Design System
   ============================================================ */

:root {
  /* Type */
  --font-sans: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  --font-display: "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;

  /* Radius — “少しだけ丸い(端正)” */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Shadows — soft, low */
  --shadow-sm: 0 1px 2px rgba(35, 33, 28, 0.06), 0 1px 3px rgba(35, 33, 28, 0.05);
  --shadow-md: 0 6px 20px -8px rgba(35, 33, 28, 0.18), 0 2px 6px rgba(35, 33, 28, 0.05);
  --shadow-lg: 0 24px 60px -24px rgba(30, 90, 64, 0.30), 0 4px 14px rgba(35, 33, 28, 0.06);

  /* Spacing rhythm */
  --pad-section: clamp(38px, 4.5vw, 64px);
  --maxw: 1200px;
}

/* -------- Color themes -------- */
/* Theme G: グリーン基調 (white + light green, default) */
[data-theme="green"] {
  --bg: #f1f8f3;
  --surface: #ffffff;
  --surface-2: #e6f4ec;
  --surface-3: #d6ecdf;
  --ink: #1f2a24;
  --ink-soft: #586b60;
  --ink-faint: #90a198;
  --line: #dbeae1;
  --primary: #2bad78;
  --primary-deep: #1c8a5c;
  --primary-press: #156f49;
  --primary-soft: #e0f1e8;
  --primary-tint: #eef8f1;
  --accent: #2f8f7a;       /* harmonious teal-green highlight */
  --accent-soft: #e1f1ec;
  --on-primary: #ffffff;
}

/* Theme A: グリーン × クリーム (warm) */
[data-theme="cream"] {
  --bg: #faf6ed;
  --surface: #ffffff;
  --surface-2: #f3ecdc;
  --surface-3: #ece2cd;
  --ink: #2b2823;
  --ink-soft: #6f685b;
  --ink-faint: #9c9484;
  --line: #e7dfcd;
  --primary: #2bad78;
  --primary-deep: #1c8a5c;
  --primary-press: #156f49;
  --primary-soft: #e2f1e7;
  --primary-tint: #f0f7ef;
  --accent: #c98a3c;       /* warm amber for tiny highlights */
  --accent-soft: #f6ecd9;
  --on-primary: #ffffff;
}

/* Theme B: グリーン × ブルー (cool, clinical-clean) */
[data-theme="blue"] {
  --bg: #f3f7f8;
  --surface: #ffffff;
  --surface-2: #e8f1f2;
  --surface-3: #dceaec;
  --ink: #1f2a2c;
  --ink-soft: #5d6b6d;
  --ink-faint: #93a1a3;
  --line: #d9e6e8;
  --primary: #2bad78;
  --primary-deep: #1c8a5c;
  --primary-press: #156f49;
  --primary-soft: #def0e7;
  --primary-tint: #eef6f6;
  --accent: #2f7fa6;       /* calm blue */
  --accent-soft: #e0eef4;
  --on-primary: #ffffff;
}

/* Theme C: グリーン × オレンジ差し色 (energetic warm) */
[data-theme="apricot"] {
  --bg: #fbf5ef;
  --surface: #ffffff;
  --surface-2: #f7ebe0;
  --surface-3: #f1dfce;
  --ink: #2c2722;
  --ink-soft: #6f665b;
  --ink-faint: #9d9384;
  --line: #ecdccb;
  --primary: #2bad78;
  --primary-deep: #1c8a5c;
  --primary-press: #156f49;
  --primary-soft: #e2f1e7;
  --primary-tint: #f0f7ef;
  --accent: #e08a3c;       /* lively orange */
  --accent-soft: #fbe8d3;
  --on-primary: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: #faf6ed;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 1;
  letter-spacing: 0.01em;
}

/* theme tokens live on .site — paint it so background/min-height resolve */
.site {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: clip;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin: 0;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  padding: 16px 28px;
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 24px -10px color-mix(in oklab, var(--primary) 70%, black);
}
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-2px); }
.btn-primary:active { background: var(--primary-press); transform: translateY(0); }
.btn-ghost {
  background: var(--surface);
  color: var(--primary-deep);
  border-color: var(--primary);
}
.btn-ghost:hover { background: var(--primary-soft); transform: translateY(-2px); }

/* ---- Section heading kit ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary-deep);
  text-transform: none;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--primary);
  display: inline-block;
}
.section-title {
  font-size: clamp(26px, 3.4vw, 38px);
  margin-top: 14px;
  letter-spacing: 0.04em;
}
.section-lead {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 60ch;
}

/* ---- Image slot host (drag-and-drop photo) ---- */
.has-slot { overflow: hidden; position: relative; }
.has-slot > image-slot { display: block; width: 100%; height: 100%; }

/* ---- Placeholder image ---- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in oklab, var(--surface-3) 70%, var(--surface)) 0 12px,
      var(--surface-2) 12px 24px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  overflow: hidden;
}
.ph span {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  text-align: center;
}

/* ---- Generic card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* ---- Pills / tags ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  background: var(--primary-soft);
  color: var(--primary-deep);
  letter-spacing: 0.04em;
}

/* reveal on scroll — visible by default; only hidden once JS arms it (.reveal-on),
   so content never gets stuck invisible if IntersectionObserver doesn't fire. */
.reveal { opacity: 1; transform: none; }
.reveal-on .reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-on .reveal.in { opacity: 1; transform: none; }

/* stagger siblings inside grids for a cascading float effect */
.reveal-on .doctors-grid .reveal.in:nth-child(2),
.reveal-on .team-grid .reveal.in:nth-child(2),
.reveal-on .recruit-cards .reveal.in:nth-child(2),
.reveal-on .dept-grid .reveal.in:nth-child(2) { transition-delay: 0.08s; }
.reveal-on .doctors-grid .reveal.in:nth-child(3),
.reveal-on .team-grid .reveal.in:nth-child(3),
.reveal-on .recruit-cards .reveal.in:nth-child(3),
.reveal-on .dept-grid .reveal.in:nth-child(3) { transition-delay: 0.16s; }
.reveal-on .doctors-grid .reveal.in:nth-child(4),
.reveal-on .team-grid .reveal.in:nth-child(4),
.reveal-on .dept-grid .reveal.in:nth-child(4) { transition-delay: 0.24s; }
.reveal-on .doctors-grid .reveal.in:nth-child(5),
.reveal-on .team-grid .reveal.in:nth-child(5),
.reveal-on .dept-grid .reveal.in:nth-child(5) { transition-delay: 0.32s; }
.reveal-on .doctors-grid .reveal.in:nth-child(6),
.reveal-on .team-grid .reveal.in:nth-child(6),
.reveal-on .dept-grid .reveal.in:nth-child(6) { transition-delay: 0.40s; }

/* utility */
.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* focus a11y */
a:focus-visible, button:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--primary) 60%, white);
  outline-offset: 2px;
}
