/*
Theme Name: C.FoxSystems
Theme URI: https://cfox.example/
Author: C.FoxSystems
Description: C.FoxSystems corporate theme. Fixed pages are rendered from theme templates without relying on editor content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: cfs
*/

:root {
  --cfs-ink: #121722;
  --cfs-ink-soft: #2d3748;
  --cfs-muted: #66758a;
  --cfs-sky: #7fcaf2;
  --cfs-blue: #207fb3;
  --cfs-blue-deep: #0f5b89;
  --cfs-teal: #149b89;
  --cfs-amber: #e8ad3f;
  --cfs-coral: #cf645b;
  --cfs-paper: #f6f9fc;
  --cfs-white: #ffffff;
  --cfs-line: #dbe7f0;
  --cfs-shadow: 0 18px 44px rgba(18, 23, 34, 0.12);
  --cfs-radius: 8px;
  --cfs-max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--cfs-ink);
  background: var(--cfs-white);
  font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.8;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

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

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

a:hover,
a:focus-visible {
  color: var(--cfs-blue);
}

:focus-visible {
  outline: 3px solid rgba(32, 127, 179, 0.35);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(219, 231, 240, 0.86);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(18px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 40px, var(--cfs-max));
  min-height: 76px;
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  font-weight: 800;
}

.brand__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand__name {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
}

.brand__kana {
  display: block;
  color: var(--cfs-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--cfs-line);
  border-radius: 6px;
  background: var(--cfs-white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--cfs-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.is-nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.is-nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.is-nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--cfs-ink-soft);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--cfs-paper);
  color: var(--cfs-blue-deep);
}

.site-nav .nav-cta a {
  margin-left: 6px;
  color: var(--cfs-white);
  background: var(--cfs-ink);
}

.site-nav .nav-cta a:hover,
.site-nav .nav-cta a:focus-visible {
  background: var(--cfs-blue-deep);
  color: var(--cfs-white);
}

.nav-parent {
  position: relative;
}

.nav-parent > ul {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  min-width: 232px;
  padding: 8px;
  border: 1px solid var(--cfs-line);
  border-radius: var(--cfs-radius);
  background: var(--cfs-white);
  box-shadow: var(--cfs-shadow);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-parent:hover > ul,
.nav-parent:focus-within > ul {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero {
  position: relative;
  min-height: 76svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--cfs-white);
  background:
    linear-gradient(90deg, rgba(9, 24, 38, 0.86), rgba(9, 24, 38, 0.58) 50%, rgba(9, 24, 38, 0.14)),
    var(--cfs-hero-image) center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  right: -12vw;
  bottom: -26vw;
  width: 58vw;
  aspect-ratio: 1;
  border: 1px solid rgba(127, 202, 242, 0.5);
  transform: rotate(45deg);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, var(--cfs-max));
  margin: 0 auto;
  padding: 96px 0 72px;
}

.hero__logo {
  width: 76px;
  height: 76px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  object-fit: contain;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--cfs-sky);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: currentColor;
}

.hero h1,
.page-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero__lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

.hero__actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--cfs-ink);
  border-radius: 6px;
  background: var(--cfs-ink);
  color: var(--cfs-white);
  font-weight: 900;
  line-height: 1.35;
}

.button:hover,
.button:focus-visible {
  border-color: var(--cfs-blue-deep);
  background: var(--cfs-blue-deep);
  color: var(--cfs-white);
}

.button--light {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.08);
  color: var(--cfs-white);
}

.button--light:hover,
.button--light:focus-visible {
  border-color: var(--cfs-white);
  background: var(--cfs-white);
  color: var(--cfs-ink);
}

.button--outline {
  border-color: var(--cfs-line);
  background: var(--cfs-white);
  color: var(--cfs-ink);
}

.button--outline:hover,
.button--outline:focus-visible {
  border-color: var(--cfs-blue-deep);
  background: var(--cfs-paper);
  color: var(--cfs-blue-deep);
}

.hero__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(720px, 100%);
  margin-top: 54px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--cfs-radius);
  background: rgba(255, 255, 255, 0.18);
}

.hero__metric {
  min-height: 104px;
  padding: 18px;
  background: rgba(11, 24, 38, 0.35);
}

.hero__metric strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.1;
}

.hero__metric span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
}

.section {
  padding: 92px 0;
}

.section--paper {
  background: var(--cfs-paper);
}

.section--ink {
  color: var(--cfs-white);
  background: var(--cfs-ink);
}

