/*
Theme Name: がじゅまる 介護・福祉サービス
Theme URI: https://kaigo.marutasu.jp/
Author: 合同会社まるたす
Author URI: https://www.marutasu.jp/
Description: 合同会社まるたすの介護・福祉サービス「がじゅまる」専用ブロックテーマです。
Version: 0.2.2
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Text Domain: gajumaru-care
*/

:root {
  --gj-cream: #fbf8f1;
  --gj-off-white: #fffefb;
  --gj-paper: #fffefb;
  --gj-green: #315f45;
  --gj-green-dark: #1f4933;
  --gj-sage: #799b7d;
  --gj-sage-pale: #e8efe5;
  --gj-beige: #eee6d8;
  --gj-ink: #202722;
  --gj-muted: #5d685f;
  --gj-line: #d9dfd5;
  --gj-white: #ffffff;
  --gj-shadow: 0 18px 45px rgba(31, 73, 51, 0.08);
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--gj-ink);
  background: var(--gj-paper);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a { text-underline-offset: 0.18em; }
*, *::before, *::after { box-sizing: border-box; }
.wp-site-blocks { overflow: clip; }
.gj-container {
  width: calc(100% - 48px) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
}
.gj-section { padding: clamp(72px, 9vw, 118px) 0; }
.gj-section--pale { background: var(--gj-sage-pale); }
.gj-section--cream { background: var(--gj-cream); }
.gj-section,
.gj-contact-cta,
.gj-site-footer,
.gj-page-main {
  position: relative;
  overflow: clip;
  isolation: isolate;
}
.gj-section > *,
.gj-contact-cta > *,
.gj-site-footer > *,
.gj-page-main > * {
  position: relative;
  z-index: 1;
}
.gj-section::before,
.gj-page-main::before,
.gj-contact-cta::after,
.gj-site-footer::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: clamp(220px, 28vw, 430px);
  aspect-ratio: 760 / 520;
  pointer-events: none;
  background: url("assets/images/gajumaru-branch.svg") center / contain no-repeat;
  opacity: .085;
}
.gj-section::before {
  top: 22px;
  right: clamp(-155px, -9vw, -78px);
  transform: rotate(-7deg);
}
.gj-section:nth-of-type(even)::before {
  right: auto;
  left: clamp(-155px, -9vw, -78px);
  transform: scaleX(-1) rotate(-7deg);
}
.gj-section--pale::before { opacity: .13; }
.gj-section--cream::before { opacity: .11; }
.gj-page-main::before {
  top: 34px;
  right: clamp(-175px, -10vw, -86px);
  opacity: .075;
  transform: rotate(-6deg);
}
.gj-contact-cta::after {
  right: clamp(-120px, -5vw, -40px);
  bottom: -70px;
  opacity: .12;
  filter: brightness(1.9) saturate(.7);
  transform: rotate(8deg);
}
.gj-site-footer::before {
  left: clamp(-150px, -7vw, -55px);
  bottom: -74px;
  opacity: .1;
  filter: brightness(1.9) saturate(.65);
  transform: scaleX(-1) rotate(5deg);
}
.gj-kicker {
  margin: 0 0 12px;
  color: var(--gj-green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.gj-section-title { margin: 0 0 18px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.35; }
.gj-lead { color: var(--gj-muted); font-size: clamp(1rem, 1.5vw, 1.12rem); }

.gj-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(49, 95, 69, 0.12);
  background: rgba(255, 254, 251, 0.95);
  backdrop-filter: blur(14px);
}
.gj-header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.gj-brand-logo { display: block; width: 220px; max-width: 100%; line-height: 0; }
.gj-brand-logo img { display: block; width: 100%; height: auto; }
.gj-brand-note { margin: -4px 0 0; color: var(--gj-muted); font-size: 0.73rem; }
.gj-main-nav { font-size: 0.84rem; font-weight: 700; }
.gj-main-nav .wp-block-navigation-item__content { padding-block: 12px; }
.gj-main-nav .gj-nav-contact > .wp-block-navigation-item__content {
  padding: 10px 20px;
  border-radius: 10px;
  color: var(--gj-white);
  background: var(--gj-green);
}

.gj-hero { padding: clamp(64px, 8vw, 108px) 0 46px; background: var(--gj-cream); }
.gj-hero-grid { align-items: center !important; gap: clamp(40px, 6vw, 88px); }
.gj-hero-copy { flex-basis: 55% !important; }
.gj-hero-art { flex-basis: 45% !important; }
.gj-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.65rem, 5.2vw, 4.65rem);
  line-height: 1.35;
  letter-spacing: -0.04em;
}
.gj-hero-text { max-width: 690px; margin: 24px 0 0; color: #48554c; font-size: clamp(1rem, 1.4vw, 1.12rem); }
.gj-botanical { width: 100%; min-height: 390px; object-fit: contain; opacity: 0.92; }
.gj-facts { display: flex; gap: 12px 28px; flex-wrap: wrap; margin-top: 26px; }
.gj-fact { display: flex; align-items: center; gap: 11px; margin: 0; font-size: 0.9rem; }
.gj-fact b { color: var(--gj-green-dark); }
.gj-fact-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  flex: 0 0 auto; border-radius: 50%; color: var(--gj-green); background: var(--gj-sage-pale);
}
.gj-fact-mark .gj-icon-svg { width: 19px; height: 19px; }
.gj-icon-svg { width: 24px; height: 24px; display: block; }

