/*
Theme Name: Anshin Stock Theme
Theme URI: https://anshin-stock.com/
Author: Codex
Description: Custom lightweight theme for 一般社団法人 安心ストック住宅推進協会.
Version: 1.0.0
Text Domain: anshin-stock
*/

:root {
  --ink: #17212b;
  --muted: #5f6f7b;
  --line: #dce5e4;
  --paper: #f7faf8;
  --white: #ffffff;
  --green: #1f7a66;
  --green-dark: #155946;
  --blue: #255d83;
  --yellow: #dba83c;
  --shadow: 0 18px 42px rgba(31, 70, 82, .13);
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 86px;
  padding: 14px clamp(20px, 5vw, 56px);
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid rgba(220, 229, 228, .8);
  backdrop-filter: blur(14px);
}

.admin-bar .site-header { top: 32px; }

.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { display: block; width: 260px; }

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--green-dark);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  content: "";
}

.global-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.55vw, 24px);
  color: #273844;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-menu { display: contents; margin: 0; padding: 0; list-style: none; }

.global-nav a,
.footer-nav a { transition: color .2s ease, background .2s ease; }
.global-nav a:hover,
.footer-nav a:hover { color: var(--green); }

.nav-contact,
.global-nav .menu-item-contact a {
  padding: 10px 16px;
  color: var(--white);
  background: var(--green);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 650px;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 47, 57, .88) 0%, rgba(18, 47, 57, .68) 42%, rgba(18, 47, 57, .18) 100%),
    var(--hero-image) center / cover;
}

.hero-inner {
  position: relative;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0 110px;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(36px, 5.2vw, 66px);
  line-height: 1.2;
}

.lead {
  max-width: 760px;
  margin: 28px 0 0;
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, .92);
}

.hero-actions,
.join-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button,
.wp-block-button__link,
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary,
.wpcf7-submit { color: var(--white); background: var(--green); }
.button.secondary { color: var(--white); border: 1px solid rgba(255, 255, 255, .66); }
.button.secondary.dark { color: var(--green-dark); border-color: var(--green); }
.button.light { color: var(--green-dark); background: var(--white); }

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0;
}

