/*
Theme Name: Restia Sleep Clinic
Theme URI:
Author: Restia Sleep Clinic
Description: 睡眠専門オンラインクリニック「レスティア睡眠外来」カスタムWordPressテーマ
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: restia-clinic
*/

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

/* ================================================================
   配色：ロゴ（夜空の紺 × 月の銀 × 葉の紫・緑）とサブページ（sub.css）に合わせる
================================================================ */
:root {
  --night: #201d3e;          /* ロゴ画像の背景色 */
  --night-deep: #171530;
  --navy: #1c2554;
  --pink: #c9547a;
  --pink-light: #e0708f;
  --gold: #f3e3a6;
  --lav: #eef1fb;
  --lav-faint: #f5f7fd;
  --lav-deep: #dfe5f6;

  --text-primary: #1f2547;
  --text-secondary: #4a516f;
  --text-muted: #6a7190;
  --border: #dde2f1;
  --white: #ffffff;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 6px 20px rgba(28, 37, 84, 0.08);
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.8;
  font-size: 15px;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--night);
  color: #fff;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
/* ロゴ画像（1024px 正方形）の中身(573x434 @ 232,244)だけを切り出して表示 */
.nav-logo-mark {
  --h: 54px;
  position: relative;
  display: block;
  width: calc(var(--h) * 573 / 434);
  height: var(--h);
  overflow: hidden;
  flex-shrink: 0;
}
.nav-logo-mark img {
  position: absolute;
  max-width: none;
  height: auto;
  width: calc(var(--h) * 1024 / 434);
  left: calc(var(--h) * -232 / 434);
  top: calc(var(--h) * -244 / 434);
}
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.nav-logo-text strong { font-size: 18px; font-weight: 500; letter-spacing: 0.1em; }
.nav-logo-text small { font-size: 17px; font-weight: 500; letter-spacing: 0.12em; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-menu-list {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}
.nav-menu-list a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}
.nav-menu-list a:hover { color: var(--gold); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--pink-light), var(--pink));
  color: white;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-cta svg { width: 18px; height: 18px; }

/* GLOBAL UTILITIES */
.container { max-width: 720px; margin: 0 auto; }
.section-label {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  text-wrap: balance;
  word-break: auto-phrase;
}
.nowrap { white-space: nowrap; }
.section-lead {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  text-wrap: pretty;
  word-break: auto-phrase;
}
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, var(--pink-light), var(--pink));
  color: white;
  text-decoration: none;
  padding: 16px 34px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 20px rgba(201, 84, 122, 0.32);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-line:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(201, 84, 122, 0.4); }
.btn-line svg { width: 22px; height: 22px; }

section { padding: 4rem 2rem; border-bottom: 0.5px solid var(--border); }

/* HERO */
.hero {
  padding: 6rem 2rem 5rem;
  text-align: center;
  background:
    radial-gradient(520px 320px at 85% 20%, rgba(255, 255, 255, 0.9), transparent 70%),
    linear-gradient(110deg, #f5f7fd 0%, #eaeffb 55%, #dde5f7 100%);
  border-bottom: 0.5px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(224, 112, 143, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(28, 37, 84, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: var(--night);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}
.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}
.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero-note { font-size: 12px; color: var(--text-muted); }

/* CONCERNS */
.concerns { background: var(--white); }
.concerns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.concern-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--lav);
  border-radius: var(--radius-md);
  border: 0.5px solid var(--lav-deep);
}
.concern-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.concern-check svg { width: 11px; height: 11px; stroke: #fff; }
.concern-item p { font-size: 13px; color: var(--text-primary); line-height: 1.6; }

/* SERVICES */
.services { background: var(--lav-faint); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 3px 10px rgba(28, 37, 84, 0.05);
}
.service-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--lav);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.service-icon svg { width: 22px; height: 22px; stroke: var(--navy); fill: none; }
.service-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--navy); }
.service-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

