/* 株式会社Keystone公式HPのスタイル定義。
   明るさ、信頼感、特徴的なタイポグラフィ、WebGL背景との重なりを制御する。 */
:root {
  --white: #ffffff;
  --soft: #f6f8fb;
  --pale: #eef4fa;
  --blue: #2f80ed;
  --navy: #183b56;
  --cyan: #20c7d9;
  --green: #06c755;
  --yellow: #ffe8a3;
  --text: #17212b;
  --muted: #536271;
  --border: #dde6ee;
  --shadow: 0 22px 70px rgba(24, 59, 86, 0.12);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 42%, #f6f8fb 100%);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.88;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 3px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--blue));
  box-shadow: 0 0 18px rgba(32, 199, 217, 0.45);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 82px;
  padding: 0 clamp(20px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(221, 230, 238, 0.78);
  backdrop-filter: blur(18px);
}

.brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  transform-origin: center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--navy);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.site-nav a {
  position: relative;
}

.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: right center;
  background: var(--blue);
  transition: transform 0.3s ease;
}

.site-nav a:not(.nav-cta):hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  will-change: transform;
}

.nav-cta,
.button.primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 14px 32px rgba(6, 199, 85, 0.24);
}

.button.secondary {
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--border);
}

.button[type="submit"] {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
}

.nav-cta:hover,
.button:hover { transform: translateY(-2px); }

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--navy);
}

.section-band {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(70px, 9vw, 118px) 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
  min-height: calc(100vh - 82px);
  padding-top: clamp(48px, 7vw, 86px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 24px;
  color: var(--navy);
  max-width: 720px;
  font-size: clamp(38px, 4.8vw, 66px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: 0;
}

h1 .accent-word {
  position: relative;
  display: inline-block;
  color: var(--blue);
}

.split-line {
  display: block;
  overflow: hidden;
}

.split-word {
  display: inline-block;
  transform-origin: left bottom;
  will-change: transform, opacity, filter;
}

h1 .accent-word::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 4px;
  height: 14px;
  z-index: -1;
  background: var(--yellow);
  transform: scaleX(var(--accent-scale, 1));
  transform-origin: left center;
}

h2 {
  color: var(--navy);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.28;
  letter-spacing: 0;
}

h3 {
  color: var(--navy);
  font-size: 19px;
  line-height: 1.45;
}

.lead {
  max-width: 610px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-metrics span {
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
}

.hero-metrics strong { color: var(--navy); }

.hero-visual,
.image-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(221, 230, 238, 0.9);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  will-change: transform, clip-path;
}

.hero-visual img,
.image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  will-change: transform;
}

.hero-visual { aspect-ratio: 16 / 9; }
.image-panel { aspect-ratio: 4 / 3; }
.strength .image-panel { aspect-ratio: 16 / 9; }

.about,
.strength,
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(36px, 6vw, 78px);
}

.section-copy p {
  color: var(--muted);
  font-size: 16px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}

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

.service-card {
  position: relative;
  min-height: 292px;
  padding: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(24, 59, 86, 0.06);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(var(--shine-x, -120%)) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.74), transparent);
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(47, 128, 237, 0.45);
  box-shadow: var(--shadow);
}

.service-card > span {
  position: absolute;
  right: 18px;
  top: 16px;
  color: rgba(47, 128, 237, 0.12);
  font-family: Inter, system-ui, sans-serif;
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
}

.service-icon {
  width: 74px;
  height: 74px;
  margin-bottom: 20px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(47, 128, 237, 0.12);
}
.service-card p { color: var(--muted); font-size: 14px; }

.strength-list {
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
  counter-reset: strength;
}

.strength-list li {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  counter-increment: strength;
}

.strength-list li::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: var(--line-w, 0);
  height: 1px;
  background: linear-gradient(90deg, var(--blue), transparent);
}

.strength-list li::before {
  content: counter(strength, decimal-leading-zero);
  color: var(--blue);
  font-family: Inter, system-ui, sans-serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

.strength-list strong,
.strength-list span {
  grid-column: 2;
}

.strength-list strong { color: var(--navy); }
.strength-list span { color: var(--muted); font-size: 14px; }

.message {
  width: 100%;
  max-width: none;
  padding-right: max(20px, calc((100vw - 1160px) / 2));
  padding-left: max(20px, calc((100vw - 1160px) / 2));
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.1), rgba(32, 199, 217, 0.12));
  overflow: hidden;
}

