/* =========================================================
   まのすけ歯科クリニック — style.css
   Design system: spacing scale / breakpoints / full-width & contained sections
   ========================================================= */

:root {
  --color-primary: #1F8A82;
  --color-primary-dark: #146B64;
  --color-primary-soft: #E7F4F2;
  --color-accent: #F2A65A;
  --color-accent-dark: #D98A3D;
  --color-bg: #FFFFFF;
  --color-bg-soft: #F5FAF9;
  --color-bg-deep: #0F3B37;
  --color-text: #23313A;
  --color-text-soft: #5C6E73;
  --color-border: #E3EEEC;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --container: 1120px;

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 96px;
  --sp-8: 128px;

  --shadow-sm: 0 2px 10px rgba(15, 59, 55, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 59, 55, 0.10);
  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-jp);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

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

/* ---------- Section rhythm ---------- */
.section { padding: var(--sp-7) 0; }
.section--soft { background: var(--color-bg-soft); }
.section--deep { background: var(--color-bg-deep); color: #fff; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto var(--sp-6); }
.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.section-title { font-size: 30px; font-weight: 700; letter-spacing: 0.02em; }
.section-lead { margin-top: var(--sp-2); color: var(--color-text-soft); font-size: 15px; }
.section--deep .section-lead { color: rgba(255,255,255,0.75); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--color-accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--color-accent-dark); box-shadow: var(--shadow-md); }
.btn--outline { border-color: rgba(255,255,255,0.6); color: #fff; }
.btn--outline:hover { background: rgba(255,255,255,0.12); }
.btn--ghost { border-color: var(--color-primary); color: var(--color-primary); }
.btn--ghost:hover { background: var(--color-primary-soft); }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--color-primary-dark); }
.brand__mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex: none;
}
.brand__sub { display: block; font-size: 10px; font-weight: 500; letter-spacing: .08em; color: var(--color-text-soft); }

.nav-desktop { display: flex; align-items: center; gap: var(--sp-5); }
.nav-desktop__list { display: flex; gap: var(--sp-4); }
.nav-desktop__list a {
  font-size: 14px; font-weight: 500; color: var(--color-text-soft);
  padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-desktop__list a:hover,
.nav-desktop__list a.is-active { color: var(--color-primary-dark); border-color: var(--color-accent); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 40px; height: 40px; border: none; background: none; padding: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--color-primary-dark); border-radius: 2px; }

.nav-mobile {
  display: none; position: fixed; inset: 76px 0 0 0; background: #fff; z-index: 99;
  padding: var(--sp-4) var(--sp-3); overflow-y: auto;
}
.nav-mobile.is-open { display: block; }
.nav-mobile ul { display: flex; flex-direction: column; }
.nav-mobile a { display: block; padding: 16px 4px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--color-border); }
.nav-mobile .btn { margin-top: var(--sp-3); }

/* ---------- Hero (full-width) ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--color-primary-soft) 0%, #ffffff 78%);
  overflow: hidden;
}
.hero__inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-6);
  align-items: center;
  padding: var(--sp-7) 0 var(--sp-6);
}
.hero__eyebrow { color: var(--color-primary-dark); font-weight: 700; font-size: 13px; letter-spacing: .1em; margin-bottom: var(--sp-2); }
.hero h1 { font-size: 40px; line-height: 1.5; font-weight: 700; letter-spacing: .01em; }
.hero h1 em { color: var(--color-primary); font-style: normal; }
.hero p.lead { margin-top: var(--sp-3); color: var(--color-text-soft); font-size: 16px; max-width: 46ch; }
.hero__cta { margin-top: var(--sp-5); display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.hero__figure {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3.1;
}
.hero__figure img { width: 100%; height: 100%; object-fit: cover; }
.hero__badge {
  position: absolute; left: var(--sp-3); bottom: var(--sp-3);
  background: #fff; border-radius: var(--radius-md); padding: 14px 18px;
  box-shadow: var(--shadow-md); display: flex; gap: 12px; align-items: center;
}
.hero__badge strong { display: block; font-size: 20px; color: var(--color-primary-dark); }
.hero__badge span { font-size: 12px; color: var(--color-text-soft); }

/* Page header (sub pages) — full-width banner */
.page-hero {
  background: linear-gradient(120deg, var(--color-bg-deep), var(--color-primary-dark));
  color: #fff; padding: var(--sp-6) 0 var(--sp-5);
}
.page-hero .breadcrumb { font-size: 12px; opacity: .7; margin-bottom: var(--sp-2); }
.page-hero h1 { font-size: 32px; font-weight: 700; }
.page-hero p { margin-top: var(--sp-2); opacity: .8; max-width: 60ch; font-size: 14px; }

