@import url("https://fonts.googleapis.com/css2?family=Google+Sans+Flex:wght@400;500;600;700;900&family=Noto+Serif+JP:wght@400;500;600;700;900&display=swap");

:root {
  --font-sans: "Google Sans Flex", "Noto Serif JP", "Noto Serif Japanese", Arial, sans-serif;
  --font-serif: "Noto Serif JP", "Noto Serif Japanese", Georgia, serif;
  --color-ink: #33363a;
  --color-muted: #7c8287;
  --color-line: #c9ced2;
  --color-paper: #ffffff;
  --color-soft: #eeeeee;
  --color-panel: #7d7d7d;
  --color-panel-dark: #063657;
  --color-accent: #00a6c8;
  --color-accent-light: #7ccbf5;
  --color-shadow: rgb(0 0 0 / 14%);
  --layout-max: 1180px;
  --section-pad: clamp(56px, 8vw, 110px);
  --header-height: 108px;
  --radius: 0;
  --reveal-distance: 28px;
  --reveal-duration: 900ms;
  --reveal-ease: cubic-bezier(.2, .8, .2, 1);
  --typing-char-duration: 600ms;
  --typing-char-gap: 50ms;
  --typing-ease: cubic-bezier(.77, 0, .175, 1);
  --back-to-top-size: 58px;
  --back-to-top-offset: clamp(18px, 4vw, 38px);
  --back-to-top-bg: rgb(6 54 87 / 92%);
  --back-to-top-color: #ffffff;
  --back-to-top-shadow: 0 12px 30px rgb(0 0 0 / 20%);
  --hero-aspect-ratio: 2000 / 1268;
  --hero-image: url("img/head.jpg");
  --circuit-pattern:
    linear-gradient(120deg, transparent 0 78%, rgb(255 255 255 / 24%) 78% 79%, transparent 79%),
    linear-gradient(60deg, transparent 0 75%, rgb(255 255 255 / 22%) 75% 76%, transparent 76%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-ink);
  background: var(--color-paper);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

.site-header {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(var(--layout-max), calc(100% - 72px));
  margin: 0 auto;
  background: var(--color-paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: clamp(190px, 23vw, 305px);
  height: auto;
}

.site-footer .brand-logo {
  width: clamp(190px, 25vw, 320px);
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 12px);
  grid-auto-rows: 12px;
  gap: 2px;
  flex: 0 0 auto;
}

.mosaic span {
  background: var(--color-panel-dark);
}

.mosaic span:nth-child(1),
.mosaic span:nth-child(2),
.mosaic span:nth-child(3) {
  background: var(--color-accent);
}

.mosaic span:nth-child(4),
.mosaic span:nth-child(8),
.mosaic span:nth-child(12) {
  background: var(--color-accent-light);
}

.mosaic span:nth-child(5),
.mosaic span:nth-child(9) {
  background: #211d1b;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  font-size: 16px;
  font-weight: 600;
  color: #50545a;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-paper);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 19px;
  height: 2px;
  background: var(--color-ink);
  transform: translate(-50%, -50%);
  transition:
    opacity 180ms ease,
    transform 220ms ease;
}

.nav-toggle span:nth-child(1) {
  transform: translate(-50%, calc(-50% - 7px));
}

.nav-toggle span:nth-child(3) {
  transform: translate(-50%, calc(-50% + 7px));
}

.site-header.is-menu-open .nav-toggle span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

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

.site-header.is-menu-open .nav-toggle span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.global-nav a {
  position: relative;
  padding: 8px 0;
}

.global-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--color-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.global-nav a:hover::after,
.global-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: clamp(420px, 56vw, 760px);
  overflow: hidden;
}

.reveal-section {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition:
    opacity var(--reveal-duration) var(--reveal-ease),
    transform var(--reveal-duration) var(--reveal-ease);
  will-change: opacity, transform;
}

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

.text-reveal-title {
  display: inline-flex;
  overflow: hidden;
}

.text-reveal-title .text-reveal-char {
  display: inline-block;
  opacity: var(--text-opacity, 0);
  transition: opacity var(--typing-char-duration) var(--typing-ease);
  transition-delay: calc(var(--char-index) * var(--typing-char-gap));
}

.text-reveal-title.is-active {
  --text-opacity: 1;
}

.back-to-top {
  position: fixed;
  right: var(--back-to-top-offset);
  bottom: var(--back-to-top-offset);
  z-index: 20;
  display: grid;
  place-items: center;
  width: var(--back-to-top-size);
  height: var(--back-to-top-size);
  border: 0;
  border-radius: 50%;
  color: var(--back-to-top-color);
  background: var(--back-to-top-bg);
  box-shadow: var(--back-to-top-shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(.92);
  transition:
    opacity 360ms var(--reveal-ease),
    transform 360ms var(--reveal-ease),
    background-color 180ms ease;
}

.back-to-top::before {
  content: "↑";
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--color-accent);
}