.gj-route-wrap { margin-top: 40px !important; }
.gj-route-grid, .gj-quick-grid, .gj-service-grid, .gj-office-grid {
  display: grid;
  gap: 18px;
}
.gj-route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gj-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }
.gj-route, .gj-quick-card, .gj-service-card, .gj-office-card {
  min-width: 0;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--gj-line);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 8px 24px rgba(31,73,51,0.035);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.gj-route:hover, .gj-quick-card:hover, .gj-service-card:hover, .gj-office-card:hover {
  transform: translateY(-3px); border-color: var(--gj-sage); box-shadow: var(--gj-shadow);
}
.gj-route { min-height: 128px; display: flex; align-items: center; gap: 22px; padding: 24px 28px; border-radius: 18px; }
.gj-route:first-child { border: 2px solid var(--gj-green); }
.gj-route-icon, .gj-service-icon {
  flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
  color: var(--gj-white); background: linear-gradient(145deg, var(--gj-sage), var(--gj-green));
}
.gj-route-icon { width: 64px; height: 64px; }
.gj-route-icon .gj-icon-svg { width: 29px; height: 29px; }
.gj-route-copy { min-width: 0; flex: 1; }
.gj-route strong { display: block; color: var(--gj-green-dark); font-size: 1.25rem; }
.gj-route small { display: block; color: var(--gj-muted); font-size: 0.84rem; overflow-wrap: anywhere; }
.gj-route-arrow { color: var(--gj-green); font-size: 1.8rem; }
.gj-quick-card {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 16px;
  border-radius: 16px;
  text-align: left;
  font-weight: 700;
}
.gj-quick-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--gj-green);
  background: var(--gj-sage-pale);
}
.gj-quick-icon .gj-icon-svg { width: 22px; height: 22px; }
.gj-quick-label { min-width: 0; color: var(--gj-green-dark); line-height: 1.55; overflow-wrap: anywhere; }

