/* ===== VARIABLES ===== */
:root {
  --primary: #0068d8;
  --primary-dark: #062d70;
  --accent: #ff8200;
  --accent-dark: #e56500;
  --green: #27ae60;
  --text: #1a1a2e;
  --text-sub: #4a5568;
  --text-light: #718096;
  --bg-light: #f6fbff;
  --bg-blue: #e9f5ff;
  --bg-orange: #fffae4;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --header-height: 78px;
}

/* ===== BASE ===== */
html {
  scroll-behavior: smooth;
}
body {
  font-family:
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic", sans-serif;
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  background: #fff;
  padding-top: var(--header-height);
}

/* ===== UTILITIES ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.section {
  padding: 68px 0;
}
.section--alt {
  background: var(--bg-light);
}
.text-center {
  text-align: center;
}
.section-label {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  font-size: clamp(14px, 2.5vw, 28px);
  font-weight: bold;
  letter-spacing: 0.08em;
  padding: 6px 24px;
  border-radius: 100px;
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(0, 104, 216, 0.18);
}
.section-sub {
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== HEADER ========== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  backdrop-filter: blur(8px);
  height: var(--header-height);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.header-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 1;
  text-decoration: none;
  color: inherit;
}
.logo-image {
  display: block;
  width: min(330px, 44vw);
  height: 54px;
  object-fit: contain;
  object-position: left center;
}
.header-nav {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
}
.header-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.header-nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger-btn__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.is-menu-open .hamburger-btn__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.is-menu-open .hamburger-btn__bar:nth-child(2) {
  opacity: 0;
}
.is-menu-open .hamburger-btn__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

body.is-menu-open {
  overflow: hidden;
}

/* ========== HERO ========== */
.hero {
  background: #fff;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.hero picture {
  display: block;
  width: 100%;
}
.hero-image {
  display: block;
  width: 100%;
  height: auto;
}

/* ========== SERVICES GRID ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid rgba(0, 104, 216, 0.14);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(6, 45, 112, 0.08);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(27, 95, 168, 0.12);
  border-color: rgba(27, 95, 168, 0.35);
}
.card-header {
  padding: 20px 22px 14px;
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}
.service-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 4px solid var(--primary);
}
.card-icon {
  display: none;
}
.card-title {
  font-size: 19px;
  font-weight: bold;
  color: var(--primary-dark);
  line-height: 1.35;
}
.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-top: 6px;
}
.card-body {
  padding: 18px 22px 20px;
  flex: 1;
}
.card-body p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}
.card-features {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feature-chip {
  font-size: 12px;
  background: #eef7ff;
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 600;
  border: 1px solid #c5daf7;
}
.card-footer {
  padding: 0 22px 22px;
}
.card-btn {
  display: block;
  width: 100%;
  background: linear-gradient(145deg, #ff9b1a 0%, var(--accent) 48%, var(--accent-dark) 100%);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 13px;
  border-radius: 999px;
  transition: opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(255, 130, 0, 0.3);
}
.card-btn:hover {
  opacity: 0.92;
  box-shadow: 0 6px 18px rgba(255, 130, 0, 0.42);
}
.card-btn .arrow {
  margin-left: 6px;
}

/* Color themes per service */
.theme-ac {
  background: #dbeafe;
}
.theme-water {
  background: #ccfbf1;
}
.theme-lock {
  background: #fef3c7;
}
.theme-glass {
  background: #ede9fe;
}
.theme-clean {
  background: #fce7f3;
}
.theme-junk {
  background: #fee2e2;
}
.theme-pest {
  background: #d1fae5;
}
.theme-garden {
  background: #dcfce7;
}
.theme-reform {
  background: #fff7ed;
}

.tag-ac {
  background: #dbeafe;
  color: #1d4ed8;
}
.tag-water {
  background: #ccfbf1;
  color: #0f766e;
}
.tag-lock {
  background: #fef3c7;
  color: #b45309;
}
.tag-glass {
  background: #ede9fe;
  color: #7c3aed;
}
.tag-clean {
  background: #fce7f3;
  color: #be185d;
}
.tag-junk {
  background: #fee2e2;
  color: #b91c1c;
}
.tag-pest {
  background: #d1fae5;
  color: #065f46;
}
.tag-garden {
  background: #dcfce7;
  color: #15803d;
}
.tag-reform {
  background: #fff7ed;
  color: #c2410c;
}

