@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --blue: #2f5388;
  --blue-dark: #1f3a63;
  --blue-footer: #2b4d82;
  --text: #333333;
  --gray: #666666;
  --border: #d8dee6;
  --bg: #ffffff;

  --font-body: 'Noto Sans JP', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--blue);
  text-decoration: none;
}

h1, h2, h3 {
  font-weight: 700;
  margin: 0;
  color: var(--blue);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  z-index: 200;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.brand { display: block; }

.brand-ja {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
}

.brand-en {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  text-decoration: underline;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--blue);
  border-radius: 4px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--blue);
  margin: 4px auto;
}

@media (max-width: 760px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.open { max-height: 320px; }
  .main-nav a {
    padding: 16px 32px;
    border-top: 1px solid var(--border);
  }
  .nav-toggle { display: block; }
}

/* ===== Hero (photo + overlay text) ===== */
.hero {
  position: relative;
  background: #1a1a1a url('../images/hero-brush.jpg') center/cover no-repeat;
  color: #fff;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 32px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
}
.hero-content { position: relative; }
.hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  letter-spacing: 0.02em;
}

/* ===== Page hero (photo, shorter, no text) ===== */
.page-hero {
  position: relative;
  background: #1a1a1a url('../images/hero-craft.jpg') center/cover no-repeat;
  min-height: 260px;
}
.page-hero.plain { background-color: #24344f; }

.hero-slideshow {
  position: relative;
  overflow: hidden;
}
.hero-slideshow .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}
.hero-slideshow .slide.active {
  opacity: 1;
}

/* ===== Section wrappers ===== */
section { padding: 64px 0; }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 20px;
}

.section-intro {
  max-width: 720px;
  color: var(--text);
  font-size: 0.98rem;
}
.section-intro.centered {
  margin: 0 auto 40px;
  text-align: center;
}

/* ===== Bunbou-shihou grid (brush/ink/inkstone/paper) — dark photo cards ===== */
.shihou-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 40px auto 0;
}

.shihou-card {
  position: relative;
  background: #14171c center/cover no-repeat;
  color: #fff;
  padding: 36px 32px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.shihou-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.shihou-card.fude   { background-image: url('../images/shihou-fude.jpg'); }
.shihou-card.sumi   { background-image: url('../images/shihou-sumi.jpg'); }
.shihou-card.suzuri { background-image: url('../images/shihou-suzuri.jpg'); }
.shihou-card.kami   { background-image: url('../images/shihou-kami.jpg'); }

.shihou-kanji {
  position: relative;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.shihou-card p.desc {
  position: relative;
  font-size: 0.85rem;
  line-height: 1.9;
}

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

/* ===== Story / text block ===== */
.story-block { max-width: 760px; margin: 0 auto; }
.story-block h2 { font-size: 1.8rem; margin-bottom: 24px; }
.story-block p { font-size: 1rem; color: var(--text); }

.section-divider { height: 48px; }

/* ===== Forms ===== */
.form-card {
  max-width: 640px;
  margin: 0 auto;
}
.form-card h2 { font-size: 1.4rem; margin-bottom: 8px; }
.form-card .form-lead {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--blue);
}

.field .required {
  color: #b6432c;
  font-weight: 400;
  font-size: 0.78rem;
  margin-left: 4px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 3px;
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.field textarea { resize: vertical; min-height: 140px; }

.btn-submit {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 13px 34px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-submit:hover { background: var(--blue-dark); }
.btn-submit:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 3px; }

/* ===== Branches ===== */
.branch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
@media (max-width: 760px) {
  .branch-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .branch-grid { grid-template-columns: 1fr; }
}

.branch-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 78px;
  padding: 16px;
  border-radius: 3px;
  font-size: 1rem;
  font-weight: 500;
  background: var(--blue);
  color: #fff;
}

.branch-item.linked {
  transition: background 0.2s ease;
}
.branch-item.linked:hover { background: var(--blue-dark); }

.branch-item.unlinked {
  background: #7d92ad;
}

.branch-note {
  text-align: center;
  color: var(--gray);
  font-size: 0.88rem;
  margin-top: 28px;
}

.special-link-card {
  max-width: 520px;
  margin: 48px auto 0;
  text-align: center;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.special-link-card a { font-weight: 700; }

/* ===== Special members list ===== */
.members-list {
  max-width: 760px;
  margin: 40px auto 0;
  border-top: 1px solid var(--border);
}
.member-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
}
.member-name { font-weight: 700; min-width: 220px; color: var(--blue); }
.member-address { color: var(--gray); font-size: 0.92rem; }

/* ===== Footer (solid blue band, like original) ===== */
.site-footer {
  background: var(--blue-footer);
  color: #fff;
  padding: 40px 32px 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}
.footer-brand .brand-ja { color: #fff; font-size: 1.05rem; }
.footer-brand .brand-en { color: #cfe0f5; }
.footer-brand a {
  display: inline-block;
  margin-top: 10px;
  color: #cfe0f5;
  font-size: 0.9rem;
}
.footer-office {
  font-size: 0.88rem;
  color: #dfeaf7;
  line-height: 1.8;
}

.footer-links {
  max-width: 1100px;
  margin: 28px auto 0;
  display: flex;
  gap: 16px;
}
.footer-links a {
  color: #fff;
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.5);
  padding: 6px 16px;
  border-radius: 3px;
}

.footer-bottom {
  max-width: 1100px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.25);
  font-size: 0.78rem;
  color: #cfe0f5;
}

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