/* =======================================================================
   style.css
   外壁塗装・リフォーム会社 テンプレートサイト共通スタイル
   配色や見出しなどの「値」は config.js の値を js/script.js が
   CSSカスタムプロパティ(--main-color 等)に反映する仕組みです。
   ここでは config.js のデフォルト値に合わせた初期値を定義しています。
   ======================================================================= */

:root {
  /* カラー(config.js の mainColor / accentColor と同期。JSが未実行でも
     崩れないようデフォルト値をここに用意しています) */
  --main-color: #1A3A5C;
  --main-color-dark: #0F2540;
  --accent-color: #E8A33D;
  --accent-color-dark: #C7841F;

  --color-bg: #FFFFFF;
  --color-bg-alt: #F5F7FA;
  --color-text: #2B2E33;
  --color-text-muted: #565C64;
  --color-border: #DDE3EA;
  --color-white: #FFFFFF;

  --font-heading: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Sans", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;

  --max-width: 1120px;
  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(15, 37, 64, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 37, 64, 0.14);

  --header-height: 64px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  margin: 0;
  padding-top: 38px;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
.portfolio-notice {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1100;
  padding: 8px 20px;
  background: #fff3cf;
  border-bottom: 1px solid #e6c777;
  color: #3f321e;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.5;
}
.site-header { inset-block-start: 38px; }
@media (max-width: 620px) {
  body { padding-top: 58px; }
  .site-header { inset-block-start: 58px; }
}

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  color: var(--main-color-dark);
}

p {
  margin: 0;
}

button {
  font-family: inherit;
}
[hidden] { display: none !important; }

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

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  background: var(--main-color);
  color: var(--color-white);
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 2000;
  transition: top 0.2s ease;
}

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

:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-color);
  color: var(--main-color-dark);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-color-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-white);
  color: var(--main-color-dark);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1em 2em;
  font-size: 1.05rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--main-color);
  height: var(--header-height);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.global-nav {
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background: var(--main-color-dark);
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.global-nav.is-open {
  transform: translateX(0);
}

.global-nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.global-nav a {
  display: block;
  color: var(--color-white);
  font-weight: 500;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.global-nav a:hover,
.global-nav a:focus-visible {
  color: var(--accent-color);
}

.nav-cta {
  width: 100%;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .global-nav {
    position: static;
    inset: auto;
    transform: none;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 24px;
    overflow: visible;
  }

  .global-nav ul {
    flex-direction: row;
    margin-bottom: 0;
    gap: 4px;
  }

  .global-nav a {
    border-bottom: none;
    padding: 8px 10px;
    font-size: 0.92rem;
    border-radius: 6px;
  }

  .global-nav a:hover,
  .global-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
  }

  .nav-cta {
    width: auto;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--color-white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 37, 64, 0.78) 0%, rgba(15, 37, 64, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 20px 56px;
}

.hero-eyebrow {
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.hero-content h1 {
  color: var(--color-white);
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

@media (min-width: 560px) {
  .hero-actions {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 900px) {
  .hero-content {
    padding: 120px 20px 96px;
  }
}

/* ---------- Sections (generic) ---------- */
.section {
  padding: 64px 0;
}

.section.alt-bg {
  background: var(--color-bg-alt);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section-eyebrow {
  color: var(--accent-color-dark);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  margin-bottom: 36px;
  position: relative;
  padding-bottom: 16px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* ---------- Reasons ---------- */
.reason-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .reason-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.reason-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.reason-card .reason-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.reason-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.reason-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- Cases (Before / After) ---------- */
.case-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 760px) {
  .case-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .case-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.case-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.case-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.case-images figure {
  margin: 0;
  position: relative;
}

.case-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.case-images figcaption {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 37, 64, 0.85);
  color: var(--color-white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.case-body {
  padding: 20px;
}

.case-body .case-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--main-color);
  background: var(--color-bg-alt);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.case-body h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.case-body .case-meta {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.case-body p.case-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ---------- Service area & content ---------- */
.area-block {
  margin-bottom: 36px;
}

.area-block h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.area-list li {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
}

.service-card .service-icon {
  font-size: 1.7rem;
  flex-shrink: 0;
}

.service-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ---------- Company ---------- */
.company-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 760px) {
  .company-wrap {
    grid-template-columns: 220px 1fr;
  }
}

.company-photo {
  border-radius: var(--radius);
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

.company-table th,
.company-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
  vertical-align: top;
}

.company-table th {
  width: 9.5em;
  color: var(--main-color-dark);
  font-weight: 700;
  white-space: nowrap;
}

.company-table td {
  color: var(--color-text-muted);
}

/* ---------- Voice ---------- */
.voice-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 700px) {
  .voice-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.voice-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.voice-rating {
  color: var(--accent-color-dark);
  letter-spacing: 2px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.voice-card p.voice-comment {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.voice-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--main-color-dark);
}

.voice-area {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ---------- Access ---------- */
.access-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 860px) {
  .access-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.info-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 18px;
  margin-bottom: 28px;
}

.info-list dt {
  font-weight: 700;
  color: var(--main-color-dark);
  white-space: nowrap;
}

.info-list dd {
  margin: 0;
  color: var(--color-text-muted);
}

.info-list a {
  color: var(--main-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.info-list a:hover,
.info-list a:focus-visible {
  color: var(--accent-color-dark);
}

.map-frame {
  background: var(--color-white);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border: 0;
  border-radius: var(--radius);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--main-color-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 40px 20px 28px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-company {
  font-family: var(--font-heading);
  color: var(--color-white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.sns-list {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.sns-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.sns-list a:hover,
.sns-list a:focus-visible {
  background: var(--accent-color);
  color: var(--main-color-dark);
  transform: translateY(-2px);
}

.sns-list svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Scroll to top ---------- */
.scroll-top-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--main-color);
  color: var(--color-white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease, visibility 0.25s;
  z-index: 900;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover,
.scroll-top-btn:focus-visible {
  background: var(--accent-color);
  color: var(--main-color-dark);
}

.scroll-top-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
