/* Home bundle: common.css + style.css */

:root {
  --color-ink: #23282b;
  --color-muted: #5f696d;
  --color-primary: #4f5457;
  --color-accent: #c3d601;
  --color-accent-soft: #eef4c2;
  --color-gold: #bd990c;
  --color-rose: #e7006f;
  --color-bg: #f7f9f8;
  --color-surface: #ffffff;
  --color-border: #d7dedb;
  --shadow-soft: 0 16px 34px rgba(54, 63, 67, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--color-ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(195, 214, 1, 0.12), transparent 50%),
    radial-gradient(900px 400px at -20% 80%, rgba(189, 153, 12, 0.1), transparent 55%),
    var(--color-bg);
  line-height: 1.85;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 10px;
  color: #1f2a1f;
  background: #e8f3d1;
  border: 1px solid #8da441;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 10px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid #5f7120;
  outline-offset: 2px;
}

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, 94vw);
  margin: 16px auto 18px;
  padding: 10px 16px;
  border: 1px solid rgba(79, 84, 87, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

nav picture img,
.phone_nav_img img,
footer .lower-row picture img {
  display: block;
  max-height: 52px;
  width: auto;
  object-fit: contain;
}

nav ol {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

nav ol li a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.25s ease, color 0.25s ease;
}

nav ol li a[aria-current="page"] {
  background: var(--color-accent-soft);
  color: #374044;
}

nav ol li a:hover {
  background: var(--color-accent-soft);
  color: #374044;
}

main {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

section {
  margin-bottom: 54px;
}

section h2,
section h3 {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  letter-spacing: 0.03em;
  font-weight: 700;
}

section h2 {
  font-size: clamp(30px, 4vw, 42px);
  text-align: center;
  margin-bottom: 10px;
}

section h3 {
  font-size: clamp(24px, 3vw, 34px);
  text-align: center;
  margin-bottom: 22px;
}

hr.line {
  width: min(760px, 72vw);
  border: none;
  height: 1px;
  margin: 30px auto 56px;
  background: linear-gradient(90deg, transparent, rgba(79, 84, 87, 0.3), transparent);
}

section > div,
.content > div,
.main-content > div,
.form,
.message {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: clamp(16px, 2.2vw, 24px);
}

.checkbutton {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid var(--color-primary);
  background: linear-gradient(120deg, #ffffff, #f6f8f7);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.checkbutton:hover {
  transform: translateY(-2px);
  border-color: var(--color-gold);
  box-shadow: 0 10px 24px rgba(79, 84, 87, 0.13);
}

.checkbutton a {
  display: inline-block;
  padding: 13px 28px;
  font-weight: 700;
  color: var(--color-primary);
}

footer {
  width: min(1120px, 94vw);
  margin: 30px auto 34px;
  padding: 28px 26px;
  border-radius: 24px;
  border: 1px solid var(--color-border);
  background: #fbfcfb;
}

footer .upper-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 22px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(79, 84, 87, 0.2);
}

footer .upper-row ul {
  list-style: none;
}

footer .upper-row h3 {
  margin-bottom: 10px;
  font-size: 18px;
  text-align: left;
}

footer .upper-row .foot-head {
  margin-top: 0;
}

footer .upper-row li + li {
  margin-top: 4px;
}

footer .upper-row li a {
  color: var(--color-muted);
  font-size: 14px;
}

footer .upper-row li a:hover {
  color: var(--color-primary);
}

footer .lower-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  flex-wrap: wrap;
}

footer .lower-row .cert-logos {
  display: flex;
  align-items: center;
  gap: 14px;
}

footer .lower-row .cert-logos img {
  max-height: 52px;
  width: auto;
  object-fit: contain;
}

footer .lower-row .office-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

footer .lower-row .office-block picture img {
  max-height: 52px;
  width: auto;
  object-fit: contain;
}

footer .lower-row .office-block div h3 {
  margin: 0 0 4px;
  font-size: 16px;
  text-align: left;
}

footer .lower-row .office-block div ul {
  list-style: none;
  color: var(--color-muted);
  font-size: 13px;
}

/* Mobile nav for index */
.phone_nav_img,
.toggle_btn,
.nav,
#mask {
  display: none;
}

