:root {
  --color-bg: #0f1115;
  --color-bg-alt: #f7f5f0;
  --color-text: #1c1c1c;
  --color-text-light: #6b6b6b;
  --color-accent: #f5a623;
  --color-accent-dark: #c9820f;
  --color-white: #ffffff;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--color-text);
  line-height: 1.7;
  background: var(--color-white);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-bg);
  color: var(--color-white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--color-white);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--color-white);
  opacity: 0.85;
}

.nav a:hover {
  opacity: 1;
}

.nav-cta {
  background: var(--color-accent);
  color: var(--color-bg) !important;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 700;
  opacity: 1 !important;
}

.nav-line {
  display: flex;
  align-items: center;
  opacity: 1 !important;
}

/* Hamburger button: hidden until the mobile breakpoint */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

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

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

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bar {
    transition: none;
  }
}

.nav-line img {
  display: block;
  height: 32px;
  width: auto;
}

.site-footer img {
  display: block;
  margin: 0 auto;
  height: 36px;
  width: auto;
}

/* Hero */
.hero {
  position: relative;
  background:
    linear-gradient(160deg, rgba(15, 17, 21, 0.82) 0%, rgba(35, 38, 46, 0.75) 100%),
    url("images/hero.jpg") center / cover no-repeat;
  color: var(--color-white);
  padding: 120px 0 100px;
  text-align: center;
}

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

.hero h1 {
  font-size: 2.2rem;
  line-height: 1.5;
  margin: 0 0 20px;
}

.hero-lead {
  color: #cfcfcf;
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 36px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

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

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

/* Sections */
.section {
  padding: 80px 0;
}

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

.section-title {
  font-size: 1.6rem;
  margin: 0 0 32px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  margin: 16px auto 0;
}

.section-lead {
  text-align: center;
  color: var(--color-text-light);
  max-width: 560px;
  margin: 0 auto 40px;
}

/* Info table */
.info-table {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  width: 140px;
  color: var(--color-text-light);
  font-weight: 700;
}

/* Wider label column for tables whose labels are equipment names
   ("エアコン用コンセント"), which break mid-word at 140px. */
.info-table--wide th {
  width: 220px;
}

@media (max-width: 480px) {
  .info-table--wide th {
    width: 130px;
  }
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.card {
  background: var(--color-white);
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 28px;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--color-accent-dark);
}

.card p {
  margin: 0;
  color: var(--color-text-light);
  font-size: 0.92rem;
}

.card-link {
  display: block;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.card-link:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* Area list */
.area-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 0;
  max-width: 720px;
  margin: 0 auto;
}

.area-list li {
  background: var(--color-bg-alt);
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.9rem;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px 20px;
  background: var(--color-white);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-text);
}

.faq-item p {
  margin: 12px 0 0;
  color: var(--color-text-light);
}

/* Checklist (symptom pages) */
.checklist {
  list-style: none;
  padding: 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist li {
  position: relative;
  padding-left: 30px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-accent);
  border-radius: 4px;
}

/* Process flow (symptom pages) */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  max-width: 720px;
}

.flow .step {
  flex: 1 1 150px;
  background: var(--color-bg-alt);
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--color-text-light);
}

.flow .step b {
  display: block;
  color: var(--color-text);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* Related links (symptom / area pages) */
.related-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-links a {
  display: inline-block;
  background: var(--color-bg-alt);
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--color-text);
}

.related-links a:hover {
  border-color: var(--color-accent);
}

/* Contact form */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 12px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  color: var(--color-text);
}

.contact-form button {
  align-self: center;
  border: none;
  cursor: pointer;
  margin-top: 8px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form-status {
  text-align: center;
  min-height: 1.4em;
  margin: 0;
}

.contact-form-status.is-success {
  color: #1a7f37;
}

.contact-form-status.is-error {
  color: #c92a2a;
}

/* Blog */
.blog-meta {
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin: -16px auto 32px;
  max-width: 640px;
}

.blog-article .container {
  max-width: 720px;
}

.blog-article h2 {
  color: var(--color-text);
  font-size: 1.25rem;
  margin: 36px 0 14px;
}

.blog-article p,
.blog-article li {
  color: var(--color-text);
}

.blog-article ul {
  padding-left: 1.2em;
}

.blog-cta {
  display: block;
  width: fit-content;
  margin: 32px auto 0;
}

.blog-back {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--color-text-light);
  text-decoration: underline;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0;
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
}

.blog-list li {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px 24px;
}

.blog-list a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.05rem;
}

.blog-list p {
  margin: 8px 0 0;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* Works (施工実績) */
/* auto-fill, not auto-fit: keeps a lone case study card at one column's
   width instead of stretching it across the whole row. */
.works-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 0;
  list-style: none;
  margin: 0;
}

.work-card {
  display: block;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color 0.15s, transform 0.15s;
}

.work-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.work-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--color-bg-alt);
}

.work-card-body {
  padding: 20px 24px;
}

.work-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.work-card-tags span {
  background: var(--color-bg-alt);
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 2px 12px;
  font-size: 0.78rem;
  color: var(--color-text-light);
}

.work-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.work-card p {
  margin: 8px 0 0;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* Photo gallery inside a case study */
.work-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
  gap: 20px;
  margin: 24px 0 0;
  padding: 0;
}

.work-gallery figure {
  margin: 0;
}

/* Uncropped on purpose: cropping these would cut off the meter readings. */
.work-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  background: var(--color-bg-alt);
}

.work-gallery figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* Footer */
.site-footer {
  background: var(--color-bg);
  color: #999;
  text-align: center;
  padding: 32px 0;
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--color-accent);
  text-decoration: none;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  /* Nav collapses into a panel that drops below the sticky header. */
  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
    background: var(--color-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    display: none;
  }

  .nav-open .nav {
    display: flex;
  }

  .nav a {
    font-size: 1rem;
    padding: 14px 24px;
  }

  .nav-cta {
    margin: 12px 24px 0;
    text-align: center;
  }

  .nav-line {
    padding: 14px 24px 4px;
  }

  .nav-line img {
    height: 36px;
  }

  /* Turn the bars into an X while the panel is open. */
  .nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding: 90px 0 70px;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
}
