/* 逢縁訪問看護ステーション — デザインシステム「蒼（あお）」 */

:root {
  --bg: #f3f8fb;
  --surface: #ffffff;
  --ink: #10202e;
  --ink-soft: #4c6478;
  --accent: #1c63e0;
  --accent-ink: #ffffff;
  --fresh: #17c1a4;
  --fresh-soft: #d9f3ec;
  --line: #dbe7f0;
  --danger: #c1442b;
  --max: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #091420;
    --surface: #0f1c2b;
    --ink: #eaf3fa;
    --ink-soft: #9db3c6;
    --accent: #5b9dff;
    --accent-ink: #071018;
    --fresh: #38e2c2;
    --fresh-soft: #103029;
    --line: #1d2c3d;
    --danger: #e2703a;
  }
}
:root[data-theme="dark"] {
  --bg: #091420; --surface: #0f1c2b; --ink: #eaf3fa; --ink-soft: #9db3c6;
  --accent: #5b9dff; --accent-ink: #071018; --fresh: #38e2c2; --fresh-soft: #103029;
  --line: #1d2c3d; --danger: #e2703a;
}
:root[data-theme="light"] {
  --bg: #f3f8fb; --surface: #ffffff; --ink: #10202e; --ink-soft: #4c6478;
  --accent: #1c63e0; --accent-ink: #ffffff; --fresh: #17c1a4; --fresh-soft: #d9f3ec;
  --line: #dbe7f0; --danger: #c1442b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.brand {
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
}
.brand em { color: var(--accent); font-style: normal; }

nav.top-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
nav.top-nav a { text-decoration: none; }
nav.top-nav a:hover, nav.top-nav a[aria-current="page"] { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
}
@media (max-width: 980px) {
  nav.top-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1.2rem;
    display: none;
  }
  nav.top-nav.open { display: flex; }
  nav.top-nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  nav.top-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Buttons / chips ---------- */
.btn {
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s ease;
  border: 1.5px solid transparent;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn:hover { transform: translateY(-2px); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--fresh-soft);
  color: var(--fresh);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}
.chip .dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--fresh); }

/* ---------- Hero (top page) ---------- */
.hero {
  position: relative;
  margin: 1rem auto 0;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; } }
.hero .chip { margin-bottom: 1.5rem; }
.hero h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
.hero h1 .u { background: linear-gradient(transparent 62%, var(--fresh-soft) 62%); }
.hero .lead { color: var(--ink-soft); max-width: 30em; font-size: 1rem; margin-bottom: 2.1rem; }
.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual { position: relative; aspect-ratio: 4/5; max-width: 380px; margin: 0 auto; }
.visual-glow {
  position: absolute; inset: -10% -18% auto auto; top: 4%; right: 2%;
  width: 70%; aspect-ratio: 1/1;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.35; filter: blur(38px); z-index: 0;
}
.visual-accent {
  position: absolute; inset: 3% 0 -3% 9%;
  background: linear-gradient(155deg, var(--accent) 0%, #4fd3e0 130%);
  border-radius: 26px; transform: rotate(5deg); z-index: 1;
}
.visual-card {
  position: relative; z-index: 2;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  transform: rotate(-2deg);
  padding: 1.6rem 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 50px -30px rgba(9, 20, 32, 0.35);
}
.live-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  align-self: flex-start;
  background: var(--fresh-soft); color: var(--fresh);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.03em;
  padding: 0.35rem 0.8rem; border-radius: 999px;
}
.live-dot {
  width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--fresh);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--fresh) 55%, transparent);
  animation: pulse-dot 1.8s ease-out infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fresh) 45%, transparent); }
  70% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--fresh) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fresh) 0%, transparent); }
}
.visual-main { margin: 1.2rem 0 1.3rem; }
.visual-main .stat-num {
  font-size: 2.6rem; font-weight: 800; color: var(--ink);
  font-feature-settings: "tnum"; letter-spacing: -0.02em; line-height: 1;
  display: block;
}
.visual-main .stat-label { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.5rem; display: block; }
.visual-stats {
  list-style: none; margin: 0; padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
  display: grid; gap: 0.85rem;
}
.visual-stats li { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; font-size: 0.83rem; }
.visual-stats li span { color: var(--ink-soft); }
.visual-stats li b { font-weight: 700; text-align: right; }
.visual-foot {
  margin-top: auto; padding-top: 1.1rem;
  font-size: 0.72rem; color: var(--ink-soft);
  display: flex; flex-direction: column; gap: 0.2rem;
  border-top: 1px solid var(--line);
}
.visual-foot b { color: var(--accent); font-weight: 800; font-size: 0.78rem; }

/* ---------- Page header (inner pages) ---------- */
.page-hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}
.page-hero .kicker {
  color: var(--accent); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.05em;
  display: block; margin-bottom: 0.7rem;
}
.page-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 800; margin: 0 0 0.8rem; letter-spacing: -0.01em; }
.page-hero p { color: var(--ink-soft); max-width: 42em; margin: 0; font-size: 0.95rem; }