@media (max-width: 760px) {
  nav {
    display: none;
  }

  body {
    padding-top: 74px;
  }

  .phone_nav_img {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    width: 100%;
    height: 64px;
    margin: 0;
    padding: 10px 16px;
    background: #fdfdfd;
    border-bottom: 1px solid #d8e0de;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
  }

  .phone_nav_img img {
    max-height: 42px;
  }

  .nav {
    display: block;
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid var(--color-border);
    transition: left 0.3s ease;
    z-index: 50;
    padding-top: 76px;
  }

  .open .nav {
    left: 0;
  }

  .nav .inner ul {
    list-style: none;
  }

  .nav .inner li + li {
    border-top: 1px solid #edf1ee;
  }

  .nav .inner a {
    display: block;
    padding: 13px 18px;
    color: var(--color-primary);
    font-size: 14px;
  }

  .toggle_btn {
    appearance: none;
    border: 0;
    background: transparent;
    display: block;
    position: fixed;
    right: 18px;
    top: 18px;
    width: 34px;
    height: 28px;
    z-index: 60;
    cursor: pointer;
  }

  .toggle_btn span {
    position: absolute;
    left: 0;
    width: 34px;
    height: 2px;
    border-radius: 999px;
    background: var(--color-primary);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .toggle_btn span:nth-child(1) {
    top: 0;
  }

  .toggle_btn span:nth-child(2) {
    top: 12px;
  }

  .toggle_btn span:nth-child(3) {
    top: 24px;
  }

  .open .toggle_btn span:nth-child(1) {
    transform: translateY(12px) rotate(45deg);
  }

  .open .toggle_btn span:nth-child(2) {
    opacity: 0;
  }

  .open .toggle_btn span:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg);
  }

  .open #mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(20, 24, 25, 0.45);
    z-index: 40;
  }

  main,
  footer {
    width: 92vw;
  }

  footer .upper-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  footer .lower-row {
    justify-content: center;
  }

  footer .lower-row .cert-logos,
  footer .lower-row .office-block {
    width: 100%;
    justify-content: center;
  }

  section {
    margin-bottom: 38px;
  }
}


main {
  width: min(1120px, 92vw);
}

body.home-page {
  --home-hero-image: url('../img/header.webp');
}

body.home-page > nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 16px;
  margin-bottom: 0;
}

.hero-home {
  margin-top: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 100vh;
  height: 100vh;
  border-radius: 0;
  overflow: hidden;
  display: grid;
  align-items: center;
  background:
    linear-gradient(105deg, rgba(24, 31, 9, 0.9), rgba(58, 72, 20, 0.66)),
    var(--home-hero-image) center/cover no-repeat;
}

@media (max-width: 760px) {
  body.home-page {
    --home-hero-image: url('../img/h-4.webp');
  }

  .hero-home {
    background:
      linear-gradient(105deg, rgba(24, 31, 9, 0.86), rgba(58, 72, 20, 0.62)),
      var(--home-hero-image) center/cover no-repeat;
  }

  .home-page main > section:not(.hero-home) {
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
  }
}

.hero-home .inner {
  width: min(900px, min(1120px, 94vw));
  max-width: min(900px, min(1120px, 94vw));
  padding: clamp(22px, 4vw, 46px);
  margin-left: max(0px, calc((100vw - min(1120px, 94vw)) / 2));
  margin-right: 0;
  color: #fff;
  background: linear-gradient(120deg, rgba(28, 36, 10, 0.52), rgba(28, 36, 10, 0.24));
  border-radius: 14px;
}

.hero-home .eyebrow {
  font-size: 12px;
  letter-spacing: 0.15em;
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 400;
}

.hero-home h1 {
  font-size: clamp(30px, 4.2vw, 60px);
  line-height: 1.2;
  margin-bottom: 14px;
  font-weight: 500;
  color: #f9fbf3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  white-space: normal;
  overflow-wrap: anywhere;
}

.hero-home p {
  font-size: 15px;
  font-weight: 400;
  color: rgba(249, 251, 243, 0.94);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.28);
}