.container {
  width: min(100% - 40px, var(--cfs-max));
  margin: 0 auto;
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 38px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.section-header p {
  margin: 0;
  color: var(--cfs-muted);
  font-weight: 700;
}

.section--ink .section-header p,
.section--ink .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  position: relative;
  display: grid;
  grid-template-rows: 168px 1fr;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--cfs-line);
  border-radius: var(--cfs-radius);
  background: var(--cfs-white);
  box-shadow: 0 12px 26px rgba(18, 23, 34, 0.06);
}

.service-card:hover {
  transform: translateY(-3px);
  transition: transform 0.2s ease;
}

.service-card__image {
  background: var(--cfs-card-image) center / cover no-repeat;
}

.service-card__body {
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.service-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 30px;
  margin-bottom: 16px;
  border-left: 4px solid var(--cfs-accent, var(--cfs-blue));
  color: var(--cfs-muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.service-card h3 {
  min-height: 2.6em;
  margin: 0 0 12px;
  font-size: 1.22rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.service-card p {
  margin: 0;
  color: var(--cfs-muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--cfs-blue-deep);
  font-size: 0.92rem;
  font-weight: 900;
}

.text-link::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  transition: width 0.2s ease;
}

.text-link:hover::after,
.text-link:focus-visible::after {
  width: 34px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: 48px;
  align-items: center;
}

.split__media {
  min-height: 430px;
  border-radius: var(--cfs-radius);
  background: var(--cfs-split-image) center / cover no-repeat;
  box-shadow: var(--cfs-shadow);
}

.feature-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--cfs-ink-soft);
  font-weight: 800;
}

.feature-list li::before {
  content: "";
  width: 30px;
  height: 30px;
  margin-top: 2px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, var(--cfs-blue), var(--cfs-teal));
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  counter-reset: flow;
}

.flow-step {
  position: relative;
  min-height: 248px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--cfs-radius);
  background: rgba(255, 255, 255, 0.055);
}

.flow-step::before {
  counter-increment: flow;
  content: "0" counter(flow);
  display: inline-block;
  margin-bottom: 54px;
  color: var(--cfs-sky);
  font-size: 0.86rem;
  font-weight: 900;
}

.flow-step h3 {
  margin: 0 0 12px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.flow-step p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  font-weight: 700;
}

.company-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.7fr);
  gap: 38px;
  align-items: start;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--cfs-line);
  border-radius: var(--cfs-radius);
  background: var(--cfs-white);
}

.company-table th,
.company-table td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--cfs-line);
  vertical-align: top;
  text-align: left;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
  border-bottom: 0;
}

.company-table th {
  width: 34%;
  color: var(--cfs-muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.company-table td {
  font-weight: 800;
}

.info-panel {
  padding: 28px;
  border: 1px solid var(--cfs-line);
  border-radius: var(--cfs-radius);
  background: var(--cfs-white);
  box-shadow: 0 14px 28px rgba(18, 23, 34, 0.06);
}

.info-panel h3 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.info-panel p {
  margin: 0;
  color: var(--cfs-muted);
  font-weight: 700;
}

.page-hero {
  color: var(--cfs-white);
  background:
    linear-gradient(90deg, rgba(12, 26, 39, 0.88), rgba(12, 26, 39, 0.6)),
    var(--cfs-page-image) center / cover no-repeat;
}

.page-hero__inner {
  width: min(100% - 40px, var(--cfs-max));
  margin: 0 auto;
  padding: 92px 0 82px;
}

.page-hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  font-weight: 700;
}

.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.58fr);
  gap: 44px;
  align-items: start;
}

.service-detail h2,
.rich-text h2 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 2.6vw, 2.5rem);
  line-height: 1.22;
}

.service-detail p,
.rich-text p {
  margin: 0 0 18px;
  color: var(--cfs-muted);
  font-weight: 700;
}

.detail-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.detail-list li {
  padding: 14px 16px;
  border: 1px solid var(--cfs-line);
  border-left: 4px solid var(--cfs-accent, var(--cfs-blue));
  border-radius: 6px;
  background: var(--cfs-white);
  font-weight: 800;
}

.side-panel {
  position: sticky;
  top: 106px;
  padding: 24px;
  border: 1px solid var(--cfs-line);
  border-radius: var(--cfs-radius);
  background: var(--cfs-paper);
}

.side-panel h3 {
  margin: 0 0 16px;
  font-size: 1rem;
}