.back-to-top:focus-visible {
  outline: 3px solid rgb(0 166 200 / 30%);
  outline-offset: 4px;
}

.hero::before {
  position: absolute;
  inset: auto auto 0 0;
  width: 44%;
  height: 34%;
  background: linear-gradient(135deg, transparent 0 42%, rgb(7 57 88 / 8%) 42% 43%, transparent 43%),
    linear-gradient(45deg, transparent 0 64%, rgb(7 57 88 / 8%) 64% 65%, transparent 65%);
  content: "";
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: var(--hero-image);
  background-position: center center;
  background-size: cover;
}

.section-inner {
  width: min(var(--layout-max), calc(100% - 72px));
  margin: 0 auto;
}

.section-circuit {
  background-color: var(--color-soft);
  background-image: var(--circuit-pattern);
  background-size: 320px 280px;
}

.about-section {
  padding: var(--section-pad) 0 72px;
  overflow: hidden;
}

.about-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 640px);
  gap: 48px;
  align-items: center;
}

.section-heading {
  grid-column: 1 / -1;
  position: relative;
  margin-bottom: -74px;
}

.ghost-title {
  position: absolute;
  z-index: 0;
  left: 12%;
  top: -88px;
  margin: 0;
  color: rgb(255 255 255 / 72%);
  font-size: clamp(96px, 16vw, 190px);
  line-height: 1;
  font-weight: 800;
}

.section-heading h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #3f4247;
  font-size: clamp(52px, 9vw, 112px);
  font-weight: 300;
  line-height: 1;
}

.company-list {
  position: relative;
  z-index: 1;
  margin: 44px 0 0;
  font-size: 16px;
  lettter-spacing:1px;
}

.company-list div {
  display: grid;
  grid-template-columns: 112px 1fr;
  border-bottom: 1px solid var(--color-line);
  min-height: 2.5em;
  align-items: center;
}

.company-list dt {
    font-weight: 600;
    letter-spacing: 2px;
}

.company-list dd {
  margin: 0;
}

.about-photo {
  margin: 0;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: cover;
  border-radius:30px;
}

.wide-photo img {
  width: 100%;
  height: clamp(260px, 37vw, 455px);
  object-fit: cover;
}

.service-section {
  position: relative;
  padding: 80px 0 88px;
  color: #fff;
  background-image: url("img/service-haikei.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  isolation: isolate;
}

.service-section::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(0 0 0 / 34%);
  content: "";
}

.section-circuit-dark {
  background-image:
    linear-gradient(120deg, transparent 0 77%, rgb(255 255 255 / 12%) 77% 78%, transparent 78%),
    linear-gradient(60deg, transparent 0 72%, rgb(255 255 255 / 10%) 72% 73%, transparent 73%);
}

.service-section.section-circuit-dark {
  background-image: url("img/service-haikei.jpg");
}

.service-intro {
  display: grid;
  grid-template-columns: minmax(320px, 620px) 1fr;
  gap: clamp(34px, 6vw, 86px);
  align-items: center;
}

.service-photo {
  margin: 0;
}

.service-photo img {
  width: 100%;
  aspect-ratio: 1.7;
  object-fit: cover;
  border-radius:30px;
}

.service-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(64px, 10vw, 122px);
  line-height: .9;
  font-weight: 300;
}

.service-copy h3,
.support-card h3 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 31px);
  letter-spacing: 0;
}

.service-copy p,
.service-copy ul {
  margin: 0 0 10px;
  padding-left: 0;
  color: rgb(255 255 255 / 82%);
  font-size: 14px;
  list-style: none;
}

.service-copy li::before {
  content: "・";
}

.service-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 56px);
  margin-top: 60px;
}

.support-card h3 {
  color: #fff;
}

.support-card {
  min-width: 0;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  table-layout: fixed;
  color: #222;
  font-family: var(--font-serif);
  font-size: clamp(13px, 1.4vw, 16px);
  line-height: 1.45;
}

th,
td {
  vertical-align: top;
  background: #fff;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

th {
  width: 124px;
  color: #fff;
  text-align: center;
  background: var(--color-panel-dark);
  white-space: nowrap;
  border-radius:4px 0 0 4px;
}
td {
  border-radius:0 4px 4px 0;
}

td ul {
  margin: 0;
  padding-left: 1.1em;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: min(1030px, calc(100% - 72px));
  margin: 0 auto;
  padding: 36px 0 44px;
}

.footer-brand address {
  margin-top: 14px;
  color: #4d4d4d;
  font-family: var(--font-serif);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.contact-button {
    display: grid;
    place-items: center;
    min-width: min(100%, 510px);
    min-height: 82px;
    border: 1px solid #b9b9b9;
    color: #5b5b61;
    padding: 1em 0;
    border-radius: 7px;
    letter-spacing: 3px;
}

.contact-button span {
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1;
}

.contact-button small {
  color: #8a8a8a;
  font-size: 14px;
}

.footer-no-cta {
  justify-content: flex-start;
}

.subpage {
  min-height: calc(100vh - var(--header-height) - 118px);
}

.page-hero {
  padding: clamp(70px, 12vw, 130px) 0;
}

.page-hero-dark {
  color: #fff;
  background-color: var(--color-panel);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-accent);
  font-weight: 800;
}

.page-hero-dark .eyebrow {
  color: #c9f2ff;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(58px, 10vw, 128px);
  line-height: 1;
  font-weight: 300;
}

.two-column-page{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(34px, 7vw, 84px);
  align-items: start;
  padding: clamp(56px, 8vw, 94px) 0;
}

.two-column-page h2,
.contact-layout h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.25;
}