.message h2 { max-width: 1050px; margin-bottom: 0; }

.message h2 span {
  display: inline-block;
  will-change: transform;
}

.company {
  width: min(1060px, calc(100% - 40px));
}

.company-table {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.company-table div {
  display: grid;
  grid-template-columns: 190px 1fr;
  border-top: 1px solid var(--border);
}

.company-table div {
  transform-origin: left center;
}

.company-table div:first-child { border-top: 0; }
.company-table dt,
.company-table dd {
  margin: 0;
  padding: 20px 24px;
}

.company-table dt {
  color: var(--navy);
  font-weight: 800;
  background: var(--pale);
}

.company-table dd { color: var(--muted); }
.company-table a { color: var(--blue); font-weight: 800; }

.contact {
  width: min(1160px, calc(100% - 40px));
  margin-bottom: 80px;
  padding: clamp(40px, 6vw, 70px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.contact-copy p { color: var(--muted); }

.contact-form {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.contact-form em {
  color: var(--blue);
  font-style: normal;
  font-size: 11px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgba(47, 128, 237, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.12);
}

.privacy-check {
  display: flex !important;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px !important;
  color: var(--muted) !important;
  font-weight: 700 !important;
  line-height: 1.6;
}

.privacy-check input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: var(--blue);
}

.privacy-check a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.contact-status {
  display: none;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.6;
}

.contact-status.is-visible {
  display: block;
}

.contact-status.is-success {
  color: #0f6b3b;
  background: rgba(6, 199, 85, 0.1);
  border: 1px solid rgba(6, 199, 85, 0.28);
}

.contact-status.is-error {
  color: #9a3412;
  background: rgba(255, 232, 163, 0.46);
  border: 1px solid rgba(154, 52, 18, 0.18);
}

.contact-meta {
  margin-bottom: 0;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 800;
}

.site-footer {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 40px clamp(20px, 4vw, 56px);
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--border);
}

.site-footer img {
  width: 128px;
  height: 128px;
  object-fit: contain;
}
.site-footer p { margin: 0; font-size: 13px; }
.site-footer nav { display: flex; gap: 18px; color: var(--navy); font-weight: 800; }
.site-footer small { grid-column: 1 / -1; font-family: Inter, system-ui, sans-serif; }

.policy-page { background: #fff; }
.policy-wrap {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0 120px;
}

.policy-wrap h1 {
  font-size: clamp(38px, 6vw, 66px);
}

.policy-wrap h2 {
  margin-top: 44px;
  font-size: 24px;
}

.policy-wrap p { color: var(--muted); }
.policy-sign { margin-top: 44px; font-weight: 700; }

.reveal {
  opacity: 1;
  transform: none;
}

.js-motion .motion-ready {
  opacity: 0;
}

@media (min-width: 1200px) {
  .section-band {
    width: min(1320px, calc(100% - 72px));
  }

  .hero {
    grid-template-columns: minmax(620px, 1.08fr) minmax(420px, 0.92fr);
    gap: clamp(44px, 4vw, 68px);
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero h1 {
    word-break: keep-all;
    overflow-wrap: normal;
  }
}

@media (max-width: 980px) {
  .hero,
  .about,
  .strength,
  .contact {
    grid-template-columns: 1fr;
  }
  .hero { min-height: auto; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .site-header { height: 72px; }
  .brand img {
    width: 56px;
    height: 56px;
  }
  .menu-button { display: block; }
  .site-nav {
    position: fixed;
    top: 72px;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open,
  .site-nav.is-policy { display: flex; }
  .section-band { width: min(100% - 28px, 1160px); }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 248px; }
  .company-table div { grid-template-columns: 1fr; }
  .company-table dt { padding-bottom: 6px; }
  .company-table dd { padding-top: 6px; }
  .contact { padding: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .nav-cta,
  .button,
  .service-card { transition: none; }
  .scroll-progress { display: none; }
}