.side-panel ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.side-panel li {
  color: var(--cfs-ink-soft);
  font-size: 0.92rem;
  font-weight: 800;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(340px, 0.7fr);
  gap: 42px;
  align-items: start;
}

.contact-box {
  padding: 28px;
  border: 1px solid var(--cfs-line);
  border-radius: var(--cfs-radius);
  background: var(--cfs-white);
  box-shadow: 0 16px 32px rgba(18, 23, 34, 0.07);
}

.contact-box h2 {
  margin-top: 0;
  font-size: 1.55rem;
  line-height: 1.25;
}

.contact-methods {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.contact-methods li {
  padding: 16px;
  border: 1px solid var(--cfs-line);
  border-radius: 6px;
  background: var(--cfs-paper);
  font-weight: 800;
}

.cf7-wrap :where(input, textarea, select) {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--cfs-line);
  border-radius: 6px;
  color: var(--cfs-ink);
  font: inherit;
}

.cf7-wrap :where(input, textarea, select):focus {
  border-color: var(--cfs-blue);
  outline: 3px solid rgba(32, 127, 179, 0.16);
}

.cf7-wrap :where(input[type="submit"], button) {
  width: auto;
  min-width: 180px;
  border-color: var(--cfs-ink);
  background: var(--cfs-ink);
  color: var(--cfs-white);
  font-weight: 900;
  cursor: pointer;
}

.cf7-wrap :where(input[type="submit"], button):hover {
  border-color: var(--cfs-blue-deep);
  background: var(--cfs-blue-deep);
}

.cta-band {
  position: relative;
  overflow: hidden;
  color: var(--cfs-white);
  background:
    linear-gradient(110deg, rgba(18, 23, 34, 0.98), rgba(15, 91, 137, 0.86)),
    var(--cfs-cta-image) center / cover no-repeat;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: auto -80px -180px auto;
  width: 380px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: rotate(45deg);
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, var(--cfs-max));
  margin: 0 auto;
  padding: 70px 0;
}

.cta-band h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.8rem, 3.8vw, 3.4rem);
  line-height: 1.18;
}

.cta-band p {
  max-width: 660px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: #0d121b;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  width: min(100% - 40px, var(--cfs-max));
  margin: 0 auto;
  padding: 46px 0;
}

.site-footer .brand__name,
.site-footer .brand__kana {
  color: var(--cfs-white);
}

.site-footer address {
  margin-top: 18px;
  font-style: normal;
}

.footer-nav {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.copyright {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  text-align: center;
}

.not-found {
  min-height: 52vh;
  display: grid;
  place-items: center;
  padding: 80px 20px;
  text-align: center;
}

.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;
}

@media (max-width: 1080px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 880px) {
  .site-header__inner {
    min-height: 68px;
  }

  .brand {
    min-width: 0;
  }

  .brand__logo {
    width: 42px;
    height: 42px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100svh - 68px);
    overflow: auto;
    border-top: 1px solid var(--cfs-line);
    background: var(--cfs-white);
  }

  .is-nav-open .site-nav {
    display: block;
  }

  .site-nav ul {
    display: grid;
    width: min(100% - 40px, var(--cfs-max));
    margin: 0 auto;
    padding: 14px 0;
  }

  .site-nav a {
    padding: 12px 0;
    white-space: normal;
  }

  .nav-parent > ul {
    position: static;
    min-width: 0;
    padding: 0 0 0 18px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .site-nav .nav-cta a {
    margin-left: 0;
    padding: 12px 14px;
    text-align: center;
  }

  .hero__inner,
  .page-hero__inner {
    padding-top: 72px;
  }

  .section-header,
  .split,
  .company-band,
  .service-detail,
  .contact-layout,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header__inner,
  .container,
  .hero__inner,
  .page-hero__inner,
  .cta-band__inner,
  .site-footer__inner {
    width: min(100% - 28px, var(--cfs-max));
  }

  .brand__name {
    font-size: 0.92rem;
  }

  .brand__kana {
    display: none;
  }

  .hero {
    min-height: 82svh;
  }

  .hero__metrics {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 66px 0;
  }

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

  .service-card {
    grid-template-rows: 188px 1fr;
    min-height: 0;
  }

  .split__media {
    min-height: 300px;
  }

  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
  }

  .company-table th {
    padding-bottom: 4px;
    border-bottom: 0;
  }

  .company-table td {
    padding-top: 0;
  }
}
