:root {
  --ink: #07142b;
  --ink-soft: #26364f;
  --muted: #64748b;
  --blue: #005dcc;
  --blue-2: #0077e6;
  --blue-soft: #e8f2ff;
  --line: #dbe4ef;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --dark: #06152c;
  --shadow: 0 20px 55px rgba(10, 35, 66, 0.14);
  --radius: 8px;
  font-family: "Segoe UI", Meiryo, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  width: 100%;
  border-bottom: 1px solid rgba(219, 228, 239, 0.86);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1280px, calc(100% - 44px));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand img {
  width: 58px;
  height: 54px;
  object-fit: contain;
  object-position: left center;
}

.brand-text {
  display: grid;
  gap: 0;
  line-height: 1;
}

.brand-text strong {
  color: #06234f;
  font-size: 1.54rem;
  letter-spacing: 0.08em;
}

.brand-text span {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.52em;
}

.brand-text small {
  margin-top: 5px;
  color: #06234f;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-menu a {
  position: relative;
  padding: 10px 0;
}

.nav-menu a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width 0.2s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 93, 204, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: #004ca8;
  box-shadow: 0 16px 34px rgba(0, 93, 204, 0.26);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--blue-soft);
}

.btn-small {
  min-height: 44px;
  padding: 0 18px;
  color: #ffffff;
}

.hero {
  position: relative;
  min-height: 760px;
  padding: 142px 0 72px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.93) 47%, rgba(255, 255, 255, 0.54) 100%),
    url("assets/machine-commissioning.jpg") center right / cover no-repeat;
}

.hero-circuit {
  position: absolute;
  inset: 88px 0 0;
  opacity: 0.32;
  background-image:
    linear-gradient(90deg, rgba(0, 93, 204, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(0, 93, 204, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, black, transparent 66%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: 58px;
}

.hero-content {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(2.7rem, 5.2vw, 5rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.28;
}

.hero-copy {
  max-width: 610px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-media {
  padding: 12px;
  border: 1px solid rgba(0, 93, 204, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  max-height: 540px;
  object-fit: contain;
  border-radius: 4px;
}

.trust-strip {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

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

.trust-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: start;
}

.line-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--blue);
  border-radius: 8px;
  color: var(--blue);
  font-size: 1.35rem;
  font-weight: 900;
}

.trust-item h2 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.trust-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 96px 0;
  background: var(--surface);
}

.section-intro {
  background: var(--surface-2);
}

.split-grid,
.contact-grid,
.courses-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 40px;
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.intro-copy {
  padding-top: 8px;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

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

.service-card {
  min-height: 238px;
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 38, 70, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-icon {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--blue);
  font-size: 0.94rem;
  font-weight: 900;
}

.service-card p,
.project-card p,
.contact-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.image-band {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: var(--dark);
}

.image-band img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.05);
}

.image-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 16, 37, 0.86), rgba(3, 16, 37, 0.28));
}

.image-band-content {
  position: absolute;
  z-index: 1;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 54px;
  max-width: 680px;
  color: #ffffff;
}

.image-band-content p {
  margin-bottom: 12px;
  color: #94c8ff;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-band-content h2 {
  color: #ffffff;
}

.project-carousel {
  position: relative;
}

.project-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 8px 18px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.project-grid::-webkit-scrollbar {
  height: 8px;
}

.project-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #b8c7d9;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(15, 38, 70, 0.07);
  scroll-snap-align: start;
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.project-card div {
  padding: 22px;
}

.project-tag {
  margin-bottom: 8px;
  color: var(--blue) !important;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.carousel-button {
  position: absolute;
  z-index: 2;
  top: 112px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(0, 93, 204, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--blue);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 38, 70, 0.16);
  transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-button:hover {
  transform: translateY(-2px);
  background: var(--blue-soft);
}

.carousel-button-prev {
  left: -18px;
}

.carousel-button-next {
  right: -18px;
}

.stats-section {
  padding: 46px 0;
  background:
    linear-gradient(90deg, rgba(0, 93, 204, 0.9), rgba(6, 21, 44, 0.94)),
    url("assets/industrial-automation-hero.png") center / cover no-repeat;
  color: #ffffff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  min-height: 110px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  color: #ffffff;
  font-size: 2.7rem;
  line-height: 1;
}

.stat span {
  color: #d6e9ff;
}

.course-media {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.course-media img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

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

.course {
  min-height: 86px;
  display: flex;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 800;
}

.contact-section {
  background: linear-gradient(180deg, var(--surface-2), #ffffff);
}

.contact-panel {
  padding: 36px;
  border-radius: var(--radius);
  background: var(--dark);
  color: #ffffff;
}

.contact-panel h2 {
  color: #ffffff;
}

.contact-panel p {
  color: #d6e4f7;
}

.contact-note {
  display: grid;
  gap: 4px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.contact-note span {
  color: #9fb4d2;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd6e4;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 93, 204, 0.12);
}

textarea {
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.form-message {
  grid-column: 1 / -1;
  min-height: 24px;
  margin: 0;
  color: var(--blue);
  font-weight: 800;
}

.security-disclaimer {
  margin: 2px 0 4px;
  padding: 14px 16px;
  border: 1px solid #cbd6e4;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: #f8fbff;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  padding: 26px 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--blue);
  font-weight: 800;
}

.footer-links {
  display: grid;
  gap: 2px;
  text-align: right;
}

.footer-links span {
  font-size: 0.86rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .nav-menu {
    gap: 18px;
    font-size: 0.82rem;
  }

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

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

  .hero-media {
    max-width: 720px;
  }
}

@media (max-width: 900px) {
  .nav {
    min-height: 76px;
  }

  .brand img {
    width: 46px;
    height: 44px;
  }

  .brand-text strong {
    font-size: 1.1rem;
  }

  .brand-text span {
    font-size: 0.58rem;
    letter-spacing: 0.38em;
  }

  .brand-text small {
    font-size: 0.62rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    inset: 76px 0 auto;
    display: grid;
    gap: 0;
    padding: 12px 22px 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-120%);
    transition: transform 0.25s ease;
  }

  .nav-menu.is-open {
    transform: translateY(0);
  }

  .nav-menu a {
    padding: 14px 0;
  }

  .nav-menu .btn {
    margin-top: 8px;
  }

  .hero {
    min-height: auto;
    padding-top: 112px;
  }

  .split-grid,
  .contact-grid,
  .courses-layout {
    grid-template-columns: 1fr;
  }

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

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

  .stat:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .container,
  .nav {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    padding-bottom: 54px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84)),
      url("assets/machine-commissioning.jpg") center / cover no-repeat;
  }

  .hero-actions,
  .footer-grid {
    flex-direction: column;
  }

  .footer-links {
    text-align: left;
  }

  .btn {
    width: 100%;
  }

  .trust-grid,
  .service-grid,
  .course-list,
  .stats-grid,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-auto-columns: minmax(260px, 88vw);
    padding-inline: 0;
  }

  .carousel-button {
    display: none;
  }

  .stat,
  .stat:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .section {
    padding: 72px 0;
  }

  .contact-form .full {
    grid-column: auto;
  }

  .image-band img {
    height: 460px;
  }
}