/* ---------- Full-width band (stats) ---------- */
.stats-band { background: var(--color-bg-deep); color: #fff; padding: var(--sp-6) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); text-align: center; }
.stats-grid strong { display: block; font-size: 34px; font-weight: 700; color: #9FE0D6; }
.stats-grid span { display: block; margin-top: 6px; font-size: 13px; opacity: .75; }

/* ---------- Card grid ---------- */
.grid { display: grid; gap: var(--sp-4); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__media { aspect-ratio: 4/3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: var(--sp-3); }
.card__body h3 { font-size: 17px; font-weight: 700; }
.card__body p { margin-top: 8px; font-size: 13.5px; color: var(--color-text-soft); }
.card__tag {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--color-primary-dark);
  background: var(--color-primary-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}

.feature {
  background: #fff; border-radius: var(--radius-md); padding: var(--sp-4);
  border: 1px solid var(--color-border); text-align: left;
}
.feature__icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--color-primary-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-3); color: var(--color-primary-dark);
}
.feature h3 { font-size: 16px; font-weight: 700; }
.feature p { margin-top: 8px; font-size: 13.5px; color: var(--color-text-soft); }

/* ---------- Split section ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: center; }
.split__figure { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 4/3; }
.split__figure img { width: 100%; height: 100%; object-fit: cover; }
.split ul.checklist li { position: relative; padding-left: 28px; margin-top: 12px; font-size: 14.5px; color: var(--color-text-soft); }
.split ul.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--color-primary);
}
.split ul.checklist li::after {
  content: ""; position: absolute; left: 6px; top: 8px; width: 6px; height: 10px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
}

/* ---------- CTA band (full-width) ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--color-accent), var(--color-accent-dark));
  color: #fff; padding: var(--sp-6) 0; text-align: center;
}
.cta-band h2 { font-size: 26px; font-weight: 700; }
.cta-band p { margin-top: 10px; opacity: .92; font-size: 14.5px; }
.cta-band .btn { margin-top: var(--sp-4); }
.cta-band .btn--primary { background: #fff; color: var(--color-accent-dark); }
.cta-band .btn--primary:hover { background: #fff8f0; }

/* ---------- Timeline (about page) ---------- */
.timeline { border-left: 2px solid var(--color-border); padding-left: var(--sp-4); }
.timeline li { position: relative; padding-bottom: var(--sp-4); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1 * var(--sp-4) - 5px); top: 4px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--color-primary);
}
.timeline time { font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); }
.timeline p { margin-top: 4px; font-size: 14.5px; }