.gj-consult {
  margin: 32px 0 0; padding: 28px 34px; display: flex; align-items: center; justify-content: space-between; gap: 30px;
  border: 1px solid var(--gj-line); border-radius: 18px; background: linear-gradient(110deg, #f4f6ef, #fbfaf5);
}
.gj-consult h2 { margin: 0 0 4px; color: var(--gj-green-dark); font-size: 1.35rem; }
.gj-consult p { margin: 0; color: var(--gj-muted); font-size: 0.9rem; }
.gj-button, .wp-block-button__link {
  min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 0 26px; border-radius: 10px; color: var(--gj-white); background: var(--gj-green);
  font-weight: 800; text-decoration: none;
}
.gj-button:hover, .wp-block-button__link:hover { color: var(--gj-white); background: var(--gj-green-dark); }
.gj-button--outline { color: var(--gj-green-dark); border: 1px solid var(--gj-green); background: transparent; }
.gj-button--outline:hover { color: var(--gj-white); }

.gj-about-grid { align-items: center !important; gap: clamp(42px, 7vw, 90px); }
.gj-about-panel { position: relative; overflow: hidden; padding: clamp(30px, 5vw, 58px); border-radius: 28px; background: var(--gj-white); box-shadow: var(--gj-shadow); }
.gj-about-panel::after { content: ""; position: absolute; width: 170px; height: 170px; right: -68px; bottom: -74px; border-radius: 50%; background: var(--gj-sage-pale); opacity: .75; }
.gj-about-mark { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 0 24px; border-radius: 24px; color: var(--gj-green); background: var(--gj-sage-pale); }
.gj-about-mark .gj-icon-svg { width: 44px; height: 44px; }
.gj-about-mark .gj-brand-mark-svg { display: block; width: 48px; height: 48px; }

.gj-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gj-service-card { padding: 34px; border-radius: 20px; }
.gj-service-card header { display: flex; align-items: center; gap: 15px; }
.gj-service-icon { width: 48px; height: 48px; }
.gj-service-icon .gj-icon-svg { width: 23px; height: 23px; }
.gj-service-card h3 { margin: 0; font-size: 1.38rem; }
.gj-service-card p { color: var(--gj-muted); }
.gj-text-link { color: var(--gj-green-dark); font-weight: 800; }

.gj-office-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gj-office-card { padding: 34px; border-radius: 20px; }
.gj-office-area { color: var(--gj-green); font-size: 0.8rem; font-weight: 900; letter-spacing: .12em; }
.gj-office-card h3 { margin: 8px 0 14px; font-size: 1.6rem; }
.gj-office-card ul { padding-left: 1.3em; }
.gj-office-card address { color: var(--gj-muted); font-style: normal; }

.gj-flow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.gj-flow-step { padding: 27px; border-top: 3px solid var(--gj-sage); background: var(--gj-white); }
.gj-flow-step b { color: var(--gj-green); font-size: .78rem; letter-spacing: .12em; }
.gj-flow-step h3 { margin: 8px 0; }
.gj-flow-step p { margin: 0; color: var(--gj-muted); font-size: .92rem; }

.gj-news .wp-block-post { padding: 18px 0; border-bottom: 1px solid var(--gj-line); }
.gj-news .wp-block-post-date { color: var(--gj-muted); font-size: .78rem; }
.gj-news .wp-block-post-title { margin: 5px 0 0; font-size: 1rem; }
.gj-news .wp-block-post-title a { text-decoration: none; }
.gj-disclosure { padding: 26px 30px; border-left: 4px solid var(--gj-sage); background: var(--gj-sage-pale); }

.gj-contact-cta { padding: clamp(65px, 8vw, 96px) 0; color: var(--gj-white); background: var(--gj-green-dark); }
.gj-contact-cta h2 { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3.1rem); }
.gj-contact-cta p { color: #dbe7dd; }
.gj-contact-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.gj-contact-buttons .gj-button { color: var(--gj-green-dark); background: var(--gj-white); }
.gj-contact-buttons .gj-button--outline { color: var(--gj-white); border-color: #a9c3ae; background: transparent; }

.gj-site-footer { padding: 70px 0 34px; color: #f4f8f4; background: #183b2a; }
.gj-footer-brand { margin-bottom: 38px; }
.gj-footer-brand strong { font-size: 1.4rem; letter-spacing: .08em; }
.gj-footer-brand p { margin: 3px 0; color: #c7d8ca; font-size: .82rem; }
.gj-footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.gj-footer-grid h2 { font-size: .92rem; }
.gj-footer-grid ul { list-style: none; margin: 0; padding: 0; }
.gj-footer-grid li { margin: 8px 0; }
.gj-footer-grid a { color: #eaf2eb; font-size: .82rem; text-decoration: none; }
.gj-footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); color: #a9bdad; font-size: .72rem; }
.gj-mobile-actions { display: none; }

.gj-page-main { padding: clamp(58px, 8vw, 96px) 0; }
.gj-page-main > .wp-block-post-title, .gj-page-main > .wp-block-post-content { width: min(900px, calc(100% - 48px)); margin-inline: auto; }
.gj-page-main > .wp-block-post-title { font-size: clamp(2.2rem, 5vw, 3.7rem); }
.gj-page-main > .wp-block-post-content { margin-top: 40px; }

/* Contact Form 7 */
.gj-page-main .wpcf7 {
  max-width: 760px;
  margin-top: 34px;
}
.gj-page-main .wpcf7-form {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--gj-line);
  border-radius: 18px;
  background: var(--gj-cream);
  box-shadow: 0 12px 36px rgba(31, 73, 51, 0.06);
}
.gj-page-main .wpcf7-form > label {
  display: block;
  margin: 0 0 22px;
  color: var(--gj-ink);
  font-weight: 750;
}
.gj-page-main .wpcf7-form-control-wrap {
  display: block;
  margin-top: 7px;
}
.gj-page-main .wpcf7 input[type="text"],
.gj-page-main .wpcf7 input[type="email"],
.gj-page-main .wpcf7 input[type="tel"],
.gj-page-main .wpcf7 select,
.gj-page-main .wpcf7 textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  padding: 11px 13px;
  border: 1px solid #aebaae;
  border-radius: 8px;
  color: var(--gj-ink);
  background: var(--gj-white);
  font: inherit;
  line-height: 1.55;
}
.gj-page-main .wpcf7 textarea {
  min-height: 190px;
  resize: vertical;
}
.gj-page-main .wpcf7 input:focus-visible,
.gj-page-main .wpcf7 select:focus-visible,
.gj-page-main .wpcf7 textarea:focus-visible {
  outline: 3px solid rgba(49, 95, 69, 0.25);
  outline-offset: 2px;
  border-color: var(--gj-green);
}
.gj-page-main .wpcf7-acceptance {
  display: block;
  margin: 6px 0 24px;
}
.gj-page-main .wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.gj-page-main .wpcf7-acceptance input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0.25em 0 0;
  accent-color: var(--gj-green);
}
.gj-page-main .wpcf7 input[type="submit"] {
  min-width: 190px;
  min-height: 54px;
  padding: 0 30px;
  border: 0;
  border-radius: 10px;
  color: var(--gj-white);
  background: var(--gj-green);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.gj-page-main .wpcf7 input[type="submit"]:hover {
  background: var(--gj-green-dark);
  transform: translateY(-1px);
}
.gj-page-main .wpcf7 input[type="submit"]:focus-visible {
  outline: 3px solid rgba(49, 95, 69, 0.3);
  outline-offset: 3px;
}
.gj-page-main .gajumaru-form-note {
  margin: 0 0 28px;
  padding: 16px 18px;
  border-left: 4px solid var(--gj-sage);
  background: var(--gj-sage-pale);
  color: var(--gj-green-dark);
  font-size: .93rem;
}
.gj-page-main .wpcf7-not-valid-tip {
  margin-top: 5px;
  color: #a12c2c;
  font-size: .86rem;
  font-weight: 700;
}
.gj-page-main .wpcf7-response-output {
  margin: 24px 0 0 !important;
  padding: 14px 16px !important;
  border-radius: 8px;
}
.gj-page-main .wpcf7-spinner {
  vertical-align: middle;
}

@media (max-width: 1100px) {
  /* backdrop-filter creates a containing block for fixed descendants and can
     trap WordPress's responsive navigation overlay inside the sticky header. */
  .gj-site-header {
    background: var(--gj-off-white);
    backdrop-filter: none;
  }
  .gj-main-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
  .gj-main-nav .wp-block-navigation__responsive-container-open { display: flex; }
  .gj-main-nav .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed;
    inset: 0;
    z-index: 100000;
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    padding: 28px 24px 40px;
    overflow-y: auto;
    background: var(--gj-off-white);
  }
  .gj-main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    width: 100%;
    padding-top: 52px;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .gj-main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
  }
  .gj-main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
    width: 100%;
    align-items: flex-start;
  }
  .gj-main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    width: 100%;
    padding: 11px 0;
    text-align: left;
  }
}