/* ========== WHY SECTION ========== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.why-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(27, 95, 168, 0.1);
}
.why-icon {
  font-size: 36px;
  margin-bottom: 14px;
}
.why-card h3 {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-dark);
  line-height: 1.4;
}
.why-card p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* ========== FLOW SECTION ========== */
#flow.section {
  background:
    radial-gradient(circle at 0 0, rgba(0, 104, 216, 0.12) 0, transparent 30%),
    #f0f7ff;
}
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 auto;
  max-width: 640px;
  padding: 0 4px;
}
.flow-step {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0 22px;
  padding-bottom: 8px;
  position: relative;
}
.flow-step:not(:last-child) {
  padding-bottom: 28px;
}
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 54px;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
  border-radius: 4px;
  background: linear-gradient(
    180deg,
    var(--primary) 0%,
    rgba(27, 95, 168, 0.15) 85%,
    transparent 100%
  );
  z-index: 0;
}
.flow-step-track {
  display: flex;
  justify-content: center;
  padding-top: 6px;
  position: relative;
  z-index: 1;
}
.flow-step-num {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 4px 14px rgba(27, 95, 168, 0.4);
  flex-shrink: 0;
}
.flow-step-body {
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px 20px;
  border: 1px solid #b3d4f5;
  box-shadow: var(--shadow);
  text-align: left;
}
.flow-step-title {
  font-size: 17px;
  font-weight: bold;
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.35;
}
.flow-step-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* ========== FOOTER ========== */
footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 0 28px;
  font-size: 13px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.footer-logo {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
}
.footer-tagline {
  font-size: 13px;
  line-height: 1.7;
  max-width: 320px;
}
.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 13px;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== PAGE TOP（右下・小さめ） ===== */
.pagetop {
  position: fixed;
  right: 12px;
  bottom: 22px;
  z-index: 100;
  width: 36px;
  height: 44px;
  border-radius: 8px;
  background: rgba(128, 128, 128, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}
.pagetop:hover {
  background: rgba(128, 128, 128, 0.5);
}
.pagetop:focus-visible {
  outline: 2px solid #1b5fa8;
  outline-offset: 2px;
}
.pagetop__icon {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid #fff;
  margin-top: -3px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 8px 16px;
  }
  .hamburger-btn {
    display: flex;
  }
  .header-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: max-height 0.3s ease;
  }
  .is-menu-open .header-nav {
    max-height: 240px;
  }
  .header-nav a {
    font-size: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    white-space: normal;
  }
  .header-nav a:last-child {
    border-bottom: none;
  }
  .header-nav a:hover {
    background: var(--bg-light);
    border-bottom-color: var(--border);
  }
  .section {
    padding: 40px 0;
  }
  .section-label {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    font-size: clamp(11px, 2.7vw + 6px, 22px);
    line-height: 1.25;
    letter-spacing: 0.03em;
    padding: 8px 12px 10px;
  }
  .logo-image {
    width: min(300px, 78vw);
    height: 44px;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .service-image {
    width: 86%;
    max-width: 320px;
    margin: 14px auto 0;
    aspect-ratio: 3 / 2;
    border-radius: 10px;
    border-bottom: none;
  }
  .card-header {
    padding: 16px 20px 12px;
  }
  .card-title {
    font-size: clamp(22px, 5.8vw, 26px);
    line-height: 1.3;
  }
  .why-grid {
    grid-template-columns: 1fr;
  }
  .flow-steps {
    padding: 0 20px 0 0;
  }
  .flow-step {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0 14px;
  }
  .flow-step:not(:last-child)::after {
    left: 19px;
    top: 50px;
  }
  .flow-step-num {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }
  .flow-step-body {
    padding: 16px 16px 18px;
  }
  .flow-step-title {
    font-size: 16px;
  }
  .flow-step-desc {
    font-size: 13px;
  }
  .footer-inner {
    flex-direction: column;
  }
  .pagetop {
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .logo-image {
    width: min(270px, 82vw);
    height: 42px;
  }
}