/* ---------- Info strip ---------- */
.info-strip { margin: 2.5rem auto 0; }
.info-strip .row {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 1.5rem 1.8rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; font-size: 0.85rem;
}
@media (max-width: 780px) { .info-strip .row { grid-template-columns: repeat(2, 1fr); } }
.info-strip dt { color: var(--ink-soft); font-size: 0.72rem; margin-bottom: 0.3rem; }
.info-strip dd { margin: 0; font-weight: 700; font-feature-settings: "tnum"; }

/* ---------- Sections ---------- */
section { margin-top: 5.5rem; }
section:first-of-type { margin-top: 3.5rem; }
.section-head { max-width: 42em; margin-bottom: 2.4rem; }
.section-head .kicker {
  color: var(--accent); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.05em;
  display: block; margin-bottom: 0.6rem;
}
.section-head h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 0.7rem; letter-spacing: -0.01em; }
.section-head p { color: var(--ink-soft); margin: 0; font-size: 0.92rem; }

/* ---------- Network (affiliation) ---------- */
.net-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; }
.net-node { flex: 1 1 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.7rem 1.5rem; }
.net-node.hub { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.net-node .tag { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; color: var(--fresh); display: block; margin-bottom: 0.6rem; }
.net-node.hub .tag { color: var(--fresh-soft); }
.net-node h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.net-node p { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.net-node.hub p { color: var(--accent-ink); opacity: 0.9; }
.net-arrow { font-size: 1.3rem; color: var(--line); flex: 0 0 auto; }
@media (max-width: 780px) { .net-arrow { display: none; } }

/* ---------- Feature / card grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.7rem 1.4rem; }
.feature .mark {
  display: inline-block; background: var(--fresh-soft); color: var(--fresh);
  font-weight: 800; font-size: 0.72rem; letter-spacing: 0.03em; padding: 0.3rem 0.7rem;
  border-radius: 999px; margin-bottom: 1rem;
}
.feature h3 { margin: 0 0 0.5rem; font-size: 0.98rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.86rem; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 860px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem 1.4rem; }
.card h3 { margin: 0 0 0.5rem; font-size: 0.98rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.86rem; }

/* ---------- Flow / steps ---------- */
.flow-section { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4.2rem 0; margin-top: 6rem; }
.steps { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.2rem; }
.step { flex: 1 1 150px; background: var(--bg); border-radius: 14px; padding: 1.2rem 1.1rem; }
.step .idx { color: var(--accent); font-weight: 800; font-size: 0.8rem; }
.step p { margin: 0.5rem 0 0; font-size: 0.85rem; }

/* ---------- Prose (text-heavy pages) ---------- */
.prose { max-width: 44em; }
.prose h2 { font-size: 1.35rem; font-weight: 800; margin: 2.6rem 0 1rem; letter-spacing: -0.01em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.05rem; font-weight: 700; margin: 1.8rem 0 0.7rem; }
.prose p { margin: 0 0 1rem; color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.3rem; color: var(--ink-soft); }
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--ink); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 0 0 2rem; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; background: var(--surface); }
table.data caption { text-align: left; padding: 0.9rem 1.1rem; font-weight: 700; border-bottom: 1px solid var(--line); }
table.data th, table.data td { text-align: left; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { width: 32%; color: var(--ink-soft); font-weight: 600; font-size: 0.82rem; background: color-mix(in srgb, var(--bg) 60%, var(--surface)); }
table.data tr:last-child th, table.data tr:last-child td { border-bottom: none; }
table.data td.num { font-feature-settings: "tnum"; }

/* ---------- Notice / callout ---------- */
.notice {
  border-left: 3px solid var(--fresh);
  background: var(--fresh-soft);
  padding: 1rem 1.2rem;
  border-radius: 0 12px 12px 0;
  font-size: 0.88rem;
  color: var(--ink);
  margin: 0 0 2rem;
}
.notice.warn { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }

/* ---------- Forms ---------- */
form.contact-form { max-width: 40em; display: grid; gap: 1.3rem; }
.field { display: grid; gap: 0.5rem; }
.field label { font-size: 0.85rem; font-weight: 700; }
.field .hint { font-size: 0.78rem; color: var(--ink-soft); font-weight: 400; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select, .field textarea {
  font: inherit;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field-radio-row { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: 0.9rem; }
.field-radio-row label { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; }
.required-tag { background: var(--fresh-soft); color: var(--fresh); font-size: 0.68rem; font-weight: 800; padding: 0.15rem 0.5rem; border-radius: 999px; margin-left: 0.4rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 7rem; border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .container { padding: 3.5rem 1.5rem 2.5rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 780px) { .site-footer .container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .site-footer .container { grid-template-columns: 1fr; } }
.site-footer .brand { display: inline-block; margin-bottom: 0.8rem; }
.site-footer p { color: var(--ink-soft); font-size: 0.85rem; margin: 0.2rem 0; }
.site-footer h4 { font-size: 0.78rem; letter-spacing: 0.04em; color: var(--ink-soft); margin: 0 0 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-size: 0.87rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 1.3rem 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