@media (max-width: 960px) {
  .gj-container { width: calc(100% - 36px) !important; }
  .gj-header-inner { min-height: 72px; }
  .gj-hero-grid, .gj-about-grid { flex-wrap: wrap !important; }
  .gj-hero-copy, .gj-hero-art, .gj-about-grid > .wp-block-column { flex-basis: 100% !important; }
  .gj-hero-art { order: 2; }
  .gj-botanical { min-height: 270px; max-height: 390px; }
  .gj-route-grid { grid-template-columns: 1fr; }
  .gj-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
  body { padding-bottom: 76px; }
  .gj-container, .gj-page-main > .wp-block-post-title, .gj-page-main > .wp-block-post-content { width: calc(100% - 30px) !important; }
  .gj-brand-logo { width: 176px; }
  .gj-brand-note { font-size: .68rem; }
  .gj-hero { padding-top: 46px; }
  .gj-hero h1 { font-size: clamp(2.15rem, 10vw, 3.2rem); line-height: 1.42; }
  .gj-hero-text { font-size: 1rem; }
  .gj-botanical { min-height: 230px; }
  .gj-route-grid, .gj-service-grid, .gj-office-grid, .gj-flow-grid, .gj-footer-grid { grid-template-columns: 1fr; }
  .gj-route { min-height: 112px; padding: 20px; }
  .gj-route-icon { width: 54px; height: 54px; }
  .gj-route strong { font-size: 1.08rem; }
  .gj-quick-card { min-height: 86px; justify-content: flex-start; padding: 14px 12px; font-size: .84rem; }
  .gj-quick-icon { width: 38px; height: 38px; border-radius: 11px; }
  .gj-consult { align-items: stretch; flex-direction: column; padding: 25px; }
  .gj-consult .gj-button { width: 100%; }
  .gj-section { padding: 72px 0; }
  .gj-service-card, .gj-office-card { padding: 27px 22px; }
  .gj-contact-buttons { flex-direction: column; }
  .gj-contact-buttons .gj-button { width: 100%; }
  .gj-page-main .wpcf7-form { padding: 24px 18px; }
  .gj-page-main .wpcf7 input[type="submit"] { width: 100%; }
  .gj-site-footer { padding-top: 58px; }
  .gj-section::before,
  .gj-page-main::before {
    width: 210px;
    opacity: .06;
  }
  .gj-section--pale::before,
  .gj-section--cream::before { opacity: .085; }
  .gj-contact-cta::after,
  .gj-site-footer::before { width: 230px; opacity: .075; }
  .gj-mobile-actions {
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 60;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px;
    border: 1px solid var(--gj-line); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 12px 34px rgba(20,50,34,.2);
  }
  .gj-mobile-actions a { min-height: 48px; display: grid; place-items: center; border-radius: 9px; color: var(--gj-green-dark); border: 1px solid var(--gj-green); font-weight: 800; text-decoration: none; }
  .gj-mobile-actions a:last-child { color: var(--gj-white); background: var(--gj-green); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