/* FLOW */
.flow { background: var(--white); }
.flow-steps { display: flex; flex-direction: column; }
.flow-step {
  display: flex;
  gap: 20px;
  padding: 1.25rem 0;
  border-bottom: 0.5px solid var(--border);
  align-items: flex-start;
}
.flow-step:last-child { border-bottom: none; }
.step-num {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-content h4 { font-size: 15px; font-weight: 700; margin-bottom: 5px; color: var(--navy); }
.step-content p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.line-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f9ee;
  color: #06C755;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  border: 0.5px solid #b3ead1;
}
.line-badge svg { width: 12px; height: 12px; }

/* PRICING */
.pricing { background: var(--lav-faint); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.price-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 10px rgba(28, 37, 84, 0.05);
}
.price-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--navy); }
.price-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}
.price-amount span {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}
.price-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin-top: 12px; }
.price-card > p:last-child { margin-top: auto; padding-top: 12px; }
.price-sub {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.price-sub-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 0.5px dashed var(--lav-deep);
}
.price-sub-row:last-child { border-bottom: none; padding-bottom: 0; }
.price-sub-row > span:first-child { font-size: 13px; color: var(--text-secondary); }
.price-sub-amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.price-sub-amount small {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}
.price-list { margin-top: 12px; padding-left: 1.2em; }
.price-list li { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.price-list li::marker { color: var(--pink); }
.price-footnote { margin-top: 1.25rem; font-size: 12px; color: var(--text-muted); line-height: 1.7; }

/* SLEEP PROGRAM */
.sleep-program { background: var(--white); }
.container-wide { max-width: 960px; margin: 0 auto; }
.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.price-card.featured { border: 2px solid var(--pink); padding: calc(1.75rem - 1px); box-shadow: 0 8px 24px rgba(201, 84, 122, 0.14); }
.plan-tagline { font-size: 14px; font-weight: 700; color: var(--navy); margin-top: 0; min-height: 3.4em; }
.price-card .plan-price { margin-top: 14px; }
.program-cta { margin-top: 2.5rem; }

/* PAYMENT */
.payment { background: var(--white); }
.payment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.payment-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 1.75rem 1.25rem;
  background: var(--lav);
  border: 0.5px solid var(--lav-deep);
  border-radius: var(--radius-lg);
  text-align: center;
}
.payment-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.payment-icon svg { width: 26px; height: 26px; stroke: var(--navy); }
.payment-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.payment-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

/* CTA */
.cta-section {
  padding: 5rem 2rem;
  text-align: center;
  background:
    radial-gradient(2px 2px at 12% 30%, #fff, transparent),
    radial-gradient(2px 2px at 30% 70%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 62% 24%, #fff, transparent),
    radial-gradient(2px 2px at 78% 62%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 92% 36%, #fff, transparent),
    linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%);
  border-bottom: none;
}
.cta-section h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
}
.cta-section p {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* FOOTER */
.site-footer {
  padding: 26px 24px 32px;
  text-align: center;
  background: var(--night-deep);
  color: rgba(255, 255, 255, 0.72);
}
.site-footer p { font-size: 12px; line-height: 1.8; color: inherit; }
.footer-clinic-note {
  font-size: 12px;
  line-height: 1.8;
  max-width: 620px;
  margin: 0 auto 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

/* フォーカス表示 */
.btn-line:focus-visible,
.nav-cta:focus-visible,
.nav-logo:focus-visible,
.nav-menu-list a:focus-visible {
  outline: 3px solid var(--pink-light);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  nav { padding: 0 0.5rem 0 1rem; height: 58px; }
  .nav-right { gap: 6px; }
  .nav-menu-list { display: none; }
  .nav-logo { gap: 8px; }
  .nav-logo-mark { --h: 44px; }
  .nav-logo-text small { font-size: 14px; letter-spacing: 0.08em; }
  .nav-cta { padding: 8px 14px; font-size: 12px; }
  .section-title, .section-label { font-size: 19px; }
  section { padding: 3rem 1.25rem; }
  .hero { padding: 4rem 1.25rem 3.5rem; }
  .cta-section { padding: 4rem 1.25rem; }
  .btn-line { padding: 15px 26px; }
  .payment-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .payment-item { padding: 1.25rem 0.75rem; }
  .payment-name { font-size: 12px; }
  .payment-desc { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-line { transition: none; }
}