/* ---------- Table (company overview) ---------- */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { text-align: left; padding: 18px 20px; border-bottom: 1px solid var(--color-border); font-size: 14.5px; }
.info-table th { width: 200px; color: var(--color-text-soft); font-weight: 600; background: var(--color-bg-soft); }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.form-grid .field--full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 8px; }
.field .req { color: var(--color-accent-dark); font-size: 11px; margin-left: 6px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14.5px; background: #fff; color: var(--color-text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.field textarea { min-height: 140px; resize: vertical; }
.field .error-msg { display: none; color: #C0392B; font-size: 12.5px; margin-top: 6px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #C0392B; }
.field.has-error .error-msg { display: block; }
.form-note { font-size: 12.5px; color: var(--color-text-soft); margin-top: var(--sp-2); }
.form-success {
  display: none; background: var(--color-primary-soft); color: var(--color-primary-dark);
  padding: var(--sp-4); border-radius: var(--radius-md); text-align: center; font-weight: 700;
}
.form-success.is-visible { display: block; }
#contactForm.is-hidden { display: none; }

/* ---------- Store detail ---------- */
.store-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2) var(--sp-4); }
.store-meta dt { font-size: 12px; color: var(--color-text-soft); font-weight: 700; }
.store-meta dd { margin: 4px 0 0; font-size: 14.5px; }
.hours-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hours-table th, .hours-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--color-border); }
.hours-table th { color: var(--color-text-soft); font-weight: 600; }
.hours-table td.on { color: var(--color-primary-dark); font-weight: 700; }
.hours-table td.off { color: #C0392B; }

/* ---------- Job cards (recruit) ---------- */
.job-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--sp-4); background: #fff; }
.job-card__head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.job-card__head h3 { font-size: 18px; font-weight: 700; }
.job-card__type { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--color-primary-soft); color: var(--color-primary-dark); }
.job-card dl { display: grid; grid-template-columns: 100px 1fr; gap: 10px 14px; margin-top: var(--sp-3); font-size: 13.5px; }
.job-card dt { color: var(--color-text-soft); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item__q {
  width: 100%; text-align: left; background: none; border: none; padding: var(--sp-3) 0;
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
  font-size: 15.5px; font-weight: 700; color: var(--color-text);
}
.faq-item__q::after {
  content: "+"; font-size: 22px; font-weight: 400; color: var(--color-primary); flex: none;
  transition: transform .2s ease;
}
.faq-item.is-open .faq-item__q::after { transform: rotate(45deg); }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.is-open .faq-item__a { max-height: 240px; }
.faq-item__a p { padding: 0 0 var(--sp-3); font-size: 14px; color: var(--color-text-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-bg-deep); color: rgba(255,255,255,0.85); padding: var(--sp-7) 0 var(--sp-3); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: var(--sp-5); padding-bottom: var(--sp-5); border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand { font-size: 17px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 10px; }
.footer-brand p { margin-top: var(--sp-2); font-size: 13px; color: rgba(255,255,255,0.6); }
.footer-col h4 { color: #fff; font-size: 13px; margin-bottom: var(--sp-2); letter-spacing: .05em; }
.footer-col li { margin-top: 10px; font-size: 13.5px; color: rgba(255,255,255,0.7); }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: var(--sp-3); font-size: 12px; color: rgba(255,255,255,0.5); flex-wrap: wrap; gap: 8px; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0 !important; }
.text-center { text-align: center; }

/* =========================================================
   Responsive breakpoints
   Tablet: <=1024px / Mobile: <=640px
   ========================================================= */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; padding-top: var(--sp-6); }
  .hero__figure { order: -1; aspect-ratio: 16/9; }
  .hero h1 { font-size: 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5) var(--sp-3); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split__figure { order: -1; aspect-ratio: 16/9; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
  .nav-desktop__list { gap: var(--sp-3); }
}

@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 640px) {
  .section { padding: var(--sp-5) 0; }
  .section-title { font-size: 24px; }
  .hero h1 { font-size: 26px; }
  .hero__badge { position: static; margin-top: var(--sp-2); }
  .hero__cta .btn { flex: 1 1 auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid strong { font-size: 26px; }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .footer-bottom { flex-direction: column; }
  .page-hero h1 { font-size: 24px; }
  .info-table th { width: 120px; padding: 14px 12px; font-size: 13px; }
  .info-table td { padding: 14px 12px; font-size: 13.5px; }
  .store-meta { grid-template-columns: 1fr; }
  .job-card dl { grid-template-columns: 90px 1fr; }
}
