/* ===================================================
   home.css — トップページ専用(外部CTOブランド)
   サブページ(technology/company/security)は style.css を使用
   =================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #fbfbf9;
  --bg-tint: #f4f3ef;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --accent: #b8860b;
  --accent-dark: #96700a;
  --accent-faint: rgba(184, 134, 11, 0.08);
  --border: #e6e3dd;
  --card: #ffffff;
  --font-sans: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --max-width: 1080px;
  --header-height: 64px;
  --radius: 20px;
  --shadow-soft: 0 1px 2px rgba(29, 29, 31, 0.04), 0 8px 32px rgba(29, 29, 31, 0.06);
}

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.9;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.72;
}

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

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

.container-narrow {
  max-width: 780px;
}

.sp-only {
  display: none;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(251, 251, 249, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  transition: box-shadow 0.25s;
}

.header.scrolled {
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}

.header-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.2s;
}

.header-cta:hover {
  background: var(--accent-dark);
  opacity: 1;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.lang-switch a {
  color: var(--text-muted);
  font-weight: 600;
}

.lang-switch a[aria-current="page"] {
  color: var(--text);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger svg {
  width: 24px;
  height: 24px;
  stroke: var(--text);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(251, 251, 249, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  z-index: 99;
  overflow-y: auto;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.mobile-nav .mobile-cta {
  color: var(--accent);
}

.mobile-nav .mobile-lang {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== Hero ===== */
.hero {
  padding: calc(var(--header-height) + 108px) 0 96px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-faint);
  border-radius: 999px;
  padding: 7px 18px;
  margin-bottom: 34px;
}

.hero-title {
  font-size: clamp(30px, 5.4vw, 54px);
  font-weight: 800;
  line-height: 1.42;
  letter-spacing: 0.015em;
  margin-bottom: 30px;
}

.hero-lead {
  font-size: clamp(15.5px, 1.7vw, 18px);
  color: var(--text-muted);
  line-height: 2.05;
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 15px 36px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.28);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  opacity: 1;
}

.btn-ghost {
  display: inline-block;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color 0.2s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  opacity: 1;
}

.hero-trust {
  display: flex;
  justify-content: center;
  gap: 12px 36px;
  flex-wrap: wrap;
  list-style: none;
  font-size: 14px;
  color: var(--text-muted);
}

.hero-trust li {
  position: relative;
}

.hero-trust li + li::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 14px;
  background: var(--border);
}

.hero-trust strong {
  color: var(--text);
  font-weight: 700;
}

/* ===== Sections (common) ===== */
.section {
  padding: 110px 0;
}

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

.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.015em;
  margin-bottom: 26px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 40px;
}

.section-foot {
  margin-top: 44px;
  font-size: 14.5px;
  color: var(--text-muted);
}

/* ===== 2. Solutions ===== */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.solution-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 34px;
  box-shadow: var(--shadow-soft);
}

.solution-worry {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.75;
  margin-bottom: 18px;
}

.solution-answer {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.95;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.solution-answer span {
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}

/* ===== 2.5 Change (相談するとどう変わるか) ===== */
.change-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.change-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.change-tag {
  display: block;
  width: fit-content;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--bg-tint);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 10px;
}

.change-tag.after {
  color: #fff;
  background: var(--accent);
}

.change-before {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.85;
}

.change-arrow {
  display: block;
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  margin: 14px 0;
}

.change-after {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.9;
}

/* ===== 3. Partnership ===== */
.partner-diagram {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 18px;
  margin: 52px 0 64px;
}

.pd-node {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 28px;
  text-align: center;
  flex: 1;
  max-width: 280px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.pd-center {
  border: 2px solid var(--accent);
  background: #fffdf7;
}

.pd-role {
  font-size: 17px;
  font-weight: 800;
}

.pd-role em {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-top: 2px;
}

.pd-note {
  font-size: 13px;
  color: var(--text-muted);
}

.pd-arrow {
  align-self: center;
  font-size: 22px;
  color: var(--accent);
}

.stance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.stance-num {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.stance-item h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 12px;
}

.stance-item p {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* ===== 4. Services (Menu) ===== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.menu-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px 38px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.menu-card h3 {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 16px;
}

.menu-copy {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 20px;
  flex-grow: 1;
}

.menu-for {
  font-size: 13.5px;
  color: var(--accent-dark);
  background: var(--accent-faint);
  border-radius: 10px;
  padding: 10px 14px;
}

.menu-link {
  margin-top: 18px;
  font-size: 14.5px;
  font-weight: 700;
}

/* ===== 5. Works ===== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.work-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 38px 36px;
  box-shadow: var(--shadow-soft);
}

.work-value {
  display: block;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

.work-value small {
  font-size: 18px;
  font-weight: 700;
  margin-left: 4px;
}

.work-item h3 {
  font-size: 17.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

.work-item p {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* ===== 6. Flow ===== */
.flow-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-top: 48px;
  list-style: none;
}

.flow-step {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 16px;
  box-shadow: var(--shadow-soft);
}

.flow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  z-index: 1;
}

.flow-num {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.flow-step h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}

.flow-step p {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ===== CTA band (ページ途中CTA) ===== */
.cta-band {
  margin-top: 64px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 44px 32px;
  text-align: center;
}

.cta-band-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 22px;
}

.cta-band-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cta-band-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== 7. FAQ ===== */
.faq-list {
  margin-top: 40px;
}

.faq-item {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 14px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 56px 22px 26px;
  font-size: 16px;
  font-weight: 700;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 26px 24px;
  font-size: 15px;
  color: var(--text-muted);
}

/* ===== 8. Contact ===== */
.contact-form-frame {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  margin-top: 8px;
}

.contact-form-frame iframe {
  width: 100%;
  height: 600px;
  border: none;
}

.contact-info {
  margin-top: 40px;
  display: flex;
  gap: 20px 48px;
  flex-wrap: wrap;
}

.contact-info dl {
  display: flex;
  gap: 12px;
  font-size: 14.5px;
}

.contact-info dt {
  color: var(--text-muted);
}

.contact-info dd {
  font-weight: 600;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 52px;
  text-align: center;
}

.footer-tagline {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 14px 30px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
}

.footer p {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ===== Fade-in =====
   JS無効・IntersectionObserver非対応環境ではコンテンツを隠さない。
   <head> のインラインスクリプトが対応環境でのみ html.js を付与する */
html.js .fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html.js .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .header-cta {
    display: none;
  }

  .section {
    padding: 76px 0;
  }

  .solution-grid,
  .menu-grid,
  .works-grid,
  .change-grid {
    grid-template-columns: 1fr;
  }

  .stance-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .flow-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .flow-step:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .sp-only {
    display: inline;
  }

  .pc-only {
    display: none;
  }

  .hero {
    padding: calc(var(--header-height) + 64px) 0 68px;
    text-align: left;
  }

  .hero-eyebrow {
    border-radius: 14px;
    line-height: 1.7;
  }

  .hero-actions,
  .hero-trust {
    justify-content: flex-start;
  }

  .hero-trust {
    flex-direction: column;
    gap: 8px;
  }

  .hero-trust li + li::before {
    display: none;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  .btn-ghost {
    width: 100%;
    text-align: center;
  }

  .partner-diagram {
    flex-direction: column;
    align-items: stretch;
  }

  .pd-node {
    max-width: none;
  }

  .pd-arrow {
    transform: rotate(90deg);
  }

  .flow-list {
    grid-template-columns: 1fr;
  }

  .solution-card,
  .menu-card,
  .work-item {
    padding: 28px 24px;
  }

  .cta-band {
    padding: 32px 20px;
  }
}