.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-label {
  margin: 0 0 14px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading h2,
.guide-copy h2,
.join h2,
.page-title {
  margin: 0;
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1.32;
}

.section-subcopy {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 800;
  line-height: 1.7;
}

.row-heading {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.text-link {
  color: var(--green-dark);
  font-weight: 800;
  border-bottom: 2px solid var(--green);
}

.news-list,
.content-card,
.post-card,
.property-card,
.mission-grid article,
.join {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.news-list { overflow: hidden; }
.news-list a {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
.news-list a:last-child { border-bottom: 0; }
.news-list time { color: var(--blue); font-weight: 800; }

.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.mission-grid article { min-height: 250px; padding: 28px; }
.mission-grid span { display: block; color: var(--green); font-weight: 900; }
.mission-grid h3 { margin: 34px 0 12px; font-size: 22px; }
.mission-grid p,
.guide-copy p { margin: 0; color: var(--muted); }

.consumer-consult { padding-top: 0; }
.consult-card {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
	gap: 34px;
	align-items: center;
	padding: clamp(28px, 5vw, 48px);
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: var(--shadow);
}
.consult-copy h2 {
	margin: 0;
	font-size: clamp(27px, 4vw, 42px);
	line-height: 1.32;
}
.consult-copy p:not(.section-label) {
	margin: 18px 0 0;
	color: var(--muted);
	font-size: 17px;
	line-height: 1.9;
}
.consult-card figure { margin: 0; }
.consult-card img { display: block; width: 100%; height: auto; }
.consult-points {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 22px 0 28px;
}
.consult-points span {
	padding: 7px 12px;
	color: var(--green-dark);
	background: #edf7f4;
	border: 1px solid #d3e8e1;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 800;
}

.guide-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 74px clamp(20px, 6vw, 80px);
  color: var(--white);
  background: var(--green-dark);
}
.guide-copy { max-width: 760px; }
.guide-copy p { margin-top: 18px; color: rgba(255, 255, 255, .82); }

.property-card {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  min-height: 410px;
  overflow: hidden;
}
.property-image { min-height: 320px; background: linear-gradient(135deg, rgba(37, 93, 131, .24), rgba(31, 122, 102, .08)), #dce5e4 center / cover; }
.property-body { padding: clamp(28px, 5vw, 46px); }
.badge {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 5px 12px;
  color: var(--white);
  background: var(--blue);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.property-body h3 { margin: 0 0 22px; font-size: clamp(24px, 3vw, 34px); line-height: 1.35; }
.data-list { display: grid; gap: 0; margin: 0 0 28px; border-top: 1px solid var(--line); }
.data-list div { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.data-list dt { color: var(--muted); font-weight: 800; }
.data-list dd { margin: 0; }

.join {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  padding: 56px;
  margin-bottom: 86px;
}
.join > div:first-child { max-width: 720px; }
.join-actions { margin-top: 0; flex-shrink: 0; }

.page-hero {
  padding: 64px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-dark), var(--blue));
}
.page-hero-inner,
.content-layout {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
}
.breadcrumb { margin: 14px 0 0; color: rgba(255,255,255,.78); font-size: 13px; }
.content-layout { padding: 70px 0 90px; }
.content-card { padding: clamp(28px, 5vw, 54px); }
.entry-content h2,
.entry-content h3 { line-height: 1.45; }
.entry-content a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.entry-content table { width: 100%; border-collapse: collapse; background: var(--white); }
.entry-content th,
.entry-content td { padding: 14px 16px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { background: #edf4f2; }
.brand-logo-panel {
	display: flex;
	justify-content: center;
	padding: 26px;
	margin: 0 0 36px;
	background: #f4faf8;
	border: 1px solid #d9e9e4;
	border-radius: 8px;
}
.brand-logo-panel img { width: min(360px, 100%); height: auto; }
.message-layout {
	display: grid;
	grid-template-columns: minmax(180px, 260px) 1fr;
	gap: 32px;
	align-items: start;
	margin: 24px 0 42px;
}
.message-layout figure { margin: 0; }
.message-layout img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 16px 32px rgba(2, 32, 44, .12);
}
.signature { margin-top: 24px; font-weight: 800; text-align: right; color: #063348; }
.overview-table th { width: 28%; white-space: nowrap; }
.member-type-grid,
.feature-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin: 24px 0 38px;
}
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.info-panel,
.feature-panel,
.faq-item {
	padding: 24px;
	background: #f8fbfa;
	border: 1px solid #dbe9e5;
	border-radius: 8px;
}
.info-panel h3,
.feature-panel h3,
.faq-item h3 { margin-top: 0; }
.r-logo { display: flex; justify-content: center; margin: 10px 0 34px; }
.r-logo img { width: min(280px, 72vw); height: auto; }
.r-intro {
	display: grid;
	grid-template-columns: minmax(160px, 260px) 1fr;
	gap: 30px;
	align-items: center;
	margin: 8px 0 34px;
}
.r-intro .r-logo { margin: 0; }
.r-visual {
	margin: 28px 0 42px;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: 0 14px 34px rgba(2, 32, 44, .08);
}
.r-visual img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}
.r-lead {
	font-size: 19px;
	line-height: 2;
	color: #253f4d;
}
.faq-list { display: grid; gap: 18px; margin-top: 24px; }
.faq-accordion { display: grid; gap: 12px; margin-top: 24px; }
.faq-accordion details {
	background: #fff;
	border: 1px solid #dbe9e5;
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(2, 32, 44, .06);
	overflow: hidden;
}
.faq-accordion summary {
	position: relative;
	padding: 20px 58px 20px 22px;
	font-weight: 800;
	color: #063348;
	cursor: pointer;
	list-style: none;
}
.faq-accordion summary::-webkit-details-marker { display: none; }
.faq-accordion summary::after {
	content: "+";
	position: absolute;
	top: 50%;
	right: 22px;
	width: 28px;
	height: 28px;
	display: grid;
	place-items: center;
	color: #fff;
	background: var(--green);
	border-radius: 50%;
	transform: translateY(-50%);
}
.faq-accordion details[open] summary::after { content: "-"; }
.faq-answer {
	padding: 0 22px 22px;
	color: var(--muted);
}
.related-links { display: grid; gap: 10px; margin-top: 18px; }
.compact-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 18px;
}
.compact-links a {
	display: flex;
	align-items: center;
	min-height: 58px;
	padding: 14px 16px;
	color: #063348;
	text-decoration: none;
	background: #f8fbfa;
	border: 1px solid #dbe9e5;
	border-radius: 8px;
	font-weight: 800;
	line-height: 1.5;
}
.compact-links a::before {
	content: "";
	width: 8px;
	height: 8px;
	margin-right: 10px;
	background: var(--orange);
	border-radius: 50%;
	flex: 0 0 auto;
}
.consult-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
	gap: 34px;
	align-items: center;
	margin-bottom: 42px;
}
.consult-hero img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
	background: #f4faf8;
}
.consult-lead {
	margin-top: 0;
	font-size: 19px;
	line-height: 2;
	color: #253f4d;
}
.consult-topic-grid,
.consult-expert-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 24px 0 40px;
}
.consult-topic,
.consult-expert,
.consult-step {
	padding: 22px;
	background: #f8fbfa;
	border: 1px solid #dbe9e5;
	border-radius: 8px;
}
.consult-topic h3,
.consult-expert h3,
.consult-step h3 { margin-top: 0; }
.consult-flow {
	display: grid;
	gap: 14px;
	margin: 24px 0 40px;
	counter-reset: consult-step;
}
.consult-step {
	position: relative;
	padding-left: 72px;
}
.consult-step::before {
	counter-increment: consult-step;
	content: counter(consult-step, decimal-leading-zero);
	position: absolute;
	top: 22px;
	left: 22px;
	color: var(--green);
	font-weight: 900;
}
.consult-cta {
	padding: 30px;
	margin-top: 34px;
	color: #fff;
	background: #155946;
	border-radius: 8px;
}
.consult-cta h2 { color: #fff; }
.consult-cta p { color: rgba(255,255,255,.86); }
.consult-cta .button { margin-top: 8px; }
.member-section { margin-top: 44px; }
.member-table-wrap { overflow-x: auto; }
.member-table { min-width: 720px; }
.member-table a { font-weight: 800; }

.archive-grid { display: grid; gap: 18px; }
.post-card { display: block; padding: 24px 28px; }
.post-card time { color: var(--blue); font-weight: 800; }
.post-card h2 { margin: 8px 0 0; font-size: 22px; line-height: 1.45; }
.pagination { display: flex; gap: 10px; justify-content: center; margin-top: 36px; }
.pagination .page-numbers { padding: 8px 13px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; }
.pagination .current { color: var(--white); background: var(--green); border-color: var(--green); }

.property-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.property-filter a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-weight: 800; }
.property-list { display: grid; gap: 24px; }
.property-detail-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 30px 0; }
.property-detail-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--line); }
.property-notice { margin-top: 34px; padding: 24px; border-radius: 8px; background: #edf4f2; }
.map-embed iframe { width: 100%; min-height: 360px; border: 0; border-radius: 8px; }

.wpcf7-form table { width: 100%; }
.wpcf7-form { display: grid; gap: 18px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid label,
.wpcf7-form > label {
  display: grid;
  gap: 8px;
  color: #063348;
  font-weight: 800;
}
.form-wide { grid-column: 1 / -1; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}
.wpcf7-form textarea { min-height: 180px; }
.wpcf7-form .wpcf7-list-item { margin-left: 0; }
.wpcf7-form input[type="submit"] {
  width: min(240px, 100%);
  border: 0;
  cursor: pointer;
}
.wpcf7 form .wpcf7-response-output {
  margin: 0;
  padding: 14px 16px;
  border-radius: 8px;
}

.site-footer {
  padding: 36px clamp(20px, 5vw, 64px);
  color: rgba(255, 255, 255, .82);
  background: #142128;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-bottom: 18px; font-size: 14px; font-weight: 700; }
.footer-nav .nav-menu { display: flex; flex-wrap: wrap; gap: 18px 28px; }
.site-footer p { margin: 0; font-size: 12px; }

@media (max-width: 980px) {
  .admin-bar .site-header { top: 46px; }
  .site-header { min-height: 72px; }
  .brand img { width: 220px; }
  .menu-toggle { display: block; }
  .global-nav {
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    z-index: 40;
    width: min(360px, 86vw);
    height: calc(100vh - 72px);
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    gap: 0;
    padding: 24px;
    background: #fff;
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateX(105%);
    transition: transform .22s ease;
    white-space: normal;
    overflow-y: auto;
    pointer-events: none;
    visibility: hidden;
  }
  .global-nav > a,
  .global-nav .nav-menu a {
    display: block;
    width: 100%;
  }
  .global-nav .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  .global-nav .nav-menu li {
    display: block;
  }
  .global-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .global-nav .nav-contact,
  .global-nav .menu-item-contact a {
    justify-content: center;
    margin-top: 18px;
    padding: 13px 18px;
    border-bottom: 0;
  }
  .nav-open .global-nav {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
  }
  .nav-open { overflow: hidden; }
  .mission-grid,
  .consult-card,
  .consult-hero,
  .consult-topic-grid,
  .consult-expert-grid,
  .property-card { grid-template-columns: 1fr; }
  .message-layout,
  .r-intro,
  .member-type-grid,
  .feature-grid { grid-template-columns: 1fr; }
  .signature { text-align: left; }
  .overview-table,
  .overview-table tbody,
  .overview-table tr,
  .overview-table th,
  .overview-table td {
    display: block;
    width: 100%;
  }
  .overview-table tr { border: 1px solid var(--line); }
  .overview-table tr + tr { border-top: 0; }
  .overview-table th,
  .overview-table td { border: 0; }
  .overview-table th {
    padding-bottom: 4px;
    white-space: normal;
  }
  .overview-table td { padding-top: 4px; }
  .form-grid { grid-template-columns: 1fr; }
  .guide-band,
  .join { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
  .admin-bar .site-header { top: 0; }
  .site-header { padding: 12px 20px; }
  .brand img { width: 190px; }
  .hero { min-height: 590px; }
  .hero-inner { padding: 56px 0 86px; }
  .section { padding: 64px 0; }
  .row-heading { align-items: flex-start; flex-direction: column; }
  .news-list a,
  .data-list div { grid-template-columns: 1fr; gap: 4px; }
  .join { padding: 30px; }
  .content-layout { padding: 48px 0 70px; }
  .content-card { padding: 24px; }
  .compact-links { grid-template-columns: 1fr; }
  .brand-logo-panel { padding: 18px; margin-bottom: 28px; }
  .message-layout { gap: 22px; margin-bottom: 34px; }
  .message-layout figure {
    max-width: 240px;
    margin: 0 auto;
  }
}