.hero-home .btns {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-home .btns a {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  border: 1px solid #677f24;
  background: #627a21;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (max-width: 1100px) {
  .hero-home .inner {
    width: min(860px, min(1120px, 94vw));
    max-width: min(860px, min(1120px, 94vw));
  }
}

@media (max-width: 900px) {
  .hero-home .inner {
    width: min(760px, 92vw);
    max-width: min(760px, 92vw);
    margin-left: auto;
    margin-right: auto;
    padding: clamp(18px, 3.4vw, 28px);
  }

  .hero-home h1 {
    font-size: clamp(28px, 4.8vw, 44px);
  }

  .hero-home .btns a {
    padding: 10px 20px;
    font-size: 16px;
  }
}

.hero-home .btns a.secondary {
  background: #6f8728;
}

.hero-home .btns a:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.section-title {
  text-align: center;
  margin-bottom: 18px;
}

.section-title .sub {
  display: block;
  color: var(--color-muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.services-pick,
.office-jump,
.association-home,
.office-info,
.home-contact {
  margin-top: 52px;
}

.services-lead {
  text-align: center;
  font-size: 15px;
  color: var(--color-muted);
  margin: -8px 0 14px;
}

.services-pick > .services-grid {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.services-grid article {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.services-grid picture {
  display: block;
}

.services-grid img {
  width: 100%;
  height: 221px;
  object-fit: cover;
}

.services-grid .txt {
  padding: 14px;
}

.services-grid h3 {
  text-align: left;
  margin-bottom: 6px;
  font-size: 22px;
}

.services-grid p {
  color: var(--color-muted);
  font-size: 14px;
}

.services-grid a {
  display: block;
  margin-top: 8px;
  color: #5f6f20;
  font-weight: 700;
  font-size: 13px;
  text-align: right;
  transition: opacity 0.2s ease;
}

.services-grid a:hover {
  opacity: 0.8;
}

.office-jump {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 320px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.office-jump::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(40, 50, 14, 0.44), rgba(82, 98, 29, 0.34)),
    url('../img/h-4.webp') center/cover no-repeat;
  filter: blur(2.5px);
  transform: scale(1.04);
}

.office-jump .box {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  box-shadow: none;
  min-height: 240px;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 24px;
}

.office-jump h3 {
  color: #fff;
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 10px;
}

.office-jump p {
  color: rgba(255, 255, 255, 0.92);
}

.office-jump a {
  display: inline-block;
  margin-top: 14px;
  padding: 11px 24px;
  border-radius: 999px;
  background: #fff;
  color: #53611a;
  font-weight: 700;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.office-info .card,
.association-home .card,
.home-contact .card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.office-info p,
.association-home p,
.association-home td,
.home-contact p {
  color: var(--color-muted);
}

.association-home table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.association-home td {
  border-bottom: 1px solid #edf1ee;
  padding: 10px 8px;
}

.association-home td:first-child {
  width: 120px;
  color: var(--color-primary);
  font-weight: 700;
}

.home-contact .card {
  text-align: center;
}

.home-contact a {
  display: inline-block;
  margin-top: 10px;
  padding: 11px 24px;
  border-radius: 999px;
  background: #5f7120;
  color: #fdfef8;
  font-weight: 700;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.office-jump a:hover,
.home-contact a:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

@media (max-width: 960px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.home-page {
    padding-top: 0;
  }

  .hero-home .inner {
    width: min(680px, 92vw);
    max-width: min(680px, 92vw);
    margin-left: auto;
    margin-right: auto;
    padding: 16px 14px;
  }

  .hero-home h1 {
    font-size: clamp(24px, 7.2vw, 34px);
    line-height: 1.28;
    margin-bottom: 12px;
  }

  .hero-home .btns {
    gap: 8px;
  }

  .hero-home .btns a {
    padding: 9px 16px;
    font-size: 14px;
  }

  body.home-page .phone_nav_img {
    background: rgba(253, 253, 253, 0.92);
    backdrop-filter: blur(4px);
  }
}

@media (max-width: 420px) {
  .hero-home .btns a {
    padding: 8px 14px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .hero-home .btns {
    display: none;
  }
}