.contact-layout {
    width: min(100%, 900px);
    padding: clamp(56px, 8vw, 94px) 0;
}

.page-image {
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: cover;
}

.company-list-page {
  margin-top: 32px;
}

.mini-service-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.mini-service-grid section {
  border-left: 5px solid var(--color-accent);
  padding-left: 18px;
}

.mini-service-grid h3 {
  margin: 0 0 4px;
}

.mini-service-grid p {
  margin: 0;
  color: var(--color-muted);
}

.contact-panel {
  display: grid;
  gap: 12px;
  padding: 30px;
  border: 1px solid var(--color-line);
  border-radius:10px;
  font-style: normal;
  text-align:center;
  color: var(--color-panel-dark);
  margin-top: 3em;
}

.contact-panel strong {
  font-size: 22px;
}
.contact-panel a{font-size:2em}

/*-----------------------------------*/
/*contact form*/

.contact-lead {
  display: grid;
  gap: 22px;
  max-width: 820px;
}

.contact-lead p {
  margin: 0;
  color: var(--color-muted);
}

.contact-form {
  display: grid;
  gap: 22px;
  width: min(100%, 900px);
  margin: 0 auto;
}

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

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

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--color-ink);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 14px 15px;
  color: var(--color-ink);
  background: #fff;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-accent);
  outline: 3px solid rgb(0 166 200 / 18%);
}

.form-submit {
  justify-self: start;
  min-width: 210px;
  min-height: 56px;
  border: 0;
  color: #fff;
  background: var(--color-panel-dark);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms ease;
  margin: 0 auto;
}

.form-submit:hover,
.form-submit:focus-visible {
  background: var(--color-accent);
}

.form-submit:disabled {
  cursor: progress;
  opacity: .64;
}


.form-message {
  display: grid;
  gap: 24px;
  width: min(100%, 760px);
  padding: 34px;
  background: #fff;
}

.form-message p {
  margin: 0;
  white-space: pre-line;
}

.form-message-success {
  border-left: 6px solid var(--color-accent);
}

.form-message-error {
  border-left: 6px solid #b73535;
}

.form-message-link {
  display: grid;
  place-items: center;
  text-align: center;
}

@media (max-width: 980px) {
  :root {
    --header-height: auto;
  }

  .site-header {
    width: min(100% - 36px, var(--layout-max));
    min-height: 86px;
    position: relative;
    align-items: center;
    flex-direction: row;
    padding: 18px 0;
  }

  .nav-toggle {
    display: grid;
    margin-left: auto;
  }

  .global-nav {
    position: absolute;
    top: calc(100% - 8px);
    left: 0;
    right: 0;
    z-index: 30;
    display: grid;
    width: 100%;
    gap: 0;
    padding: 12px 0;
    border: 1px solid var(--color-line);
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 18px 40px rgb(0 0 0 / 12%);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 220ms ease,
      transform 220ms ease;
  }

  .site-header.is-menu-open .global-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .global-nav a {
    padding: 14px 22px;
    font-size: 14px;
  }

  .global-nav a::after {
    left: 22px;
    right: 22px;
    bottom: 8px;
  }

  .hero {
    min-height: 0;
    aspect-ratio: var(--hero-aspect-ratio);
  }

  .hero-media {
    background-position: center top;
    background-repeat: no-repeat;
    background-size: contain;
  }

  .section-inner,
  .site-footer {
    width: min(100% - 36px, var(--layout-max));
  }

  .about-grid,
  .service-intro,
  .service-tables,
  .two-column-page,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .section-heading {
    margin-bottom: 0;
  }

  .ghost-title {
    left: 0;
    top: -44px;
    max-width: 100%;
  }

  .company-list {
    margin-top: 24px;
  }

  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

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


}

@media (max-width: 520px) {
  .brand-logo {
    width: min(70vw, 245px);
  }

  .company-list div {
    grid-template-columns: 84px 1fr;
    gap: 10px;
  }

  th,
  td {
    display: block;
    width: 100%;
  }

  td ul {
    padding-left: 1em;
  }

  th {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .text-reveal-title .text-reveal-char {
    opacity: 1;
    transition: none;
  }

  .back-to-top {
    transition: none;
  }
}
